Skip to content

Commit 9a1a7aa

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Update Azure Spec to include Resource Collection (#1782)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 169c3fc commit 9a1a7aa

File tree

8 files changed

+45
-25
lines changed

8 files changed

+45
-25
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-11-21 21:47:39.641703",
8-
"spec_repo_commit": "891a7c39"
7+
"regenerated": "2023-12-04 14:33:57.370401",
8+
"spec_repo_commit": "37397584"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2023-11-21 21:47:40.007237",
13-
"spec_repo_commit": "891a7c39"
12+
"regenerated": "2023-12-04 14:33:57.397495",
13+
"spec_repo_commit": "37397584"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -808,8 +808,9 @@ components:
808808
example: key:value,filter:example
809809
type: string
810810
cspm_enabled:
811-
description: Enable Cloud Security Management Misconfigurations for your
812-
organization.
811+
description: "When enabled, Datadog\u2019s Cloud Security Management product
812+
will scan resource configurations monitored by this app registration.\nNote:
813+
This requires resource_collection_enabled to be set to true."
813814
example: true
814815
type: boolean
815816
custom_metrics_enabled:
@@ -840,6 +841,12 @@ components:
840841
description: Your New Azure Active Directory ID.
841842
example: new1c44-1234-5678-9101-cc00736ftest
842843
type: string
844+
resource_collection_enabled:
845+
description: When enabled, Datadog collects metadata and configuration info
846+
from cloud resources (compute instances, databases, load balancers, etc.)
847+
monitored by this app registration.
848+
example: true
849+
type: boolean
843850
tenant_name:
844851
description: Your Azure Active Directory ID.
845852
example: testc44-1234-5678-9101-cc00736ftest

examples/v1/azure-integration/CreateAzureIntegration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
host_filters="key:value,filter:example",
2121
new_client_id="new1c7f6-1234-5678-9101-3fcbf464test",
2222
new_tenant_name="new1c44-1234-5678-9101-cc00736ftest",
23+
resource_collection_enabled=True,
2324
tenant_name="testc44-1234-5678-9101-cc00736ftest",
2425
)
2526

examples/v1/azure-integration/DeleteAzureIntegration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
host_filters="key:value,filter:example",
2121
new_client_id="new1c7f6-1234-5678-9101-3fcbf464test",
2222
new_tenant_name="new1c44-1234-5678-9101-cc00736ftest",
23+
resource_collection_enabled=True,
2324
tenant_name="testc44-1234-5678-9101-cc00736ftest",
2425
)
2526

examples/v1/azure-integration/UpdateAzureHostFilters.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
host_filters="key:value,filter:example",
2121
new_client_id="new1c7f6-1234-5678-9101-3fcbf464test",
2222
new_tenant_name="new1c44-1234-5678-9101-cc00736ftest",
23+
resource_collection_enabled=True,
2324
tenant_name="testc44-1234-5678-9101-cc00736ftest",
2425
)
2526

examples/v1/azure-integration/UpdateAzureIntegration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
host_filters="key:value,filter:example",
2121
new_client_id="new1c7f6-1234-5678-9101-3fcbf464test",
2222
new_tenant_name="new1c44-1234-5678-9101-cc00736ftest",
23+
resource_collection_enabled=True,
2324
tenant_name="testc44-1234-5678-9101-cc00736ftest",
2425
)
2526

src/datadog_api_client/v1/model/azure_account.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def openapi_types(_):
2828
"host_filters": (str,),
2929
"new_client_id": (str,),
3030
"new_tenant_name": (str,),
31+
"resource_collection_enabled": (bool,),
3132
"tenant_name": (str,),
3233
}
3334

@@ -43,6 +44,7 @@ def openapi_types(_):
4344
"host_filters": "host_filters",
4445
"new_client_id": "new_client_id",
4546
"new_tenant_name": "new_tenant_name",
47+
"resource_collection_enabled": "resource_collection_enabled",
4648
"tenant_name": "tenant_name",
4749
}
4850

@@ -59,6 +61,7 @@ def __init__(
5961
host_filters: Union[str, UnsetType] = unset,
6062
new_client_id: Union[str, UnsetType] = unset,
6163
new_tenant_name: Union[str, UnsetType] = unset,
64+
resource_collection_enabled: Union[bool, UnsetType] = unset,
6265
tenant_name: Union[str, UnsetType] = unset,
6366
**kwargs,
6467
):
@@ -82,7 +85,8 @@ def __init__(
8285
Only container apps that match one of the defined tags are imported into Datadog.
8386
:type container_app_filters: str, optional
8487
85-
:param cspm_enabled: Enable Cloud Security Management Misconfigurations for your organization.
88+
:param cspm_enabled: When enabled, Datadog’s Cloud Security Management product will scan resource configurations monitored by this app registration.
89+
Note: This requires resource_collection_enabled to be set to true.
8690
:type cspm_enabled: bool, optional
8791
8892
:param custom_metrics_enabled: Enable custom metrics for your organization.
@@ -101,6 +105,9 @@ def __init__(
101105
:param new_tenant_name: Your New Azure Active Directory ID.
102106
:type new_tenant_name: str, optional
103107
108+
:param resource_collection_enabled: When enabled, Datadog collects metadata and configuration info from cloud resources (compute instances, databases, load balancers, etc.) monitored by this app registration.
109+
:type resource_collection_enabled: bool, optional
110+
104111
:param tenant_name: Your Azure Active Directory ID.
105112
:type tenant_name: str, optional
106113
"""
@@ -126,6 +133,8 @@ def __init__(
126133
kwargs["new_client_id"] = new_client_id
127134
if new_tenant_name is not unset:
128135
kwargs["new_tenant_name"] = new_tenant_name
136+
if resource_collection_enabled is not unset:
137+
kwargs["resource_collection_enabled"] = resource_collection_enabled
129138
if tenant_name is not unset:
130139
kwargs["tenant_name"] = tenant_name
131140
super().__init__(kwargs)

tests/v1/features/azure_integration.feature

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,70 +9,70 @@ Feature: Azure Integration
99
And a valid "appKeyAuth" key in the system
1010
And an instance of "AzureIntegration" API
1111

12-
@generated @skip @team:DataDog/cloud-integrations
12+
@generated @skip @team:DataDog/azure-integrations
1313
Scenario: Create an Azure integration returns "Bad Request" response
1414
Given new "CreateAzureIntegration" request
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", "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", "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", "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"}
1616
When the request is sent
1717
Then the response status is 400 Bad Request
1818

19-
@generated @skip @team:DataDog/cloud-integrations
19+
@generated @skip @team:DataDog/azure-integrations
2020
Scenario: Create an Azure integration returns "OK" response
2121
Given new "CreateAzureIntegration" request
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", "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", "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", "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"}
2323
When the request is sent
2424
Then the response status is 200 OK
2525

26-
@generated @skip @team:DataDog/cloud-integrations
26+
@generated @skip @team:DataDog/azure-integrations
2727
Scenario: Delete an Azure integration returns "Bad Request" response
2828
Given new "DeleteAzureIntegration" request
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", "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", "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", "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"}
3030
When the request is sent
3131
Then the response status is 400 Bad Request
3232

33-
@generated @skip @team:DataDog/cloud-integrations
33+
@generated @skip @team:DataDog/azure-integrations
3434
Scenario: Delete an Azure integration returns "OK" response
3535
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", "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", "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"}
3737
When the request is sent
3838
Then the response status is 200 OK
3939

40-
@generated @skip @team:DataDog/cloud-integrations
40+
@generated @skip @team:DataDog/azure-integrations
4141
Scenario: List all Azure integrations returns "Bad Request" response
4242
Given new "ListAzureIntegration" request
4343
When the request is sent
4444
Then the response status is 400 Bad Request
4545

46-
@generated @skip @team:DataDog/cloud-integrations
46+
@generated @skip @team:DataDog/azure-integrations
4747
Scenario: List all Azure integrations returns "OK" response
4848
Given new "ListAzureIntegration" request
4949
When the request is sent
5050
Then the response status is 200 OK
5151

52-
@generated @skip @team:DataDog/cloud-integrations
52+
@generated @skip @team:DataDog/azure-integrations
5353
Scenario: Update Azure integration host filters returns "Bad Request" response
5454
Given new "UpdateAzureHostFilters" request
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", "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", "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", "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"}
5656
When the request is sent
5757
Then the response status is 400 Bad Request
5858

59-
@generated @skip @team:DataDog/cloud-integrations
59+
@generated @skip @team:DataDog/azure-integrations
6060
Scenario: Update Azure integration host filters returns "OK" response
6161
Given new "UpdateAzureHostFilters" request
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", "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", "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", "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"}
6363
When the request is sent
6464
Then the response status is 200 OK
6565

66-
@generated @skip @team:DataDog/cloud-integrations
66+
@generated @skip @team:DataDog/azure-integrations
6767
Scenario: Update an Azure integration returns "Bad Request" response
6868
Given new "UpdateAzureIntegration" request
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", "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", "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", "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"}
7070
When the request is sent
7171
Then the response status is 400 Bad Request
7272

73-
@generated @skip @team:DataDog/cloud-integrations
73+
@generated @skip @team:DataDog/azure-integrations
7474
Scenario: Update an Azure integration returns "OK" response
7575
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", "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", "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"}
7777
When the request is sent
7878
Then the response status is 200 OK

0 commit comments

Comments
 (0)