Skip to content

Commit 406e194

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit af65d9b of spec repo
1 parent 90a1dc9 commit 406e194

File tree

11 files changed

+324
-16
lines changed

11 files changed

+324
-16
lines changed

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "b308db8",
3-
"generated": "2025-08-04 15:39:57.539"
2+
"spec_repo_commit": "af65d9b",
3+
"generated": "2025-08-04 21:26:57.257"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,6 +1625,8 @@ components:
16251625
example: arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder
16261626
type: string
16271627
type: array
1628+
log_source_config:
1629+
$ref: '#/components/schemas/AWSLambdaForwarderConfigLogSourceConfig'
16281630
sources:
16291631
description: 'List of service IDs set to enable automatic log collection.
16301632
Discover the list of available services with the
@@ -1636,6 +1638,36 @@ components:
16361638
type: string
16371639
type: array
16381640
type: object
1641+
AWSLambdaForwarderConfigLogSourceConfig:
1642+
description: Log source configuration.
1643+
properties:
1644+
tag_filters:
1645+
description: List of AWS log source tag filters. Defaults to `[]`.
1646+
items:
1647+
$ref: '#/components/schemas/AWSLogSourceTagFilter'
1648+
type: array
1649+
type: object
1650+
AWSLogSourceTagFilter:
1651+
description: 'AWS Log Source tag filters list. Defaults to `[]`.
1652+
1653+
The array of custom AWS resource tags (in the form `key:value`) defines a
1654+
filter that Datadog uses when collecting logs from a specified log source.'
1655+
properties:
1656+
source:
1657+
description: The AWS log source for which the tag filters defined in `tags`
1658+
will be applied.
1659+
example: s3
1660+
type: string
1661+
tags:
1662+
description: The AWS resource tags to filter on for the log source specified
1663+
by `source`.
1664+
items:
1665+
description: Tag in the form `key:value`.
1666+
example: env:prod
1667+
type: string
1668+
nullable: true
1669+
type: array
1670+
type: object
16391671
AWSLogsConfig:
16401672
description: AWS Logs Collection config.
16411673
properties:

examples/v2/aws-integration/CreateAWSAccount.rb

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,26 @@
1616
access_key_id: "AKIAIOSFODNN7EXAMPLE",
1717
secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
1818
}),
19-
aws_account_id: "123456789012",
19+
aws_account_id: "",
2020
aws_partition: DatadogAPIClient::V2::AWSAccountPartition::AWS,
2121
logs_config: DatadogAPIClient::V2::AWSLogsConfig.new({
2222
lambda_forwarder: DatadogAPIClient::V2::AWSLambdaForwarderConfig.new({
2323
lambdas: [
24-
"arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder",
24+
"arn:aws:lambda:us-east-1::function:DatadogLambdaLogForwarder",
2525
],
2626
sources: [
2727
"s3",
2828
],
29+
log_source_config: DatadogAPIClient::V2::AWSLambdaForwarderConfigLogSourceConfig.new({
30+
tag_filters: [
31+
DatadogAPIClient::V2::AWSLogSourceTagFilter.new({
32+
source: "s3",
33+
tags: [
34+
"test:test",
35+
],
36+
}),
37+
],
38+
}),
2939
}),
3040
}),
3141
metrics_config: DatadogAPIClient::V2::AWSMetricsConfig.new({

examples/v2/aws-integration/CreateAWSAccount_1716720881.rb

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,26 @@
1515
auth_config: DatadogAPIClient::V2::AWSAuthConfigRole.new({
1616
role_name: "DatadogIntegrationRole",
1717
}),
18-
aws_account_id: "123456789012",
18+
aws_account_id: "",
1919
aws_partition: DatadogAPIClient::V2::AWSAccountPartition::AWS,
2020
logs_config: DatadogAPIClient::V2::AWSLogsConfig.new({
2121
lambda_forwarder: DatadogAPIClient::V2::AWSLambdaForwarderConfig.new({
2222
lambdas: [
23-
"arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder",
23+
"arn:aws:lambda:us-east-1::function:DatadogLambdaLogForwarder",
2424
],
2525
sources: [
2626
"s3",
2727
],
28+
log_source_config: DatadogAPIClient::V2::AWSLambdaForwarderConfigLogSourceConfig.new({
29+
tag_filters: [
30+
DatadogAPIClient::V2::AWSLogSourceTagFilter.new({
31+
source: "s3",
32+
tags: [
33+
"test:test",
34+
],
35+
}),
36+
],
37+
}),
2838
}),
2939
}),
3040
metrics_config: DatadogAPIClient::V2::AWSMetricsConfig.new({

examples/v2/aws-integration/UpdateAWSAccount.rb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
api_instance = DatadogAPIClient::V2::AWSIntegrationAPI.new
88

99
# there is a valid "aws_account_v2" in the system
10+
AWS_ACCOUNT_V2_DATA_ATTRIBUTES_AWS_ACCOUNT_ID = ENV["AWS_ACCOUNT_V2_DATA_ATTRIBUTES_AWS_ACCOUNT_ID"]
1011
AWS_ACCOUNT_V2_DATA_ID = ENV["AWS_ACCOUNT_V2_DATA_ID"]
1112

1213
body = DatadogAPIClient::V2::AWSAccountUpdateRequest.new({
@@ -18,7 +19,7 @@
1819
auth_config: DatadogAPIClient::V2::AWSAuthConfigRole.new({
1920
role_name: "DatadogIntegrationRole",
2021
}),
21-
aws_account_id: "123456789012",
22+
aws_account_id: AWS_ACCOUNT_V2_DATA_ATTRIBUTES_AWS_ACCOUNT_ID,
2223
aws_partition: DatadogAPIClient::V2::AWSAccountPartition::AWS,
2324
logs_config: DatadogAPIClient::V2::AWSLogsConfig.new({
2425
lambda_forwarder: DatadogAPIClient::V2::AWSLambdaForwarderConfig.new({
@@ -28,6 +29,16 @@
2829
sources: [
2930
"s3",
3031
],
32+
log_source_config: DatadogAPIClient::V2::AWSLambdaForwarderConfigLogSourceConfig.new({
33+
tag_filters: [
34+
DatadogAPIClient::V2::AWSLogSourceTagFilter.new({
35+
source: "s3",
36+
tags: [
37+
"test:test",
38+
],
39+
}),
40+
],
41+
}),
3142
}),
3243
}),
3344
metrics_config: DatadogAPIClient::V2::AWSMetricsConfig.new({

features/v2/aws_integration.feature

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ Feature: AWS Integration
1313
Scenario: Create an AWS account returns "AWS Account object" response
1414
Given operation "CreateAWSAccount" enabled
1515
And new "CreateAWSAccount" request
16-
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"], "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"}}
16+
And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "{{ unique_aws_account_id }}", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:{{ unique_aws_account_id }}:function:DatadogLambdaLogForwarder"], "sources": ["s3"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}}}, "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"}}
1717
When the request is sent
1818
Then the response status is 200 AWS Account object
1919

2020
@team:DataDog/aws-integrations
2121
Scenario: Create an AWS integration returns "AWS Account object" response
2222
Given operation "CreateAWSAccount" enabled
2323
And new "CreateAWSAccount" request
24-
And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"access_key_id": "AKIAIOSFODNN7EXAMPLE", "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"}, "aws_account_id": "123456789012", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "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"}}
24+
And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"access_key_id": "AKIAIOSFODNN7EXAMPLE", "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"}, "aws_account_id": "{{ unique_aws_account_id }}", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:{{ unique_aws_account_id }}:function:DatadogLambdaLogForwarder"], "sources": ["s3"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}}}, "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"}}
2525
When the request is sent
2626
Then the response status is 200 AWS Account object
2727

2828
@team:DataDog/aws-integrations
2929
Scenario: Create an AWS integration returns "Bad Request" response
3030
Given operation "CreateAWSAccount" enabled
3131
And new "CreateAWSAccount" request
32-
And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "123456789012", "aws_partition": "aws-invalid", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "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"}}
32+
And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "{{ unique_aws_account_id }}", "aws_partition": "aws-invalid", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:{{ unique_aws_account_id }}:function:DatadogLambdaLogForwarder"], "sources": ["s3"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}}}, "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"}}
3333
When the request is sent
3434
Then the response status is 400 Bad Request
3535

@@ -38,7 +38,7 @@ Feature: AWS Integration
3838
Given operation "CreateAWSAccount" enabled
3939
And there is a valid "aws_account_v2" in the system
4040
And new "CreateAWSAccount" request
41-
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"], "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"}}
41+
And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "{{ aws_account_v2.data.attributes.aws_account_id }}", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:{{ aws_account_v2.data.attributes.aws_account_id }}:function:DatadogLambdaLogForwarder"], "sources": ["s3"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}}}, "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"}}
4242
When the request is sent
4343
Then the response status is 409 Conflict
4444

@@ -140,7 +140,7 @@ Feature: AWS Integration
140140
And there is a valid "aws_account_v2" in the system
141141
And new "UpdateAWSAccount" request
142142
And request contains "aws_account_config_id" parameter from "aws_account_v2.data.id"
143-
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"], "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"}}
143+
And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "{{ aws_account_v2.data.attributes.aws_account_id }}", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:{{ aws_account_v2.data.attributes.aws_account_id }}:function:DatadogLambdaLogForwarder"], "sources": ["s3"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}}}, "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"}}
144144
When the request is sent
145145
Then the response status is 200 AWS Account object
146146

@@ -150,7 +150,7 @@ Feature: AWS Integration
150150
And there is a valid "aws_account_v2" in the system
151151
And new "UpdateAWSAccount" request
152152
And request contains "aws_account_config_id" parameter from "aws_account_v2.data.id"
153-
And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"access_key_id": "AKIAIOSFODNN7EXAMPLE", "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"}, "aws_account_id": "123456789012", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "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"}}
153+
And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"access_key_id": "AKIAIOSFODNN7EXAMPLE", "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"}, "aws_account_id": "{{ aws_account_v2.data.attributes.aws_account_id }}", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:{{ aws_account_v2.data.attributes.aws_account_id }}:function:DatadogLambdaLogForwarder"], "sources": ["s3"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}}}, "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"}}
154154
When the request is sent
155155
Then the response status is 400 Bad Request
156156

@@ -159,6 +159,6 @@ Feature: AWS Integration
159159
Given operation "UpdateAWSAccount" enabled
160160
And new "UpdateAWSAccount" request
161161
And request contains "aws_account_config_id" parameter with value "448169a8-251c-4344-abee-1c4edef39f7a"
162-
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"], "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"}}
162+
And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "{{ unique_aws_account_id }}", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:{{ unique_aws_account_id }}:function:DatadogLambdaLogForwarder"], "sources": ["s3"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}}}, "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"}}
163163
When the request is sent
164164
Then the response status is 404 Not Found

0 commit comments

Comments
 (0)