Skip to content
Open
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
298 changes: 222 additions & 76 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2437,6 +2437,158 @@ components:
type: string
x-enum-varnames:
- CCM_CONFIG
AWSCcmConfigValidationIssue:
description: A single validation issue found while validating an AWS Cost and Usage Report (CUR) 2.0 configuration.
properties:
code:
$ref: "#/components/schemas/AWSCcmConfigValidationIssueCode"
description:
description: Human-readable description of the validation issue.
example: 'no CUR 2.0 export named "cost-and-usage-report" found'
type: string
required:
- code
- description
type: object
AWSCcmConfigValidationIssueCode:
description: Identifies the specific reason a Cost and Usage Report (CUR) 2.0 configuration failed validation.
enum:
- ISSUE_CODE_UNSPECIFIED
- CREDENTIAL_ERROR
- BUCKET_NAME_INVALID_GOVCLOUD
- S3_LIST_PERMISSION_MISSING
- S3_GET_PERMISSION_MISSING
- S3_BUCKET_REGION_MISMATCH
- S3_BUCKET_NOT_ACCESSIBLE
- EXPORT_LIST_PERMISSION_MISSING
- EXPORT_GET_PERMISSION_MISSING
- EXPORT_NOT_FOUND
- EXPORT_STATUS_UNHEALTHY
- TIME_GRANULARITY_INVALID
- FILE_FORMAT_INVALID
- INCLUDE_RESOURCES_DISABLED
- REFRESH_CADENCE_INVALID
- OVERWRITE_MODE_INVALID
- QUERY_STATEMENT_INVALID
example: "EXPORT_NOT_FOUND"
type: string
x-enum-varnames:
- ISSUE_CODE_UNSPECIFIED
- CREDENTIAL_ERROR
- BUCKET_NAME_INVALID_GOVCLOUD
- S3_LIST_PERMISSION_MISSING
- S3_GET_PERMISSION_MISSING
- S3_BUCKET_REGION_MISMATCH
- S3_BUCKET_NOT_ACCESSIBLE
- EXPORT_LIST_PERMISSION_MISSING
- EXPORT_GET_PERMISSION_MISSING
- EXPORT_NOT_FOUND
- EXPORT_STATUS_UNHEALTHY
- TIME_GRANULARITY_INVALID
- FILE_FORMAT_INVALID
- INCLUDE_RESOURCES_DISABLED
- REFRESH_CADENCE_INVALID
- OVERWRITE_MODE_INVALID
- QUERY_STATEMENT_INVALID
AWSCcmConfigValidationIssues:
description: List of validation issues found for the Cost and Usage Report (CUR) 2.0 configuration. Empty when the configuration is valid.
items:
$ref: "#/components/schemas/AWSCcmConfigValidationIssue"
type: array
AWSCcmConfigValidationRequest:
description: AWS CCM config validation request body.
properties:
data:
$ref: "#/components/schemas/AWSCcmConfigValidationRequestData"
required:
- data
type: object
AWSCcmConfigValidationRequestAttributes:
description: Attributes for an AWS CCM config validation request.
properties:
account_id:
description: Your AWS Account ID without dashes.
example: "123456789012"
type: string
bucket_name:
description: Name of the S3 bucket where the Cost and Usage Report is stored.
example: "billing"
type: string
bucket_region:
description: AWS region of the S3 bucket.
example: "us-east-1"
type: string
report_name:
description: Name of the Cost and Usage Report.
example: "cost-and-usage-report"
type: string
report_prefix:
description: S3 prefix where the Cost and Usage Report is stored.
example: "reports"
type: string
required:
- account_id
- bucket_name
- bucket_region
- report_name
type: object
AWSCcmConfigValidationRequestData:
description: AWS CCM config validation request data.
properties:
attributes:
$ref: "#/components/schemas/AWSCcmConfigValidationRequestAttributes"
type:
$ref: "#/components/schemas/AWSCcmConfigValidationType"
required:
- attributes
- type
type: object
AWSCcmConfigValidationResponse:
description: AWS CCM config validation response body.
properties:
data:
$ref: "#/components/schemas/AWSCcmConfigValidationResponseData"
required:
- data
type: object
AWSCcmConfigValidationResponseAttributes:
description: Attributes for an AWS CCM config validation response.
properties:
account_id:
description: Your AWS Account ID without dashes.
example: "123456789012"
type: string
issues:
$ref: "#/components/schemas/AWSCcmConfigValidationIssues"
required:
- account_id
- issues
type: object
AWSCcmConfigValidationResponseData:
description: AWS CCM config validation response data.
properties:
attributes:
$ref: "#/components/schemas/AWSCcmConfigValidationResponseAttributes"
id:
description: AWS CCM config validation resource identifier.
example: "ccm_config_validation"
type: string
type:
$ref: "#/components/schemas/AWSCcmConfigValidationType"
required:
- attributes
- id
- type
type: object
AWSCcmConfigValidationType:
default: "ccm_config_validation"
description: AWS CCM config validation resource type.
enum:
- ccm_config_validation
example: "ccm_config_validation"
type: string
x-enum-varnames:
- CCM_CONFIG_VALIDATION
AWSCloudAuthPersonaMappingAttributesResponse:
description: Attributes for AWS cloud authentication persona mapping response
properties:
Expand Down Expand Up @@ -55624,7 +55776,6 @@ components:
- $ref: "#/components/schemas/ObservabilityPipelineSyslogNgDestination"
- $ref: "#/components/schemas/ObservabilityPipelineDatabricksZerobusDestination"
- $ref: "#/components/schemas/ObservabilityPipelineDatadogMetricsDestination"
- $ref: "#/components/schemas/ObservabilityPipelineSplunkHecMetricsDestination"
ObservabilityPipelineConfigPipelineType:
default: logs
description: The type of data being ingested. Defaults to `logs` if not specified.
Expand Down Expand Up @@ -59746,81 +59897,6 @@ components:
type: string
x-enum-varnames:
- SPLUNK_HEC
ObservabilityPipelineSplunkHecMetricsDestination:
description: |-
The `splunk_hec_metrics` destination forwards metrics to Splunk using the HTTP Event Collector (HEC).

**Supported pipeline types:** metrics
properties:
buffer:
$ref: "#/components/schemas/ObservabilityPipelineBufferOptions"
compression:
$ref: "#/components/schemas/ObservabilityPipelineSplunkHecMetricsDestinationCompression"
default_namespace:
description: Optional default namespace for metrics sent to Splunk HEC.
example: "custom_namespace"
type: string
endpoint_url_key:
description: Name of the environment variable or secret that holds the Splunk HEC endpoint URL.
example: SPLUNK_HEC_ENDPOINT_URL
type: string
id:
description: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` to downstream components).
example: splunk-hec-metrics-destination
type: string
index:
description: Optional name of the Splunk index where metrics are written.
example: "metrics"
type: string
inputs:
description: A list of component IDs whose output is used as the `input` for this component.
example: ["metrics-filter-processor"]
items:
description: The ID of a component whose output is used as input for this destination.
type: string
type: array
source:
description: The Splunk source field value for metric events.
example: "observability_pipelines"
type: string
sourcetype:
description: The Splunk sourcetype to assign to metric events.
example: "custom_sourcetype"
type: string
tls:
$ref: "#/components/schemas/ObservabilityPipelineTls"
token_key:
description: Name of the environment variable or secret that holds the Splunk HEC token.
example: SPLUNK_HEC_TOKEN
type: string
type:
$ref: "#/components/schemas/ObservabilityPipelineSplunkHecMetricsDestinationType"
required:
- id
- type
- inputs
type: object
x-pipeline-types: [metrics]
ObservabilityPipelineSplunkHecMetricsDestinationCompression:
default: none
description: Compression algorithm applied when sending metrics to Splunk HEC.
enum:
- none
- gzip
example: none
type: string
x-enum-varnames:
- NONE
- GZIP
ObservabilityPipelineSplunkHecMetricsDestinationType:
default: splunk_hec_metrics
description: The destination type. Always `splunk_hec_metrics`.
enum:
- splunk_hec_metrics
example: splunk_hec_metrics
type: string
x-enum-varnames:
- SPLUNK_HEC_METRICS
ObservabilityPipelineSplunkHecSource:
description: |-
The `splunk_hec` source implements the Splunk HTTP Event Collector (HEC) API.
Expand Down Expand Up @@ -121645,6 +121721,76 @@ paths:
operator: OR
permissions:
- aws_configuration_read
/api/v2/integration/aws/validate_ccm_config:
post:
description: |-
Validate a Cloud Cost Management config for an AWS account using Cost and Usage Report
(CUR) 2.0 against Datadog's ingest requirements without persisting it.
operationId: ValidateAWSCCMConfig
requestBody:
content:
application/json:
examples:
default:
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
schema:
$ref: "#/components/schemas/AWSCcmConfigValidationRequest"
description: Validate a Cloud Cost Management config for an AWS account integration config.
required: true
responses:
"200":
content:
application/json:
examples:
default:
value:
data:
attributes:
account_id: "123456789012"
issues:
- code: EXPORT_NOT_FOUND
description: 'no CUR 2.0 export named "cost-and-usage-report" found'
id: ccm_config_validation
type: ccm_config_validation
schema:
$ref: "#/components/schemas/AWSCcmConfigValidationResponse"
description: AWS CCM Config validation result
"400":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Bad Request
"403":
$ref: "#/components/responses/ForbiddenResponse"
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
"503":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Service Unavailable
summary: Validate AWS CCM config
tags:
- AWS Integration
x-codegen-request-body-name: body
"x-permission":
operator: OR
permissions:
- cloud_cost_management_read
- cloud_cost_management_write
x-unstable: |-
**Note**: This endpoint is in Preview and may be subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/integration/gcp/accounts:
get:
description: List all GCP STS-enabled service accounts configured in your Datadog account.
Expand Down
21 changes: 21 additions & 0 deletions examples/v2/aws-integration/ValidateAWSCCMConfig.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Validate AWS CCM config returns "AWS CCM Config validation result" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.validate_awsccm_config".to_sym] = true
end
api_instance = DatadogAPIClient::V2::AWSIntegrationAPI.new

body = DatadogAPIClient::V2::AWSCcmConfigValidationRequest.new({
data: DatadogAPIClient::V2::AWSCcmConfigValidationRequestData.new({
attributes: DatadogAPIClient::V2::AWSCcmConfigValidationRequestAttributes.new({
account_id: "123456789012",
bucket_name: "billing",
bucket_region: "us-east-1",
report_name: "cost-and-usage-report",
report_prefix: "reports",
}),
type: DatadogAPIClient::V2::AWSCcmConfigValidationType::CCM_CONFIG_VALIDATION,
}),
})
p api_instance.validate_awsccm_config(body)
3 changes: 3 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3289,6 +3289,9 @@
"v2.CreateAWSEventBridgeSource" => {
"body" => "AWSEventBridgeCreateRequest",
},
"v2.ValidateAWSCCMConfig" => {
"body" => "AWSCcmConfigValidationRequest",
},
"v2.CreateGCPSTSAccount" => {
"body" => "GCPSTSServiceAccountCreateRequest",
},
Expand Down
16 changes: 16 additions & 0 deletions features/v2/aws_integration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -292,3 +292,19 @@ Feature: AWS Integration
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"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/aws-integrations
Scenario: Validate AWS CCM config returns "AWS CCM Config validation result" response
Given operation "ValidateAWSCCMConfig" enabled
And new "ValidateAWSCCMConfig" request
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"}}
When the request is sent
Then the response status is 200 AWS CCM Config validation result

@generated @skip @team:DataDog/aws-integrations
Scenario: Validate AWS CCM config returns "Bad Request" response
Given operation "ValidateAWSCCMConfig" enabled
And new "ValidateAWSCCMConfig" request
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"}}
When the request is sent
Then the response status is 400 Bad Request
6 changes: 6 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3126,6 +3126,12 @@
"type": "safe"
}
},
"ValidateAWSCCMConfig": {
"tag": "AWS Integration",
"undo": {
"type": "safe"
}
},
"ListGCPSTSAccounts": {
"tag": "GCP Integration",
"undo": {
Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ def initialize
"v2.delete_aws_account_ccm_config": false,
"v2.get_aws_account_ccm_config": false,
"v2.update_aws_account_ccm_config": false,
"v2.validate_awsccm_config": false,
"v2.create_jira_issue_template": false,
"v2.delete_jira_account": false,
"v2.delete_jira_issue_template": false,
Expand Down
Loading
Loading