Skip to content

Commit 435640f

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Support metric filtering in integration azure GET, PUT APIs (#1680)
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 74554a1 commit 435640f

File tree

14 files changed

+143
-44
lines changed

14 files changed

+143
-44
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": "2024-07-02 18:50:24.822584",
8-
"spec_repo_commit": "fae9d797"
7+
"regenerated": "2024-07-03 18:25:12.681194",
8+
"spec_repo_commit": "ce846cd6"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-07-02 18:50:24.840415",
13-
"spec_repo_commit": "fae9d797"
12+
"regenerated": "2024-07-03 18:25:12.698893",
13+
"spec_repo_commit": "ce846cd6"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,8 @@ components:
840840
Only hosts that match one of the defined tags are imported into Datadog.'
841841
example: key:value,filter:example
842842
type: string
843+
metrics_config:
844+
$ref: '#/components/schemas/AzureAccountMetricsConfig'
843845
new_client_id:
844846
description: Your New Azure web application ID.
845847
example: new1c7f6-1234-5678-9101-3fcbf464test
@@ -864,6 +866,27 @@ components:
864866
items:
865867
$ref: '#/components/schemas/AzureAccount'
866868
type: array
869+
AzureAccountMetricsConfig:
870+
description: 'Dictionary containing the key `excluded_resource_providers` which
871+
has to be a list of Microsoft Azure Resource Provider names.
872+
873+
This feature is currently being beta tested.
874+
875+
In order to enable all resource providers for metric collection, pass:
876+
877+
`metrics_config: {"excluded_resource_providers": []}` (i.e., an empty list
878+
for `excluded_resource_providers`).'
879+
properties:
880+
excluded_resource_providers:
881+
description: List of Microsoft Azure Resource Providers to exclude from
882+
metric collection.
883+
example:
884+
- Microsoft.Sql
885+
- Microsoft.Cdn
886+
items:
887+
type: string
888+
type: array
889+
type: object
867890
CancelDowntimesByScopeRequest:
868891
description: Cancel downtimes according to scope.
869892
properties:
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2024-02-28T20:25:59.931Z"
1+
"2024-07-01T18:40:05.567Z"

cassettes/v1/Azure-Integration_213553394/Delete-an-Azure-integration-returns-OK-response_2152805638/recording.har

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
},
99
"entries": [
1010
{
11-
"_id": "28fc80566b966b1b3358284b38769d4c",
11+
"_id": "6bf7ec14e35662da9821014a7ce66339",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
15-
"bodySize": 531,
15+
"bodySize": 614,
1616
"cookies": [],
1717
"headers": [
1818
{
@@ -32,7 +32,7 @@
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"app_service_plan_filters\":\"key:value,filter:example\",\"automute\":true,\"client_id\":\"17091519-0000-0000-0000-170915195900\",\"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\":\"17091519-0000-0000-0000-170915195900\",\"new_tenant_name\":\"17091519-0000-0000-0000-170915195900\",\"resource_collection_enabled\":true,\"tenant_name\":\"17091519-0000-0000-0000-170915195900\"}"
35+
"text": "{\"app_service_plan_filters\":\"key:value,filter:example\",\"automute\":true,\"client_id\":\"17198592-0000-0000-0000-171985920500\",\"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\",\"metrics_config\":{\"excluded_resource_providers\":[\"Microsoft.Sql\",\"Microsoft.Cdn\"]},\"new_client_id\":\"17198592-0000-0000-0000-171985920500\",\"new_tenant_name\":\"17198592-0000-0000-0000-171985920500\",\"resource_collection_enabled\":true,\"tenant_name\":\"17198592-0000-0000-0000-171985920500\"}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v1/integration/azure"
@@ -57,11 +57,11 @@
5757
"status": 200,
5858
"statusText": "OK"
5959
},
60-
"startedDateTime": "2024-02-28T20:25:59.936Z",
61-
"time": 173
60+
"startedDateTime": "2024-07-01T18:40:05.576Z",
61+
"time": 151
6262
},
6363
{
64-
"_id": "493d73f332fefc7b7b8cf7d6a6b7bfea",
64+
"_id": "8e24b3ac0aacd6523dbd8e914b6b8495",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
@@ -79,13 +79,13 @@
7979
"value": "application/json"
8080
}
8181
],
82-
"headersSize": 576,
82+
"headersSize": 575,
8383
"httpVersion": "HTTP/1.1",
8484
"method": "DELETE",
8585
"postData": {
8686
"mimeType": "application/json",
8787
"params": [],
88-
"text": "{\"client_id\":\"17091519-0000-0000-0000-170915195900\",\"tenant_name\":\"17091519-0000-0000-0000-170915195900\"}"
88+
"text": "{\"client_id\":\"17198592-0000-0000-0000-171985920500\",\"tenant_name\":\"17198592-0000-0000-0000-171985920500\"}"
8989
},
9090
"queryString": [],
9191
"url": "https://api.datadoghq.com/api/v1/integration/azure"
@@ -110,11 +110,11 @@
110110
"status": 200,
111111
"statusText": "OK"
112112
},
113-
"startedDateTime": "2024-02-28T20:26:00.117Z",
114-
"time": 113
113+
"startedDateTime": "2024-07-01T18:40:05.735Z",
114+
"time": 100
115115
},
116116
{
117-
"_id": "493d73f332fefc7b7b8cf7d6a6b7bfea",
117+
"_id": "8e24b3ac0aacd6523dbd8e914b6b8495",
118118
"_order": 1,
119119
"cache": {},
120120
"request": {
@@ -132,13 +132,13 @@
132132
"value": "application/json"
133133
}
134134
],
135-
"headersSize": 576,
135+
"headersSize": 575,
136136
"httpVersion": "HTTP/1.1",
137137
"method": "DELETE",
138138
"postData": {
139139
"mimeType": "application/json",
140140
"params": [],
141-
"text": "{\"client_id\":\"17091519-0000-0000-0000-170915195900\",\"tenant_name\":\"17091519-0000-0000-0000-170915195900\"}"
141+
"text": "{\"client_id\":\"17198592-0000-0000-0000-171985920500\",\"tenant_name\":\"17198592-0000-0000-0000-171985920500\"}"
142142
},
143143
"queryString": [],
144144
"url": "https://api.datadoghq.com/api/v1/integration/azure"
@@ -163,8 +163,8 @@
163163
"status": 200,
164164
"statusText": "OK"
165165
},
166-
"startedDateTime": "2024-02-28T20:26:00.238Z",
167-
"time": 115
166+
"startedDateTime": "2024-07-01T18:40:05.842Z",
167+
"time": 83
168168
}
169169
],
170170
"pages": [],
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2024-02-28T20:26:00.368Z"
1+
"2024-07-01T18:40:05.942Z"

cassettes/v1/Azure-Integration_213553394/Update-an-Azure-integration-returns-OK-response_5343984/recording.har

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
},
99
"entries": [
1010
{
11-
"_id": "73f064101653cdc69b011e9e812ea062",
11+
"_id": "6bf7ec14e35662da9821014a7ce66339",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
15-
"bodySize": 531,
15+
"bodySize": 614,
1616
"cookies": [],
1717
"headers": [
1818
{
@@ -26,13 +26,13 @@
2626
"value": "application/json"
2727
}
2828
],
29-
"headersSize": 574,
29+
"headersSize": 573,
3030
"httpVersion": "HTTP/1.1",
3131
"method": "POST",
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"app_service_plan_filters\":\"key:value,filter:example\",\"automute\":true,\"client_id\":\"17091519-0000-0000-0000-170915196000\",\"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\":\"17091519-0000-0000-0000-170915196000\",\"new_tenant_name\":\"17091519-0000-0000-0000-170915196000\",\"resource_collection_enabled\":true,\"tenant_name\":\"17091519-0000-0000-0000-170915196000\"}"
35+
"text": "{\"app_service_plan_filters\":\"key:value,filter:example\",\"automute\":true,\"client_id\":\"17198592-0000-0000-0000-171985920500\",\"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\",\"metrics_config\":{\"excluded_resource_providers\":[\"Microsoft.Sql\",\"Microsoft.Cdn\"]},\"new_client_id\":\"17198592-0000-0000-0000-171985920500\",\"new_tenant_name\":\"17198592-0000-0000-0000-171985920500\",\"resource_collection_enabled\":true,\"tenant_name\":\"17198592-0000-0000-0000-171985920500\"}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v1/integration/azure"
@@ -57,15 +57,15 @@
5757
"status": 200,
5858
"statusText": "OK"
5959
},
60-
"startedDateTime": "2024-02-28T20:26:00.371Z",
61-
"time": 152
60+
"startedDateTime": "2024-07-01T18:40:05.948Z",
61+
"time": 213
6262
},
6363
{
64-
"_id": "ce24f58ea6739e6c62deb89b3d9173dc",
64+
"_id": "1c1491036ab1940aea38a0e5b484a5c7",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
68-
"bodySize": 531,
68+
"bodySize": 614,
6969
"cookies": [],
7070
"headers": [
7171
{
@@ -79,13 +79,13 @@
7979
"value": "application/json"
8080
}
8181
],
82-
"headersSize": 573,
82+
"headersSize": 572,
8383
"httpVersion": "HTTP/1.1",
8484
"method": "PUT",
8585
"postData": {
8686
"mimeType": "application/json",
8787
"params": [],
88-
"text": "{\"app_service_plan_filters\":\"key:value,filter:example\",\"automute\":true,\"client_id\":\"17091519-0000-0000-0000-170915196000\",\"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\":\"17091519-0000-0000-0000-170915196000\",\"new_tenant_name\":\"17091519-0000-0000-0000-170915196000\",\"resource_collection_enabled\":true,\"tenant_name\":\"17091519-0000-0000-0000-170915196000\"}"
88+
"text": "{\"app_service_plan_filters\":\"key:value,filter:example\",\"automute\":true,\"client_id\":\"17198592-0000-0000-0000-171985920500\",\"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\",\"metrics_config\":{\"excluded_resource_providers\":[\"Microsoft.Sql\",\"Microsoft.Cdn\"]},\"new_client_id\":\"17198592-0000-0000-0000-171985920500\",\"new_tenant_name\":\"17198592-0000-0000-0000-171985920500\",\"resource_collection_enabled\":true,\"tenant_name\":\"17198592-0000-0000-0000-171985920500\"}"
8989
},
9090
"queryString": [],
9191
"url": "https://api.datadoghq.com/api/v1/integration/azure"
@@ -110,11 +110,11 @@
110110
"status": 200,
111111
"statusText": "OK"
112112
},
113-
"startedDateTime": "2024-02-28T20:26:00.534Z",
114-
"time": 154
113+
"startedDateTime": "2024-07-01T18:40:06.166Z",
114+
"time": 126
115115
},
116116
{
117-
"_id": "538ea99f76863523c49059b13615f1c8",
117+
"_id": "8e24b3ac0aacd6523dbd8e914b6b8495",
118118
"_order": 0,
119119
"cache": {},
120120
"request": {
@@ -138,7 +138,7 @@
138138
"postData": {
139139
"mimeType": "application/json",
140140
"params": [],
141-
"text": "{\"client_id\":\"17091519-0000-0000-0000-170915196000\",\"tenant_name\":\"17091519-0000-0000-0000-170915196000\"}"
141+
"text": "{\"client_id\":\"17198592-0000-0000-0000-171985920500\",\"tenant_name\":\"17198592-0000-0000-0000-171985920500\"}"
142142
},
143143
"queryString": [],
144144
"url": "https://api.datadoghq.com/api/v1/integration/azure"
@@ -163,8 +163,8 @@
163163
"status": 200,
164164
"statusText": "OK"
165165
},
166-
"startedDateTime": "2024-02-28T20:26:00.694Z",
167-
"time": 124
166+
"startedDateTime": "2024-07-01T18:40:06.297Z",
167+
"time": 92
168168
}
169169
],
170170
"pages": [],

examples/v1/azure-integration/UpdateAzureHostFilters.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ const params: v1.AzureIntegrationApiUpdateAzureHostFiltersRequest = {
1818
customMetricsEnabled: true,
1919
errors: ["*"],
2020
hostFilters: "key:value,filter:example",
21+
metricsConfig: {
22+
excludedResourceProviders: ["Microsoft.Sql", "Microsoft.Cdn"],
23+
},
2124
newClientId: "new1c7f6-1234-5678-9101-3fcbf464test",
2225
newTenantName: "new1c44-1234-5678-9101-cc00736ftest",
2326
resourceCollectionEnabled: true,

examples/v1/azure-integration/UpdateAzureIntegration.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ const params: v1.AzureIntegrationApiUpdateAzureIntegrationRequest = {
2121
newClientId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
2222
newTenantName: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
2323
resourceCollectionEnabled: true,
24+
metricsConfig: {
25+
excludedResourceProviders: ["Microsoft.Sql", "Microsoft.Cdn"],
26+
},
2427
tenantName: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
2528
},
2629
};

0 commit comments

Comments
 (0)