Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete api/v2/cost/aws_related_accounts from spec #2754

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-10-31 16:03:50.739325",
"spec_repo_commit": "a11da7b5"
"regenerated": "2024-10-31 16:41:34.289382",
"spec_repo_commit": "63c441b2"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-10-31 16:03:50.758646",
"spec_repo_commit": "a11da7b5"
"regenerated": "2024-10-31 16:41:34.307754",
"spec_repo_commit": "63c441b2"
}
}
}
90 changes: 0 additions & 90 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -976,49 +976,6 @@ components:
type: string
x-enum-varnames:
- API_KEYS
AWSRelatedAccount:
description: AWS related account.
properties:
attributes:
$ref: '#/components/schemas/AWSRelatedAccountAttributes'
id:
description: The AWS account ID.
example: '123456789123'
type: string
type:
$ref: '#/components/schemas/AWSRelatedAccountType'
required:
- id
- type
type: object
AWSRelatedAccountAttributes:
description: Attributes for an AWS related account.
properties:
has_datadog_integration:
description: Whether or not the AWS account has a Datadog integration.
type: boolean
name:
description: The name of the AWS account.
type: string
type: object
AWSRelatedAccountType:
default: aws_account
description: Type of AWS related account.
enum:
- aws_account
example: aws_account
type: string
x-enum-varnames:
- AWS_ACCOUNT
AWSRelatedAccountsResponse:
description: List of AWS related accounts.
properties:
data:
description: An AWS related account.
items:
$ref: '#/components/schemas/AWSRelatedAccount'
type: array
type: object
ActiveBillingDimensionsAttributes:
description: List of active billing dimensions.
properties:
Expand Down Expand Up @@ -28974,53 +28931,6 @@ paths:
operator: OR
permissions:
- cloud_cost_management_write
/api/v2/cost/aws_related_accounts:
get:
deprecated: true
description: List the AWS accounts in an organization by calling 'organizations:ListAccounts'
from the specified management account.
operationId: ListAWSRelatedAccounts
parameters:
- description: The ID of the management account to filter by.
example: '123456789123'
in: query
name: filter[management_account_id]
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AWSRelatedAccountsResponse'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Bad Request
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Forbidden
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- cloud_cost_management_read
summary: List related AWS accounts
tags:
- Cloud Cost Management
x-permission:
operator: OR
permissions:
- cloud_cost_management_read
/api/v2/cost/azure_uc_config:
get:
description: List the Azure configs.
Expand Down
73 changes: 0 additions & 73 deletions api/datadogV2/api_cloud_cost_management.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,79 +486,6 @@ func (a *CloudCostManagementApi) GetCustomCostsFile(ctx _context.Context, fileId
return localVarReturnValue, localVarHTTPResponse, nil
}

// ListAWSRelatedAccounts List related AWS accounts.
// List the AWS accounts in an organization by calling 'organizations:ListAccounts' from the specified management account.
//
// Deprecated: This API is deprecated.
func (a *CloudCostManagementApi) ListAWSRelatedAccounts(ctx _context.Context, filterManagementAccountId string) (AWSRelatedAccountsResponse, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarReturnValue AWSRelatedAccountsResponse
)

localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CloudCostManagementApi.ListAWSRelatedAccounts")
if err != nil {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
}

localVarPath := localBasePath + "/api/v2/cost/aws_related_accounts"

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams.Add("filter[management_account_id]", datadog.ParameterToString(filterManagementAccountId, ""))
localVarHeaderParams["Accept"] = "application/json"

datadog.SetAuthKeys(
ctx,
&localVarHeaderParams,
[2]string{"apiKeyAuth", "DD-API-KEY"},
[2]string{"appKeyAuth", "DD-APPLICATION-KEY"},
)
req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil)
if err != nil {
return localVarReturnValue, nil, err
}

localVarHTTPResponse, err := a.Client.CallAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}

localVarBody, err := datadog.ReadBody(localVarHTTPResponse)
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}

if localVarHTTPResponse.StatusCode >= 300 {
newErr := datadog.GenericOpenAPIError{
ErrorBody: localVarBody,
ErrorMessage: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 429 {
var v APIErrorResponse
err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.ErrorModel = v
}
return localVarReturnValue, localVarHTTPResponse, newErr
}

err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := datadog.GenericOpenAPIError{
ErrorBody: localVarBody,
ErrorMessage: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}

return localVarReturnValue, localVarHTTPResponse, nil
}

// ListCostAWSCURConfigs List Cloud Cost Management AWS CUR configs.
// List the AWS CUR configs.
func (a *CloudCostManagementApi) ListCostAWSCURConfigs(ctx _context.Context) (AwsCURConfigsResponse, *_nethttp.Response, error) {
Expand Down
1 change: 0 additions & 1 deletion api/datadogV2/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
// - [CloudCostManagementApi.DeleteCustomCostsFile]
// - [CloudCostManagementApi.GetCloudCostActivity]
// - [CloudCostManagementApi.GetCustomCostsFile]
// - [CloudCostManagementApi.ListAWSRelatedAccounts]
// - [CloudCostManagementApi.ListCostAWSCURConfigs]
// - [CloudCostManagementApi.ListCostAzureUCConfigs]
// - [CloudCostManagementApi.ListCustomCostsFiles]
Expand Down
183 changes: 0 additions & 183 deletions api/datadogV2/model_aws_related_account.go

This file was deleted.

Loading
Loading