Skip to content

Commit

Permalink
[AutoPR] resources/resource-manager (#7549)
Browse files Browse the repository at this point in the history
* regenerated

* updated history and version

* updated date
  • Loading branch information
AutorestCI authored and Zim Kalinowski committed Oct 4, 2019
1 parent 937fb1a commit d2b712d
Show file tree
Hide file tree
Showing 12 changed files with 1,479 additions and 1 deletion.
8 changes: 8 additions & 0 deletions sdk/resources/azure-mgmt-resource/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
Release History
===============

5.1.0 (2019-10-04)
++++++++++++++++++

**Features**

- Added operation DeploymentsOperations.what_if
- Added operation DeploymentsOperations.what_if_at_subscription_scope

5.0.0 (2019-09-22)
++++++++++++++++++

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
from ._models_py3 import DeploymentProperties
from ._models_py3 import DeploymentPropertiesExtended
from ._models_py3 import DeploymentValidateResult
from ._models_py3 import DeploymentWhatIf
from ._models_py3 import DeploymentWhatIfProperties
from ._models_py3 import DeploymentWhatIfSettings
from ._models_py3 import ErrorAdditionalInfo
from ._models_py3 import ErrorResponse
from ._models_py3 import ExportTemplateRequest
Expand Down Expand Up @@ -56,6 +59,9 @@
from ._models_py3 import TargetResource
from ._models_py3 import TemplateHashResult
from ._models_py3 import TemplateLink
from ._models_py3 import WhatIfChange
from ._models_py3 import WhatIfOperationResult
from ._models_py3 import WhatIfPropertyChange
except (SyntaxError, ImportError):
from ._models import AliasPathType
from ._models import AliasType
Expand All @@ -71,6 +77,9 @@
from ._models import DeploymentProperties
from ._models import DeploymentPropertiesExtended
from ._models import DeploymentValidateResult
from ._models import DeploymentWhatIf
from ._models import DeploymentWhatIfProperties
from ._models import DeploymentWhatIfSettings
from ._models import ErrorAdditionalInfo
from ._models import ErrorResponse
from ._models import ExportTemplateRequest
Expand Down Expand Up @@ -103,6 +112,9 @@
from ._models import TargetResource
from ._models import TemplateHashResult
from ._models import TemplateLink
from ._models import WhatIfChange
from ._models import WhatIfOperationResult
from ._models import WhatIfPropertyChange
from ._paged_models import DeploymentExtendedPaged
from ._paged_models import DeploymentOperationPaged
from ._paged_models import GenericResourcePaged
Expand All @@ -113,7 +125,10 @@
from ._resource_management_client_enums import (
DeploymentMode,
OnErrorDeploymentType,
WhatIfResultFormat,
ResourceIdentityType,
PropertyChangeType,
ChangeType,
)

__all__ = [
Expand All @@ -131,6 +146,9 @@
'DeploymentProperties',
'DeploymentPropertiesExtended',
'DeploymentValidateResult',
'DeploymentWhatIf',
'DeploymentWhatIfProperties',
'DeploymentWhatIfSettings',
'ErrorAdditionalInfo',
'ErrorResponse',
'ExportTemplateRequest',
Expand Down Expand Up @@ -163,6 +181,9 @@
'TargetResource',
'TemplateHashResult',
'TemplateLink',
'WhatIfChange',
'WhatIfOperationResult',
'WhatIfPropertyChange',
'OperationPaged',
'DeploymentExtendedPaged',
'ProviderPaged',
Expand All @@ -172,5 +193,8 @@
'DeploymentOperationPaged',
'DeploymentMode',
'OnErrorDeploymentType',
'WhatIfResultFormat',
'ResourceIdentityType',
'PropertyChangeType',
'ChangeType',
]
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,118 @@ def __init__(self, **kwargs):
self.properties = kwargs.get('properties', None)


class DeploymentWhatIf(Model):
"""Deployment What-if operation parameters.
All required parameters must be populated in order to send to Azure.
:param location: The location to store the deployment data.
:type location: str
:param properties: Required. The deployment properties.
:type properties:
~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentWhatIfProperties
"""

_validation = {
'properties': {'required': True},
}

_attribute_map = {
'location': {'key': 'location', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'DeploymentWhatIfProperties'},
}

def __init__(self, **kwargs):
super(DeploymentWhatIf, self).__init__(**kwargs)
self.location = kwargs.get('location', None)
self.properties = kwargs.get('properties', None)


class DeploymentWhatIfProperties(DeploymentProperties):
"""Deployment What-if properties.
All required parameters must be populated in order to send to Azure.
:param template: The template content. You use this element when you want
to pass the template syntax directly in the request rather than link to an
existing template. It can be a JObject or well-formed JSON string. Use
either the templateLink property or the template property, but not both.
:type template: object
:param template_link: The URI of the template. Use either the templateLink
property or the template property, but not both.
:type template_link:
~azure.mgmt.resource.resources.v2019_07_01.models.TemplateLink
:param parameters: Name and value pairs that define the deployment
parameters for the template. You use this element when you want to provide
the parameter values directly in the request rather than link to an
existing parameter file. Use either the parametersLink property or the
parameters property, but not both. It can be a JObject or a well formed
JSON string.
:type parameters: object
:param parameters_link: The URI of parameters file. You use this element
to link to an existing parameters file. Use either the parametersLink
property or the parameters property, but not both.
:type parameters_link:
~azure.mgmt.resource.resources.v2019_07_01.models.ParametersLink
:param mode: Required. The mode that is used to deploy resources. This
value can be either Incremental or Complete. In Incremental mode,
resources are deployed without deleting existing resources that are not
included in the template. In Complete mode, resources are deployed and
existing resources in the resource group that are not included in the
template are deleted. Be careful when using Complete mode as you may
unintentionally delete resources. Possible values include: 'Incremental',
'Complete'
:type mode: str or
~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentMode
:param debug_setting: The debug setting of the deployment.
:type debug_setting:
~azure.mgmt.resource.resources.v2019_07_01.models.DebugSetting
:param on_error_deployment: The deployment on error behavior.
:type on_error_deployment:
~azure.mgmt.resource.resources.v2019_07_01.models.OnErrorDeployment
:param what_if_settings: Optional What-If operation settings.
:type what_if_settings:
~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentWhatIfSettings
"""

_validation = {
'mode': {'required': True},
}

_attribute_map = {
'template': {'key': 'template', 'type': 'object'},
'template_link': {'key': 'templateLink', 'type': 'TemplateLink'},
'parameters': {'key': 'parameters', 'type': 'object'},
'parameters_link': {'key': 'parametersLink', 'type': 'ParametersLink'},
'mode': {'key': 'mode', 'type': 'DeploymentMode'},
'debug_setting': {'key': 'debugSetting', 'type': 'DebugSetting'},
'on_error_deployment': {'key': 'onErrorDeployment', 'type': 'OnErrorDeployment'},
'what_if_settings': {'key': 'whatIfSettings', 'type': 'DeploymentWhatIfSettings'},
}

def __init__(self, **kwargs):
super(DeploymentWhatIfProperties, self).__init__(**kwargs)
self.what_if_settings = kwargs.get('what_if_settings', None)


class DeploymentWhatIfSettings(Model):
"""Deployment What-If operation settings.
:param result_format: The format of the What-If results. Possible values
include: 'ResourceIdOnly', 'FullResourcePayloads'
:type result_format: str or
~azure.mgmt.resource.resources.v2019_07_01.models.WhatIfResultFormat
"""

_attribute_map = {
'result_format': {'key': 'resultFormat', 'type': 'WhatIfResultFormat'},
}

def __init__(self, **kwargs):
super(DeploymentWhatIfSettings, self).__init__(**kwargs)
self.result_format = kwargs.get('result_format', None)


class ErrorAdditionalInfo(Model):
"""The resource management error additional info.
Expand Down Expand Up @@ -1512,3 +1624,118 @@ def __init__(self, **kwargs):
super(TemplateLink, self).__init__(**kwargs)
self.uri = kwargs.get('uri', None)
self.content_version = kwargs.get('content_version', None)


class WhatIfChange(Model):
"""Information about a single resource change predicted by What-If operation.
All required parameters must be populated in order to send to Azure.
:param resource_id: Required. Resource ID
:type resource_id: str
:param change_type: Required. Type of change that will be made to the
resource when the deployment is executed. Possible values include:
'Create', 'Delete', 'Ignore', 'Deploy', 'NoChange', 'Modify'
:type change_type: str or
~azure.mgmt.resource.resources.v2019_07_01.models.ChangeType
:param before: The snapshot of the resource before the deployment is
executed.
:type before: object
:param after: The predicted snapshot of the resource after the deployment
is executed.
:type after: object
:param delta: The predicted changes to resource properties.
:type delta:
list[~azure.mgmt.resource.resources.v2019_07_01.models.WhatIfPropertyChange]
"""

_validation = {
'resource_id': {'required': True},
'change_type': {'required': True},
}

_attribute_map = {
'resource_id': {'key': 'resourceId', 'type': 'str'},
'change_type': {'key': 'changeType', 'type': 'ChangeType'},
'before': {'key': 'before', 'type': 'object'},
'after': {'key': 'after', 'type': 'object'},
'delta': {'key': 'delta', 'type': '[WhatIfPropertyChange]'},
}

def __init__(self, **kwargs):
super(WhatIfChange, self).__init__(**kwargs)
self.resource_id = kwargs.get('resource_id', None)
self.change_type = kwargs.get('change_type', None)
self.before = kwargs.get('before', None)
self.after = kwargs.get('after', None)
self.delta = kwargs.get('delta', None)


class WhatIfOperationResult(Model):
"""Result of the What-If operation. Contains a list of predicted changes and a
URL link to get to the next set of results.
:param status: Status of the What-If operation.
:type status: str
:param changes: List of resource changes predicted by What-If operation.
:type changes:
list[~azure.mgmt.resource.resources.v2019_07_01.models.WhatIfChange]
:param error: Error when What-If operation fails.
:type error:
~azure.mgmt.resource.resources.v2019_07_01.models.ErrorResponse
"""

_attribute_map = {
'status': {'key': 'status', 'type': 'str'},
'changes': {'key': 'properties.changes', 'type': '[WhatIfChange]'},
'error': {'key': 'error', 'type': 'ErrorResponse'},
}

def __init__(self, **kwargs):
super(WhatIfOperationResult, self).__init__(**kwargs)
self.status = kwargs.get('status', None)
self.changes = kwargs.get('changes', None)
self.error = kwargs.get('error', None)


class WhatIfPropertyChange(Model):
"""The predicted change to the resource property.
All required parameters must be populated in order to send to Azure.
:param path: Required. The path of the property.
:type path: str
:param property_change_type: Required. The type of property change.
Possible values include: 'Create', 'Delete', 'Modify', 'Array'
:type property_change_type: str or
~azure.mgmt.resource.resources.v2019_07_01.models.PropertyChangeType
:param before: The value of the property before the deployment is
executed.
:type before: object
:param after: The value of the property after the deployment is executed.
:type after: object
:param children: Nested property changes.
:type children:
list[~azure.mgmt.resource.resources.v2019_07_01.models.WhatIfPropertyChange]
"""

_validation = {
'path': {'required': True},
'property_change_type': {'required': True},
}

_attribute_map = {
'path': {'key': 'path', 'type': 'str'},
'property_change_type': {'key': 'propertyChangeType', 'type': 'PropertyChangeType'},
'before': {'key': 'before', 'type': 'object'},
'after': {'key': 'after', 'type': 'object'},
'children': {'key': 'children', 'type': '[WhatIfPropertyChange]'},
}

def __init__(self, **kwargs):
super(WhatIfPropertyChange, self).__init__(**kwargs)
self.path = kwargs.get('path', None)
self.property_change_type = kwargs.get('property_change_type', None)
self.before = kwargs.get('before', None)
self.after = kwargs.get('after', None)
self.children = kwargs.get('children', None)
Loading

0 comments on commit d2b712d

Please sign in to comment.