Skip to content

Commit 01ab389

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 60ad0ae of spec repo (DataDog#3362)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent f24904e commit 01ab389

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
@@ -2700,6 +2700,158 @@ components:
27002700
type: string
27012701
x-enum-varnames:
27022702
- CCM_CONFIG
2703+
AWSCcmConfigValidationIssue:
2704+
description: A single validation issue found while validating an AWS Cost and Usage Report (CUR) 2.0 configuration.
2705+
properties:
2706+
code:
2707+
$ref: "#/components/schemas/AWSCcmConfigValidationIssueCode"
2708+
description:
2709+
description: Human-readable description of the validation issue.
2710+
example: 'no CUR 2.0 export named "cost-and-usage-report" found'
2711+
type: string
2712+
required:
2713+
- code
2714+
- description
2715+
type: object
2716+
AWSCcmConfigValidationIssueCode:
2717+
description: Identifies the specific reason a Cost and Usage Report (CUR) 2.0 configuration failed validation.
2718+
enum:
2719+
- ISSUE_CODE_UNSPECIFIED
2720+
- CREDENTIAL_ERROR
2721+
- BUCKET_NAME_INVALID_GOVCLOUD
2722+
- S3_LIST_PERMISSION_MISSING
2723+
- S3_GET_PERMISSION_MISSING
2724+
- S3_BUCKET_REGION_MISMATCH
2725+
- S3_BUCKET_NOT_ACCESSIBLE
2726+
- EXPORT_LIST_PERMISSION_MISSING
2727+
- EXPORT_GET_PERMISSION_MISSING
2728+
- EXPORT_NOT_FOUND
2729+
- EXPORT_STATUS_UNHEALTHY
2730+
- TIME_GRANULARITY_INVALID
2731+
- FILE_FORMAT_INVALID
2732+
- INCLUDE_RESOURCES_DISABLED
2733+
- REFRESH_CADENCE_INVALID
2734+
- OVERWRITE_MODE_INVALID
2735+
- QUERY_STATEMENT_INVALID
2736+
example: "EXPORT_NOT_FOUND"
2737+
type: string
2738+
x-enum-varnames:
2739+
- ISSUE_CODE_UNSPECIFIED
2740+
- CREDENTIAL_ERROR
2741+
- BUCKET_NAME_INVALID_GOVCLOUD
2742+
- S3_LIST_PERMISSION_MISSING
2743+
- S3_GET_PERMISSION_MISSING
2744+
- S3_BUCKET_REGION_MISMATCH
2745+
- S3_BUCKET_NOT_ACCESSIBLE
2746+
- EXPORT_LIST_PERMISSION_MISSING
2747+
- EXPORT_GET_PERMISSION_MISSING
2748+
- EXPORT_NOT_FOUND
2749+
- EXPORT_STATUS_UNHEALTHY
2750+
- TIME_GRANULARITY_INVALID
2751+
- FILE_FORMAT_INVALID
2752+
- INCLUDE_RESOURCES_DISABLED
2753+
- REFRESH_CADENCE_INVALID
2754+
- OVERWRITE_MODE_INVALID
2755+
- QUERY_STATEMENT_INVALID
2756+
AWSCcmConfigValidationIssues:
2757+
description: List of validation issues found for the Cost and Usage Report (CUR) 2.0 configuration. Empty when the configuration is valid.
2758+
items:
2759+
$ref: "#/components/schemas/AWSCcmConfigValidationIssue"
2760+
type: array
2761+
AWSCcmConfigValidationRequest:
2762+
description: AWS CCM config validation request body.
2763+
properties:
2764+
data:
2765+
$ref: "#/components/schemas/AWSCcmConfigValidationRequestData"
2766+
required:
2767+
- data
2768+
type: object
2769+
AWSCcmConfigValidationRequestAttributes:
2770+
description: Attributes for an AWS CCM config validation request.
2771+
properties:
2772+
account_id:
2773+
description: Your AWS Account ID without dashes.
2774+
example: "123456789012"
2775+
type: string
2776+
bucket_name:
2777+
description: Name of the S3 bucket where the Cost and Usage Report is stored.
2778+
example: "billing"
2779+
type: string
2780+
bucket_region:
2781+
description: AWS region of the S3 bucket.
2782+
example: "us-east-1"
2783+
type: string
2784+
report_name:
2785+
description: Name of the Cost and Usage Report.
2786+
example: "cost-and-usage-report"
2787+
type: string
2788+
report_prefix:
2789+
description: S3 prefix where the Cost and Usage Report is stored.
2790+
example: "reports"
2791+
type: string
2792+
required:
2793+
- account_id
2794+
- bucket_name
2795+
- bucket_region
2796+
- report_name
2797+
type: object
2798+
AWSCcmConfigValidationRequestData:
2799+
description: AWS CCM config validation request data.
2800+
properties:
2801+
attributes:
2802+
$ref: "#/components/schemas/AWSCcmConfigValidationRequestAttributes"
2803+
type:
2804+
$ref: "#/components/schemas/AWSCcmConfigValidationType"
2805+
required:
2806+
- attributes
2807+
- type
2808+
type: object
2809+
AWSCcmConfigValidationResponse:
2810+
description: AWS CCM config validation response body.
2811+
properties:
2812+
data:
2813+
$ref: "#/components/schemas/AWSCcmConfigValidationResponseData"
2814+
required:
2815+
- data
2816+
type: object
2817+
AWSCcmConfigValidationResponseAttributes:
2818+
description: Attributes for an AWS CCM config validation response.
2819+
properties:
2820+
account_id:
2821+
description: Your AWS Account ID without dashes.
2822+
example: "123456789012"
2823+
type: string
2824+
issues:
2825+
$ref: "#/components/schemas/AWSCcmConfigValidationIssues"
2826+
required:
2827+
- account_id
2828+
- issues
2829+
type: object
2830+
AWSCcmConfigValidationResponseData:
2831+
description: AWS CCM config validation response data.
2832+
properties:
2833+
attributes:
2834+
$ref: "#/components/schemas/AWSCcmConfigValidationResponseAttributes"
2835+
id:
2836+
description: AWS CCM config validation resource identifier.
2837+
example: "ccm_config_validation"
2838+
type: string
2839+
type:
2840+
$ref: "#/components/schemas/AWSCcmConfigValidationType"
2841+
required:
2842+
- attributes
2843+
- id
2844+
- type
2845+
type: object
2846+
AWSCcmConfigValidationType:
2847+
default: "ccm_config_validation"
2848+
description: AWS CCM config validation resource type.
2849+
enum:
2850+
- ccm_config_validation
2851+
example: "ccm_config_validation"
2852+
type: string
2853+
x-enum-varnames:
2854+
- CCM_CONFIG_VALIDATION
27032855
AWSCloudAuthPersonaMappingAttributesResponse:
27042856
description: Attributes for AWS cloud authentication persona mapping response
27052857
properties:
@@ -128868,6 +129020,76 @@ paths:
128868129020
operator: OR
128869129021
permissions:
128870129022
- aws_configuration_read
129023+
/api/v2/integration/aws/validate_ccm_config:
129024+
post:
129025+
description: |-
129026+
Validate a Cloud Cost Management config for an AWS account using Cost and Usage Report
129027+
(CUR) 2.0 against Datadog's ingest requirements without persisting it.
129028+
operationId: ValidateAWSCCMConfig
129029+
requestBody:
129030+
content:
129031+
application/json:
129032+
examples:
129033+
default:
129034+
value:
129035+
data:
129036+
attributes:
129037+
account_id: "123456789012"
129038+
bucket_name: billing
129039+
bucket_region: us-east-1
129040+
report_name: cost-and-usage-report
129041+
report_prefix: reports
129042+
type: ccm_config_validation
129043+
schema:
129044+
$ref: "#/components/schemas/AWSCcmConfigValidationRequest"
129045+
description: Validate a Cloud Cost Management config for an AWS account integration config.
129046+
required: true
129047+
responses:
129048+
"200":
129049+
content:
129050+
application/json:
129051+
examples:
129052+
default:
129053+
value:
129054+
data:
129055+
attributes:
129056+
account_id: "123456789012"
129057+
issues:
129058+
- code: EXPORT_NOT_FOUND
129059+
description: 'no CUR 2.0 export named "cost-and-usage-report" found'
129060+
id: ccm_config_validation
129061+
type: ccm_config_validation
129062+
schema:
129063+
$ref: "#/components/schemas/AWSCcmConfigValidationResponse"
129064+
description: AWS CCM Config validation result
129065+
"400":
129066+
content:
129067+
application/json:
129068+
schema:
129069+
$ref: "#/components/schemas/JSONAPIErrorResponse"
129070+
description: Bad Request
129071+
"403":
129072+
$ref: "#/components/responses/ForbiddenResponse"
129073+
"429":
129074+
$ref: "#/components/responses/TooManyRequestsResponse"
129075+
"503":
129076+
content:
129077+
application/json:
129078+
schema:
129079+
$ref: "#/components/schemas/JSONAPIErrorResponse"
129080+
description: Service Unavailable
129081+
summary: Validate AWS CCM config
129082+
tags:
129083+
- AWS Integration
129084+
x-codegen-request-body-name: body
129085+
"x-permission":
129086+
operator: OR
129087+
permissions:
129088+
- cloud_cost_management_read
129089+
- cloud_cost_management_write
129090+
x-unstable: |-
129091+
**Note**: This endpoint is in Preview and may be subject to change.
129092+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
128871129093
/api/v2/integration/gcp/accounts:
128872129094
get:
128873129095
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
@@ -3394,6 +3394,9 @@
33943394
"v2.CreateAWSEventBridgeSource" => {
33953395
"body" => "AWSEventBridgeCreateRequest",
33963396
},
3397+
"v2.ValidateAWSCCMConfig" => {
3398+
"body" => "AWSCcmConfigValidationRequest",
3399+
},
33973400
"v2.CreateGCPSTSAccount" => {
33983401
"body" => "GCPSTSServiceAccountCreateRequest",
33993402
},

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
@@ -3193,6 +3193,12 @@
31933193
"type": "safe"
31943194
}
31953195
},
3196+
"ValidateAWSCCMConfig": {
3197+
"tag": "AWS Integration",
3198+
"undo": {
3199+
"type": "safe"
3200+
}
3201+
},
31963202
"ListGCPSTSAccounts": {
31973203
"tag": "GCP Integration",
31983204
"undo": {

lib/datadog_api_client/configuration.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,7 @@ def initialize
494494
"v2.delete_aws_account_ccm_config": false,
495495
"v2.get_aws_account_ccm_config": false,
496496
"v2.update_aws_account_ccm_config": false,
497+
"v2.validate_awsccm_config": false,
497498
"v2.create_jira_issue_template": false,
498499
"v2.delete_jira_account": false,
499500
"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
@@ -1594,6 +1594,15 @@ def overrides
15941594
"v2.aws_ccm_config_response_attributes" => "AWSCcmConfigResponseAttributes",
15951595
"v2.aws_ccm_config_response_data" => "AWSCcmConfigResponseData",
15961596
"v2.aws_ccm_config_type" => "AWSCcmConfigType",
1597+
"v2.aws_ccm_config_validation_issue" => "AWSCcmConfigValidationIssue",
1598+
"v2.aws_ccm_config_validation_issue_code" => "AWSCcmConfigValidationIssueCode",
1599+
"v2.aws_ccm_config_validation_request" => "AWSCcmConfigValidationRequest",
1600+
"v2.aws_ccm_config_validation_request_attributes" => "AWSCcmConfigValidationRequestAttributes",
1601+
"v2.aws_ccm_config_validation_request_data" => "AWSCcmConfigValidationRequestData",
1602+
"v2.aws_ccm_config_validation_response" => "AWSCcmConfigValidationResponse",
1603+
"v2.aws_ccm_config_validation_response_attributes" => "AWSCcmConfigValidationResponseAttributes",
1604+
"v2.aws_ccm_config_validation_response_data" => "AWSCcmConfigValidationResponseData",
1605+
"v2.aws_ccm_config_validation_type" => "AWSCcmConfigValidationType",
15971606
"v2.aws_cloud_auth_persona_mapping_attributes_response" => "AWSCloudAuthPersonaMappingAttributesResponse",
15981607
"v2.aws_cloud_auth_persona_mapping_create_attributes" => "AWSCloudAuthPersonaMappingCreateAttributes",
15991608
"v2.aws_cloud_auth_persona_mapping_create_data" => "AWSCloudAuthPersonaMappingCreateData",

0 commit comments

Comments
 (0)