-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathaws_integration.feature
More file actions
170 lines (146 loc) · 12.6 KB
/
aws_integration.feature
File metadata and controls
170 lines (146 loc) · 12.6 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
@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
@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
@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
@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
@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.
@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
@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