Skip to content

Commit 0980089

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add support in azure integration endpoint for app service plan filters/cspm/custom metrics (#1278)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 6467754 commit 0980089

File tree

8 files changed

+66
-12
lines changed

8 files changed

+66
-12
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.5",
7-
"regenerated": "2023-08-15 17:01:28.345423",
8-
"spec_repo_commit": "d5b95a22"
7+
"regenerated": "2023-08-16 07:23:46.459356",
8+
"spec_repo_commit": "f7f3d222"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.5",
12-
"regenerated": "2023-08-15 17:01:28.359439",
13-
"spec_repo_commit": "d5b95a22"
12+
"regenerated": "2023-08-16 07:23:46.473906",
13+
"spec_repo_commit": "f7f3d222"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,14 @@ components:
647647
AzureAccount:
648648
description: Datadog-Azure integrations configured for your organization.
649649
properties:
650+
app_service_plan_filters:
651+
description: 'Limit the Azure app service plans that are pulled into Datadog
652+
using tags.
653+
654+
Only app service plans that match one of the defined tags are imported
655+
into Datadog.'
656+
example: key:value,filter:example
657+
type: string
650658
automute:
651659
description: Silence monitors for expected Azure VM shutdowns.
652660
example: true
@@ -659,6 +667,15 @@ components:
659667
description: Your Azure web application secret key.
660668
example: testingx./Sw*g/Y33t..R1cH+hScMDt
661669
type: string
670+
cspm_enabled:
671+
description: Enable Cloud Security Management Misconfigurations for your
672+
organization.
673+
example: true
674+
type: boolean
675+
custom_metrics_enabled:
676+
description: Enable custom metrics for your organization.
677+
example: true
678+
type: boolean
662679
errors:
663680
description: Errors in your configuration.
664681
example:

examples/v1/azure-integration/CreateAzureIntegration.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@ const apiInstance = new v1.AzureIntegrationApi(configuration);
99

1010
const params: v1.AzureIntegrationApiCreateAzureIntegrationRequest = {
1111
body: {
12+
appServicePlanFilters: "key:value,filter:example",
1213
automute: true,
1314
clientId: "testc7f6-1234-5678-9101-3fcbf464test",
1415
clientSecret: "testingx./Sw*g/Y33t..R1cH+hScMDt",
16+
cspmEnabled: true,
17+
customMetricsEnabled: true,
1518
errors: ["*"],
1619
hostFilters: "key:value,filter:example",
1720
newClientId: "new1c7f6-1234-5678-9101-3fcbf464test",

examples/v1/azure-integration/DeleteAzureIntegration.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@ const apiInstance = new v1.AzureIntegrationApi(configuration);
99

1010
const params: v1.AzureIntegrationApiDeleteAzureIntegrationRequest = {
1111
body: {
12+
appServicePlanFilters: "key:value,filter:example",
1213
automute: true,
1314
clientId: "testc7f6-1234-5678-9101-3fcbf464test",
1415
clientSecret: "testingx./Sw*g/Y33t..R1cH+hScMDt",
16+
cspmEnabled: true,
17+
customMetricsEnabled: true,
1518
errors: ["*"],
1619
hostFilters: "key:value,filter:example",
1720
newClientId: "new1c7f6-1234-5678-9101-3fcbf464test",

examples/v1/azure-integration/UpdateAzureHostFilters.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@ const apiInstance = new v1.AzureIntegrationApi(configuration);
99

1010
const params: v1.AzureIntegrationApiUpdateAzureHostFiltersRequest = {
1111
body: {
12+
appServicePlanFilters: "key:value,filter:example",
1213
automute: true,
1314
clientId: "testc7f6-1234-5678-9101-3fcbf464test",
1415
clientSecret: "testingx./Sw*g/Y33t..R1cH+hScMDt",
16+
cspmEnabled: true,
17+
customMetricsEnabled: true,
1518
errors: ["*"],
1619
hostFilters: "key:value,filter:example",
1720
newClientId: "new1c7f6-1234-5678-9101-3fcbf464test",

examples/v1/azure-integration/UpdateAzureIntegration.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@ const apiInstance = new v1.AzureIntegrationApi(configuration);
99

1010
const params: v1.AzureIntegrationApiUpdateAzureIntegrationRequest = {
1111
body: {
12+
appServicePlanFilters: "key:value,filter:example",
1213
automute: true,
1314
clientId: "testc7f6-1234-5678-9101-3fcbf464test",
1415
clientSecret: "testingx./Sw*g/Y33t..R1cH+hScMDt",
16+
cspmEnabled: true,
17+
customMetricsEnabled: true,
1518
errors: ["*"],
1619
hostFilters: "key:value,filter:example",
1720
newClientId: "new1c7f6-1234-5678-9101-3fcbf464test",

features/v1/azure_integration.feature

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,28 @@ Feature: Azure Integration
1212
@generated @skip @team:DataDog/cloud-integrations
1313
Scenario: Create an Azure integration returns "Bad Request" response
1414
Given new "CreateAzureIntegration" request
15-
And body with value {"automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
15+
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", "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", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
1616
When the request is sent
1717
Then the response status is 400 Bad Request
1818

1919
@generated @skip @team:DataDog/cloud-integrations
2020
Scenario: Create an Azure integration returns "OK" response
2121
Given new "CreateAzureIntegration" request
22-
And body with value {"automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
22+
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", "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", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
2323
When the request is sent
2424
Then the response status is 200 OK
2525

2626
@generated @skip @team:DataDog/cloud-integrations
2727
Scenario: Delete an Azure integration returns "Bad Request" response
2828
Given new "DeleteAzureIntegration" request
29-
And body with value {"automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
29+
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", "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", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
3030
When the request is sent
3131
Then the response status is 400 Bad Request
3232

3333
@generated @skip @team:DataDog/cloud-integrations
3434
Scenario: Delete an Azure integration returns "OK" response
3535
Given new "DeleteAzureIntegration" request
36-
And body with value {"automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
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", "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", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
3737
When the request is sent
3838
Then the response status is 200 OK
3939

@@ -52,27 +52,27 @@ Feature: Azure Integration
5252
@generated @skip @team:DataDog/cloud-integrations
5353
Scenario: Update Azure integration host filters returns "Bad Request" response
5454
Given new "UpdateAzureHostFilters" request
55-
And body with value {"automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
55+
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", "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", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
5656
When the request is sent
5757
Then the response status is 400 Bad Request
5858

5959
@generated @skip @team:DataDog/cloud-integrations
6060
Scenario: Update Azure integration host filters returns "OK" response
6161
Given new "UpdateAzureHostFilters" request
62-
And body with value {"automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
62+
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", "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", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
6363
When the request is sent
6464
Then the response status is 200 OK
6565

6666
@generated @skip @team:DataDog/cloud-integrations
6767
Scenario: Update an Azure integration returns "Bad Request" response
6868
Given new "UpdateAzureIntegration" request
69-
And body with value {"automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
69+
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", "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", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
7070
When the request is sent
7171
Then the response status is 400 Bad Request
7272

7373
@generated @skip @team:DataDog/cloud-integrations
7474
Scenario: Update an Azure integration returns "OK" response
7575
Given new "UpdateAzureIntegration" request
76-
And body with value {"automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
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", "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", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
7777
When the request is sent
7878
Then the response status is 200 OK

packages/datadog-api-client-v1/models/AzureAccount.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util";
1010
* Datadog-Azure integrations configured for your organization.
1111
*/
1212
export class AzureAccount {
13+
/**
14+
* Limit the Azure app service plans that are pulled into Datadog using tags.
15+
* Only app service plans that match one of the defined tags are imported into Datadog.
16+
*/
17+
"appServicePlanFilters"?: string;
1318
/**
1419
* Silence monitors for expected Azure VM shutdowns.
1520
*/
@@ -22,6 +27,14 @@ export class AzureAccount {
2227
* Your Azure web application secret key.
2328
*/
2429
"clientSecret"?: string;
30+
/**
31+
* Enable Cloud Security Management Misconfigurations for your organization.
32+
*/
33+
"cspmEnabled"?: boolean;
34+
/**
35+
* Enable custom metrics for your organization.
36+
*/
37+
"customMetricsEnabled"?: boolean;
2538
/**
2639
* Errors in your configuration.
2740
*/
@@ -53,6 +66,10 @@ export class AzureAccount {
5366
* @ignore
5467
*/
5568
static readonly attributeTypeMap: AttributeTypeMap = {
69+
appServicePlanFilters: {
70+
baseName: "app_service_plan_filters",
71+
type: "string",
72+
},
5673
automute: {
5774
baseName: "automute",
5875
type: "boolean",
@@ -65,6 +82,14 @@ export class AzureAccount {
6582
baseName: "client_secret",
6683
type: "string",
6784
},
85+
cspmEnabled: {
86+
baseName: "cspm_enabled",
87+
type: "boolean",
88+
},
89+
customMetricsEnabled: {
90+
baseName: "custom_metrics_enabled",
91+
type: "boolean",
92+
},
6893
errors: {
6994
baseName: "errors",
7095
type: "Array<string>",

0 commit comments

Comments
 (0)