Skip to content

Commit 449b0a6

Browse files
AutorestCIZim Kalinowski
authored andcommitted
Generated from d5154334bedc1a06875214e99338c61be88739fb (#6771)
Revert the changes for 2019-07-01/Microsoft.Resources.
1 parent e3fb8dc commit 449b0a6

File tree

3 files changed

+26
-6
lines changed

3 files changed

+26
-6
lines changed

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/_models.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,17 +521,22 @@ def __init__(self, **kwargs):
521521
class DeploymentValidateResult(Model):
522522
"""Information from validate template deployment response.
523523
524+
:param error: The deployment validation error.
525+
:type error:
526+
~azure.mgmt.resource.resources.v2019_07_01.models.ErrorResponse
524527
:param properties: The template deployment properties.
525528
:type properties:
526529
~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentPropertiesExtended
527530
"""
528531

529532
_attribute_map = {
533+
'error': {'key': 'error', 'type': 'ErrorResponse'},
530534
'properties': {'key': 'properties', 'type': 'DeploymentPropertiesExtended'},
531535
}
532536

533537
def __init__(self, **kwargs):
534538
super(DeploymentValidateResult, self).__init__(**kwargs)
539+
self.error = kwargs.get('error', None)
535540
self.properties = kwargs.get('properties', None)
536541

537542

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/_models_py3.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,17 +521,22 @@ def __init__(self, *, outputs=None, providers=None, dependencies=None, template=
521521
class DeploymentValidateResult(Model):
522522
"""Information from validate template deployment response.
523523
524+
:param error: The deployment validation error.
525+
:type error:
526+
~azure.mgmt.resource.resources.v2019_07_01.models.ErrorResponse
524527
:param properties: The template deployment properties.
525528
:type properties:
526529
~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentPropertiesExtended
527530
"""
528531

529532
_attribute_map = {
533+
'error': {'key': 'error', 'type': 'ErrorResponse'},
530534
'properties': {'key': 'properties', 'type': 'DeploymentPropertiesExtended'},
531535
}
532536

533-
def __init__(self, *, properties=None, **kwargs) -> None:
537+
def __init__(self, *, error=None, properties=None, **kwargs) -> None:
534538
super(DeploymentValidateResult, self).__init__(**kwargs)
539+
self.error = error
535540
self.properties = properties
536541

537542

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/operations/_deployments_operations.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -470,14 +470,16 @@ def validate_at_scope(
470470
request = self._client.post(url, query_parameters, header_parameters, body_content)
471471
response = self._client.send(request, stream=False, **operation_config)
472472

473-
if response.status_code not in [200]:
473+
if response.status_code not in [200, 400]:
474474
exp = CloudError(response)
475475
exp.request_id = response.headers.get('x-ms-request-id')
476476
raise exp
477477

478478
deserialized = None
479479
if response.status_code == 200:
480480
deserialized = self._deserialize('DeploymentValidateResult', response)
481+
if response.status_code == 400:
482+
deserialized = self._deserialize('DeploymentValidateResult', response)
481483

482484
if raw:
483485
client_raw_response = ClientRawResponse(deserialized, response)
@@ -1034,14 +1036,16 @@ def validate_at_tenant_scope(
10341036
request = self._client.post(url, query_parameters, header_parameters, body_content)
10351037
response = self._client.send(request, stream=False, **operation_config)
10361038

1037-
if response.status_code not in [200]:
1039+
if response.status_code not in [200, 400]:
10381040
exp = CloudError(response)
10391041
exp.request_id = response.headers.get('x-ms-request-id')
10401042
raise exp
10411043

10421044
deserialized = None
10431045
if response.status_code == 200:
10441046
deserialized = self._deserialize('DeploymentValidateResult', response)
1047+
if response.status_code == 400:
1048+
deserialized = self._deserialize('DeploymentValidateResult', response)
10451049

10461050
if raw:
10471051
client_raw_response = ClientRawResponse(deserialized, response)
@@ -1609,14 +1613,16 @@ def validate_at_management_group_scope(
16091613
request = self._client.post(url, query_parameters, header_parameters, body_content)
16101614
response = self._client.send(request, stream=False, **operation_config)
16111615

1612-
if response.status_code not in [200]:
1616+
if response.status_code not in [200, 400]:
16131617
exp = CloudError(response)
16141618
exp.request_id = response.headers.get('x-ms-request-id')
16151619
raise exp
16161620

16171621
deserialized = None
16181622
if response.status_code == 200:
16191623
deserialized = self._deserialize('DeploymentValidateResult', response)
1624+
if response.status_code == 400:
1625+
deserialized = self._deserialize('DeploymentValidateResult', response)
16201626

16211627
if raw:
16221628
client_raw_response = ClientRawResponse(deserialized, response)
@@ -2179,14 +2185,16 @@ def validate_at_subscription_scope(
21792185
request = self._client.post(url, query_parameters, header_parameters, body_content)
21802186
response = self._client.send(request, stream=False, **operation_config)
21812187

2182-
if response.status_code not in [200]:
2188+
if response.status_code not in [200, 400]:
21832189
exp = CloudError(response)
21842190
exp.request_id = response.headers.get('x-ms-request-id')
21852191
raise exp
21862192

21872193
deserialized = None
21882194
if response.status_code == 200:
21892195
deserialized = self._deserialize('DeploymentValidateResult', response)
2196+
if response.status_code == 400:
2197+
deserialized = self._deserialize('DeploymentValidateResult', response)
21902198

21912199
if raw:
21922200
client_raw_response = ClientRawResponse(deserialized, response)
@@ -2773,14 +2781,16 @@ def validate(
27732781
request = self._client.post(url, query_parameters, header_parameters, body_content)
27742782
response = self._client.send(request, stream=False, **operation_config)
27752783

2776-
if response.status_code not in [200]:
2784+
if response.status_code not in [200, 400]:
27772785
exp = CloudError(response)
27782786
exp.request_id = response.headers.get('x-ms-request-id')
27792787
raise exp
27802788

27812789
deserialized = None
27822790
if response.status_code == 200:
27832791
deserialized = self._deserialize('DeploymentValidateResult', response)
2792+
if response.status_code == 400:
2793+
deserialized = self._deserialize('DeploymentValidateResult', response)
27842794

27852795
if raw:
27862796
client_raw_response = ClientRawResponse(deserialized, response)

0 commit comments

Comments
 (0)