Skip to content

Commit 52bc9e3

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Enable azure update delete (#1807)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 285df4a commit 52bc9e3

9 files changed

+159
-18
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2023-12-15 16:54:06.684134",
8-
"spec_repo_commit": "358fd0af"
7+
"regenerated": "2023-12-15 17:29:36.806700",
8+
"spec_repo_commit": "0285f23a"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2023-12-15 16:54:06.731519",
13-
"spec_repo_commit": "358fd0af"
12+
"regenerated": "2023-12-15 17:29:36.827320",
13+
"spec_repo_commit": "0285f23a"
1414
}
1515
}
1616
}

examples/v1/azure-integration/DeleteAzureIntegration.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
body = AzureAccount(
1010
app_service_plan_filters="key:value,filter:example",
1111
automute=True,
12-
client_id="testc7f6-1234-5678-9101-3fcbf464test",
12+
client_id="9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
1313
client_secret="testingx./Sw*g/Y33t..R1cH+hScMDt",
1414
container_app_filters="key:value,filter:example",
1515
cspm_enabled=True,
@@ -18,10 +18,10 @@
1818
"*",
1919
],
2020
host_filters="key:value,filter:example",
21-
new_client_id="new1c7f6-1234-5678-9101-3fcbf464test",
22-
new_tenant_name="new1c44-1234-5678-9101-cc00736ftest",
21+
new_client_id="9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
22+
new_tenant_name="9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
2323
resource_collection_enabled=True,
24-
tenant_name="testc44-1234-5678-9101-cc00736ftest",
24+
tenant_name="9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
2525
)
2626

2727
configuration = Configuration()

examples/v1/azure-integration/UpdateAzureIntegration.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
body = AzureAccount(
1010
app_service_plan_filters="key:value,filter:example",
1111
automute=True,
12-
client_id="testc7f6-1234-5678-9101-3fcbf464test",
12+
client_id="9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
1313
client_secret="testingx./Sw*g/Y33t..R1cH+hScMDt",
1414
container_app_filters="key:value,filter:example",
1515
cspm_enabled=True,
@@ -18,10 +18,10 @@
1818
"*",
1919
],
2020
host_filters="key:value,filter:example",
21-
new_client_id="new1c7f6-1234-5678-9101-3fcbf464test",
22-
new_tenant_name="new1c44-1234-5678-9101-cc00736ftest",
21+
new_client_id="9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
22+
new_tenant_name="9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
2323
resource_collection_enabled=True,
24-
tenant_name="testc44-1234-5678-9101-cc00736ftest",
24+
tenant_name="9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
2525
)
2626

2727
configuration = Configuration()
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2023-12-15T17:19:40.609Z
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
interactions:
2+
- request:
3+
body: '{"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17026607-0000-0000-0000-170266078000","client_secret":"testingx./Sw*g/Y33t..R1cH+hScMDt","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","new_client_id":"17026607-0000-0000-0000-170266078000","new_tenant_name":"17026607-0000-0000-0000-170266078000","resource_collection_enabled":true,"tenant_name":"17026607-0000-0000-0000-170266078000"}'
4+
headers:
5+
accept:
6+
- application/json
7+
content-type:
8+
- application/json
9+
method: POST
10+
uri: https://api.datadoghq.com/api/v1/integration/azure
11+
response:
12+
body:
13+
string: '{}
14+
15+
'
16+
headers:
17+
content-type:
18+
- application/json
19+
status:
20+
code: 200
21+
message: OK
22+
- request:
23+
body: '{"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17026607-0000-0000-0000-170266078000","client_secret":"testingx./Sw*g/Y33t..R1cH+hScMDt","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","new_client_id":"17026607-0000-0000-0000-170266078000","new_tenant_name":"17026607-0000-0000-0000-170266078000","resource_collection_enabled":true,"tenant_name":"17026607-0000-0000-0000-170266078000"}'
24+
headers:
25+
accept:
26+
- application/json
27+
content-type:
28+
- application/json
29+
method: DELETE
30+
uri: https://api.datadoghq.com/api/v1/integration/azure
31+
response:
32+
body:
33+
string: '{}
34+
35+
'
36+
headers:
37+
content-type:
38+
- application/json
39+
status:
40+
code: 200
41+
message: OK
42+
- request:
43+
body: '{"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17026607-0000-0000-0000-170266078000","client_secret":"testingx./Sw*g/Y33t..R1cH+hScMDt","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","new_client_id":"17026607-0000-0000-0000-170266078000","new_tenant_name":"17026607-0000-0000-0000-170266078000","resource_collection_enabled":true,"tenant_name":"17026607-0000-0000-0000-170266078000"}'
44+
headers:
45+
accept:
46+
- application/json
47+
content-type:
48+
- application/json
49+
method: DELETE
50+
uri: https://api.datadoghq.com/api/v1/integration/azure
51+
response:
52+
body:
53+
string: '{}
54+
55+
'
56+
headers:
57+
content-type:
58+
- application/json
59+
status:
60+
code: 200
61+
message: OK
62+
version: 1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2023-12-15T17:19:43.390Z
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
interactions:
2+
- request:
3+
body: '{"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17026607-0000-0000-0000-170266078300","client_secret":"testingx./Sw*g/Y33t..R1cH+hScMDt","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","new_client_id":"17026607-0000-0000-0000-170266078300","new_tenant_name":"17026607-0000-0000-0000-170266078300","resource_collection_enabled":true,"tenant_name":"17026607-0000-0000-0000-170266078300"}'
4+
headers:
5+
accept:
6+
- application/json
7+
content-type:
8+
- application/json
9+
method: POST
10+
uri: https://api.datadoghq.com/api/v1/integration/azure
11+
response:
12+
body:
13+
string: '{}
14+
15+
'
16+
headers:
17+
content-type:
18+
- application/json
19+
status:
20+
code: 200
21+
message: OK
22+
- request:
23+
body: '{"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17026607-0000-0000-0000-170266078300","client_secret":"testingx./Sw*g/Y33t..R1cH+hScMDt","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","new_client_id":"17026607-0000-0000-0000-170266078300","new_tenant_name":"17026607-0000-0000-0000-170266078300","resource_collection_enabled":true,"tenant_name":"17026607-0000-0000-0000-170266078300"}'
24+
headers:
25+
accept:
26+
- application/json
27+
content-type:
28+
- application/json
29+
method: PUT
30+
uri: https://api.datadoghq.com/api/v1/integration/azure
31+
response:
32+
body:
33+
string: '{}
34+
35+
'
36+
headers:
37+
content-type:
38+
- application/json
39+
status:
40+
code: 200
41+
message: OK
42+
- request:
43+
body: '{"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17026607-0000-0000-0000-170266078300","client_secret":"testingx./Sw*g/Y33t..R1cH+hScMDt","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","new_client_id":"17026607-0000-0000-0000-170266078300","new_tenant_name":"17026607-0000-0000-0000-170266078300","resource_collection_enabled":true,"tenant_name":"17026607-0000-0000-0000-170266078300"}'
44+
headers:
45+
accept:
46+
- application/json
47+
content-type:
48+
- application/json
49+
method: DELETE
50+
uri: https://api.datadoghq.com/api/v1/integration/azure
51+
response:
52+
body:
53+
string: '{}
54+
55+
'
56+
headers:
57+
content-type:
58+
- application/json
59+
status:
60+
code: 200
61+
message: OK
62+
version: 1

tests/v1/features/azure_integration.feature

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ Feature: Azure Integration
3030
When the request is sent
3131
Then the response status is 400 Bad Request
3232

33-
@generated @skip @team:DataDog/azure-integrations
33+
@team:DataDog/azure-integrations
3434
Scenario: Delete an Azure integration returns "OK" response
35-
Given new "DeleteAzureIntegration" request
36-
And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
35+
Given there is a valid "azure_account" in the system
36+
And new "DeleteAzureIntegration" request
37+
And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "{{ uuid }}", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "{{ uuid }}", "new_tenant_name": "{{ uuid }}", "resource_collection_enabled": true, "tenant_name": "{{ uuid }}"}
3738
When the request is sent
3839
Then the response status is 200 OK
3940

@@ -70,9 +71,10 @@ Feature: Azure Integration
7071
When the request is sent
7172
Then the response status is 400 Bad Request
7273

73-
@generated @skip @team:DataDog/azure-integrations
74+
@team:DataDog/azure-integrations
7475
Scenario: Update an Azure integration returns "OK" response
75-
Given new "UpdateAzureIntegration" request
76-
And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
76+
Given there is a valid "azure_account" in the system
77+
And new "UpdateAzureIntegration" request
78+
And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "{{ uuid }}", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "{{ uuid }}", "new_tenant_name": "{{ uuid }}", "resource_collection_enabled": true, "tenant_name": "{{ uuid }}"}
7779
When the request is sent
7880
Then the response status is 200 OK

tests/v1/features/given.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,19 @@
112112
"tag": "AWS Integration",
113113
"operationId": "CreateAWSAccount"
114114
},
115+
{
116+
"parameters": [
117+
{
118+
"name": "body",
119+
"origin": "request",
120+
"value": "{\n \"app_service_plan_filters\": \"key:value,filter:example\",\n \"automute\": true,\n \"client_id\": \"{{ uuid }}\",\n \"client_secret\": \"testingx./Sw*g/Y33t..R1cH+hScMDt\",\n \"container_app_filters\": \"key:value,filter:example\",\n \"cspm_enabled\": true,\n \"custom_metrics_enabled\": true,\n \"errors\": [\"*\"],\n \"host_filters\": \"key:value,filter:example\",\n \"new_client_id\": \"{{ uuid }}\",\n \"new_tenant_name\": \"{{ uuid }}\",\n \"resource_collection_enabled\": true,\n \"tenant_name\": \"{{ uuid }}\"\n}"
121+
}
122+
],
123+
"step": "there is a valid \"azure_account\" in the system",
124+
"key": "aws_account",
125+
"tag": "Azure Integration",
126+
"operationId": "CreateAzureIntegration"
127+
},
115128
{
116129
"parameters": [
117130
{

0 commit comments

Comments
 (0)