From a79fad086466f08d4a175e561508bc0d6349c6b4 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 22 Mar 2021 01:49:41 +0000 Subject: [PATCH] CodeGen from PR 13512 in Azure/azure-rest-api-specs dataDog track1 config del (#13512) --- .../azure/mgmt/datadog/_configuration.py | 4 +- .../azure/mgmt/datadog/_metadata.json | 8 +- .../mgmt/datadog/_microsoft_datadog_client.py | 2 +- .../azure/mgmt/datadog/_version.py | 2 +- .../azure/mgmt/datadog/aio/_configuration.py | 4 +- .../datadog/aio/_microsoft_datadog_client.py | 2 +- .../_marketplace_agreements_operations.py | 12 +- .../aio/operations/_monitors_operations.py | 146 +++++++------- .../datadog/aio/operations/_operations.py | 8 +- ...ingle_sign_on_configurations_operations.py | 37 ++-- .../aio/operations/_tag_rules_operations.py | 33 ++- .../azure/mgmt/datadog/models/__init__.py | 20 +- .../models/_microsoft_datadog_client_enums.py | 9 + .../azure/mgmt/datadog/models/_models.py | 175 ++++++++++++---- .../azure/mgmt/datadog/models/_models_py3.py | 189 ++++++++++++++---- .../_marketplace_agreements_operations.py | 12 +- .../operations/_monitors_operations.py | 146 +++++++------- .../mgmt/datadog/operations/_operations.py | 8 +- ...ingle_sign_on_configurations_operations.py | 37 ++-- .../operations/_tag_rules_operations.py | 33 ++- 20 files changed, 540 insertions(+), 347 deletions(-) diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/_configuration.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/_configuration.py index 3e947d6b0b1f..4c417c560a0e 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/_configuration.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/_configuration.py @@ -29,7 +29,7 @@ class MicrosoftDatadogClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Microsoft Azure subscription ID. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-02-01-preview" + self.api_version = "2021-03-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-datadog/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/_metadata.json b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/_metadata.json index afa30fc94835..f26914326050 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/_metadata.json +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2020-02-01-preview", - "total_api_version_list": ["2020-02-01-preview"], + "chosen_version": "2021-03-01", + "total_api_version_list": ["2021-03-01"], "client": { "name": "MicrosoftDatadogClient", "filename": "_microsoft_datadog_client", @@ -21,7 +21,7 @@ }, "subscription_id": { "signature": "subscription_id, # type: str", - "description": "The Microsoft Azure subscription ID.", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } @@ -35,7 +35,7 @@ }, "subscription_id": { "signature": "subscription_id, # type: str", - "description": "The Microsoft Azure subscription ID.", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/_microsoft_datadog_client.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/_microsoft_datadog_client.py index c8ba724207c1..d557b59868e6 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/_microsoft_datadog_client.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/_microsoft_datadog_client.py @@ -41,7 +41,7 @@ class MicrosoftDatadogClient(object): :vartype single_sign_on_configurations: microsoft_datadog_client.operations.SingleSignOnConfigurationsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Microsoft Azure subscription ID. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/_version.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/_version.py index 20971492f129..59deb8c7263b 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/_version.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b3" +VERSION = "1.1.0" diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/_configuration.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/_configuration.py index bb2bde802381..bc46aa3a28cc 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/_configuration.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/_configuration.py @@ -27,7 +27,7 @@ class MicrosoftDatadogClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Microsoft Azure subscription ID. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-02-01-preview" + self.api_version = "2021-03-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-datadog/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/_microsoft_datadog_client.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/_microsoft_datadog_client.py index 0897bdbed9e4..c378a32e2f2b 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/_microsoft_datadog_client.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/_microsoft_datadog_client.py @@ -39,7 +39,7 @@ class MicrosoftDatadogClient(object): :vartype single_sign_on_configurations: microsoft_datadog_client.aio.operations.SingleSignOnConfigurationsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Microsoft Azure subscription ID. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_marketplace_agreements_operations.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_marketplace_agreements_operations.py index a9328b39b149..28f44e0bd4a4 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_marketplace_agreements_operations.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_marketplace_agreements_operations.py @@ -59,7 +59,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -71,7 +71,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -131,14 +131,14 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -163,7 +163,7 @@ async def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DatadogAgreementResource', pipeline_response) diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_monitors_operations.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_monitors_operations.py index d51aed0c83ea..f318c933cf51 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_monitors_operations.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_monitors_operations.py @@ -53,8 +53,7 @@ def list_api_keys( List the api keys for a given monitor resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -68,7 +67,7 @@ def list_api_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -80,8 +79,8 @@ def prepare_request(next_link=None): # Construct URL url = self.list_api_keys.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -110,7 +109,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -131,8 +130,7 @@ async def get_default_key( Get the default api key. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -146,14 +144,14 @@ async def get_default_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self.get_default_key.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -172,7 +170,7 @@ async def get_default_key( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DatadogApiKey', pipeline_response) @@ -194,8 +192,7 @@ async def set_default_key( Set the default api key. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -211,15 +208,15 @@ async def set_default_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self.set_default_key.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -245,7 +242,7 @@ async def set_default_key( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -263,8 +260,7 @@ def list_hosts( List the hosts for a given monitor resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -278,7 +274,7 @@ def list_hosts( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -290,8 +286,8 @@ def prepare_request(next_link=None): # Construct URL url = self.list_hosts.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -320,7 +316,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -341,8 +337,7 @@ def list_linked_resources( List all Azure resources associated to the same Datadog organization as the target resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -356,7 +351,7 @@ def list_linked_resources( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -368,8 +363,8 @@ def prepare_request(next_link=None): # Construct URL url = self.list_linked_resources.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -398,7 +393,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -419,8 +414,7 @@ def list_monitored_resources( List the resources currently being monitored by the Datadog monitor resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -434,7 +428,7 @@ def list_monitored_resources( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -446,8 +440,8 @@ def prepare_request(next_link=None): # Construct URL url = self.list_monitored_resources.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -476,7 +470,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -505,7 +499,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -517,7 +511,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -545,7 +539,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -565,8 +559,7 @@ def list_by_resource_group( List all monitors under the specified resource group. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DatadogMonitorResourceListResponse or the result of cls(response) @@ -578,7 +571,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -590,8 +583,8 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -619,7 +612,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -640,8 +633,7 @@ async def get( Get the properties of a specific monitor resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -655,14 +647,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -681,7 +673,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DatadogMonitorResource', pipeline_response) @@ -704,15 +696,15 @@ async def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -738,7 +730,7 @@ async def _create_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -764,8 +756,7 @@ async def begin_create( Create a monitor resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -808,8 +799,8 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } @@ -838,8 +829,7 @@ async def update( Update a monitor resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -855,15 +845,15 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -889,7 +879,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DatadogMonitorResource', pipeline_response) @@ -911,14 +901,14 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -937,7 +927,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -955,8 +945,7 @@ async def begin_delete( Delete a monitor resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -993,8 +982,8 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } @@ -1022,8 +1011,7 @@ async def refresh_set_password_link( Refresh the set password link and return a latest one. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -1037,14 +1025,14 @@ async def refresh_set_password_link( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self.refresh_set_password_link.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -1063,7 +1051,7 @@ async def refresh_set_password_link( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DatadogSetPasswordLink', pipeline_response) diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_operations.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_operations.py index 53e3da7158f4..b522b54d8273 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_operations.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_operations.py @@ -45,9 +45,9 @@ def list( self, **kwargs ) -> AsyncIterable["_models.OperationListResult"]: - """List all operations provided by Microsoft.Datadog for the 2020-02-01-preview api version. + """List all operations provided by Microsoft.Datadog for the 2021-03-01 api version. - List all operations provided by Microsoft.Datadog for the 2020-02-01-preview api version. + List all operations provided by Microsoft.Datadog for the 2021-03-01 api version. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) @@ -59,7 +59,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -95,7 +95,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_single_sign_on_configurations_operations.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_single_sign_on_configurations_operations.py index 19d9c6596618..dfeedfbb8a8f 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_single_sign_on_configurations_operations.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_single_sign_on_configurations_operations.py @@ -53,8 +53,7 @@ def list( List the single sign-on configurations for a given monitor resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -68,7 +67,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -80,8 +79,8 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -110,7 +109,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -134,15 +133,15 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), } @@ -169,7 +168,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -196,8 +195,7 @@ async def begin_create_or_update( Configures single-sign-on for this resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -243,8 +241,8 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), } @@ -274,8 +272,7 @@ async def get( Gets the datadog single sign-on resource for the given Monitor. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -291,14 +288,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), } @@ -318,7 +315,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DatadogSingleSignOnResource', pipeline_response) diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_tag_rules_operations.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_tag_rules_operations.py index 0c3123aa5c05..0e1044421ab1 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_tag_rules_operations.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/aio/operations/_tag_rules_operations.py @@ -51,8 +51,7 @@ def list( List the tag rules for a given monitor resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -66,7 +65,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -78,8 +77,8 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -108,7 +107,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -131,8 +130,7 @@ async def create_or_update( Create or update a tag rule set for a given monitor resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -150,15 +148,15 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), 'ruleSetName': self._serialize.url("rule_set_name", rule_set_name, 'str'), } @@ -185,7 +183,7 @@ async def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MonitoringTagRules', pipeline_response) @@ -207,8 +205,7 @@ async def get( Get a tag rule set for a given monitor resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -224,14 +221,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), 'ruleSetName': self._serialize.url("rule_set_name", rule_set_name, 'str'), } @@ -251,7 +248,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MonitoringTagRules', pipeline_response) diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/models/__init__.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/models/__init__.py index 214693e7ae48..68e79e98bccd 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/models/__init__.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/models/__init__.py @@ -25,7 +25,9 @@ from ._models_py3 import DatadogSingleSignOnProperties from ._models_py3 import DatadogSingleSignOnResource from ._models_py3 import DatadogSingleSignOnResourceListResponse - from ._models_py3 import ErrorResponseBody + from ._models_py3 import ErrorAdditionalInfo + from ._models_py3 import ErrorDetail + from ._models_py3 import ErrorResponse from ._models_py3 import FilteringTag from ._models_py3 import IdentityProperties from ._models_py3 import LinkedResource @@ -42,8 +44,8 @@ from ._models_py3 import OperationDisplay from ._models_py3 import OperationListResult from ._models_py3 import OperationResult - from ._models_py3 import ResourceProviderDefaultErrorResponse from ._models_py3 import ResourceSku + from ._models_py3 import SystemData from ._models_py3 import UserInfo except (SyntaxError, ImportError): from ._models import DatadogAgreementProperties # type: ignore @@ -64,7 +66,9 @@ from ._models import DatadogSingleSignOnProperties # type: ignore from ._models import DatadogSingleSignOnResource # type: ignore from ._models import DatadogSingleSignOnResourceListResponse # type: ignore - from ._models import ErrorResponseBody # type: ignore + from ._models import ErrorAdditionalInfo # type: ignore + from ._models import ErrorDetail # type: ignore + from ._models import ErrorResponse # type: ignore from ._models import FilteringTag # type: ignore from ._models import IdentityProperties # type: ignore from ._models import LinkedResource # type: ignore @@ -81,11 +85,12 @@ from ._models import OperationDisplay # type: ignore from ._models import OperationListResult # type: ignore from ._models import OperationResult # type: ignore - from ._models import ResourceProviderDefaultErrorResponse # type: ignore from ._models import ResourceSku # type: ignore + from ._models import SystemData # type: ignore from ._models import UserInfo # type: ignore from ._microsoft_datadog_client_enums import ( + CreatedByType, LiftrResourceCategories, ManagedIdentityTypes, MarketplaceSubscriptionStatus, @@ -114,7 +119,9 @@ 'DatadogSingleSignOnProperties', 'DatadogSingleSignOnResource', 'DatadogSingleSignOnResourceListResponse', - 'ErrorResponseBody', + 'ErrorAdditionalInfo', + 'ErrorDetail', + 'ErrorResponse', 'FilteringTag', 'IdentityProperties', 'LinkedResource', @@ -131,9 +138,10 @@ 'OperationDisplay', 'OperationListResult', 'OperationResult', - 'ResourceProviderDefaultErrorResponse', 'ResourceSku', + 'SystemData', 'UserInfo', + 'CreatedByType', 'LiftrResourceCategories', 'ManagedIdentityTypes', 'MarketplaceSubscriptionStatus', diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/models/_microsoft_datadog_client_enums.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/models/_microsoft_datadog_client_enums.py index 8f569e2b1bb9..eba8198b7a4b 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/models/_microsoft_datadog_client_enums.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/models/_microsoft_datadog_client_enums.py @@ -26,6 +26,15 @@ def __getattr__(cls, name): raise AttributeError(name) +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + class LiftrResourceCategories(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): UNKNOWN = "Unknown" diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/models/_models.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/models/_models.py index 3202a480f505..02652c08a905 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/models/_models.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/models/_models.py @@ -71,12 +71,15 @@ class DatadogAgreementResource(msrest.serialization.Model): :vartype type: str :param properties: Represents the properties of the resource. :type properties: ~microsoft_datadog_client.models.DatadogAgreementProperties + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~microsoft_datadog_client.models.SystemData """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { @@ -84,6 +87,7 @@ class DatadogAgreementResource(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'DatadogAgreementProperties'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -95,6 +99,7 @@ def __init__( self.name = None self.type = None self.properties = kwargs.get('properties', None) + self.system_data = None class DatadogAgreementResourceListResponse(msrest.serialization.Model): @@ -330,6 +335,8 @@ class DatadogMonitorResource(msrest.serialization.Model): :type tags: dict[str, str] :param location: Required. :type location: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~microsoft_datadog_client.models.SystemData """ _validation = { @@ -337,6 +344,7 @@ class DatadogMonitorResource(msrest.serialization.Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, + 'system_data': {'readonly': True}, } _attribute_map = { @@ -348,6 +356,7 @@ class DatadogMonitorResource(msrest.serialization.Model): 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -363,6 +372,7 @@ def __init__( self.identity = kwargs.get('identity', None) self.tags = kwargs.get('tags', None) self.location = kwargs['location'] + self.system_data = None class DatadogMonitorResourceListResponse(msrest.serialization.Model): @@ -538,12 +548,15 @@ class DatadogSingleSignOnResource(msrest.serialization.Model): :vartype type: str :param properties: :type properties: ~microsoft_datadog_client.models.DatadogSingleSignOnProperties + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~microsoft_datadog_client.models.SystemData """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { @@ -551,6 +564,7 @@ class DatadogSingleSignOnResource(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'DatadogSingleSignOnProperties'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -562,6 +576,7 @@ def __init__( self.name = None self.type = None self.properties = kwargs.get('properties', None) + self.system_data = None class DatadogSingleSignOnResourceListResponse(msrest.serialization.Model): @@ -587,35 +602,98 @@ def __init__( self.next_link = kwargs.get('next_link', None) -class ErrorResponseBody(msrest.serialization.Model): - """ErrorResponseBody. +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. - :param code: - :type code: str - :param message: - :type message: str - :param target: - :type target: str - :param details: - :type details: list[~microsoft_datadog_client.models.ErrorResponseBody] + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: object + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(msrest.serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~microsoft_datadog_client.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~microsoft_datadog_client.models.ErrorAdditionalInfo] """ + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponseBody]'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, } def __init__( self, **kwargs ): - super(ErrorResponseBody, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponse(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :param error: The error object. + :type error: ~microsoft_datadog_client.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) class FilteringTag(msrest.serialization.Model): @@ -853,12 +931,15 @@ class MonitoringTagRules(msrest.serialization.Model): :vartype type: str :param properties: Definition of the properties for a TagRules resource. :type properties: ~microsoft_datadog_client.models.MonitoringTagRulesProperties + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~microsoft_datadog_client.models.SystemData """ _validation = { 'name': {'readonly': True}, 'id': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { @@ -866,6 +947,7 @@ class MonitoringTagRules(msrest.serialization.Model): 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'MonitoringTagRulesProperties'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -877,6 +959,7 @@ def __init__( self.id = None self.type = None self.properties = kwargs.get('properties', None) + self.system_data = None class MonitoringTagRulesListResponse(msrest.serialization.Model): @@ -1089,25 +1172,6 @@ def __init__( self.is_data_action = kwargs.get('is_data_action', None) -class ResourceProviderDefaultErrorResponse(msrest.serialization.Model): - """ResourceProviderDefaultErrorResponse. - - :param error: - :type error: ~microsoft_datadog_client.models.ErrorResponseBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, - } - - def __init__( - self, - **kwargs - ): - super(ResourceProviderDefaultErrorResponse, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - class ResourceSku(msrest.serialization.Model): """ResourceSku. @@ -1133,6 +1197,47 @@ def __init__( self.name = kwargs['name'] +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~microsoft_datadog_client.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~microsoft_datadog_client.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) + + class UserInfo(msrest.serialization.Model): """User info. diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/models/_models_py3.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/models/_models_py3.py index 72fa3ae29b9b..c06931d83614 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/models/_models_py3.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/models/_models_py3.py @@ -85,12 +85,15 @@ class DatadogAgreementResource(msrest.serialization.Model): :vartype type: str :param properties: Represents the properties of the resource. :type properties: ~microsoft_datadog_client.models.DatadogAgreementProperties + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~microsoft_datadog_client.models.SystemData """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { @@ -98,6 +101,7 @@ class DatadogAgreementResource(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'DatadogAgreementProperties'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -111,6 +115,7 @@ def __init__( self.name = None self.type = None self.properties = properties + self.system_data = None class DatadogAgreementResourceListResponse(msrest.serialization.Model): @@ -375,6 +380,8 @@ class DatadogMonitorResource(msrest.serialization.Model): :type tags: dict[str, str] :param location: Required. :type location: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~microsoft_datadog_client.models.SystemData """ _validation = { @@ -382,6 +389,7 @@ class DatadogMonitorResource(msrest.serialization.Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, + 'system_data': {'readonly': True}, } _attribute_map = { @@ -393,6 +401,7 @@ class DatadogMonitorResource(msrest.serialization.Model): 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -414,6 +423,7 @@ def __init__( self.identity = identity self.tags = tags self.location = location + self.system_data = None class DatadogMonitorResourceListResponse(msrest.serialization.Model): @@ -608,12 +618,15 @@ class DatadogSingleSignOnResource(msrest.serialization.Model): :vartype type: str :param properties: :type properties: ~microsoft_datadog_client.models.DatadogSingleSignOnProperties + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~microsoft_datadog_client.models.SystemData """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { @@ -621,6 +634,7 @@ class DatadogSingleSignOnResource(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'DatadogSingleSignOnProperties'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -634,6 +648,7 @@ def __init__( self.name = None self.type = None self.properties = properties + self.system_data = None class DatadogSingleSignOnResourceListResponse(msrest.serialization.Model): @@ -662,40 +677,100 @@ def __init__( self.next_link = next_link -class ErrorResponseBody(msrest.serialization.Model): - """ErrorResponseBody. +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. - :param code: - :type code: str - :param message: - :type message: str - :param target: - :type target: str - :param details: - :type details: list[~microsoft_datadog_client.models.ErrorResponseBody] + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: object """ + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(msrest.serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~microsoft_datadog_client.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~microsoft_datadog_client.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponseBody]'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponse(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :param error: The error object. + :type error: ~microsoft_datadog_client.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, } def __init__( self, *, - code: Optional[str] = None, - message: Optional[str] = None, - target: Optional[str] = None, - details: Optional[List["ErrorResponseBody"]] = None, + error: Optional["ErrorDetail"] = None, **kwargs ): - super(ErrorResponseBody, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details + super(ErrorResponse, self).__init__(**kwargs) + self.error = error class FilteringTag(msrest.serialization.Model): @@ -960,12 +1035,15 @@ class MonitoringTagRules(msrest.serialization.Model): :vartype type: str :param properties: Definition of the properties for a TagRules resource. :type properties: ~microsoft_datadog_client.models.MonitoringTagRulesProperties + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~microsoft_datadog_client.models.SystemData """ _validation = { 'name': {'readonly': True}, 'id': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { @@ -973,6 +1051,7 @@ class MonitoringTagRules(msrest.serialization.Model): 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'MonitoringTagRulesProperties'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -986,6 +1065,7 @@ def __init__( self.id = None self.type = None self.properties = properties + self.system_data = None class MonitoringTagRulesListResponse(msrest.serialization.Model): @@ -1224,27 +1304,6 @@ def __init__( self.is_data_action = is_data_action -class ResourceProviderDefaultErrorResponse(msrest.serialization.Model): - """ResourceProviderDefaultErrorResponse. - - :param error: - :type error: ~microsoft_datadog_client.models.ErrorResponseBody - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, - } - - def __init__( - self, - *, - error: Optional["ErrorResponseBody"] = None, - **kwargs - ): - super(ResourceProviderDefaultErrorResponse, self).__init__(**kwargs) - self.error = error - - class ResourceSku(msrest.serialization.Model): """ResourceSku. @@ -1272,6 +1331,54 @@ def __init__( self.name = name +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~microsoft_datadog_client.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~microsoft_datadog_client.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + class UserInfo(msrest.serialization.Model): """User info. diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_marketplace_agreements_operations.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_marketplace_agreements_operations.py index 797ef0f74754..310412848333 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_marketplace_agreements_operations.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_marketplace_agreements_operations.py @@ -64,7 +64,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -76,7 +76,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -137,14 +137,14 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -169,7 +169,7 @@ def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DatadogAgreementResource', pipeline_response) diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_monitors_operations.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_monitors_operations.py index 779425c6e3d9..d2094226dcd0 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_monitors_operations.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_monitors_operations.py @@ -58,8 +58,7 @@ def list_api_keys( List the api keys for a given monitor resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -73,7 +72,7 @@ def list_api_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -85,8 +84,8 @@ def prepare_request(next_link=None): # Construct URL url = self.list_api_keys.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -115,7 +114,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -137,8 +136,7 @@ def get_default_key( Get the default api key. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -152,14 +150,14 @@ def get_default_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self.get_default_key.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -178,7 +176,7 @@ def get_default_key( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DatadogApiKey', pipeline_response) @@ -201,8 +199,7 @@ def set_default_key( Set the default api key. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -218,15 +215,15 @@ def set_default_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self.set_default_key.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -252,7 +249,7 @@ def set_default_key( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -271,8 +268,7 @@ def list_hosts( List the hosts for a given monitor resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -286,7 +282,7 @@ def list_hosts( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -298,8 +294,8 @@ def prepare_request(next_link=None): # Construct URL url = self.list_hosts.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -328,7 +324,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -350,8 +346,7 @@ def list_linked_resources( List all Azure resources associated to the same Datadog organization as the target resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -365,7 +360,7 @@ def list_linked_resources( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -377,8 +372,8 @@ def prepare_request(next_link=None): # Construct URL url = self.list_linked_resources.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -407,7 +402,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -429,8 +424,7 @@ def list_monitored_resources( List the resources currently being monitored by the Datadog monitor resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -444,7 +438,7 @@ def list_monitored_resources( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -456,8 +450,8 @@ def prepare_request(next_link=None): # Construct URL url = self.list_monitored_resources.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -486,7 +480,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -516,7 +510,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -528,7 +522,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -556,7 +550,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -577,8 +571,7 @@ def list_by_resource_group( List all monitors under the specified resource group. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DatadogMonitorResourceListResponse or the result of cls(response) @@ -590,7 +583,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -602,8 +595,8 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -631,7 +624,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -653,8 +646,7 @@ def get( Get the properties of a specific monitor resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -668,14 +660,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -694,7 +686,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DatadogMonitorResource', pipeline_response) @@ -718,15 +710,15 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -752,7 +744,7 @@ def _create_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -779,8 +771,7 @@ def begin_create( Create a monitor resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -823,8 +814,8 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } @@ -854,8 +845,7 @@ def update( Update a monitor resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -871,15 +861,15 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -905,7 +895,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DatadogMonitorResource', pipeline_response) @@ -928,14 +918,14 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -954,7 +944,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -973,8 +963,7 @@ def begin_delete( Delete a monitor resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -1011,8 +1000,8 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } @@ -1041,8 +1030,7 @@ def refresh_set_password_link( Refresh the set password link and return a latest one. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -1056,14 +1044,14 @@ def refresh_set_password_link( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self.refresh_set_password_link.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -1082,7 +1070,7 @@ def refresh_set_password_link( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DatadogSetPasswordLink', pipeline_response) diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_operations.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_operations.py index c3ec44b9a795..7fcedeccfeff 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_operations.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_operations.py @@ -50,9 +50,9 @@ def list( **kwargs # type: Any ): # type: (...) -> Iterable["_models.OperationListResult"] - """List all operations provided by Microsoft.Datadog for the 2020-02-01-preview api version. + """List all operations provided by Microsoft.Datadog for the 2021-03-01 api version. - List all operations provided by Microsoft.Datadog for the 2020-02-01-preview api version. + List all operations provided by Microsoft.Datadog for the 2021-03-01 api version. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) @@ -64,7 +64,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -100,7 +100,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_single_sign_on_configurations_operations.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_single_sign_on_configurations_operations.py index 2749ea4ca7f2..7521077c2d39 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_single_sign_on_configurations_operations.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_single_sign_on_configurations_operations.py @@ -58,8 +58,7 @@ def list( List the single sign-on configurations for a given monitor resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -73,7 +72,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -85,8 +84,8 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -115,7 +114,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -140,15 +139,15 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), } @@ -175,7 +174,7 @@ def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -203,8 +202,7 @@ def begin_create_or_update( Configures single-sign-on for this resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -250,8 +248,8 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), } @@ -282,8 +280,7 @@ def get( Gets the datadog single sign-on resource for the given Monitor. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -299,14 +296,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), } @@ -326,7 +323,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DatadogSingleSignOnResource', pipeline_response) diff --git a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_tag_rules_operations.py b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_tag_rules_operations.py index 280fb0fb2031..7fd01eedea79 100644 --- a/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_tag_rules_operations.py +++ b/sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/operations/_tag_rules_operations.py @@ -56,8 +56,7 @@ def list( List the tag rules for a given monitor resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -71,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -83,8 +82,8 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -113,7 +112,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -137,8 +136,7 @@ def create_or_update( Create or update a tag rule set for a given monitor resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -156,15 +154,15 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), 'ruleSetName': self._serialize.url("rule_set_name", rule_set_name, 'str'), } @@ -191,7 +189,7 @@ def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MonitoringTagRules', pipeline_response) @@ -214,8 +212,7 @@ def get( Get a tag rule set for a given monitor resource. - :param resource_group_name: The name of the resource group to which the Datadog resource - belongs. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param monitor_name: Monitor resource name. :type monitor_name: str @@ -231,14 +228,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-02-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'), 'ruleSetName': self._serialize.url("rule_set_name", rule_set_name, 'str'), } @@ -258,7 +255,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResourceProviderDefaultErrorResponse, response) + error = self._deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MonitoringTagRules', pipeline_response)