Skip to content

Commit a44a847

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 041b29a of spec repo
1 parent e40cee5 commit a44a847

17 files changed

Lines changed: 1461 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2397,6 +2397,158 @@ components:
23972397
type: string
23982398
x-enum-varnames:
23992399
- CCM_CONFIG
2400+
AWSCcmConfigValidationIssue:
2401+
description: A single validation issue found while validating an AWS Cost and Usage Report (CUR) 2.0 configuration.
2402+
properties:
2403+
code:
2404+
$ref: "#/components/schemas/AWSCcmConfigValidationIssueCode"
2405+
description:
2406+
description: Human-readable description of the validation issue.
2407+
example: 'no CUR 2.0 export named "cost-and-usage-report" found'
2408+
type: string
2409+
required:
2410+
- code
2411+
- description
2412+
type: object
2413+
AWSCcmConfigValidationIssueCode:
2414+
description: Identifies the specific reason a Cost and Usage Report (CUR) 2.0 configuration failed validation.
2415+
enum:
2416+
- ISSUE_CODE_UNSPECIFIED
2417+
- CREDENTIAL_ERROR
2418+
- BUCKET_NAME_INVALID_GOVCLOUD
2419+
- S3_LIST_PERMISSION_MISSING
2420+
- S3_GET_PERMISSION_MISSING
2421+
- S3_BUCKET_REGION_MISMATCH
2422+
- S3_BUCKET_NOT_ACCESSIBLE
2423+
- EXPORT_LIST_PERMISSION_MISSING
2424+
- EXPORT_GET_PERMISSION_MISSING
2425+
- EXPORT_NOT_FOUND
2426+
- EXPORT_STATUS_UNHEALTHY
2427+
- TIME_GRANULARITY_INVALID
2428+
- FILE_FORMAT_INVALID
2429+
- INCLUDE_RESOURCES_DISABLED
2430+
- REFRESH_CADENCE_INVALID
2431+
- OVERWRITE_MODE_INVALID
2432+
- QUERY_STATEMENT_INVALID
2433+
example: "EXPORT_NOT_FOUND"
2434+
type: string
2435+
x-enum-varnames:
2436+
- ISSUE_CODE_UNSPECIFIED
2437+
- CREDENTIAL_ERROR
2438+
- BUCKET_NAME_INVALID_GOVCLOUD
2439+
- S3_LIST_PERMISSION_MISSING
2440+
- S3_GET_PERMISSION_MISSING
2441+
- S3_BUCKET_REGION_MISMATCH
2442+
- S3_BUCKET_NOT_ACCESSIBLE
2443+
- EXPORT_LIST_PERMISSION_MISSING
2444+
- EXPORT_GET_PERMISSION_MISSING
2445+
- EXPORT_NOT_FOUND
2446+
- EXPORT_STATUS_UNHEALTHY
2447+
- TIME_GRANULARITY_INVALID
2448+
- FILE_FORMAT_INVALID
2449+
- INCLUDE_RESOURCES_DISABLED
2450+
- REFRESH_CADENCE_INVALID
2451+
- OVERWRITE_MODE_INVALID
2452+
- QUERY_STATEMENT_INVALID
2453+
AWSCcmConfigValidationIssues:
2454+
description: List of validation issues found for the Cost and Usage Report (CUR) 2.0 configuration. Empty when the configuration is valid.
2455+
items:
2456+
$ref: "#/components/schemas/AWSCcmConfigValidationIssue"
2457+
type: array
2458+
AWSCcmConfigValidationRequest:
2459+
description: AWS CCM config validation request body.
2460+
properties:
2461+
data:
2462+
$ref: "#/components/schemas/AWSCcmConfigValidationRequestData"
2463+
required:
2464+
- data
2465+
type: object
2466+
AWSCcmConfigValidationRequestAttributes:
2467+
description: Attributes for an AWS CCM config validation request.
2468+
properties:
2469+
account_id:
2470+
description: Your AWS Account ID without dashes.
2471+
example: "123456789012"
2472+
type: string
2473+
bucket_name:
2474+
description: Name of the S3 bucket where the Cost and Usage Report is stored.
2475+
example: "billing"
2476+
type: string
2477+
bucket_region:
2478+
description: AWS region of the S3 bucket.
2479+
example: "us-east-1"
2480+
type: string
2481+
report_name:
2482+
description: Name of the Cost and Usage Report.
2483+
example: "cost-and-usage-report"
2484+
type: string
2485+
report_prefix:
2486+
description: S3 prefix where the Cost and Usage Report is stored.
2487+
example: "reports"
2488+
type: string
2489+
required:
2490+
- account_id
2491+
- bucket_name
2492+
- bucket_region
2493+
- report_name
2494+
type: object
2495+
AWSCcmConfigValidationRequestData:
2496+
description: AWS CCM config validation request data.
2497+
properties:
2498+
attributes:
2499+
$ref: "#/components/schemas/AWSCcmConfigValidationRequestAttributes"
2500+
type:
2501+
$ref: "#/components/schemas/AWSCcmConfigValidationType"
2502+
required:
2503+
- attributes
2504+
- type
2505+
type: object
2506+
AWSCcmConfigValidationResponse:
2507+
description: AWS CCM config validation response body.
2508+
properties:
2509+
data:
2510+
$ref: "#/components/schemas/AWSCcmConfigValidationResponseData"
2511+
required:
2512+
- data
2513+
type: object
2514+
AWSCcmConfigValidationResponseAttributes:
2515+
description: Attributes for an AWS CCM config validation response.
2516+
properties:
2517+
account_id:
2518+
description: Your AWS Account ID without dashes.
2519+
example: "123456789012"
2520+
type: string
2521+
issues:
2522+
$ref: "#/components/schemas/AWSCcmConfigValidationIssues"
2523+
required:
2524+
- account_id
2525+
- issues
2526+
type: object
2527+
AWSCcmConfigValidationResponseData:
2528+
description: AWS CCM config validation response data.
2529+
properties:
2530+
attributes:
2531+
$ref: "#/components/schemas/AWSCcmConfigValidationResponseAttributes"
2532+
id:
2533+
description: AWS CCM config validation resource identifier.
2534+
example: "ccm_config_validation"
2535+
type: string
2536+
type:
2537+
$ref: "#/components/schemas/AWSCcmConfigValidationType"
2538+
required:
2539+
- attributes
2540+
- id
2541+
- type
2542+
type: object
2543+
AWSCcmConfigValidationType:
2544+
default: "ccm_config_validation"
2545+
description: AWS CCM config validation resource type.
2546+
enum:
2547+
- ccm_config_validation
2548+
example: "ccm_config_validation"
2549+
type: string
2550+
x-enum-varnames:
2551+
- CCM_CONFIG_VALIDATION
24002552
AWSCloudAuthPersonaMappingAttributesResponse:
24012553
description: Attributes for AWS cloud authentication persona mapping response
24022554
properties:
@@ -116331,6 +116483,76 @@ paths:
116331116483
operator: OR
116332116484
permissions:
116333116485
- aws_configuration_read
116486+
/api/v2/integration/aws/validate_ccm_config:
116487+
post:
116488+
description: |-
116489+
Validate a Cloud Cost Management config for an AWS account using Cost and Usage Report
116490+
(CUR) 2.0 against Datadog's ingest requirements without persisting it.
116491+
operationId: ValidateAWSCCMConfig
116492+
requestBody:
116493+
content:
116494+
application/json:
116495+
examples:
116496+
default:
116497+
value:
116498+
data:
116499+
attributes:
116500+
account_id: "123456789012"
116501+
bucket_name: billing
116502+
bucket_region: us-east-1
116503+
report_name: cost-and-usage-report
116504+
report_prefix: reports
116505+
type: ccm_config_validation
116506+
schema:
116507+
$ref: "#/components/schemas/AWSCcmConfigValidationRequest"
116508+
description: Validate a Cloud Cost Management config for an AWS account integration config.
116509+
required: true
116510+
responses:
116511+
"200":
116512+
content:
116513+
application/json:
116514+
examples:
116515+
default:
116516+
value:
116517+
data:
116518+
attributes:
116519+
account_id: "123456789012"
116520+
issues:
116521+
- code: EXPORT_NOT_FOUND
116522+
description: 'no CUR 2.0 export named "cost-and-usage-report" found'
116523+
id: ccm_config_validation
116524+
type: ccm_config_validation
116525+
schema:
116526+
$ref: "#/components/schemas/AWSCcmConfigValidationResponse"
116527+
description: AWS CCM Config validation result
116528+
"400":
116529+
content:
116530+
application/json:
116531+
schema:
116532+
$ref: "#/components/schemas/JSONAPIErrorResponse"
116533+
description: Bad Request
116534+
"403":
116535+
$ref: "#/components/responses/ForbiddenResponse"
116536+
"429":
116537+
$ref: "#/components/responses/TooManyRequestsResponse"
116538+
"503":
116539+
content:
116540+
application/json:
116541+
schema:
116542+
$ref: "#/components/schemas/JSONAPIErrorResponse"
116543+
description: Service Unavailable
116544+
summary: Validate AWS CCM config
116545+
tags:
116546+
- AWS Integration
116547+
x-codegen-request-body-name: body
116548+
"x-permission":
116549+
operator: OR
116550+
permissions:
116551+
- cloud_cost_management_read
116552+
- cloud_cost_management_write
116553+
x-unstable: |-
116554+
**Note**: This endpoint is in Preview and may be subject to change.
116555+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
116334116556
/api/v2/integration/gcp/accounts:
116335116557
get:
116336116558
description: List all GCP STS-enabled service accounts configured in your Datadog account.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Validate AWS CCM config returns "AWS CCM Config validation result" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.validate_awsccm_config".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::AWSIntegrationAPI.new
8+
9+
body = DatadogAPIClient::V2::AWSCcmConfigValidationRequest.new({
10+
data: DatadogAPIClient::V2::AWSCcmConfigValidationRequestData.new({
11+
attributes: DatadogAPIClient::V2::AWSCcmConfigValidationRequestAttributes.new({
12+
account_id: "123456789012",
13+
bucket_name: "billing",
14+
bucket_region: "us-east-1",
15+
report_name: "cost-and-usage-report",
16+
report_prefix: "reports",
17+
}),
18+
type: DatadogAPIClient::V2::AWSCcmConfigValidationType::CCM_CONFIG_VALIDATION,
19+
}),
20+
})
21+
p api_instance.validate_awsccm_config(body)

features/scenarios_model_mapping.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3126,6 +3126,9 @@
31263126
"v2.CreateAWSEventBridgeSource" => {
31273127
"body" => "AWSEventBridgeCreateRequest",
31283128
},
3129+
"v2.ValidateAWSCCMConfig" => {
3130+
"body" => "AWSCcmConfigValidationRequest",
3131+
},
31293132
"v2.CreateGCPSTSAccount" => {
31303133
"body" => "GCPSTSServiceAccountCreateRequest",
31313134
},

features/v2/aws_integration.feature

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,3 +292,19 @@ Feature: AWS Integration
292292
And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "123456789012", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}, "sources": ["s3"]}}, "metrics_config": {"automute_enabled": true, "collect_cloudwatch_alarms": true, "collect_custom_metrics": true, "enabled": true, "tag_filters": [{"namespace": "AWS/EC2", "tags": ["key:value"]}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}}
293293
When the request is sent
294294
Then the response status is 404 Not Found
295+
296+
@generated @skip @team:DataDog/aws-integrations
297+
Scenario: Validate AWS CCM config returns "AWS CCM Config validation result" response
298+
Given operation "ValidateAWSCCMConfig" enabled
299+
And new "ValidateAWSCCMConfig" request
300+
And body with value {"data": {"attributes": {"account_id": "123456789012", "bucket_name": "billing", "bucket_region": "us-east-1", "report_name": "cost-and-usage-report", "report_prefix": "reports"}, "type": "ccm_config_validation"}}
301+
When the request is sent
302+
Then the response status is 200 AWS CCM Config validation result
303+
304+
@generated @skip @team:DataDog/aws-integrations
305+
Scenario: Validate AWS CCM config returns "Bad Request" response
306+
Given operation "ValidateAWSCCMConfig" enabled
307+
And new "ValidateAWSCCMConfig" request
308+
And body with value {"data": {"attributes": {"account_id": "123456789012", "bucket_name": "billing", "bucket_region": "us-east-1", "report_name": "cost-and-usage-report", "report_prefix": "reports"}, "type": "ccm_config_validation"}}
309+
When the request is sent
310+
Then the response status is 400 Bad Request

features/v2/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3066,6 +3066,12 @@
30663066
"type": "safe"
30673067
}
30683068
},
3069+
"ValidateAWSCCMConfig": {
3070+
"tag": "AWS Integration",
3071+
"undo": {
3072+
"type": "safe"
3073+
}
3074+
},
30693075
"ListGCPSTSAccounts": {
30703076
"tag": "GCP Integration",
30713077
"undo": {

lib/datadog_api_client/configuration.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ def initialize
437437
"v2.delete_aws_account_ccm_config": false,
438438
"v2.get_aws_account_ccm_config": false,
439439
"v2.update_aws_account_ccm_config": false,
440+
"v2.validate_awsccm_config": false,
440441
"v2.create_jira_issue_template": false,
441442
"v2.delete_jira_account": false,
442443
"v2.delete_jira_issue_template": false,

lib/datadog_api_client/inflector.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,6 +1437,15 @@ def overrides
14371437
"v2.aws_ccm_config_response_attributes" => "AWSCcmConfigResponseAttributes",
14381438
"v2.aws_ccm_config_response_data" => "AWSCcmConfigResponseData",
14391439
"v2.aws_ccm_config_type" => "AWSCcmConfigType",
1440+
"v2.aws_ccm_config_validation_issue" => "AWSCcmConfigValidationIssue",
1441+
"v2.aws_ccm_config_validation_issue_code" => "AWSCcmConfigValidationIssueCode",
1442+
"v2.aws_ccm_config_validation_request" => "AWSCcmConfigValidationRequest",
1443+
"v2.aws_ccm_config_validation_request_attributes" => "AWSCcmConfigValidationRequestAttributes",
1444+
"v2.aws_ccm_config_validation_request_data" => "AWSCcmConfigValidationRequestData",
1445+
"v2.aws_ccm_config_validation_response" => "AWSCcmConfigValidationResponse",
1446+
"v2.aws_ccm_config_validation_response_attributes" => "AWSCcmConfigValidationResponseAttributes",
1447+
"v2.aws_ccm_config_validation_response_data" => "AWSCcmConfigValidationResponseData",
1448+
"v2.aws_ccm_config_validation_type" => "AWSCcmConfigValidationType",
14401449
"v2.aws_cloud_auth_persona_mapping_attributes_response" => "AWSCloudAuthPersonaMappingAttributesResponse",
14411450
"v2.aws_cloud_auth_persona_mapping_create_attributes" => "AWSCloudAuthPersonaMappingCreateAttributes",
14421451
"v2.aws_cloud_auth_persona_mapping_create_data" => "AWSCloudAuthPersonaMappingCreateData",

0 commit comments

Comments
 (0)