From 5b77016386ac1e1d711d79568b3065cbfef676b9 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 4 Dec 2023 14:34:46 +0000 Subject: [PATCH] Regenerate client from commit 37397584 of spec repo --- .apigentools-info | 8 ++--- .generator/schemas/v1/openapi.yaml | 11 ++++-- .../CreateAzureIntegration.py | 1 + .../DeleteAzureIntegration.py | 1 + .../UpdateAzureHostFilters.py | 1 + .../UpdateAzureIntegration.py | 1 + .../v1/model/azure_account.py | 11 +++++- tests/v1/features/azure_integration.feature | 36 +++++++++---------- 8 files changed, 45 insertions(+), 25 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index d255b5ba32..599f4cbe5f 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2023-11-21 21:47:39.641703", - "spec_repo_commit": "891a7c39" + "regenerated": "2023-12-04 14:33:57.370401", + "spec_repo_commit": "37397584" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2023-11-21 21:47:40.007237", - "spec_repo_commit": "891a7c39" + "regenerated": "2023-12-04 14:33:57.397495", + "spec_repo_commit": "37397584" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 1da63b4716..5d8ae15970 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -808,8 +808,9 @@ components: example: key:value,filter:example type: string cspm_enabled: - description: Enable Cloud Security Management Misconfigurations for your - organization. + description: "When enabled, Datadog\u2019s Cloud Security Management product + will scan resource configurations monitored by this app registration.\nNote: + This requires resource_collection_enabled to be set to true." example: true type: boolean custom_metrics_enabled: @@ -840,6 +841,12 @@ components: description: Your New Azure Active Directory ID. example: new1c44-1234-5678-9101-cc00736ftest type: string + resource_collection_enabled: + description: When enabled, Datadog collects metadata and configuration info + from cloud resources (compute instances, databases, load balancers, etc.) + monitored by this app registration. + example: true + type: boolean tenant_name: description: Your Azure Active Directory ID. example: testc44-1234-5678-9101-cc00736ftest diff --git a/examples/v1/azure-integration/CreateAzureIntegration.py b/examples/v1/azure-integration/CreateAzureIntegration.py index 94011d1601..818ebe51e7 100644 --- a/examples/v1/azure-integration/CreateAzureIntegration.py +++ b/examples/v1/azure-integration/CreateAzureIntegration.py @@ -20,6 +20,7 @@ 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", ) diff --git a/examples/v1/azure-integration/DeleteAzureIntegration.py b/examples/v1/azure-integration/DeleteAzureIntegration.py index d4342eb7c8..2388bef812 100644 --- a/examples/v1/azure-integration/DeleteAzureIntegration.py +++ b/examples/v1/azure-integration/DeleteAzureIntegration.py @@ -20,6 +20,7 @@ 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", ) diff --git a/examples/v1/azure-integration/UpdateAzureHostFilters.py b/examples/v1/azure-integration/UpdateAzureHostFilters.py index c6033af3cb..369addd249 100644 --- a/examples/v1/azure-integration/UpdateAzureHostFilters.py +++ b/examples/v1/azure-integration/UpdateAzureHostFilters.py @@ -20,6 +20,7 @@ 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", ) diff --git a/examples/v1/azure-integration/UpdateAzureIntegration.py b/examples/v1/azure-integration/UpdateAzureIntegration.py index 84bd7ca4ef..095e4a84f3 100644 --- a/examples/v1/azure-integration/UpdateAzureIntegration.py +++ b/examples/v1/azure-integration/UpdateAzureIntegration.py @@ -20,6 +20,7 @@ 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", ) diff --git a/src/datadog_api_client/v1/model/azure_account.py b/src/datadog_api_client/v1/model/azure_account.py index da28d2f1fb..0793b34d14 100644 --- a/src/datadog_api_client/v1/model/azure_account.py +++ b/src/datadog_api_client/v1/model/azure_account.py @@ -28,6 +28,7 @@ def openapi_types(_): "host_filters": (str,), "new_client_id": (str,), "new_tenant_name": (str,), + "resource_collection_enabled": (bool,), "tenant_name": (str,), } @@ -43,6 +44,7 @@ def openapi_types(_): "host_filters": "host_filters", "new_client_id": "new_client_id", "new_tenant_name": "new_tenant_name", + "resource_collection_enabled": "resource_collection_enabled", "tenant_name": "tenant_name", } @@ -59,6 +61,7 @@ def __init__( host_filters: Union[str, UnsetType] = unset, new_client_id: Union[str, UnsetType] = unset, new_tenant_name: Union[str, UnsetType] = unset, + resource_collection_enabled: Union[bool, UnsetType] = unset, tenant_name: Union[str, UnsetType] = unset, **kwargs, ): @@ -82,7 +85,8 @@ def __init__( Only container apps that match one of the defined tags are imported into Datadog. :type container_app_filters: str, optional - :param cspm_enabled: Enable Cloud Security Management Misconfigurations for your organization. + :param cspm_enabled: When enabled, Datadog’s Cloud Security Management product will scan resource configurations monitored by this app registration. + Note: This requires resource_collection_enabled to be set to true. :type cspm_enabled: bool, optional :param custom_metrics_enabled: Enable custom metrics for your organization. @@ -101,6 +105,9 @@ def __init__( :param new_tenant_name: Your New Azure Active Directory ID. :type new_tenant_name: str, optional + :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. + :type resource_collection_enabled: bool, optional + :param tenant_name: Your Azure Active Directory ID. :type tenant_name: str, optional """ @@ -126,6 +133,8 @@ def __init__( kwargs["new_client_id"] = new_client_id if new_tenant_name is not unset: kwargs["new_tenant_name"] = new_tenant_name + if resource_collection_enabled is not unset: + kwargs["resource_collection_enabled"] = resource_collection_enabled if tenant_name is not unset: kwargs["tenant_name"] = tenant_name super().__init__(kwargs) diff --git a/tests/v1/features/azure_integration.feature b/tests/v1/features/azure_integration.feature index c7ef5e4b83..de79d3fb3f 100644 --- a/tests/v1/features/azure_integration.feature +++ b/tests/v1/features/azure_integration.feature @@ -9,70 +9,70 @@ Feature: Azure Integration And a valid "appKeyAuth" key in the system And an instance of "AzureIntegration" API - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/azure-integrations Scenario: Create an Azure integration returns "Bad Request" response Given new "CreateAzureIntegration" request - 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"} + 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"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/azure-integrations Scenario: Create an Azure integration returns "OK" response Given new "CreateAzureIntegration" request - 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"} + 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"} When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/azure-integrations Scenario: Delete an Azure integration returns "Bad Request" response Given new "DeleteAzureIntegration" request - 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"} + 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"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/azure-integrations Scenario: Delete an Azure integration returns "OK" response Given new "DeleteAzureIntegration" request - 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"} + 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"} When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/azure-integrations Scenario: List all Azure integrations returns "Bad Request" response Given new "ListAzureIntegration" request When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/azure-integrations Scenario: List all Azure integrations returns "OK" response Given new "ListAzureIntegration" request When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/azure-integrations Scenario: Update Azure integration host filters returns "Bad Request" response Given new "UpdateAzureHostFilters" request - 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"} + 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"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/azure-integrations Scenario: Update Azure integration host filters returns "OK" response Given new "UpdateAzureHostFilters" request - 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"} + 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"} When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/azure-integrations Scenario: Update an Azure integration returns "Bad Request" response Given new "UpdateAzureIntegration" request - 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"} + 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"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/azure-integrations Scenario: Update an Azure integration returns "OK" response Given new "UpdateAzureIntegration" request - 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"} + 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"} When the request is sent Then the response status is 200 OK