-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathaws_integration.feature
More file actions
310 lines (268 loc) · 20.9 KB
/
Copy pathaws_integration.feature
File metadata and controls
310 lines (268 loc) · 20.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
@endpoint(aws-integration) @endpoint(aws-integration-v2)
Feature: AWS Integration
Configure your Datadog-AWS integration directly through the Datadog API.
For more information, see the [AWS integration
page](https://docs.datadoghq.com/integrations/amazon_web_services).
Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "AWSIntegration" API
@skip @team:DataDog/aws-integrations
Scenario: Create AWS CCM config returns "AWS CCM Config object" response
Given operation "CreateAWSAccountCCMConfig" enabled
And new "CreateAWSAccountCCMConfig" request
And request contains "aws_account_config_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"ccm_config": {"data_export_configs": [{"bucket_name": "billing", "bucket_region": "us-east-1", "report_name": "cost-and-usage-report", "report_prefix": "reports", "report_type": "CUR2.0"}]}}, "type": "ccm_config"}}
When the request is sent
Then the response status is 200 AWS CCM Config object
@skip @team:DataDog/aws-integrations
Scenario: Create AWS CCM config returns "Conflict" response
Given operation "CreateAWSAccountCCMConfig" enabled
And new "CreateAWSAccountCCMConfig" request
And request contains "aws_account_config_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"ccm_config": {"data_export_configs": [{"bucket_name": "billing", "bucket_region": "us-east-1", "report_name": "cost-and-usage-report", "report_prefix": "reports", "report_type": "CUR2.0"}]}}, "type": "ccm_config"}}
When the request is sent
Then the response status is 409 Conflict
@skip @team:DataDog/aws-integrations
Scenario: Create AWS CCM config returns "Not Found" response
Given operation "CreateAWSAccountCCMConfig" enabled
And new "CreateAWSAccountCCMConfig" request
And request contains "aws_account_config_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"ccm_config": {"data_export_configs": [{"bucket_name": "billing", "bucket_region": "us-east-1", "report_name": "cost-and-usage-report", "report_prefix": "reports", "report_type": "CUR2.0"}]}}, "type": "ccm_config"}}
When the request is sent
Then the response status is 404 Not Found
@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", "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", "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", "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
@team:DataDog/aws-integrations
Scenario: Create an AWS integration returns "Conflict" response
Given there is a valid "aws_account_v2" in the system
And 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", "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 409 Conflict
@generated @skip @team:DataDog/aws-integrations
Scenario: Create an Amazon EventBridge source returns "Amazon EventBridge source created." response
Given new "CreateAWSEventBridgeSource" request
And body with value {"data": {"attributes": {"account_id": "123456789012", "create_event_bus": true, "event_generator_name": "app-alerts", "region": "us-east-1"}, "type": "event_bridge"}}
When the request is sent
Then the response status is 200 Amazon EventBridge source created.
@generated @skip @team:DataDog/aws-integrations
Scenario: Create an Amazon EventBridge source returns "Bad Request" response
Given new "CreateAWSEventBridgeSource" request
And body with value {"data": {"attributes": {"account_id": "123456789012", "create_event_bus": true, "event_generator_name": "app-alerts", "region": "us-east-1"}, "type": "event_bridge"}}
When the request is sent
Then the response status is 400 Bad Request
@generated @skip @team:DataDog/aws-integrations
Scenario: Create an Amazon EventBridge source returns "Conflict" response
Given new "CreateAWSEventBridgeSource" request
And body with value {"data": {"attributes": {"account_id": "123456789012", "create_event_bus": true, "event_generator_name": "app-alerts", "region": "us-east-1"}, "type": "event_bridge"}}
When the request is sent
Then the response status is 409 Conflict
@skip @team:DataDog/aws-integrations
Scenario: Delete AWS CCM config returns "No Content" response
Given operation "DeleteAWSAccountCCMConfig" enabled
And new "DeleteAWSAccountCCMConfig" request
And request contains "aws_account_config_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 204 No Content
@skip @team:DataDog/aws-integrations
Scenario: Delete AWS CCM config returns "Not Found" response
Given operation "DeleteAWSAccountCCMConfig" enabled
And new "DeleteAWSAccountCCMConfig" request
And request contains "aws_account_config_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found
@team:DataDog/aws-integrations
Scenario: Delete an AWS integration returns "Bad Request" response
Given new "DeleteAWSAccount" request
And request contains "aws_account_config_id" parameter with value "not-a-uuid"
When the request is sent
Then the response status is 400 Bad Request
@team:DataDog/aws-integrations
Scenario: Delete an AWS integration returns "No Content" response
Given there is a valid "aws_account_v2" in the system
And new "DeleteAWSAccount" request
And request contains "aws_account_config_id" parameter from "aws_account_v2.data.id"
When the request is sent
Then the response status is 204 No Content
@team:DataDog/aws-integrations
Scenario: Delete an AWS integration returns "Not Found" response
Given there is a valid "aws_account_v2" in the system
And new "DeleteAWSAccount" request
And request contains "aws_account_config_id" parameter with value "448169a8-251c-4344-abee-1c4edef39f7a"
When the request is sent
Then the response status is 404 Not Found
@generated @skip @team:DataDog/aws-integrations
Scenario: Delete an Amazon EventBridge source returns "Amazon EventBridge source deleted." response
Given new "DeleteAWSEventBridgeSource" request
And body with value {"data": {"attributes": {"account_id": "123456789012", "event_generator_name": "app-alerts-zyxw3210", "region": "us-east-1"}, "type": "event_bridge"}}
When the request is sent
Then the response status is 200 Amazon EventBridge source deleted.
@generated @skip @team:DataDog/aws-integrations
Scenario: Delete an Amazon EventBridge source returns "Bad Request" response
Given new "DeleteAWSEventBridgeSource" request
And body with value {"data": {"attributes": {"account_id": "123456789012", "event_generator_name": "app-alerts-zyxw3210", "region": "us-east-1"}, "type": "event_bridge"}}
When the request is sent
Then the response status is 400 Bad Request
@team:DataDog/aws-integrations
Scenario: Generate a new external ID returns "AWS External ID object" response
Given new "CreateNewAWSExternalID" request
When the request is sent
Then the response status is 200 AWS External ID object
@team:DataDog/aws-integrations
Scenario: Generate new external ID returns "AWS External ID object" response
Given new "CreateNewAWSExternalID" request
When the request is sent
Then the response status is 200 AWS External ID object
@skip @team:DataDog/aws-integrations
Scenario: Get AWS CCM config returns "AWS CCM Config object" response
Given operation "GetAWSAccountCCMConfig" enabled
And new "GetAWSAccountCCMConfig" request
And request contains "aws_account_config_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 AWS CCM Config object
@skip @team:DataDog/aws-integrations
Scenario: Get AWS CCM config returns "Not Found" response
Given operation "GetAWSAccountCCMConfig" enabled
And new "GetAWSAccountCCMConfig" request
And request contains "aws_account_config_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found
@generated @skip @team:DataDog/aws-integrations
Scenario: Get AWS integration IAM permissions returns "AWS IAM Permissions object" response
Given new "GetAWSIntegrationIAMPermissions" request
When the request is sent
Then the response status is 200 AWS IAM Permissions object
@team:DataDog/aws-integrations
Scenario: Get AWS integration standard IAM permissions returns "AWS IAM Permissions object" response
Given new "GetAWSIntegrationIAMPermissionsStandard" request
When the request is sent
Then the response status is 200 AWS IAM Permissions object
@generated @skip @team:DataDog/aws-integrations
Scenario: Get AWS integration standard IAM permissions returns "AWS integration standard IAM permissions." response
Given new "GetAWSIntegrationIAMPermissionsStandard" request
When the request is sent
Then the response status is 200 AWS integration standard IAM permissions.
@generated @skip @team:DataDog/aws-integrations
Scenario: Get all Amazon EventBridge sources returns "Amazon EventBridge sources list." response
Given new "ListAWSEventBridgeSources" request
When the request is sent
Then the response status is 200 Amazon EventBridge sources list.
@generated @skip @team:DataDog/aws-integrations
Scenario: Get all Amazon EventBridge sources returns "Bad Request" response
Given new "ListAWSEventBridgeSources" request
When the request is sent
Then the response status is 400 Bad Request
@team:DataDog/aws-integrations
Scenario: Get an AWS integration by config ID returns "AWS Account object" response
Given there is a valid "aws_account_v2" in the system
And new "GetAWSAccount" request
And request contains "aws_account_config_id" parameter from "aws_account_v2.data.id"
When the request is sent
Then the response status is 200 AWS Account object
@team:DataDog/aws-integrations
Scenario: Get an AWS integration by config ID returns "Bad Request" response
Given new "GetAWSAccount" request
And request contains "aws_account_config_id" parameter with value "not-a-uuid"
When the request is sent
Then the response status is 400 Bad Request
@team:DataDog/aws-integrations
Scenario: Get an AWS integration by config ID returns "Not Found" response
Given new "GetAWSAccount" request
And request contains "aws_account_config_id" parameter with value "448169a8-251c-4344-abee-1c4edef39f7a"
When the request is sent
Then the response status is 404 Not Found
@team:DataDog/aws-integrations
Scenario: Get resource collection IAM permissions returns "AWS IAM Permissions object" response
Given new "GetAWSIntegrationIAMPermissionsResourceCollection" request
When the request is sent
Then the response status is 200 AWS IAM Permissions object
@generated @skip @team:DataDog/aws-integrations
Scenario: Get resource collection IAM permissions returns "AWS integration resource collection IAM permissions." response
Given new "GetAWSIntegrationIAMPermissionsResourceCollection" request
When the request is sent
Then the response status is 200 AWS integration resource collection IAM permissions.
@team:DataDog/aws-integrations
Scenario: List all AWS integrations returns "AWS Accounts List object" response
Given new "ListAWSAccounts" request
When the request is sent
Then the response status is 200 AWS Accounts List object
@team:DataDog/aws-integrations
Scenario: List available namespaces returns "AWS Namespaces List object" response
Given new "ListAWSNamespaces" request
When the request is sent
Then the response status is 200 AWS Namespaces List object
@team:DataDog/aws-integrations
Scenario: List namespaces returns "AWS Namespaces List object" response
Given new "ListAWSNamespaces" request
When the request is sent
Then the response status is 200 AWS Namespaces List object
@skip @team:DataDog/aws-integrations
Scenario: Update AWS CCM config returns "AWS CCM Config object" response
Given operation "UpdateAWSAccountCCMConfig" enabled
And new "UpdateAWSAccountCCMConfig" request
And request contains "aws_account_config_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"ccm_config": {"data_export_configs": [{"bucket_name": "billing", "bucket_region": "us-east-1", "report_name": "cost-and-usage-report", "report_prefix": "reports", "report_type": "CUR2.0"}]}}, "type": "ccm_config"}}
When the request is sent
Then the response status is 200 AWS CCM Config object
@skip @team:DataDog/aws-integrations
Scenario: Update AWS CCM config returns "Not Found" response
Given operation "UpdateAWSAccountCCMConfig" enabled
And new "UpdateAWSAccountCCMConfig" request
And request contains "aws_account_config_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"ccm_config": {"data_export_configs": [{"bucket_name": "billing", "bucket_region": "us-east-1", "report_name": "cost-and-usage-report", "report_prefix": "reports", "report_type": "CUR2.0"}]}}, "type": "ccm_config"}}
When the request is sent
Then the response status is 404 Not Found
@team:DataDog/aws-integrations
Scenario: Update an AWS integration returns "AWS Account object" response
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", "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: Update an AWS integration returns "Bad Request" response
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", "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
@team:DataDog/aws-integrations
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", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}, "sources": ["s3"]}}, "metrics_config": {"automute_enabled": true, "collect_cloudwatch_alarms": true, "collect_custom_metrics": true, "enabled": true, "tag_filters": [{"namespace": "AWS/EC2", "tags": ["key:value"]}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}}
When the request is sent
Then the response status is 404 Not Found
@generated @skip @team:DataDog/aws-integrations
Scenario: Validate AWS CCM config returns "AWS CCM Config validation result" response
Given operation "ValidateAWSCCMConfig" enabled
And new "ValidateAWSCCMConfig" request
And body with value {"data": {"attributes": {"account_id": "123456789012", "bucket_name": "billing", "bucket_region": "us-east-1", "report_name": "cost-and-usage-report", "report_prefix": "reports"}, "type": "ccm_config_validation"}}
When the request is sent
Then the response status is 200 AWS CCM Config validation result
@generated @skip @team:DataDog/aws-integrations
Scenario: Validate AWS CCM config returns "Bad Request" response
Given operation "ValidateAWSCCMConfig" enabled
And new "ValidateAWSCCMConfig" request
And body with value {"data": {"attributes": {"account_id": "123456789012", "bucket_name": "billing", "bucket_region": "us-east-1", "report_name": "cost-and-usage-report", "report_prefix": "reports"}, "type": "ccm_config_validation"}}
When the request is sent
Then the response status is 400 Bad Request