diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/_models.py index 56521549ac6b..f26e13c45769 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/_models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/_models.py @@ -521,17 +521,22 @@ def __init__(self, **kwargs): class DeploymentValidateResult(Model): """Information from validate template deployment response. + :param error: The deployment validation error. + :type error: + ~azure.mgmt.resource.resources.v2019_07_01.models.ErrorResponse :param properties: The template deployment properties. :type properties: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentPropertiesExtended """ _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponse'}, 'properties': {'key': 'properties', 'type': 'DeploymentPropertiesExtended'}, } def __init__(self, **kwargs): super(DeploymentValidateResult, self).__init__(**kwargs) + self.error = kwargs.get('error', None) self.properties = kwargs.get('properties', None) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/_models_py3.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/_models_py3.py index 076d670f81a1..758d0b128981 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/_models_py3.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/_models_py3.py @@ -521,17 +521,22 @@ def __init__(self, *, outputs=None, providers=None, dependencies=None, template= class DeploymentValidateResult(Model): """Information from validate template deployment response. + :param error: The deployment validation error. + :type error: + ~azure.mgmt.resource.resources.v2019_07_01.models.ErrorResponse :param properties: The template deployment properties. :type properties: ~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentPropertiesExtended """ _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponse'}, 'properties': {'key': 'properties', 'type': 'DeploymentPropertiesExtended'}, } - def __init__(self, *, properties=None, **kwargs) -> None: + def __init__(self, *, error=None, properties=None, **kwargs) -> None: super(DeploymentValidateResult, self).__init__(**kwargs) + self.error = error self.properties = properties diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/operations/_deployments_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/operations/_deployments_operations.py index d8d055ac362c..c27b3e5df653 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/operations/_deployments_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/operations/_deployments_operations.py @@ -470,7 +470,7 @@ def validate_at_scope( request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 400]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -478,6 +478,8 @@ def validate_at_scope( deserialized = None if response.status_code == 200: deserialized = self._deserialize('DeploymentValidateResult', response) + if response.status_code == 400: + deserialized = self._deserialize('DeploymentValidateResult', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -1034,7 +1036,7 @@ def validate_at_tenant_scope( request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 400]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -1042,6 +1044,8 @@ def validate_at_tenant_scope( deserialized = None if response.status_code == 200: deserialized = self._deserialize('DeploymentValidateResult', response) + if response.status_code == 400: + deserialized = self._deserialize('DeploymentValidateResult', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -1609,7 +1613,7 @@ def validate_at_management_group_scope( request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 400]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -1617,6 +1621,8 @@ def validate_at_management_group_scope( deserialized = None if response.status_code == 200: deserialized = self._deserialize('DeploymentValidateResult', response) + if response.status_code == 400: + deserialized = self._deserialize('DeploymentValidateResult', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -2179,7 +2185,7 @@ def validate_at_subscription_scope( request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 400]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -2187,6 +2193,8 @@ def validate_at_subscription_scope( deserialized = None if response.status_code == 200: deserialized = self._deserialize('DeploymentValidateResult', response) + if response.status_code == 400: + deserialized = self._deserialize('DeploymentValidateResult', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -2773,7 +2781,7 @@ def validate( request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 400]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -2781,6 +2789,8 @@ def validate( deserialized = None if response.status_code == 200: deserialized = self._deserialize('DeploymentValidateResult', response) + if response.status_code == 400: + deserialized = self._deserialize('DeploymentValidateResult', response) if raw: client_raw_response = ClientRawResponse(deserialized, response)