Skip to content
Closed
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 @@ -46,7 +46,7 @@ class PolicyClient(MultiApiClientMixin, SDKClient):
:type profile: azure.profiles.KnownProfiles
"""

DEFAULT_API_VERSION = '2019-06-01'
DEFAULT_API_VERSION = '2019-09-01'
_PROFILE_TAG = "azure.mgmt.resource.policy.PolicyClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
Expand Down Expand Up @@ -80,6 +80,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2018-05-01: :mod:`v2018_05_01.models<azure.mgmt.resource.policy.v2018_05_01.models>`
* 2019-01-01: :mod:`v2019_01_01.models<azure.mgmt.resource.policy.v2019_01_01.models>`
* 2019-06-01: :mod:`v2019_06_01.models<azure.mgmt.resource.policy.v2019_06_01.models>`
* 2019-09-01: :mod:`v2019_09_01.models<azure.mgmt.resource.policy.v2019_09_01.models>`
"""
if api_version == '2015-10-01-preview':
from .v2015_10_01_preview import models
Expand All @@ -105,6 +106,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2019-06-01':
from .v2019_06_01 import models
return models
elif api_version == '2019-09-01':
from .v2019_09_01 import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))

@property
Expand All @@ -119,6 +123,7 @@ def policy_assignments(self):
* 2018-05-01: :class:`PolicyAssignmentsOperations<azure.mgmt.resource.policy.v2018_05_01.operations.PolicyAssignmentsOperations>`
* 2019-01-01: :class:`PolicyAssignmentsOperations<azure.mgmt.resource.policy.v2019_01_01.operations.PolicyAssignmentsOperations>`
* 2019-06-01: :class:`PolicyAssignmentsOperations<azure.mgmt.resource.policy.v2019_06_01.operations.PolicyAssignmentsOperations>`
* 2019-09-01: :class:`PolicyAssignmentsOperations<azure.mgmt.resource.policy.v2019_09_01.operations.PolicyAssignmentsOperations>`
"""
api_version = self._get_api_version('policy_assignments')
if api_version == '2015-10-01-preview':
Expand All @@ -137,6 +142,8 @@ def policy_assignments(self):
from .v2019_01_01.operations import PolicyAssignmentsOperations as OperationClass
elif api_version == '2019-06-01':
from .v2019_06_01.operations import PolicyAssignmentsOperations as OperationClass
elif api_version == '2019-09-01':
from .v2019_09_01.operations import PolicyAssignmentsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -153,6 +160,7 @@ def policy_definitions(self):
* 2018-05-01: :class:`PolicyDefinitionsOperations<azure.mgmt.resource.policy.v2018_05_01.operations.PolicyDefinitionsOperations>`
* 2019-01-01: :class:`PolicyDefinitionsOperations<azure.mgmt.resource.policy.v2019_01_01.operations.PolicyDefinitionsOperations>`
* 2019-06-01: :class:`PolicyDefinitionsOperations<azure.mgmt.resource.policy.v2019_06_01.operations.PolicyDefinitionsOperations>`
* 2019-09-01: :class:`PolicyDefinitionsOperations<azure.mgmt.resource.policy.v2019_09_01.operations.PolicyDefinitionsOperations>`
"""
api_version = self._get_api_version('policy_definitions')
if api_version == '2015-10-01-preview':
Expand All @@ -171,6 +179,8 @@ def policy_definitions(self):
from .v2019_01_01.operations import PolicyDefinitionsOperations as OperationClass
elif api_version == '2019-06-01':
from .v2019_06_01.operations import PolicyDefinitionsOperations as OperationClass
elif api_version == '2019-09-01':
from .v2019_09_01.operations import PolicyDefinitionsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -184,6 +194,7 @@ def policy_set_definitions(self):
* 2018-05-01: :class:`PolicySetDefinitionsOperations<azure.mgmt.resource.policy.v2018_05_01.operations.PolicySetDefinitionsOperations>`
* 2019-01-01: :class:`PolicySetDefinitionsOperations<azure.mgmt.resource.policy.v2019_01_01.operations.PolicySetDefinitionsOperations>`
* 2019-06-01: :class:`PolicySetDefinitionsOperations<azure.mgmt.resource.policy.v2019_06_01.operations.PolicySetDefinitionsOperations>`
* 2019-09-01: :class:`PolicySetDefinitionsOperations<azure.mgmt.resource.policy.v2019_09_01.operations.PolicySetDefinitionsOperations>`
"""
api_version = self._get_api_version('policy_set_definitions')
if api_version == '2017-06-01-preview':
Expand All @@ -196,6 +207,8 @@ def policy_set_definitions(self):
from .v2019_01_01.operations import PolicySetDefinitionsOperations as OperationClass
elif api_version == '2019-06-01':
from .v2019_06_01.operations import PolicySetDefinitionsOperations as OperationClass
elif api_version == '2019-09-01':
from .v2019_09_01.operations import PolicySetDefinitionsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from .v2019_06_01.models import *
from .v2019_09_01.models import *
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@ class Identity(Model):
:vartype principal_id: str
:ivar tenant_id: The tenant ID of the resource identity.
:vartype tenant_id: str
:param type: The identity type. Possible values include: 'SystemAssigned',
'None'
:param type: The identity type. This is the only required field when
adding a system assigned identity to a resource. Possible values include:
'SystemAssigned', 'None'
:type type: str or
~azure.mgmt.resource.policy.v2019_09_01.models.ResourceIdentityType
"""
Expand All @@ -149,7 +150,7 @@ def __init__(self, **kwargs):


class ParameterDefinitionsValue(Model):
"""ParameterDefinitionsValue.
"""The definition of a parameter that can be provided to the policy.

:param type: The data type of the parameter. Possible values include:
'String', 'Array', 'Object', 'Boolean', 'Integer', 'Float', 'DateTime'
Expand Down Expand Up @@ -206,7 +207,7 @@ def __init__(self, **kwargs):


class ParameterValuesValue(Model):
"""ParameterValuesValue.
"""The value of a parameter.

:param value: The value of the parameter.
:type value: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@ class Identity(Model):
:vartype principal_id: str
:ivar tenant_id: The tenant ID of the resource identity.
:vartype tenant_id: str
:param type: The identity type. Possible values include: 'SystemAssigned',
'None'
:param type: The identity type. This is the only required field when
adding a system assigned identity to a resource. Possible values include:
'SystemAssigned', 'None'
:type type: str or
~azure.mgmt.resource.policy.v2019_09_01.models.ResourceIdentityType
"""
Expand All @@ -149,7 +150,7 @@ def __init__(self, *, type=None, **kwargs) -> None:


class ParameterDefinitionsValue(Model):
"""ParameterDefinitionsValue.
"""The definition of a parameter that can be provided to the policy.

:param type: The data type of the parameter. Possible values include:
'String', 'Array', 'Object', 'Boolean', 'Integer', 'Float', 'DateTime'
Expand Down Expand Up @@ -206,7 +207,7 @@ def __init__(self, *, additional_properties=None, display_name: str=None, descri


class ParameterValuesValue(Model):
"""ParameterValuesValue.
"""The value of a parameter.

:param value: The value of the parameter.
:type value: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class EnforcementMode(str, Enum):

class ResourceIdentityType(str, Enum):

system_assigned = "SystemAssigned"
none = "None"
system_assigned = "SystemAssigned" #: Indicates that a system assigned identity is associated with the resource.
none = "None" #: Indicates that no identity is associated with the resource or that the existing identity should be removed.


class PolicyType(str, Enum):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class ResourceManagementClient(MultiApiClientMixin, SDKClient):
:type profile: azure.profiles.KnownProfiles
"""

DEFAULT_API_VERSION = '2019-08-01'
DEFAULT_API_VERSION = '2019-10-01'
_PROFILE_TAG = "azure.mgmt.resource.resources.ResourceManagementClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
Expand Down Expand Up @@ -81,6 +81,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2019-05-10: :mod:`v2019_05_10.models<azure.mgmt.resource.resources.v2019_05_10.models>`
* 2019-07-01: :mod:`v2019_07_01.models<azure.mgmt.resource.resources.v2019_07_01.models>`
* 2019-08-01: :mod:`v2019_08_01.models<azure.mgmt.resource.resources.v2019_08_01.models>`
* 2019-10-01: :mod:`v2019_10_01.models<azure.mgmt.resource.resources.v2019_10_01.models>`
"""
if api_version == '2016-02-01':
from .v2016_02_01 import models
Expand Down Expand Up @@ -109,6 +110,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2019-08-01':
from .v2019_08_01 import models
return models
elif api_version == '2019-10-01':
from .v2019_10_01 import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))

@property
Expand All @@ -124,6 +128,7 @@ def deployment_operations(self):
* 2019-05-10: :class:`DeploymentOperations<azure.mgmt.resource.resources.v2019_05_10.operations.DeploymentOperations>`
* 2019-07-01: :class:`DeploymentOperations<azure.mgmt.resource.resources.v2019_07_01.operations.DeploymentOperations>`
* 2019-08-01: :class:`DeploymentOperations<azure.mgmt.resource.resources.v2019_08_01.operations.DeploymentOperations>`
* 2019-10-01: :class:`DeploymentOperations<azure.mgmt.resource.resources.v2019_10_01.operations.DeploymentOperations>`
"""
api_version = self._get_api_version('deployment_operations')
if api_version == '2016-02-01':
Expand All @@ -144,6 +149,8 @@ def deployment_operations(self):
from .v2019_07_01.operations import DeploymentOperations as OperationClass
elif api_version == '2019-08-01':
from .v2019_08_01.operations import DeploymentOperations as OperationClass
elif api_version == '2019-10-01':
from .v2019_10_01.operations import DeploymentOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -161,6 +168,7 @@ def deployments(self):
* 2019-05-10: :class:`DeploymentsOperations<azure.mgmt.resource.resources.v2019_05_10.operations.DeploymentsOperations>`
* 2019-07-01: :class:`DeploymentsOperations<azure.mgmt.resource.resources.v2019_07_01.operations.DeploymentsOperations>`
* 2019-08-01: :class:`DeploymentsOperations<azure.mgmt.resource.resources.v2019_08_01.operations.DeploymentsOperations>`
* 2019-10-01: :class:`DeploymentsOperations<azure.mgmt.resource.resources.v2019_10_01.operations.DeploymentsOperations>`
"""
api_version = self._get_api_version('deployments')
if api_version == '2016-02-01':
Expand All @@ -181,6 +189,8 @@ def deployments(self):
from .v2019_07_01.operations import DeploymentsOperations as OperationClass
elif api_version == '2019-08-01':
from .v2019_08_01.operations import DeploymentsOperations as OperationClass
elif api_version == '2019-10-01':
from .v2019_10_01.operations import DeploymentsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -194,6 +204,7 @@ def operations(self):
* 2019-05-10: :class:`Operations<azure.mgmt.resource.resources.v2019_05_10.operations.Operations>`
* 2019-07-01: :class:`Operations<azure.mgmt.resource.resources.v2019_07_01.operations.Operations>`
* 2019-08-01: :class:`Operations<azure.mgmt.resource.resources.v2019_08_01.operations.Operations>`
* 2019-10-01: :class:`Operations<azure.mgmt.resource.resources.v2019_10_01.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2018-05-01':
Expand All @@ -206,6 +217,8 @@ def operations(self):
from .v2019_07_01.operations import Operations as OperationClass
elif api_version == '2019-08-01':
from .v2019_08_01.operations import Operations as OperationClass
elif api_version == '2019-10-01':
from .v2019_10_01.operations import Operations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -223,6 +236,7 @@ def providers(self):
* 2019-05-10: :class:`ProvidersOperations<azure.mgmt.resource.resources.v2019_05_10.operations.ProvidersOperations>`
* 2019-07-01: :class:`ProvidersOperations<azure.mgmt.resource.resources.v2019_07_01.operations.ProvidersOperations>`
* 2019-08-01: :class:`ProvidersOperations<azure.mgmt.resource.resources.v2019_08_01.operations.ProvidersOperations>`
* 2019-10-01: :class:`ProvidersOperations<azure.mgmt.resource.resources.v2019_10_01.operations.ProvidersOperations>`
"""
api_version = self._get_api_version('providers')
if api_version == '2016-02-01':
Expand All @@ -243,6 +257,8 @@ def providers(self):
from .v2019_07_01.operations import ProvidersOperations as OperationClass
elif api_version == '2019-08-01':
from .v2019_08_01.operations import ProvidersOperations as OperationClass
elif api_version == '2019-10-01':
from .v2019_10_01.operations import ProvidersOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -260,6 +276,7 @@ def resource_groups(self):
* 2019-05-10: :class:`ResourceGroupsOperations<azure.mgmt.resource.resources.v2019_05_10.operations.ResourceGroupsOperations>`
* 2019-07-01: :class:`ResourceGroupsOperations<azure.mgmt.resource.resources.v2019_07_01.operations.ResourceGroupsOperations>`
* 2019-08-01: :class:`ResourceGroupsOperations<azure.mgmt.resource.resources.v2019_08_01.operations.ResourceGroupsOperations>`
* 2019-10-01: :class:`ResourceGroupsOperations<azure.mgmt.resource.resources.v2019_10_01.operations.ResourceGroupsOperations>`
"""
api_version = self._get_api_version('resource_groups')
if api_version == '2016-02-01':
Expand All @@ -280,6 +297,8 @@ def resource_groups(self):
from .v2019_07_01.operations import ResourceGroupsOperations as OperationClass
elif api_version == '2019-08-01':
from .v2019_08_01.operations import ResourceGroupsOperations as OperationClass
elif api_version == '2019-10-01':
from .v2019_10_01.operations import ResourceGroupsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -297,6 +316,7 @@ def resources(self):
* 2019-05-10: :class:`ResourcesOperations<azure.mgmt.resource.resources.v2019_05_10.operations.ResourcesOperations>`
* 2019-07-01: :class:`ResourcesOperations<azure.mgmt.resource.resources.v2019_07_01.operations.ResourcesOperations>`
* 2019-08-01: :class:`ResourcesOperations<azure.mgmt.resource.resources.v2019_08_01.operations.ResourcesOperations>`
* 2019-10-01: :class:`ResourcesOperations<azure.mgmt.resource.resources.v2019_10_01.operations.ResourcesOperations>`
"""
api_version = self._get_api_version('resources')
if api_version == '2016-02-01':
Expand All @@ -317,6 +337,8 @@ def resources(self):
from .v2019_07_01.operations import ResourcesOperations as OperationClass
elif api_version == '2019-08-01':
from .v2019_08_01.operations import ResourcesOperations as OperationClass
elif api_version == '2019-10-01':
from .v2019_10_01.operations import ResourcesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -334,6 +356,7 @@ def tags(self):
* 2019-05-10: :class:`TagsOperations<azure.mgmt.resource.resources.v2019_05_10.operations.TagsOperations>`
* 2019-07-01: :class:`TagsOperations<azure.mgmt.resource.resources.v2019_07_01.operations.TagsOperations>`
* 2019-08-01: :class:`TagsOperations<azure.mgmt.resource.resources.v2019_08_01.operations.TagsOperations>`
* 2019-10-01: :class:`TagsOperations<azure.mgmt.resource.resources.v2019_10_01.operations.TagsOperations>`
"""
api_version = self._get_api_version('tags')
if api_version == '2016-02-01':
Expand All @@ -354,6 +377,8 @@ def tags(self):
from .v2019_07_01.operations import TagsOperations as OperationClass
elif api_version == '2019-08-01':
from .v2019_08_01.operations import TagsOperations as OperationClass
elif api_version == '2019-10-01':
from .v2019_10_01.operations import TagsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from .v2019_08_01.models import *
from .v2019_10_01.models import *
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
from ._models_py3 import ResourceGroupProperties
from ._models_py3 import ResourceProviderOperationDisplayProperties
from ._models_py3 import ResourcesMoveInfo
from ._models_py3 import ScopedDeployment
from ._models_py3 import Sku
from ._models_py3 import SubResource
from ._models_py3 import TagCount
Expand Down Expand Up @@ -107,6 +108,7 @@
from ._models import ResourceGroupProperties
from ._models import ResourceProviderOperationDisplayProperties
from ._models import ResourcesMoveInfo
from ._models import ScopedDeployment
from ._models import Sku
from ._models import SubResource
from ._models import TagCount
Expand Down Expand Up @@ -179,6 +181,7 @@
'ResourceGroupProperties',
'ResourceProviderOperationDisplayProperties',
'ResourcesMoveInfo',
'ScopedDeployment',
'Sku',
'SubResource',
'TagCount',
Expand Down
Loading