Skip to content

[AutoPR resources/resource-manager] Revert the changes for 2019-07-01/Microsoft.Resources. #6771

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,14 +470,16 @@ 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

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)
Expand Down Expand Up @@ -1034,14 +1036,16 @@ 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

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)
Expand Down Expand Up @@ -1609,14 +1613,16 @@ 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

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)
Expand Down Expand Up @@ -2179,14 +2185,16 @@ 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

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)
Expand Down Expand Up @@ -2773,14 +2781,16 @@ 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

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)
Expand Down