From 4eef7e5b973a704bc1e9c2808f57e8efc47d2976 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 1 Jul 2024 21:28:09 +0000 Subject: [PATCH] Regenerate client from commit 175d99e4 of spec repo --- .apigentools-info | 8 ++-- .generator/schemas/v1/openapi.yaml | 23 +++++++++++ docs/datadog_api_client.v1.model.rst | 7 ++++ .../UpdateAzureHostFilters.py | 7 ++++ .../UpdateAzureIntegration.py | 7 ++++ .../v1/model/azure_account.py | 19 ++++++++- .../v1/model/azure_account_metrics_config.py | 39 +++++++++++++++++++ src/datadog_api_client/v1/models/__init__.py | 2 + ...ure_integration_returns_ok_response.frozen | 2 +- ...azure_integration_returns_ok_response.yaml | 6 +-- ...ure_integration_returns_ok_response.frozen | 2 +- ...azure_integration_returns_ok_response.yaml | 6 +-- tests/v1/features/azure_integration.feature | 12 +++--- tests/v1/features/given.json | 2 +- 14 files changed, 122 insertions(+), 20 deletions(-) create mode 100644 src/datadog_api_client/v1/model/azure_account_metrics_config.py diff --git a/.apigentools-info b/.apigentools-info index 913ce78c8c..a918e2cd29 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-07-01 17:39:12.491494", - "spec_repo_commit": "acfbfe3f" + "regenerated": "2024-07-01 21:27:39.149935", + "spec_repo_commit": "175d99e4" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-07-01 17:39:12.508105", - "spec_repo_commit": "acfbfe3f" + "regenerated": "2024-07-01 21:27:39.166710", + "spec_repo_commit": "175d99e4" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 53920ec20c..22c354ce44 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -840,6 +840,8 @@ components: Only hosts that match one of the defined tags are imported into Datadog.' example: key:value,filter:example type: string + metrics_config: + $ref: '#/components/schemas/AzureAccountMetricsConfig' new_client_id: description: Your New Azure web application ID. example: new1c7f6-1234-5678-9101-3fcbf464test @@ -864,6 +866,27 @@ components: items: $ref: '#/components/schemas/AzureAccount' type: array + AzureAccountMetricsConfig: + description: 'Dictionary containing the key `excluded_resource_providers` which + has to be a list of Microsoft Azure Resource Provider names. + + This feature is currently being beta tested. + + In order to enable all resource providers for metric collection, pass: + + `metrics_config: {"excluded_resource_providers": []}` (i.e., an empty list + for `excluded_resource_providers`).' + properties: + excluded_resource_providers: + description: List of Microsoft Azure Resource Providers to exclude from + metric collection. + example: + - Microsoft.Sql + - Microsoft.Cdn + items: + type: string + type: array + type: object CancelDowntimesByScopeRequest: description: Cancel downtimes according to scope. properties: diff --git a/docs/datadog_api_client.v1.model.rst b/docs/datadog_api_client.v1.model.rst index 2adb14ec32..5bfcba5709 100644 --- a/docs/datadog_api_client.v1.model.rst +++ b/docs/datadog_api_client.v1.model.rst @@ -316,6 +316,13 @@ azure\_account\_list\_response :members: :show-inheritance: +azure\_account\_metrics\_config +------------------------------- + +.. automodule:: datadog_api_client.v1.model.azure_account_metrics_config + :members: + :show-inheritance: + cancel\_downtimes\_by\_scope\_request ------------------------------------- diff --git a/examples/v1/azure-integration/UpdateAzureHostFilters.py b/examples/v1/azure-integration/UpdateAzureHostFilters.py index 369addd249..d1a2ee42ec 100644 --- a/examples/v1/azure-integration/UpdateAzureHostFilters.py +++ b/examples/v1/azure-integration/UpdateAzureHostFilters.py @@ -5,6 +5,7 @@ from datadog_api_client import ApiClient, Configuration from datadog_api_client.v1.api.azure_integration_api import AzureIntegrationApi from datadog_api_client.v1.model.azure_account import AzureAccount +from datadog_api_client.v1.model.azure_account_metrics_config import AzureAccountMetricsConfig body = AzureAccount( app_service_plan_filters="key:value,filter:example", @@ -18,6 +19,12 @@ "*", ], host_filters="key:value,filter:example", + metrics_config=AzureAccountMetricsConfig( + excluded_resource_providers=[ + "Microsoft.Sql", + "Microsoft.Cdn", + ], + ), new_client_id="new1c7f6-1234-5678-9101-3fcbf464test", new_tenant_name="new1c44-1234-5678-9101-cc00736ftest", resource_collection_enabled=True, diff --git a/examples/v1/azure-integration/UpdateAzureIntegration.py b/examples/v1/azure-integration/UpdateAzureIntegration.py index 7c4eeb6c54..74c3d8218f 100644 --- a/examples/v1/azure-integration/UpdateAzureIntegration.py +++ b/examples/v1/azure-integration/UpdateAzureIntegration.py @@ -5,6 +5,7 @@ from datadog_api_client import ApiClient, Configuration from datadog_api_client.v1.api.azure_integration_api import AzureIntegrationApi from datadog_api_client.v1.model.azure_account import AzureAccount +from datadog_api_client.v1.model.azure_account_metrics_config import AzureAccountMetricsConfig body = AzureAccount( app_service_plan_filters="key:value,filter:example", @@ -21,6 +22,12 @@ new_client_id="9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", new_tenant_name="9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", resource_collection_enabled=True, + metrics_config=AzureAccountMetricsConfig( + excluded_resource_providers=[ + "Microsoft.Sql", + "Microsoft.Cdn", + ], + ), tenant_name="9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", ) diff --git a/src/datadog_api_client/v1/model/azure_account.py b/src/datadog_api_client/v1/model/azure_account.py index ef8b2514d5..06dfa9f931 100644 --- a/src/datadog_api_client/v1/model/azure_account.py +++ b/src/datadog_api_client/v1/model/azure_account.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import List, Union +from typing import List, Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -13,9 +13,15 @@ ) +if TYPE_CHECKING: + from datadog_api_client.v1.model.azure_account_metrics_config import AzureAccountMetricsConfig + + class AzureAccount(ModelNormal): @cached_property def openapi_types(_): + from datadog_api_client.v1.model.azure_account_metrics_config import AzureAccountMetricsConfig + return { "app_service_plan_filters": (str,), "automute": (bool,), @@ -26,6 +32,7 @@ def openapi_types(_): "custom_metrics_enabled": (bool,), "errors": ([str],), "host_filters": (str,), + "metrics_config": (AzureAccountMetricsConfig,), "new_client_id": (str,), "new_tenant_name": (str,), "resource_collection_enabled": (bool,), @@ -42,6 +49,7 @@ def openapi_types(_): "custom_metrics_enabled": "custom_metrics_enabled", "errors": "errors", "host_filters": "host_filters", + "metrics_config": "metrics_config", "new_client_id": "new_client_id", "new_tenant_name": "new_tenant_name", "resource_collection_enabled": "resource_collection_enabled", @@ -59,6 +67,7 @@ def __init__( custom_metrics_enabled: Union[bool, UnsetType] = unset, errors: Union[List[str], UnsetType] = unset, host_filters: Union[str, UnsetType] = unset, + metrics_config: Union[AzureAccountMetricsConfig, UnsetType] = unset, new_client_id: Union[str, UnsetType] = unset, new_tenant_name: Union[str, UnsetType] = unset, resource_collection_enabled: Union[bool, UnsetType] = unset, @@ -99,6 +108,12 @@ def __init__( Only hosts that match one of the defined tags are imported into Datadog. :type host_filters: str, optional + :param metrics_config: Dictionary containing the key ``excluded_resource_providers`` which has to be a list of Microsoft Azure Resource Provider names. + This feature is currently being beta tested. + In order to enable all resource providers for metric collection, pass: + ``metrics_config: {"excluded_resource_providers": []}`` (i.e., an empty list for ``excluded_resource_providers`` ). + :type metrics_config: AzureAccountMetricsConfig, optional + :param new_client_id: Your New Azure web application ID. :type new_client_id: str, optional @@ -129,6 +144,8 @@ def __init__( kwargs["errors"] = errors if host_filters is not unset: kwargs["host_filters"] = host_filters + if metrics_config is not unset: + kwargs["metrics_config"] = metrics_config if new_client_id is not unset: kwargs["new_client_id"] = new_client_id if new_tenant_name is not unset: diff --git a/src/datadog_api_client/v1/model/azure_account_metrics_config.py b/src/datadog_api_client/v1/model/azure_account_metrics_config.py new file mode 100644 index 0000000000..4cdf76a495 --- /dev/null +++ b/src/datadog_api_client/v1/model/azure_account_metrics_config.py @@ -0,0 +1,39 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class AzureAccountMetricsConfig(ModelNormal): + @cached_property + def openapi_types(_): + return { + "excluded_resource_providers": ([str],), + } + + attribute_map = { + "excluded_resource_providers": "excluded_resource_providers", + } + + def __init__(self_, excluded_resource_providers: Union[List[str], UnsetType] = unset, **kwargs): + """ + Dictionary containing the key ``excluded_resource_providers`` which has to be a list of Microsoft Azure Resource Provider names. + This feature is currently being beta tested. + In order to enable all resource providers for metric collection, pass: + ``metrics_config: {"excluded_resource_providers": []}`` (i.e., an empty list for ``excluded_resource_providers`` ). + + :param excluded_resource_providers: List of Microsoft Azure Resource Providers to exclude from metric collection. + :type excluded_resource_providers: [str], optional + """ + if excluded_resource_providers is not unset: + kwargs["excluded_resource_providers"] = excluded_resource_providers + super().__init__(kwargs) diff --git a/src/datadog_api_client/v1/models/__init__.py b/src/datadog_api_client/v1/models/__init__.py index eca9abf854..0c4e670984 100644 --- a/src/datadog_api_client/v1/models/__init__.py +++ b/src/datadog_api_client/v1/models/__init__.py @@ -43,6 +43,7 @@ from datadog_api_client.v1.model.authentication_validation_response import AuthenticationValidationResponse from datadog_api_client.v1.model.azure_account import AzureAccount from datadog_api_client.v1.model.azure_account_list_response import AzureAccountListResponse +from datadog_api_client.v1.model.azure_account_metrics_config import AzureAccountMetricsConfig from datadog_api_client.v1.model.cancel_downtimes_by_scope_request import CancelDowntimesByScopeRequest from datadog_api_client.v1.model.canceled_downtimes_ids import CanceledDowntimesIds from datadog_api_client.v1.model.change_widget_definition import ChangeWidgetDefinition @@ -1026,6 +1027,7 @@ "AuthenticationValidationResponse", "AzureAccount", "AzureAccountListResponse", + "AzureAccountMetricsConfig", "CancelDowntimesByScopeRequest", "CanceledDowntimesIds", "ChangeWidgetDefinition", diff --git a/tests/v1/cassettes/test_scenarios/test_delete_an_azure_integration_returns_ok_response.frozen b/tests/v1/cassettes/test_scenarios/test_delete_an_azure_integration_returns_ok_response.frozen index d524edb781..3124154711 100644 --- a/tests/v1/cassettes/test_scenarios/test_delete_an_azure_integration_returns_ok_response.frozen +++ b/tests/v1/cassettes/test_scenarios/test_delete_an_azure_integration_returns_ok_response.frozen @@ -1 +1 @@ -2024-02-28T20:25:59.931Z \ No newline at end of file +2024-07-01T18:40:05.567Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_delete_an_azure_integration_returns_ok_response.yaml b/tests/v1/cassettes/test_scenarios/test_delete_an_azure_integration_returns_ok_response.yaml index e33a2c9766..d6d51b90ce 100644 --- a/tests/v1/cassettes/test_scenarios/test_delete_an_azure_integration_returns_ok_response.yaml +++ b/tests/v1/cassettes/test_scenarios/test_delete_an_azure_integration_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"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"}' + body: '{"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"}' headers: accept: - application/json @@ -20,7 +20,7 @@ interactions: code: 200 message: OK - request: - body: '{"client_id":"17091519-0000-0000-0000-170915195900","tenant_name":"17091519-0000-0000-0000-170915195900"}' + body: '{"client_id":"17198592-0000-0000-0000-171985920500","tenant_name":"17198592-0000-0000-0000-171985920500"}' headers: accept: - application/json @@ -40,7 +40,7 @@ interactions: code: 200 message: OK - request: - body: '{"client_id":"17091519-0000-0000-0000-170915195900","tenant_name":"17091519-0000-0000-0000-170915195900"}' + body: '{"client_id":"17198592-0000-0000-0000-171985920500","tenant_name":"17198592-0000-0000-0000-171985920500"}' headers: accept: - application/json diff --git a/tests/v1/cassettes/test_scenarios/test_update_an_azure_integration_returns_ok_response.frozen b/tests/v1/cassettes/test_scenarios/test_update_an_azure_integration_returns_ok_response.frozen index 331d986611..938f5155db 100644 --- a/tests/v1/cassettes/test_scenarios/test_update_an_azure_integration_returns_ok_response.frozen +++ b/tests/v1/cassettes/test_scenarios/test_update_an_azure_integration_returns_ok_response.frozen @@ -1 +1 @@ -2024-02-28T20:26:00.368Z \ No newline at end of file +2024-07-01T18:40:05.942Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_update_an_azure_integration_returns_ok_response.yaml b/tests/v1/cassettes/test_scenarios/test_update_an_azure_integration_returns_ok_response.yaml index 5e248f2d94..09c47ee2eb 100644 --- a/tests/v1/cassettes/test_scenarios/test_update_an_azure_integration_returns_ok_response.yaml +++ b/tests/v1/cassettes/test_scenarios/test_update_an_azure_integration_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"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"}' + body: '{"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"}' headers: accept: - application/json @@ -20,7 +20,7 @@ interactions: code: 200 message: OK - request: - body: '{"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"}' + body: '{"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"}' headers: accept: - application/json @@ -40,7 +40,7 @@ interactions: code: 200 message: OK - request: - body: '{"client_id":"17091519-0000-0000-0000-170915196000","tenant_name":"17091519-0000-0000-0000-170915196000"}' + body: '{"client_id":"17198592-0000-0000-0000-171985920500","tenant_name":"17198592-0000-0000-0000-171985920500"}' headers: accept: - application/json diff --git a/tests/v1/features/azure_integration.feature b/tests/v1/features/azure_integration.feature index eaa91dce65..818ae6e301 100644 --- a/tests/v1/features/azure_integration.feature +++ b/tests/v1/features/azure_integration.feature @@ -12,7 +12,7 @@ Feature: Azure Integration @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", "resource_collection_enabled": true, "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", "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "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 @@ -26,7 +26,7 @@ Feature: Azure Integration @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", "resource_collection_enabled": true, "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", "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "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 @@ -53,21 +53,21 @@ Feature: Azure Integration @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", "resource_collection_enabled": true, "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", "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "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/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", "resource_collection_enabled": true, "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", "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "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/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", "resource_collection_enabled": true, "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", "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "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 @@ -75,6 +75,6 @@ Feature: Azure Integration Scenario: Update an Azure integration returns "OK" response Given there is a valid "azure_account" in the system And new "UpdateAzureIntegration" request - 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 }}"} + 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, "metrics_config": {"excluded_resource_providers": ["Microsoft.Sql", "Microsoft.Cdn"]}, "tenant_name": "{{ uuid }}"} When the request is sent Then the response status is 200 OK diff --git a/tests/v1/features/given.json b/tests/v1/features/given.json index a773eb3254..cf63cca14d 100644 --- a/tests/v1/features/given.json +++ b/tests/v1/features/given.json @@ -117,7 +117,7 @@ { "name": "body", "origin": "request", - "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}" + "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 \"metrics_config\": {\n \"excluded_resource_providers\": [\"Microsoft.Sql\", \"Microsoft.Cdn\"]\n },\n \"tenant_name\": \"{{ uuid }}\"\n}" } ], "step": "there is a valid \"azure_account\" in the system",