From 9651214f139e956e0a94190c27429c5bc9df30bc Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 16:52:26 +0000 Subject: [PATCH 1/3] agentless: fix CreateAwsOnDemandTask test (#2617) Co-authored-by: ci.datadog-api-spec --- .generated-info | 4 ++-- ...-AWS-on-demand-task-created-successfully-response.frozen | 2 +- ...rns-AWS-on-demand-task-created-successfully-response.yml | 6 +++--- examples/v2/agentless-scanning/CreateAwsOnDemandTask.rb | 2 +- features/v2/agentless_scanning.feature | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.generated-info b/.generated-info index de1a0f4e8c20..d9d2af1856bd 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "c3b2b7d", - "generated": "2025-08-25 10:18:04.330" + "spec_repo_commit": "55aea96", + "generated": "2025-08-25 15:33:44.229" } diff --git a/cassettes/features/v2/agentless_scanning/Post-an-AWS-on-demand-task-returns-AWS-on-demand-task-created-successfully-response.frozen b/cassettes/features/v2/agentless_scanning/Post-an-AWS-on-demand-task-returns-AWS-on-demand-task-created-successfully-response.frozen index 28fd0505ba61..90ba1c855742 100644 --- a/cassettes/features/v2/agentless_scanning/Post-an-AWS-on-demand-task-returns-AWS-on-demand-task-created-successfully-response.frozen +++ b/cassettes/features/v2/agentless_scanning/Post-an-AWS-on-demand-task-returns-AWS-on-demand-task-created-successfully-response.frozen @@ -1 +1 @@ -2025-03-05T15:30:09.058Z \ No newline at end of file +2025-08-24T22:41:50.537Z \ No newline at end of file diff --git a/cassettes/features/v2/agentless_scanning/Post-an-AWS-on-demand-task-returns-AWS-on-demand-task-created-successfully-response.yml b/cassettes/features/v2/agentless_scanning/Post-an-AWS-on-demand-task-returns-AWS-on-demand-task-created-successfully-response.yml index e4f67695aa1f..b891aa25856e 100644 --- a/cassettes/features/v2/agentless_scanning/Post-an-AWS-on-demand-task-returns-AWS-on-demand-task-created-successfully-response.yml +++ b/cassettes/features/v2/agentless_scanning/Post-an-AWS-on-demand-task-returns-AWS-on-demand-task-created-successfully-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Wed, 05 Mar 2025 15:30:09 GMT +- recorded_at: Sun, 24 Aug 2025 22:41:50 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"arn":"arn:aws:lambda:eu-west-3:376334461865:function:This-Is-An-Api-Spec-Test"},"type":"aws_resource"}}' + string: '{"data":{"attributes":{"arn":"arn:aws:lambda:us-west-2:123456789012:function:my-function"},"type":"aws_resource"}}' headers: Accept: - application/json @@ -14,7 +14,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"aaa12247-2b39-4b70-a2fd-a804840e17f5","type":"aws_resource","attributes":{"arn":"arn:aws:lambda:eu-west-3:376334461865:function:This-Is-An-Api-Spec-Test","created_at":"2025-03-05T15:30:09.129732Z","status":"QUEUED"}}}' + string: '{"data":{"id":"20fa1c5c-0f03-4db7-b1d9-e360226bb786","type":"aws_resource","attributes":{"arn":"arn:aws:lambda:us-west-2:123456789012:function:my-function","created_at":"2025-08-24T22:41:51.043274Z","status":"QUEUED"}}}' headers: Content-Type: - application/vnd.api+json diff --git a/examples/v2/agentless-scanning/CreateAwsOnDemandTask.rb b/examples/v2/agentless-scanning/CreateAwsOnDemandTask.rb index e841e98b4023..4e0d0d5c76dc 100644 --- a/examples/v2/agentless-scanning/CreateAwsOnDemandTask.rb +++ b/examples/v2/agentless-scanning/CreateAwsOnDemandTask.rb @@ -6,7 +6,7 @@ body = DatadogAPIClient::V2::AwsOnDemandCreateRequest.new({ data: DatadogAPIClient::V2::AwsOnDemandCreateData.new({ attributes: DatadogAPIClient::V2::AwsOnDemandCreateAttributes.new({ - arn: "arn:aws:lambda:eu-west-3:376334461865:function:This-Is-An-Api-Spec-Test", + arn: "arn:aws:lambda:us-west-2:123456789012:function:my-function", }), type: DatadogAPIClient::V2::AwsOnDemandType::AWS_RESOURCE, }), diff --git a/features/v2/agentless_scanning.feature b/features/v2/agentless_scanning.feature index 5b0c5e965825..e0b10496eba5 100644 --- a/features/v2/agentless_scanning.feature +++ b/features/v2/agentless_scanning.feature @@ -123,10 +123,10 @@ Feature: Agentless Scanning @team:DataDog/k9-agentless Scenario: Post an AWS on demand task returns "AWS on demand task created successfully." response Given new "CreateAwsOnDemandTask" request - And body with value {"data": {"attributes": {"arn": "arn:aws:lambda:eu-west-3:376334461865:function:This-Is-An-Api-Spec-Test"}, "type": "aws_resource"}} + And body with value {"data": {"attributes": {"arn": "arn:aws:lambda:us-west-2:123456789012:function:my-function"}, "type": "aws_resource"}} When the request is sent Then the response status is 201 AWS on demand task created successfully - And the response "data.attributes.arn" is equal to "arn:aws:lambda:eu-west-3:376334461865:function:This-Is-An-Api-Spec-Test" + And the response "data.attributes.arn" is equal to "arn:aws:lambda:us-west-2:123456789012:function:my-function" And the response "data.attributes.status" is equal to "QUEUED" @team:DataDog/k9-agentless From 9e2569c8fb67d72adebf90158a13c0130ae19db1 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 18:37:27 +0000 Subject: [PATCH 2/3] Update v2 API spec to reflect default AWS metric collection behavior (#2588) Co-authored-by: ci.datadog-api-spec --- .generated-info | 4 ++-- .generator/schemas/v2/openapi.yaml | 13 +++++++------ .../v2/models/aws_namespace_filters_exclude_only.rb | 8 ++++---- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.generated-info b/.generated-info index d9d2af1856bd..97f73416afa8 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "55aea96", - "generated": "2025-08-25 15:33:44.229" + "spec_repo_commit": "e22129c", + "generated": "2025-08-25 17:47:35.253" } diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 123b5ff15617..e9385b0038fe 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1764,20 +1764,21 @@ components: - $ref: '#/components/schemas/AWSNamespaceFiltersIncludeOnly' AWSNamespaceFiltersExcludeOnly: description: 'Exclude only these namespaces from metrics collection. Defaults - to `["AWS/SQS", "AWS/ElasticMapReduce"]`. + to `["AWS/SQS", "AWS/ElasticMapReduce", "AWS/Usage"]`. - `AWS/SQS` and `AWS/ElasticMapReduce` are excluded by default to reduce your - AWS CloudWatch costs from `GetMetricData` API calls.' + `AWS/SQS`, `AWS/ElasticMapReduce`, and `AWS/Usage` are excluded by default + to reduce your AWS CloudWatch costs from `GetMetricData` API calls.' properties: exclude_only: description: 'Exclude only these namespaces from metrics collection. Defaults - to `["AWS/SQS", "AWS/ElasticMapReduce"]`. + to `["AWS/SQS", "AWS/ElasticMapReduce", "AWS/Usage"]`. - `AWS/SQS` and `AWS/ElasticMapReduce` are excluded by default to reduce - your AWS CloudWatch costs from `GetMetricData` API calls.' + `AWS/SQS`, `AWS/ElasticMapReduce`, and `AWS/Usage` are excluded by default + to reduce your AWS CloudWatch costs from `GetMetricData` API calls.' example: - AWS/SQS - AWS/ElasticMapReduce + - AWS/Usage items: example: AWS/SQS type: string diff --git a/lib/datadog_api_client/v2/models/aws_namespace_filters_exclude_only.rb b/lib/datadog_api_client/v2/models/aws_namespace_filters_exclude_only.rb index 62d137b2f008..cb31e20fbd2a 100644 --- a/lib/datadog_api_client/v2/models/aws_namespace_filters_exclude_only.rb +++ b/lib/datadog_api_client/v2/models/aws_namespace_filters_exclude_only.rb @@ -17,13 +17,13 @@ require 'time' module DatadogAPIClient::V2 - # Exclude only these namespaces from metrics collection. Defaults to `["AWS/SQS", "AWS/ElasticMapReduce"]`. - # `AWS/SQS` and `AWS/ElasticMapReduce` are excluded by default to reduce your AWS CloudWatch costs from `GetMetricData` API calls. + # Exclude only these namespaces from metrics collection. Defaults to `["AWS/SQS", "AWS/ElasticMapReduce", "AWS/Usage"]`. + # `AWS/SQS`, `AWS/ElasticMapReduce`, and `AWS/Usage` are excluded by default to reduce your AWS CloudWatch costs from `GetMetricData` API calls. class AWSNamespaceFiltersExcludeOnly include BaseGenericModel - # Exclude only these namespaces from metrics collection. Defaults to `["AWS/SQS", "AWS/ElasticMapReduce"]`. - # `AWS/SQS` and `AWS/ElasticMapReduce` are excluded by default to reduce your AWS CloudWatch costs from `GetMetricData` API calls. + # Exclude only these namespaces from metrics collection. Defaults to `["AWS/SQS", "AWS/ElasticMapReduce", "AWS/Usage"]`. + # `AWS/SQS`, `AWS/ElasticMapReduce`, and `AWS/Usage` are excluded by default to reduce your AWS CloudWatch costs from `GetMetricData` API calls. attr_reader :exclude_only attr_accessor :additional_properties From 4c1f6aa8875e3c64adf1137add04cd89689aa3ca Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 19:34:40 +0000 Subject: [PATCH 3/3] Add docs for 404 not found error in cost-onboarding-api (#2606) Co-authored-by: ci.datadog-api-spec --- .generated-info | 4 +-- .generator/schemas/v2/openapi.yaml | 12 +++++++++ ...R-config-returns-Not-Found-response.frozen | 1 + ...-CUR-config-returns-Not-Found-response.yml | 25 +++++++++++++++++++ ...e-config-returns-Not-Found-response.frozen | 1 + ...zure-config-returns-Not-Found-response.yml | 25 +++++++++++++++++++ features/v2/cloud_cost_management.feature | 16 ++++++++++++ 7 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-AWS-CUR-config-returns-Not-Found-response.frozen create mode 100644 cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-AWS-CUR-config-returns-Not-Found-response.yml create mode 100644 cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-Azure-config-returns-Not-Found-response.frozen create mode 100644 cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-Azure-config-returns-Not-Found-response.yml diff --git a/.generated-info b/.generated-info index 97f73416afa8..ecf00039e30e 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "e22129c", - "generated": "2025-08-25 17:47:35.253" + "spec_repo_commit": "1e6c346", + "generated": "2025-08-25 18:45:37.801" } diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index e9385b0038fe..3705ce533ddd 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -49699,6 +49699,12 @@ paths: schema: $ref: '#/components/schemas/APIErrorResponse' description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' security: @@ -49851,6 +49857,12 @@ paths: schema: $ref: '#/components/schemas/APIErrorResponse' description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' security: diff --git a/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-AWS-CUR-config-returns-Not-Found-response.frozen b/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-AWS-CUR-config-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..a2e736103dbd --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-AWS-CUR-config-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2025-08-25T15:10:14.494Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-AWS-CUR-config-returns-Not-Found-response.yml b/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-AWS-CUR-config-returns-Not-Found-response.yml new file mode 100644 index 000000000000..aab5c15b8b30 --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-AWS-CUR-config-returns-Not-Found-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Mon, 25 Aug 2025 15:10:14 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"is_enabled":true},"type":"aws_cur_config_patch_request"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/cost/aws_cur_config/12345678 + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"404","title":"Cloud account not found","detail":"Cloud + account with ID 12345678 was not found"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-Azure-config-returns-Not-Found-response.frozen b/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-Azure-config-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..de3073eebf33 --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-Azure-config-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2025-08-25T15:10:28.926Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-Azure-config-returns-Not-Found-response.yml b/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-Azure-config-returns-Not-Found-response.yml new file mode 100644 index 000000000000..b7122e65aa19 --- /dev/null +++ b/cassettes/features/v2/cloud_cost_management/Update-Cloud-Cost-Management-Azure-config-returns-Not-Found-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Mon, 25 Aug 2025 15:10:28 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"is_enabled":true},"type":"azure_uc_config_patch_request"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/cost/azure_uc_config/12345678 + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"404","title":"Cloud account not found","detail":"Cloud + account with ID 12345678 was not found"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/features/v2/cloud_cost_management.feature b/features/v2/cloud_cost_management.feature index 300d7094f799..eed19e63a9be 100644 --- a/features/v2/cloud_cost_management.feature +++ b/features/v2/cloud_cost_management.feature @@ -267,6 +267,14 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 200 OK + @team:Datadog/cloud-cost-management + Scenario: Update Cloud Cost Management AWS CUR config returns "Not Found" response + Given new "UpdateCostAWSCURConfig" request + And request contains "cloud_account_id" parameter with value 12345678 + And body with value {"data": {"attributes": {"is_enabled": true}, "type": "aws_cur_config_patch_request"}} + When the request is sent + Then the response status is 404 Not Found + @replay-only @team:Datadog/cloud-cost-management Scenario: Update Cloud Cost Management AWS CUR config returns "OK" response Given new "UpdateCostAWSCURConfig" request @@ -284,6 +292,14 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 400 Bad Request + @team:Datadog/cloud-cost-management + Scenario: Update Cloud Cost Management Azure config returns "Not Found" response + Given new "UpdateCostAzureUCConfigs" request + And request contains "cloud_account_id" parameter with value 12345678 + And body with value {"data": {"attributes": {"is_enabled": true}, "type": "azure_uc_config_patch_request"}} + When the request is sent + Then the response status is 404 Not Found + @replay-only @team:Datadog/cloud-cost-management Scenario: Update Cloud Cost Management Azure config returns "OK" response Given new "UpdateCostAzureUCConfigs" request