diff --git a/.apigentools-info b/.apigentools-info index c4818ca03e..6d9e9a5bc7 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2023-10-30 15:19:04.164754", - "spec_repo_commit": "483916f9" + "regenerated": "2023-10-30 20:43:57.830074", + "spec_repo_commit": "580d1734" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2023-10-30 15:19:04.179200", - "spec_repo_commit": "483916f9" + "regenerated": "2023-10-30 20:43:57.845295", + "spec_repo_commit": "580d1734" } } } \ No newline at end of file diff --git a/examples/v1/aws-integration/CreateAWSAccount.py b/examples/v1/aws-integration/CreateAWSAccount.py index 268c5e2cee..3e5d28af44 100644 --- a/examples/v1/aws-integration/CreateAWSAccount.py +++ b/examples/v1/aws-integration/CreateAWSAccount.py @@ -10,7 +10,6 @@ account_id="123456789012", account_specific_namespace_rules=dict( auto_scaling=False, - opswork=False, ), cspm_resource_collection_enabled=True, excluded_regions=[ diff --git a/tests/v1/cassettes/test_scenarios/test_create_an_aws_integration_returns_ok_response.frozen b/tests/v1/cassettes/test_scenarios/test_create_an_aws_integration_returns_ok_response.frozen new file mode 100644 index 0000000000..ed26c7409b --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_create_an_aws_integration_returns_ok_response.frozen @@ -0,0 +1 @@ +2023-10-30T20:37:07.199Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_an_aws_integration_returns_ok_response.yaml b/tests/v1/cassettes/test_scenarios/test_create_an_aws_integration_returns_ok_response.yaml new file mode 100644 index 0000000000..7b2144e8f2 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_create_an_aws_integration_returns_ok_response.yaml @@ -0,0 +1,42 @@ +interactions: +- request: + body: '{"account_id":"123456789012","account_specific_namespace_rules":{"auto_scaling":false},"cspm_resource_collection_enabled":true,"excluded_regions":["us-east-1","us-west-2"],"filter_tags":["$KEY:$VALUE"],"host_tags":["$KEY:$VALUE"],"metrics_collection_enabled":false,"resource_collection_enabled":true,"role_name":"DatadogAWSIntegrationRole"}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/integration/aws + response: + body: + string: '{"external_id":"240b016c46fe4ceb95ac0232da138c88"} + + ' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +- request: + body: '{"account_id":"123456789012","role_name":"DatadogAWSIntegrationRole"}' + headers: + accept: + - application/json + content-type: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v1/integration/aws + response: + body: + string: '{} + + ' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v1/features/aws_integration.feature b/tests/v1/features/aws_integration.feature index d86bff2b32..69b8b91be8 100644 --- a/tests/v1/features/aws_integration.feature +++ b/tests/v1/features/aws_integration.feature @@ -23,10 +23,10 @@ Feature: AWS Integration When the request is sent Then the response status is 409 Conflict Error - @generated @skip @team:DataDog/cloud-integrations + @team:DataDog/cloud-integrations Scenario: Create an AWS integration returns "OK" response Given new "CreateAWSAccount" request - And body with value {"account_id": "123456789012", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"} + And body with value {"account_id": "123456789012", "account_specific_namespace_rules": {"auto_scaling": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"} When the request is sent Then the response status is 200 OK diff --git a/tests/v1/features/undo.json b/tests/v1/features/undo.json index cb8c824383..1329863520 100644 --- a/tests/v1/features/undo.json +++ b/tests/v1/features/undo.json @@ -356,7 +356,16 @@ "tag": "AWS Integration", "undo": { "operationId": "DeleteAWSAccount", - "parameters": [], + "parameters": [ + { + "name": "body", + "origin": "request", + "template": { + "account_id": "{{account_id}}", + "role_name": "{{role_name}}" + } + } + ], "type": "unsafe" } },