From 01a1163bd43e68db04d8b40610b86dfcb10ce6fd 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, 12 Jan 2026 17:15:29 +0000 Subject: [PATCH 1/2] Revert - Update specs for AWS account updates and creation for CCM configs (#2886) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v2/openapi.yaml | 39 ----- ...returns-AWS-Account-object-response.frozen | 2 +- ...nt-returns-AWS-Account-object-response.yml | 10 +- ...returns-AWS-Account-object-response.frozen | 2 +- ...on-returns-AWS-Account-object-response.yml | 10 +- ...ration-returns-Bad-Request-response.frozen | 2 +- ...tegration-returns-Bad-Request-response.yml | 4 +- ...returns-AWS-Account-object-response.frozen | 2 +- ...on-returns-AWS-Account-object-response.yml | 16 +- ...ration-returns-Bad-Request-response.frozen | 2 +- ...tegration-returns-Bad-Request-response.yml | 19 ++- ...egration-returns-Not-Found-response.frozen | 2 +- ...integration-returns-Not-Found-response.yml | 4 +- .../v2/aws-integration/CreateAWSAccount.rb | 11 -- .../CreateAWSAccount_1716720881.rb | 11 -- .../v2/aws-integration/UpdateAWSAccount.rb | 11 -- features/v2/aws_integration.feature | 12 +- lib/datadog_api_client/inflector.rb | 2 - .../aws_account_create_request_attributes.rb | 12 +- .../models/aws_account_response_attributes.rb | 12 +- .../aws_account_update_request_attributes.rb | 12 +- .../v2/models/awsccm_config.rb | 107 ------------- .../v2/models/data_export_config.rb | 145 ------------------ 23 files changed, 46 insertions(+), 403 deletions(-) delete mode 100644 lib/datadog_api_client/v2/models/awsccm_config.rb delete mode 100644 lib/datadog_api_client/v2/models/data_export_config.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 52c13bf6e581..380a344138b6 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1485,8 +1485,6 @@ components: $ref: '#/components/schemas/AWSAccountPartition' aws_regions: $ref: '#/components/schemas/AWSRegions' - ccm_config: - $ref: '#/components/schemas/AWSCCMConfig' logs_config: $ref: '#/components/schemas/AWSLogsConfig' metrics_config: @@ -1552,8 +1550,6 @@ components: $ref: '#/components/schemas/AWSAccountPartition' aws_regions: $ref: '#/components/schemas/AWSRegions' - ccm_config: - $ref: '#/components/schemas/AWSCCMConfig' created_at: description: Timestamp of when the account integration was created. format: date-time @@ -1627,8 +1623,6 @@ components: $ref: '#/components/schemas/AWSAccountPartition' aws_regions: $ref: '#/components/schemas/AWSRegions' - ccm_config: - $ref: '#/components/schemas/AWSCCMConfig' logs_config: $ref: '#/components/schemas/AWSLogsConfig' metrics_config: @@ -1760,15 +1754,6 @@ components: required: - role_name type: object - AWSCCMConfig: - description: AWS Cloud Cost Management config. - properties: - data_export_configs: - description: List of data export configurations for Cost and Usage Reports. - items: - $ref: '#/components/schemas/DataExportConfig' - type: array - type: object AWSCredentials: description: The definition of `AWSCredentials` object. oneOf: @@ -16814,30 +16799,6 @@ components: example: canceled type: string type: object - DataExportConfig: - description: AWS Cost and Usage Report data export configuration. - properties: - 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 - report_type: - description: Type of the Cost and Usage Report. - example: CUR2.0 - type: string - type: object DataRelationshipsTeams: description: Associates teams with this schedule in a data structure. properties: diff --git a/cassettes/features/v2/aws_integration/Create-an-AWS-account-returns-AWS-Account-object-response.frozen b/cassettes/features/v2/aws_integration/Create-an-AWS-account-returns-AWS-Account-object-response.frozen index 403f0e6375d3..b63a9ddbfcf2 100644 --- a/cassettes/features/v2/aws_integration/Create-an-AWS-account-returns-AWS-Account-object-response.frozen +++ b/cassettes/features/v2/aws_integration/Create-an-AWS-account-returns-AWS-Account-object-response.frozen @@ -1 +1 @@ -2025-12-10T17:32:09.613Z \ No newline at end of file +2025-08-06T17:41:40.185Z \ No newline at end of file diff --git a/cassettes/features/v2/aws_integration/Create-an-AWS-account-returns-AWS-Account-object-response.yml b/cassettes/features/v2/aws_integration/Create-an-AWS-account-returns-AWS-Account-object-response.yml index 3ff2f726243e..7c4e90039aa8 100644 --- a/cassettes/features/v2/aws_integration/Create-an-AWS-account-returns-AWS-Account-object-response.yml +++ b/cassettes/features/v2/aws_integration/Create-an-AWS-account-returns-AWS-Account-object-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Wed, 10 Dec 2025 17:32:09 GMT +- recorded_at: Wed, 06 Aug 2025 17:41:40 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole"},"aws_account_id":"123456789012","aws_partition":"aws","ccm_config":{"data_export_configs":[{"bucket_name":"my-bucket","bucket_region":"us-east-1","report_name":"my-report","report_prefix":"reports","report_type":"CUR2.0"}]},"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"}}' + string: '{"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"}}' headers: Accept: - application/json @@ -14,21 +14,21 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"de1a3b78-ed2e-4f50-9191-1879129d09ff","type":"account","attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole","external_id":"55d4a43935224fe09c096f96392f1ca1"},"aws_account_id":"123456789012","aws_partition":"aws","aws_regions":{"include_all":true},"ccm_config":{"data_export_configs":[{"report_name":"my-report","report_prefix":"reports","report_type":"CUR2.0","bucket_name":"my-bucket","bucket_region":"us-east-1"}]},"created_at":"2025-12-10T17:32:11.003276673Z","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"sources":["s3"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]}}},"metrics_config":{"enabled":true,"automute_enabled":true,"collect_custom_metrics":true,"collect_cloudwatch_alarms":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}],"namespace_filters":{"exclude_only":["AWS/SQS","AWS/ElasticMapReduce","AWS/Usage"]}},"modified_at":"2025-12-10T17:32:11.003276673Z","resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{"xray_services":{"include_only":[]}}}}}' + string: '{"data":{"id":"4ee52a3f-d0e9-487b-bde9-cd1cbc0e4cb0","type":"account","attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole","external_id":"a4e4a6b4c2cf4638a58b1febc6b856e9"},"aws_account_id":"123456789012","aws_partition":"aws","aws_regions":{"include_all":true},"created_at":"2025-08-06T17:41:41.111886478Z","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"sources":["s3"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]}}},"metrics_config":{"enabled":true,"automute_enabled":true,"collect_custom_metrics":true,"collect_cloudwatch_alarms":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}],"namespace_filters":{"exclude_only":["AWS/SQS","AWS/ElasticMapReduce"]}},"modified_at":"2025-08-06T17:41:41.111886478Z","resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{"xray_services":{"include_only":[]}}}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Wed, 10 Dec 2025 17:32:09 GMT +- recorded_at: Wed, 06 Aug 2025 17:41:40 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/integration/aws/accounts/de1a3b78-ed2e-4f50-9191-1879129d09ff + uri: https://api.datadoghq.com/api/v2/integration/aws/accounts/4ee52a3f-d0e9-487b-bde9-cd1cbc0e4cb0 response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/aws_integration/Create-an-AWS-integration-returns-AWS-Account-object-response.frozen b/cassettes/features/v2/aws_integration/Create-an-AWS-integration-returns-AWS-Account-object-response.frozen index dfc78df9ae07..d0e249e860ed 100644 --- a/cassettes/features/v2/aws_integration/Create-an-AWS-integration-returns-AWS-Account-object-response.frozen +++ b/cassettes/features/v2/aws_integration/Create-an-AWS-integration-returns-AWS-Account-object-response.frozen @@ -1 +1 @@ -2025-12-10T17:32:36.829Z \ No newline at end of file +2025-08-06T17:41:41.364Z \ No newline at end of file diff --git a/cassettes/features/v2/aws_integration/Create-an-AWS-integration-returns-AWS-Account-object-response.yml b/cassettes/features/v2/aws_integration/Create-an-AWS-integration-returns-AWS-Account-object-response.yml index 50a2c1480c55..f4b4a28d8648 100644 --- a/cassettes/features/v2/aws_integration/Create-an-AWS-integration-returns-AWS-Account-object-response.yml +++ b/cassettes/features/v2/aws_integration/Create-an-AWS-integration-returns-AWS-Account-object-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Wed, 10 Dec 2025 17:32:36 GMT +- recorded_at: Wed, 06 Aug 2025 17:41:41 GMT request: body: encoding: UTF-8 - string: '{"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","ccm_config":{"data_export_configs":[{"bucket_name":"my-bucket","bucket_region":"us-east-1","report_name":"my-report","report_prefix":"reports","report_type":"CUR2.0"}]},"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"}}' + string: '{"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"],"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"}}' headers: Accept: - application/json @@ -14,21 +14,21 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"a7d72fb6-ec59-4eca-a905-805dd599d061","type":"account","attributes":{"account_tags":["key:value"],"auth_config":{"access_key_id":"AKIAIOSFODNN7EXAMPLE"},"aws_account_id":"123456789012","aws_partition":"aws","aws_regions":{"include_all":true},"ccm_config":{"data_export_configs":[{"report_name":"my-report","report_prefix":"reports","report_type":"CUR2.0","bucket_name":"my-bucket","bucket_region":"us-east-1"}]},"created_at":"2025-12-10T17:32:37.014514664Z","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"sources":["s3"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]}}},"metrics_config":{"enabled":true,"automute_enabled":true,"collect_custom_metrics":true,"collect_cloudwatch_alarms":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}],"namespace_filters":{"exclude_only":["AWS/SQS","AWS/ElasticMapReduce","AWS/Usage"]}},"modified_at":"2025-12-10T17:32:37.014514664Z","resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{"xray_services":{"include_only":[]}}}}}' + string: '{"data":{"id":"c80e30d5-b3f9-45b1-85fc-bad652af206b","type":"account","attributes":{"account_tags":["key:value"],"auth_config":{"access_key_id":"AKIAIOSFODNN7EXAMPLE"},"aws_account_id":"123456789012","aws_partition":"aws","aws_regions":{"include_all":true},"created_at":"2025-08-06T17:41:41.445076718Z","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"sources":["s3"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]}}},"metrics_config":{"enabled":true,"automute_enabled":true,"collect_custom_metrics":true,"collect_cloudwatch_alarms":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}],"namespace_filters":{"exclude_only":["AWS/SQS","AWS/ElasticMapReduce"]}},"modified_at":"2025-08-06T17:41:41.445076718Z","resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{"xray_services":{"include_only":[]}}}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Wed, 10 Dec 2025 17:32:36 GMT +- recorded_at: Wed, 06 Aug 2025 17:41:41 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/integration/aws/accounts/a7d72fb6-ec59-4eca-a905-805dd599d061 + uri: https://api.datadoghq.com/api/v2/integration/aws/accounts/c80e30d5-b3f9-45b1-85fc-bad652af206b response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/aws_integration/Create-an-AWS-integration-returns-Bad-Request-response.frozen b/cassettes/features/v2/aws_integration/Create-an-AWS-integration-returns-Bad-Request-response.frozen index 2800bbe0aa25..abfd935a03f5 100644 --- a/cassettes/features/v2/aws_integration/Create-an-AWS-integration-returns-Bad-Request-response.frozen +++ b/cassettes/features/v2/aws_integration/Create-an-AWS-integration-returns-Bad-Request-response.frozen @@ -1 +1 @@ -2025-12-10T17:34:11.261Z \ No newline at end of file +2025-08-06T17:41:41.716Z \ No newline at end of file diff --git a/cassettes/features/v2/aws_integration/Create-an-AWS-integration-returns-Bad-Request-response.yml b/cassettes/features/v2/aws_integration/Create-an-AWS-integration-returns-Bad-Request-response.yml index eddba207c7c3..79e4b109dda9 100644 --- a/cassettes/features/v2/aws_integration/Create-an-AWS-integration-returns-Bad-Request-response.yml +++ b/cassettes/features/v2/aws_integration/Create-an-AWS-integration-returns-Bad-Request-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Wed, 10 Dec 2025 17:34:11 GMT +- recorded_at: Wed, 06 Aug 2025 17:41:41 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole"},"aws_account_id":"123456789012","aws_partition":"aws-invalid","ccm_config":{"data_export_configs":[{"bucket_name":"my-bucket","bucket_region":"us-east-1","report_name":"my-report","report_prefix":"reports","report_type":"CUR2.0"}]},"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"}}' + string: '{"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"],"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"}}' headers: Accept: - application/json diff --git a/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-AWS-Account-object-response.frozen b/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-AWS-Account-object-response.frozen index 0acb432176a4..770d0364bdcb 100644 --- a/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-AWS-Account-object-response.frozen +++ b/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-AWS-Account-object-response.frozen @@ -1 +1 @@ -2025-12-10T17:40:36.176Z \ No newline at end of file +2025-08-06T17:41:51.622Z \ No newline at end of file diff --git a/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-AWS-Account-object-response.yml b/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-AWS-Account-object-response.yml index 2067e6a92d33..1b520902394f 100644 --- a/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-AWS-Account-object-response.yml +++ b/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-AWS-Account-object-response.yml @@ -1,5 +1,5 @@ http_interactions: -- recorded_at: Wed, 10 Dec 2025 17:40:36 GMT +- recorded_at: Wed, 06 Aug 2025 17:41:51 GMT request: body: encoding: UTF-8 @@ -14,43 +14,43 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"0c2238ef-3b8e-4d25-85df-b18f96ac7031","type":"account","attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole","external_id":"a297178885da4934acf9eca79f3e7892"},"aws_account_id":"123456789012","aws_partition":"aws","aws_regions":{"include_only":["us-east-1"]},"created_at":"2025-12-10T17:40:37.609564422Z","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"sources":["s3"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]}}},"metrics_config":{"enabled":true,"automute_enabled":true,"collect_custom_metrics":false,"collect_cloudwatch_alarms":false,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}],"namespace_filters":{"include_only":["AWS/EC2"]}},"modified_at":"2025-12-10T17:40:37.609564422Z","resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{"xray_services":{"include_only":["AWS/AppSync"]}}}}}' + string: '{"data":{"id":"ab6528e3-5dab-4375-ae47-4ce93d1216e2","type":"account","attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole","external_id":"36416390710445e7be511e1622ee4149"},"aws_account_id":"123456789012","aws_partition":"aws","aws_regions":{"include_only":["us-east-1"]},"created_at":"2025-08-06T17:41:52.510132689Z","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"sources":["s3"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]}}},"metrics_config":{"enabled":true,"automute_enabled":true,"collect_custom_metrics":false,"collect_cloudwatch_alarms":false,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}],"namespace_filters":{"include_only":["AWS/EC2"]}},"modified_at":"2025-08-06T17:41:52.510132689Z","resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{"xray_services":{"include_only":["AWS/AppSync"]}}}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Wed, 10 Dec 2025 17:40:36 GMT +- recorded_at: Wed, 06 Aug 2025 17:41:51 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole"},"aws_account_id":"123456789012","aws_partition":"aws","ccm_config":{"data_export_configs":[{"bucket_name":"updated-bucket","bucket_region":"us-west-2","report_name":"updated-report","report_prefix":"cost-reports","report_type":"CUR2.0"}]},"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"}}' + string: '{"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"}}' headers: Accept: - application/json Content-Type: - application/json method: PATCH - uri: https://api.datadoghq.com/api/v2/integration/aws/accounts/0c2238ef-3b8e-4d25-85df-b18f96ac7031 + uri: https://api.datadoghq.com/api/v2/integration/aws/accounts/ab6528e3-5dab-4375-ae47-4ce93d1216e2 response: body: encoding: UTF-8 - string: '{"data":{"id":"0c2238ef-3b8e-4d25-85df-b18f96ac7031","type":"account","attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole","external_id":"a297178885da4934acf9eca79f3e7892"},"aws_account_id":"123456789012","aws_partition":"aws","aws_regions":{"include_only":["us-east-1"]},"ccm_config":{"data_export_configs":[{"report_name":"updated-report","report_prefix":"cost-reports","report_type":"CUR2.0","bucket_name":"updated-bucket","bucket_region":"us-west-2"}]},"created_at":"2025-12-10T17:40:37.609564Z","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"sources":["s3"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]}}},"metrics_config":{"enabled":true,"automute_enabled":true,"collect_custom_metrics":true,"collect_cloudwatch_alarms":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}],"namespace_filters":{"include_only":["AWS/EC2"]}},"modified_at":"2025-12-10T17:40:37.867410688Z","resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{"xray_services":{"include_only":["AWS/AppSync"]}}}}}' + string: '{"data":{"id":"ab6528e3-5dab-4375-ae47-4ce93d1216e2","type":"account","attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole","external_id":"36416390710445e7be511e1622ee4149"},"aws_account_id":"123456789012","aws_partition":"aws","aws_regions":{"include_only":["us-east-1"]},"created_at":"2025-08-06T17:41:52.510132Z","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"sources":["s3"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]}}},"metrics_config":{"enabled":true,"automute_enabled":true,"collect_custom_metrics":true,"collect_cloudwatch_alarms":true,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}],"namespace_filters":{"include_only":["AWS/EC2"]}},"modified_at":"2025-08-06T17:41:52.717094345Z","resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{"xray_services":{"include_only":["AWS/AppSync"]}}}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Wed, 10 Dec 2025 17:40:36 GMT +- recorded_at: Wed, 06 Aug 2025 17:41:51 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/integration/aws/accounts/0c2238ef-3b8e-4d25-85df-b18f96ac7031 + uri: https://api.datadoghq.com/api/v2/integration/aws/accounts/ab6528e3-5dab-4375-ae47-4ce93d1216e2 response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-Bad-Request-response.frozen b/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-Bad-Request-response.frozen index e550a6022163..2ad05fcd48b3 100644 --- a/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-Bad-Request-response.frozen +++ b/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-Bad-Request-response.frozen @@ -1 +1 @@ -2025-12-10T17:42:50.556Z \ No newline at end of file +2025-08-06T17:41:53.059Z \ No newline at end of file diff --git a/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-Bad-Request-response.yml b/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-Bad-Request-response.yml index 0d6d19af9eae..83f8744f9292 100644 --- a/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-Bad-Request-response.yml +++ b/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-Bad-Request-response.yml @@ -1,5 +1,5 @@ http_interactions: -- recorded_at: Wed, 10 Dec 2025 17:42:50 GMT +- recorded_at: Wed, 06 Aug 2025 17:41:53 GMT request: body: encoding: UTF-8 @@ -14,45 +14,44 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"0c358c9f-84fd-4fe5-b0e9-722d787de213","type":"account","attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole","external_id":"84a9c55851ce4a01869c503e990d325b"},"aws_account_id":"123456789012","aws_partition":"aws","aws_regions":{"include_only":["us-east-1"]},"created_at":"2025-12-10T17:42:52.162655791Z","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"sources":["s3"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]}}},"metrics_config":{"enabled":true,"automute_enabled":true,"collect_custom_metrics":false,"collect_cloudwatch_alarms":false,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}],"namespace_filters":{"include_only":["AWS/EC2"]}},"modified_at":"2025-12-10T17:42:52.162655791Z","resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{"xray_services":{"include_only":["AWS/AppSync"]}}}}}' + string: '{"data":{"id":"dff6d3ee-e90a-4df1-b0d7-6f4e1ed35acc","type":"account","attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole","external_id":"f3f5392d608c448ca4910d7adcefa849"},"aws_account_id":"123456789012","aws_partition":"aws","aws_regions":{"include_only":["us-east-1"]},"created_at":"2025-08-06T17:41:54.148895503Z","logs_config":{"lambda_forwarder":{"lambdas":["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"],"sources":["s3"],"log_source_config":{"tag_filters":[{"source":"s3","tags":["test:test"]}]}}},"metrics_config":{"enabled":true,"automute_enabled":true,"collect_custom_metrics":false,"collect_cloudwatch_alarms":false,"tag_filters":[{"namespace":"AWS/EC2","tags":["key:value"]}],"namespace_filters":{"include_only":["AWS/EC2"]}},"modified_at":"2025-08-06T17:41:54.148895503Z","resources_config":{"cloud_security_posture_management_collection":false,"extended_collection":false},"traces_config":{"xray_services":{"include_only":["AWS/AppSync"]}}}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Wed, 10 Dec 2025 17:42:50 GMT +- recorded_at: Wed, 06 Aug 2025 17:41:53 GMT request: body: encoding: UTF-8 - string: '{"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","ccm_config":{"data_export_configs":[{"bucket_name":"invalid-bucket","bucket_region":"invalid-region","report_name":"invalid-report","report_prefix":"invalid","report_type":"CUR2.0"}]},"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"}}' + string: '{"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"],"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"}}' headers: Accept: - application/json Content-Type: - application/json method: PATCH - uri: https://api.datadoghq.com/api/v2/integration/aws/accounts/0c358c9f-84fd-4fe5-b0e9-722d787de213 + uri: https://api.datadoghq.com/api/v2/integration/aws/accounts/dff6d3ee-e90a-4df1-b0d7-6f4e1ed35acc response: body: encoding: UTF-8 - string: '{"errors":[{"status":"400","title":"Bad Request","detail":"invalid - value","meta":{"ccm_config.data_export_configs[CUR2.0].bucket_region":"invalid - bucket region: invalid-region"}}]}' + string: '{"errors":[{"title":"Generic Error","detail":"cannot switch between + role and key based auth"}]}' headers: Content-Type: - application/vnd.api+json status: code: 400 message: Bad Request -- recorded_at: Wed, 10 Dec 2025 17:42:50 GMT +- recorded_at: Wed, 06 Aug 2025 17:41:53 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/integration/aws/accounts/0c358c9f-84fd-4fe5-b0e9-722d787de213 + uri: https://api.datadoghq.com/api/v2/integration/aws/accounts/dff6d3ee-e90a-4df1-b0d7-6f4e1ed35acc response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-Not-Found-response.frozen b/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-Not-Found-response.frozen index 07ac47cd4ec8..8c2f55ecb19d 100644 --- a/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-Not-Found-response.frozen +++ b/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-Not-Found-response.frozen @@ -1 +1 @@ -2025-12-10T17:43:13.852Z \ No newline at end of file +2025-08-06T17:41:54.735Z \ No newline at end of file diff --git a/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-Not-Found-response.yml b/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-Not-Found-response.yml index 99d068bfe343..02e784a97c0b 100644 --- a/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-Not-Found-response.yml +++ b/cassettes/features/v2/aws_integration/Update-an-AWS-integration-returns-Not-Found-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Wed, 10 Dec 2025 17:43:13 GMT +- recorded_at: Wed, 06 Aug 2025 17:41:54 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"account_tags":["key:value"],"auth_config":{"role_name":"DatadogIntegrationRole"},"aws_account_id":"123456789012","aws_partition":"aws","ccm_config":{"data_export_configs":[{"bucket_name":"notfound-bucket","bucket_region":"eu-west-1","report_name":"notfound-report","report_prefix":"notfound","report_type":"CUR2.0"}]},"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"}}' + string: '{"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"}}' headers: Accept: - application/json diff --git a/examples/v2/aws-integration/CreateAWSAccount.rb b/examples/v2/aws-integration/CreateAWSAccount.rb index d3fef8de4bbb..0c3d16d03a13 100644 --- a/examples/v2/aws-integration/CreateAWSAccount.rb +++ b/examples/v2/aws-integration/CreateAWSAccount.rb @@ -15,17 +15,6 @@ }), aws_account_id: "123456789012", aws_partition: DatadogAPIClient::V2::AWSAccountPartition::AWS, - ccm_config: DatadogAPIClient::V2::AWSCCMConfig.new({ - data_export_configs: [ - DatadogAPIClient::V2::DataExportConfig.new({ - bucket_name: "my-bucket", - bucket_region: "us-east-1", - report_name: "my-report", - report_prefix: "reports", - report_type: "CUR2.0", - }), - ], - }), logs_config: DatadogAPIClient::V2::AWSLogsConfig.new({ lambda_forwarder: DatadogAPIClient::V2::AWSLambdaForwarderConfig.new({ lambdas: [ diff --git a/examples/v2/aws-integration/CreateAWSAccount_1716720881.rb b/examples/v2/aws-integration/CreateAWSAccount_1716720881.rb index c885185ef605..5a4fa555447f 100644 --- a/examples/v2/aws-integration/CreateAWSAccount_1716720881.rb +++ b/examples/v2/aws-integration/CreateAWSAccount_1716720881.rb @@ -14,17 +14,6 @@ }), aws_account_id: "123456789012", aws_partition: DatadogAPIClient::V2::AWSAccountPartition::AWS, - ccm_config: DatadogAPIClient::V2::AWSCCMConfig.new({ - data_export_configs: [ - DatadogAPIClient::V2::DataExportConfig.new({ - bucket_name: "my-bucket", - bucket_region: "us-east-1", - report_name: "my-report", - report_prefix: "reports", - report_type: "CUR2.0", - }), - ], - }), logs_config: DatadogAPIClient::V2::AWSLogsConfig.new({ lambda_forwarder: DatadogAPIClient::V2::AWSLambdaForwarderConfig.new({ lambdas: [ diff --git a/examples/v2/aws-integration/UpdateAWSAccount.rb b/examples/v2/aws-integration/UpdateAWSAccount.rb index b0f95eb6af4b..1e7596a9e804 100644 --- a/examples/v2/aws-integration/UpdateAWSAccount.rb +++ b/examples/v2/aws-integration/UpdateAWSAccount.rb @@ -17,17 +17,6 @@ }), aws_account_id: "123456789012", aws_partition: DatadogAPIClient::V2::AWSAccountPartition::AWS, - ccm_config: DatadogAPIClient::V2::AWSCCMConfig.new({ - data_export_configs: [ - DatadogAPIClient::V2::DataExportConfig.new({ - bucket_name: "updated-bucket", - bucket_region: "us-west-2", - report_name: "updated-report", - report_prefix: "cost-reports", - report_type: "CUR2.0", - }), - ], - }), logs_config: DatadogAPIClient::V2::AWSLogsConfig.new({ lambda_forwarder: DatadogAPIClient::V2::AWSLambdaForwarderConfig.new({ lambdas: [ diff --git a/features/v2/aws_integration.feature b/features/v2/aws_integration.feature index 9e14d0824b3d..30ded64d73f1 100644 --- a/features/v2/aws_integration.feature +++ b/features/v2/aws_integration.feature @@ -12,21 +12,21 @@ Feature: AWS Integration @team:DataDog/aws-integrations Scenario: Create an AWS account returns "AWS Account object" response Given new "CreateAWSAccount" request - And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "123456789012", "aws_partition": "aws", "ccm_config": {"data_export_configs": [{"bucket_name": "my-bucket", "bucket_region": "us-east-1", "report_name": "my-report", "report_prefix": "reports", "report_type": "CUR2.0"}]}, "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"}} + 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 200 AWS Account object @team:DataDog/aws-integrations Scenario: Create an AWS integration returns "AWS Account object" response Given new "CreateAWSAccount" request - 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", "ccm_config": {"data_export_configs": [{"bucket_name": "my-bucket", "bucket_region": "us-east-1", "report_name": "my-report", "report_prefix": "reports", "report_type": "CUR2.0"}]}, "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"}} + 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"], "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 200 AWS Account object @team:DataDog/aws-integrations Scenario: Create an AWS integration returns "Bad Request" response Given new "CreateAWSAccount" request - And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "123456789012", "aws_partition": "aws-invalid", "ccm_config": {"data_export_configs": [{"bucket_name": "my-bucket", "bucket_region": "us-east-1", "report_name": "my-report", "report_prefix": "reports", "report_type": "CUR2.0"}]}, "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"}} + 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"], "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 400 Bad Request @@ -195,7 +195,7 @@ Feature: AWS Integration Given there is a valid "aws_account_v2" in the system And new "UpdateAWSAccount" request And request contains "aws_account_config_id" parameter from "aws_account_v2.data.id" - And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "123456789012", "aws_partition": "aws", "ccm_config": {"data_export_configs": [{"bucket_name": "updated-bucket", "bucket_region": "us-west-2", "report_name": "updated-report", "report_prefix": "cost-reports", "report_type": "CUR2.0"}]}, "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"}} + 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 200 AWS Account object @@ -204,7 +204,7 @@ Feature: AWS Integration Given there is a valid "aws_account_v2" in the system And new "UpdateAWSAccount" request And request contains "aws_account_config_id" parameter from "aws_account_v2.data.id" - 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", "ccm_config": {"data_export_configs": [{"bucket_name": "invalid-bucket", "bucket_region": "invalid-region", "report_name": "invalid-report", "report_prefix": "invalid", "report_type": "CUR2.0"}]}, "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"}} + 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"], "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 400 Bad Request @@ -212,6 +212,6 @@ Feature: AWS Integration Scenario: Update an AWS integration returns "Not Found" response Given new "UpdateAWSAccount" request And request contains "aws_account_config_id" parameter with value "448169a8-251c-4344-abee-1c4edef39f7a" - And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "123456789012", "aws_partition": "aws", "ccm_config": {"data_export_configs": [{"bucket_name": "notfound-bucket", "bucket_region": "eu-west-1", "report_name": "notfound-report", "report_prefix": "notfound", "report_type": "CUR2.0"}]}, "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"}} + 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 diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 345f1ec65e1a..163e609556aa 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1204,7 +1204,6 @@ def overrides "v2.aws_auth_config" => "AWSAuthConfig", "v2.aws_auth_config_keys" => "AWSAuthConfigKeys", "v2.aws_auth_config_role" => "AWSAuthConfigRole", - "v2.awsccm_config" => "AWSCCMConfig", "v2.aws_credentials" => "AWSCredentials", "v2.aws_credentials_update" => "AWSCredentialsUpdate", "v2.aws_cur_config" => "AwsCURConfig", @@ -1907,7 +1906,6 @@ def overrides "v2.datadog_integration" => "DatadogIntegration", "v2.datadog_integration_type" => "DatadogIntegrationType", "v2.datadog_integration_update" => "DatadogIntegrationUpdate", - "v2.data_export_config" => "DataExportConfig", "v2.data_relationships_teams" => "DataRelationshipsTeams", "v2.data_relationships_teams_data_items" => "DataRelationshipsTeamsDataItems", "v2.data_relationships_teams_data_items_type" => "DataRelationshipsTeamsDataItemsType", diff --git a/lib/datadog_api_client/v2/models/aws_account_create_request_attributes.rb b/lib/datadog_api_client/v2/models/aws_account_create_request_attributes.rb index b2fe1d1797c9..d64c59594eeb 100644 --- a/lib/datadog_api_client/v2/models/aws_account_create_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/aws_account_create_request_attributes.rb @@ -38,9 +38,6 @@ class AWSAccountCreateRequestAttributes # AWS Regions to collect data from. Defaults to `include_all`. attr_accessor :aws_regions - # AWS Cloud Cost Management config. - attr_accessor :ccm_config - # AWS Logs Collection config. attr_accessor :logs_config @@ -64,7 +61,6 @@ def self.attribute_map :'aws_account_id' => :'aws_account_id', :'aws_partition' => :'aws_partition', :'aws_regions' => :'aws_regions', - :'ccm_config' => :'ccm_config', :'logs_config' => :'logs_config', :'metrics_config' => :'metrics_config', :'resources_config' => :'resources_config', @@ -81,7 +77,6 @@ def self.openapi_types :'aws_account_id' => :'String', :'aws_partition' => :'AWSAccountPartition', :'aws_regions' => :'AWSRegions', - :'ccm_config' => :'AWSCCMConfig', :'logs_config' => :'AWSLogsConfig', :'metrics_config' => :'AWSMetricsConfig', :'resources_config' => :'AWSResourcesConfig', @@ -137,10 +132,6 @@ def initialize(attributes = {}) self.aws_regions = attributes[:'aws_regions'] end - if attributes.key?(:'ccm_config') - self.ccm_config = attributes[:'ccm_config'] - end - if attributes.key?(:'logs_config') self.logs_config = attributes[:'logs_config'] end @@ -229,7 +220,6 @@ def ==(o) aws_account_id == o.aws_account_id && aws_partition == o.aws_partition && aws_regions == o.aws_regions && - ccm_config == o.ccm_config && logs_config == o.logs_config && metrics_config == o.metrics_config && resources_config == o.resources_config && @@ -241,7 +231,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [account_tags, auth_config, aws_account_id, aws_partition, aws_regions, ccm_config, logs_config, metrics_config, resources_config, traces_config, additional_properties].hash + [account_tags, auth_config, aws_account_id, aws_partition, aws_regions, logs_config, metrics_config, resources_config, traces_config, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/aws_account_response_attributes.rb b/lib/datadog_api_client/v2/models/aws_account_response_attributes.rb index 149bcad2a506..9063205acd01 100644 --- a/lib/datadog_api_client/v2/models/aws_account_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/aws_account_response_attributes.rb @@ -38,9 +38,6 @@ class AWSAccountResponseAttributes # AWS Regions to collect data from. Defaults to `include_all`. attr_accessor :aws_regions - # AWS Cloud Cost Management config. - attr_accessor :ccm_config - # Timestamp of when the account integration was created. attr_accessor :created_at @@ -70,7 +67,6 @@ def self.attribute_map :'aws_account_id' => :'aws_account_id', :'aws_partition' => :'aws_partition', :'aws_regions' => :'aws_regions', - :'ccm_config' => :'ccm_config', :'created_at' => :'created_at', :'logs_config' => :'logs_config', :'metrics_config' => :'metrics_config', @@ -89,7 +85,6 @@ def self.openapi_types :'aws_account_id' => :'String', :'aws_partition' => :'AWSAccountPartition', :'aws_regions' => :'AWSRegions', - :'ccm_config' => :'AWSCCMConfig', :'created_at' => :'Time', :'logs_config' => :'AWSLogsConfig', :'metrics_config' => :'AWSMetricsConfig', @@ -147,10 +142,6 @@ def initialize(attributes = {}) self.aws_regions = attributes[:'aws_regions'] end - if attributes.key?(:'ccm_config') - self.ccm_config = attributes[:'ccm_config'] - end - if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] end @@ -225,7 +216,6 @@ def ==(o) aws_account_id == o.aws_account_id && aws_partition == o.aws_partition && aws_regions == o.aws_regions && - ccm_config == o.ccm_config && created_at == o.created_at && logs_config == o.logs_config && metrics_config == o.metrics_config && @@ -239,7 +229,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [account_tags, auth_config, aws_account_id, aws_partition, aws_regions, ccm_config, created_at, logs_config, metrics_config, modified_at, resources_config, traces_config, additional_properties].hash + [account_tags, auth_config, aws_account_id, aws_partition, aws_regions, created_at, logs_config, metrics_config, modified_at, resources_config, traces_config, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/aws_account_update_request_attributes.rb b/lib/datadog_api_client/v2/models/aws_account_update_request_attributes.rb index 450ac815b5dd..efbdfdda1f8c 100644 --- a/lib/datadog_api_client/v2/models/aws_account_update_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/aws_account_update_request_attributes.rb @@ -38,9 +38,6 @@ class AWSAccountUpdateRequestAttributes # AWS Regions to collect data from. Defaults to `include_all`. attr_accessor :aws_regions - # AWS Cloud Cost Management config. - attr_accessor :ccm_config - # AWS Logs Collection config. attr_accessor :logs_config @@ -64,7 +61,6 @@ def self.attribute_map :'aws_account_id' => :'aws_account_id', :'aws_partition' => :'aws_partition', :'aws_regions' => :'aws_regions', - :'ccm_config' => :'ccm_config', :'logs_config' => :'logs_config', :'metrics_config' => :'metrics_config', :'resources_config' => :'resources_config', @@ -81,7 +77,6 @@ def self.openapi_types :'aws_account_id' => :'String', :'aws_partition' => :'AWSAccountPartition', :'aws_regions' => :'AWSRegions', - :'ccm_config' => :'AWSCCMConfig', :'logs_config' => :'AWSLogsConfig', :'metrics_config' => :'AWSMetricsConfig', :'resources_config' => :'AWSResourcesConfig', @@ -137,10 +132,6 @@ def initialize(attributes = {}) self.aws_regions = attributes[:'aws_regions'] end - if attributes.key?(:'ccm_config') - self.ccm_config = attributes[:'ccm_config'] - end - if attributes.key?(:'logs_config') self.logs_config = attributes[:'logs_config'] end @@ -207,7 +198,6 @@ def ==(o) aws_account_id == o.aws_account_id && aws_partition == o.aws_partition && aws_regions == o.aws_regions && - ccm_config == o.ccm_config && logs_config == o.logs_config && metrics_config == o.metrics_config && resources_config == o.resources_config && @@ -219,7 +209,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [account_tags, auth_config, aws_account_id, aws_partition, aws_regions, ccm_config, logs_config, metrics_config, resources_config, traces_config, additional_properties].hash + [account_tags, auth_config, aws_account_id, aws_partition, aws_regions, logs_config, metrics_config, resources_config, traces_config, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/awsccm_config.rb b/lib/datadog_api_client/v2/models/awsccm_config.rb deleted file mode 100644 index e0827aa3fb1e..000000000000 --- a/lib/datadog_api_client/v2/models/awsccm_config.rb +++ /dev/null @@ -1,107 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # AWS Cloud Cost Management config. - class AWSCCMConfig - include BaseGenericModel - - # List of data export configurations for Cost and Usage Reports. - attr_accessor :data_export_configs - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data_export_configs' => :'data_export_configs' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data_export_configs' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AWSCCMConfig` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data_export_configs') - if (value = attributes[:'data_export_configs']).is_a?(Array) - self.data_export_configs = value - end - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data_export_configs == o.data_export_configs && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data_export_configs, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/data_export_config.rb b/lib/datadog_api_client/v2/models/data_export_config.rb deleted file mode 100644 index 3cfcda879275..000000000000 --- a/lib/datadog_api_client/v2/models/data_export_config.rb +++ /dev/null @@ -1,145 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # AWS Cost and Usage Report data export configuration. - class DataExportConfig - include BaseGenericModel - - # Name of the S3 bucket where the Cost and Usage Report is stored. - attr_accessor :bucket_name - - # AWS region of the S3 bucket. - attr_accessor :bucket_region - - # Name of the Cost and Usage Report. - attr_accessor :report_name - - # S3 prefix where the Cost and Usage Report is stored. - attr_accessor :report_prefix - - # Type of the Cost and Usage Report. - attr_accessor :report_type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'bucket_name' => :'bucket_name', - :'bucket_region' => :'bucket_region', - :'report_name' => :'report_name', - :'report_prefix' => :'report_prefix', - :'report_type' => :'report_type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'bucket_name' => :'String', - :'bucket_region' => :'String', - :'report_name' => :'String', - :'report_prefix' => :'String', - :'report_type' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DataExportConfig` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'bucket_name') - self.bucket_name = attributes[:'bucket_name'] - end - - if attributes.key?(:'bucket_region') - self.bucket_region = attributes[:'bucket_region'] - end - - if attributes.key?(:'report_name') - self.report_name = attributes[:'report_name'] - end - - if attributes.key?(:'report_prefix') - self.report_prefix = attributes[:'report_prefix'] - end - - if attributes.key?(:'report_type') - self.report_type = attributes[:'report_type'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - bucket_name == o.bucket_name && - bucket_region == o.bucket_region && - report_name == o.report_name && - report_prefix == o.report_prefix && - report_type == o.report_type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [bucket_name, bucket_region, report_name, report_prefix, report_type, additional_properties].hash - end - end -end From ba0d1b090c7c49f1e81abc4557e9754f76bcf339 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, 12 Jan 2026 21:31:10 +0000 Subject: [PATCH 2/2] feat - Add data-quality alert monitor type support (#2899) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v1/openapi.yaml | 101 ++++++++ ...Quality-monitor-returns-OK-response.frozen | 1 + ...ta-Quality-monitor-returns-OK-response.yml | 53 ++++ .../v1/monitors/CreateMonitor_3626832481.rb | 33 +++ features/v1/monitors.feature | 9 + lib/datadog_api_client/inflector.rb | 4 + ...a_and_function_data_quality_data_source.rb | 26 ++ ...nction_data_quality_model_type_override.rb | 28 +++ ...d_function_data_quality_monitor_options.rb | 147 +++++++++++ ..._function_data_quality_query_definition.rb | 232 ++++++++++++++++++ ...r_formula_and_function_query_definition.rb | 3 +- .../v1/models/monitor_type.rb | 1 + 12 files changed, 637 insertions(+), 1 deletion(-) create mode 100644 cassettes/features/v1/monitors/Create-a-Data-Quality-monitor-returns-OK-response.frozen create mode 100644 cassettes/features/v1/monitors/Create-a-Data-Quality-monitor-returns-OK-response.yml create mode 100644 examples/v1/monitors/CreateMonitor_3626832481.rb create mode 100644 lib/datadog_api_client/v1/models/monitor_formula_and_function_data_quality_data_source.rb create mode 100644 lib/datadog_api_client/v1/models/monitor_formula_and_function_data_quality_model_type_override.rb create mode 100644 lib/datadog_api_client/v1/models/monitor_formula_and_function_data_quality_monitor_options.rb create mode 100644 lib/datadog_api_client/v1/models/monitor_formula_and_function_data_quality_query_definition.rb diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 8c4bbdb21870..d3016c41cbed 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -7534,6 +7534,104 @@ components: - data_source - query type: object + MonitorFormulaAndFunctionDataQualityDataSource: + description: Data source for data quality queries. + enum: + - data_quality_metrics + example: data_quality_metrics + type: string + x-enum-varnames: + - DATA_QUALITY_METRICS + MonitorFormulaAndFunctionDataQualityMeasure: + description: 'The data quality measure to query. Common values include: + + `bytes`, `cardinality`, `custom`, `freshness`, `max`, `mean`, `min`, + + `nullness`, `percent_negative`, `percent_zero`, `row_count`, `stddev`, + + `sum`, `uniqueness`. Additional values may be supported.' + example: row_count + type: string + MonitorFormulaAndFunctionDataQualityModelTypeOverride: + description: Override for the model type used in anomaly detection. + enum: + - freshness + - percentage + - any + type: string + x-enum-varnames: + - FRESHNESS + - PERCENTAGE + - ANY + MonitorFormulaAndFunctionDataQualityMonitorOptions: + description: Monitor configuration options for data quality queries. + properties: + crontab_override: + description: Crontab expression to override the default schedule. + example: '* * * 10' + type: string + custom_sql: + description: Custom SQL query for the monitor. + example: SELECT COUNT(*) FROM users AS dd_value + type: string + custom_where: + description: Custom WHERE clause for the query. + example: USER_ID = 123 + type: string + group_by_columns: + description: Columns to group results by. + example: + - col1 + - col2 + items: + type: string + type: array + model_type_override: + $ref: '#/components/schemas/MonitorFormulaAndFunctionDataQualityModelTypeOverride' + type: object + MonitorFormulaAndFunctionDataQualityQueryDefinition: + description: A formula and functions data quality query. + properties: + data_source: + $ref: '#/components/schemas/MonitorFormulaAndFunctionDataQualityDataSource' + filter: + description: Filter expression used to match on data entities. Uses Aastra + query syntax. + example: search for column where `database:production AND table:users` + type: string + group_by: + description: Optional grouping fields for aggregation. + example: + - entity_id + items: + type: string + type: array + measure: + $ref: '#/components/schemas/MonitorFormulaAndFunctionDataQualityMeasure' + monitor_options: + $ref: '#/components/schemas/MonitorFormulaAndFunctionDataQualityMonitorOptions' + name: + description: Name of the query for use in formulas. + example: query1 + type: string + schema_version: + description: Schema version for the data quality query. + example: 0.0.1 + type: string + scope: + description: 'Optional scoping expression to further filter metrics. Uses + metrics filter syntax. + + This is useful when an entity has been configured to emit metrics with + additional tags.' + example: env:production + type: string + required: + - name + - data_source + - measure + - filter + type: object MonitorFormulaAndFunctionEventAggregation: description: Aggregation methods for event platform queries. enum: @@ -7685,6 +7783,7 @@ components: oneOf: - $ref: '#/components/schemas/MonitorFormulaAndFunctionEventQueryDefinition' - $ref: '#/components/schemas/MonitorFormulaAndFunctionCostQueryDefinition' + - $ref: '#/components/schemas/MonitorFormulaAndFunctionDataQualityQueryDefinition' MonitorGroupSearchResponse: description: The response of a monitor group search. example: @@ -8523,6 +8622,7 @@ components: - database-monitoring alert - network-performance alert - cost alert + - data-quality alert example: query alert type: string x-enum-varnames: @@ -8545,6 +8645,7 @@ components: - DATABASE_MONITORING_ALERT - NETWORK_PERFORMANCE_ALERT - COST_ALERT + - DATA_QUALITY_ALERT MonitorUpdateRequest: description: Object describing a monitor update request. properties: diff --git a/cassettes/features/v1/monitors/Create-a-Data-Quality-monitor-returns-OK-response.frozen b/cassettes/features/v1/monitors/Create-a-Data-Quality-monitor-returns-OK-response.frozen new file mode 100644 index 000000000000..46cc74fab73c --- /dev/null +++ b/cassettes/features/v1/monitors/Create-a-Data-Quality-monitor-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-12T17:23:49.629Z \ No newline at end of file diff --git a/cassettes/features/v1/monitors/Create-a-Data-Quality-monitor-returns-OK-response.yml b/cassettes/features/v1/monitors/Create-a-Data-Quality-monitor-returns-OK-response.yml new file mode 100644 index 000000000000..2a644ff45d94 --- /dev/null +++ b/cassettes/features/v1/monitors/Create-a-Data-Quality-monitor-returns-OK-response.yml @@ -0,0 +1,53 @@ +http_interactions: +- recorded_at: Mon, 12 Jan 2026 17:23:49 GMT + request: + body: + encoding: UTF-8 + string: '{"message":"Data quality alert triggered","name":"Test-Create_a_Data_Quality_monitor_returns_OK_response-1768238629","options":{"thresholds":{"critical":100},"variables":[{"data_source":"data_quality_metrics","filter":"search + for column where `database:production AND table:users`","group_by":["entity_id"],"measure":"row_count","name":"query1"}]},"priority":3,"query":"formula(\"query1\").last(\"5m\") + > 100","tags":["test:testcreateadataqualitymonitorreturnsokresponse1768238629","env:ci"],"type":"data-quality + alert"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/monitor + response: + body: + encoding: UTF-8 + string: '{"id":250323411,"org_id":321813,"type":"data-quality alert","name":"Test-Create_a_Data_Quality_monitor_returns_OK_response-1768238629","message":"Data + quality alert triggered","tags":["test:testcreateadataqualitymonitorreturnsokresponse1768238629","env:ci"],"query":"formula(\"query1\").last(\"5m\") + > 100","options":{"thresholds":{"critical":100.0},"variables":[{"data_source":"data_quality_metrics","filter":"search + for column where `database:production AND table:users`","group_by":["entity_id"],"measure":"row_count","name":"query1"}],"notify_no_data":false,"notify_audit":false,"new_host_delay":300,"include_tags":true,"silenced":{}},"multi":false,"created_at":1768238629000,"created":"2026-01-12T17:23:49.782143+00:00","modified":"2026-01-12T17:23:49.782143+00:00","deleted":null,"priority":3,"restricted_roles":null,"restriction_policy":null,"draft_status":"published","assets":[],"overall_state_modified":null,"overall_state":"No + Data","creator":{"name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","email":"team-intg-tools-libs-spam@datadoghq.com","id":2320499}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Mon, 12 Jan 2026 17:23:49 GMT + request: + body: null + headers: + Accept: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v1/monitor/250323411 + response: + body: + encoding: UTF-8 + string: '{"deleted_monitor_id":250323411} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/examples/v1/monitors/CreateMonitor_3626832481.rb b/examples/v1/monitors/CreateMonitor_3626832481.rb new file mode 100644 index 000000000000..a205c2f35e7c --- /dev/null +++ b/examples/v1/monitors/CreateMonitor_3626832481.rb @@ -0,0 +1,33 @@ +# Create a Data Quality monitor returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V1::MonitorsAPI.new + +body = DatadogAPIClient::V1::Monitor.new({ + name: "Example-Monitor", + type: DatadogAPIClient::V1::MonitorType::DATA_QUALITY_ALERT, + query: 'formula("query1").last("5m") > 100', + message: "Data quality alert triggered", + tags: [ + "test:examplemonitor", + "env:ci", + ], + priority: 3, + options: DatadogAPIClient::V1::MonitorOptions.new({ + thresholds: DatadogAPIClient::V1::MonitorThresholds.new({ + critical: 100, + }), + variables: [ + DatadogAPIClient::V1::MonitorFormulaAndFunctionDataQualityQueryDefinition.new({ + name: "query1", + data_source: DatadogAPIClient::V1::MonitorFormulaAndFunctionDataQualityDataSource::DATA_QUALITY_METRICS, + measure: "row_count", + filter: "search for column where `database:production AND table:users`", + group_by: [ + "entity_id", + ], + }), + ], + }), +}) +p api_instance.create_monitor(body) diff --git a/features/v1/monitors.feature b/features/v1/monitors.feature index 75a681927b95..af8d4522e9b2 100644 --- a/features/v1/monitors.feature +++ b/features/v1/monitors.feature @@ -42,6 +42,15 @@ Feature: Monitors When the request is sent Then the response status is 200 OK + @team:DataDog/monitor-app + Scenario: Create a Data Quality monitor returns "OK" response + Given new "CreateMonitor" request + And body with value {"name": "{{ unique }}", "type": "data-quality alert", "query": "formula(\"query1\").last(\"5m\") > 100", "message": "Data quality alert triggered", "tags": ["test:{{ unique_lower_alnum }}", "env:ci"], "priority": 3, "options": {"thresholds": {"critical": 100}, "variables": [{"name": "query1", "data_source": "data_quality_metrics", "measure": "row_count", "filter": "search for column where `database:production AND table:users`", "group_by": ["entity_id"]}]}} + When the request is sent + Then the response status is 200 OK + And the response "name" is equal to "{{ unique }}" + And the response "type" is equal to "data-quality alert" + @team:DataDog/monitor-app Scenario: Create a RUM formula and functions monitor returns "OK" response Given new "CreateMonitor" request diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 163e609556aa..bb4a9b220d44 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -331,6 +331,10 @@ def overrides "v1.monitor_formula_and_function_cost_aggregator" => "MonitorFormulaAndFunctionCostAggregator", "v1.monitor_formula_and_function_cost_data_source" => "MonitorFormulaAndFunctionCostDataSource", "v1.monitor_formula_and_function_cost_query_definition" => "MonitorFormulaAndFunctionCostQueryDefinition", + "v1.monitor_formula_and_function_data_quality_data_source" => "MonitorFormulaAndFunctionDataQualityDataSource", + "v1.monitor_formula_and_function_data_quality_model_type_override" => "MonitorFormulaAndFunctionDataQualityModelTypeOverride", + "v1.monitor_formula_and_function_data_quality_monitor_options" => "MonitorFormulaAndFunctionDataQualityMonitorOptions", + "v1.monitor_formula_and_function_data_quality_query_definition" => "MonitorFormulaAndFunctionDataQualityQueryDefinition", "v1.monitor_formula_and_function_event_aggregation" => "MonitorFormulaAndFunctionEventAggregation", "v1.monitor_formula_and_function_event_query_definition" => "MonitorFormulaAndFunctionEventQueryDefinition", "v1.monitor_formula_and_function_event_query_definition_compute" => "MonitorFormulaAndFunctionEventQueryDefinitionCompute", diff --git a/lib/datadog_api_client/v1/models/monitor_formula_and_function_data_quality_data_source.rb b/lib/datadog_api_client/v1/models/monitor_formula_and_function_data_quality_data_source.rb new file mode 100644 index 000000000000..0c0d6fad0e83 --- /dev/null +++ b/lib/datadog_api_client/v1/models/monitor_formula_and_function_data_quality_data_source.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Data source for data quality queries. + class MonitorFormulaAndFunctionDataQualityDataSource + include BaseEnumModel + + DATA_QUALITY_METRICS = "data_quality_metrics".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/monitor_formula_and_function_data_quality_model_type_override.rb b/lib/datadog_api_client/v1/models/monitor_formula_and_function_data_quality_model_type_override.rb new file mode 100644 index 000000000000..7dd0496ad42f --- /dev/null +++ b/lib/datadog_api_client/v1/models/monitor_formula_and_function_data_quality_model_type_override.rb @@ -0,0 +1,28 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Override for the model type used in anomaly detection. + class MonitorFormulaAndFunctionDataQualityModelTypeOverride + include BaseEnumModel + + FRESHNESS = "freshness".freeze + PERCENTAGE = "percentage".freeze + ANY = "any".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/monitor_formula_and_function_data_quality_monitor_options.rb b/lib/datadog_api_client/v1/models/monitor_formula_and_function_data_quality_monitor_options.rb new file mode 100644 index 000000000000..59ebfe3935fe --- /dev/null +++ b/lib/datadog_api_client/v1/models/monitor_formula_and_function_data_quality_monitor_options.rb @@ -0,0 +1,147 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Monitor configuration options for data quality queries. + class MonitorFormulaAndFunctionDataQualityMonitorOptions + include BaseGenericModel + + # Crontab expression to override the default schedule. + attr_accessor :crontab_override + + # Custom SQL query for the monitor. + attr_accessor :custom_sql + + # Custom WHERE clause for the query. + attr_accessor :custom_where + + # Columns to group results by. + attr_accessor :group_by_columns + + # Override for the model type used in anomaly detection. + attr_accessor :model_type_override + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'crontab_override' => :'crontab_override', + :'custom_sql' => :'custom_sql', + :'custom_where' => :'custom_where', + :'group_by_columns' => :'group_by_columns', + :'model_type_override' => :'model_type_override' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'crontab_override' => :'String', + :'custom_sql' => :'String', + :'custom_where' => :'String', + :'group_by_columns' => :'Array', + :'model_type_override' => :'MonitorFormulaAndFunctionDataQualityModelTypeOverride' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorFormulaAndFunctionDataQualityMonitorOptions` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'crontab_override') + self.crontab_override = attributes[:'crontab_override'] + end + + if attributes.key?(:'custom_sql') + self.custom_sql = attributes[:'custom_sql'] + end + + if attributes.key?(:'custom_where') + self.custom_where = attributes[:'custom_where'] + end + + if attributes.key?(:'group_by_columns') + if (value = attributes[:'group_by_columns']).is_a?(Array) + self.group_by_columns = value + end + end + + if attributes.key?(:'model_type_override') + self.model_type_override = attributes[:'model_type_override'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + crontab_override == o.crontab_override && + custom_sql == o.custom_sql && + custom_where == o.custom_where && + group_by_columns == o.group_by_columns && + model_type_override == o.model_type_override && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [crontab_override, custom_sql, custom_where, group_by_columns, model_type_override, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/monitor_formula_and_function_data_quality_query_definition.rb b/lib/datadog_api_client/v1/models/monitor_formula_and_function_data_quality_query_definition.rb new file mode 100644 index 000000000000..581fdf5b2b76 --- /dev/null +++ b/lib/datadog_api_client/v1/models/monitor_formula_and_function_data_quality_query_definition.rb @@ -0,0 +1,232 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # A formula and functions data quality query. + class MonitorFormulaAndFunctionDataQualityQueryDefinition + include BaseGenericModel + + # Data source for data quality queries. + attr_reader :data_source + + # Filter expression used to match on data entities. Uses Aastra query syntax. + attr_reader :filter + + # Optional grouping fields for aggregation. + attr_accessor :group_by + + # The data quality measure to query. Common values include: + # `bytes`, `cardinality`, `custom`, `freshness`, `max`, `mean`, `min`, + # `nullness`, `percent_negative`, `percent_zero`, `row_count`, `stddev`, + # `sum`, `uniqueness`. Additional values may be supported. + attr_reader :measure + + # Monitor configuration options for data quality queries. + attr_accessor :monitor_options + + # Name of the query for use in formulas. + attr_reader :name + + # Schema version for the data quality query. + attr_accessor :schema_version + + # Optional scoping expression to further filter metrics. Uses metrics filter syntax. + # This is useful when an entity has been configured to emit metrics with additional tags. + attr_accessor :scope + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data_source' => :'data_source', + :'filter' => :'filter', + :'group_by' => :'group_by', + :'measure' => :'measure', + :'monitor_options' => :'monitor_options', + :'name' => :'name', + :'schema_version' => :'schema_version', + :'scope' => :'scope' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data_source' => :'MonitorFormulaAndFunctionDataQualityDataSource', + :'filter' => :'String', + :'group_by' => :'Array', + :'measure' => :'String', + :'monitor_options' => :'MonitorFormulaAndFunctionDataQualityMonitorOptions', + :'name' => :'String', + :'schema_version' => :'String', + :'scope' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorFormulaAndFunctionDataQualityQueryDefinition` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data_source') + self.data_source = attributes[:'data_source'] + end + + if attributes.key?(:'filter') + self.filter = attributes[:'filter'] + end + + if attributes.key?(:'group_by') + if (value = attributes[:'group_by']).is_a?(Array) + self.group_by = value + end + end + + if attributes.key?(:'measure') + self.measure = attributes[:'measure'] + end + + if attributes.key?(:'monitor_options') + self.monitor_options = attributes[:'monitor_options'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'schema_version') + self.schema_version = attributes[:'schema_version'] + end + + if attributes.key?(:'scope') + self.scope = attributes[:'scope'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data_source.nil? + return false if @filter.nil? + return false if @measure.nil? + return false if @name.nil? + true + end + + # Custom attribute writer method with validation + # @param data_source [Object] Object to be assigned + # @!visibility private + def data_source=(data_source) + if data_source.nil? + fail ArgumentError, 'invalid value for "data_source", data_source cannot be nil.' + end + @data_source = data_source + end + + # Custom attribute writer method with validation + # @param filter [Object] Object to be assigned + # @!visibility private + def filter=(filter) + if filter.nil? + fail ArgumentError, 'invalid value for "filter", filter cannot be nil.' + end + @filter = filter + end + + # Custom attribute writer method with validation + # @param measure [Object] Object to be assigned + # @!visibility private + def measure=(measure) + if measure.nil? + fail ArgumentError, 'invalid value for "measure", measure cannot be nil.' + end + @measure = measure + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data_source == o.data_source && + filter == o.filter && + group_by == o.group_by && + measure == o.measure && + monitor_options == o.monitor_options && + name == o.name && + schema_version == o.schema_version && + scope == o.scope && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data_source, filter, group_by, measure, monitor_options, name, schema_version, scope, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/monitor_formula_and_function_query_definition.rb b/lib/datadog_api_client/v1/models/monitor_formula_and_function_query_definition.rb index f59902f117da..8c1ee496d5cd 100644 --- a/lib/datadog_api_client/v1/models/monitor_formula_and_function_query_definition.rb +++ b/lib/datadog_api_client/v1/models/monitor_formula_and_function_query_definition.rb @@ -27,7 +27,8 @@ class << self def openapi_one_of [ :'MonitorFormulaAndFunctionEventQueryDefinition', - :'MonitorFormulaAndFunctionCostQueryDefinition' + :'MonitorFormulaAndFunctionCostQueryDefinition', + :'MonitorFormulaAndFunctionDataQualityQueryDefinition' ] end # Builds the object diff --git a/lib/datadog_api_client/v1/models/monitor_type.rb b/lib/datadog_api_client/v1/models/monitor_type.rb index a23ff91229bd..d8d40b1745a3 100644 --- a/lib/datadog_api_client/v1/models/monitor_type.rb +++ b/lib/datadog_api_client/v1/models/monitor_type.rb @@ -40,5 +40,6 @@ class MonitorType DATABASE_MONITORING_ALERT = "database-monitoring alert".freeze NETWORK_PERFORMANCE_ALERT = "network-performance alert".freeze COST_ALERT = "cost alert".freeze + DATA_QUALITY_ALERT = "data-quality alert".freeze end end