Skip to content

Commit cb5e251

Browse files
author
SDKAuto
committed
CodeGen from PR 14198 in Azure/azure-rest-api-specs
Merge 6e61333b2bbd2e747bb22117a0e0e66defe05c33 into 741037c
1 parent 8dd26ca commit cb5e251

File tree

93 files changed

+17976
-177
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+17976
-177
lines changed

sdk/resources/azure-mgmt-resource/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include _meta.json
12
recursive-include tests *.py *.yaml
23
include *.md
34
include azure/__init__.py
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"autorest": "V2",
3+
"use": "@microsoft.azure/autorest.python@~4.0.71",
4+
"commit": "3951a779e4cd7b351bdfc4557fdc94490f5f6765",
5+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
6+
"autorest_command": "autorest specification/resources/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2",
7+
"readme": "specification/resources/resource-manager/readme.md"
8+
}

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/operations/_deployment_scripts_operations.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def _create_initial(
4747
url = self.create.metadata['url']
4848
path_format_arguments = {
4949
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
50-
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
50+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
5151
'scriptName': self._serialize.url("script_name", script_name, 'str', max_length=90, min_length=1)
5252
}
5353
url = self._client.format_url(url, **path_format_arguments)
@@ -174,7 +174,7 @@ def update(
174174
url = self.update.metadata['url']
175175
path_format_arguments = {
176176
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
177-
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
177+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
178178
'scriptName': self._serialize.url("script_name", script_name, 'str', max_length=90, min_length=1)
179179
}
180180
url = self._client.format_url(url, **path_format_arguments)
@@ -243,7 +243,7 @@ def get(
243243
url = self.get.metadata['url']
244244
path_format_arguments = {
245245
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
246-
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
246+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
247247
'scriptName': self._serialize.url("script_name", script_name, 'str', max_length=90, min_length=1)
248248
}
249249
url = self._client.format_url(url, **path_format_arguments)
@@ -304,7 +304,7 @@ def delete(
304304
url = self.delete.metadata['url']
305305
path_format_arguments = {
306306
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
307-
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
307+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
308308
'scriptName': self._serialize.url("script_name", script_name, 'str', max_length=90, min_length=1)
309309
}
310310
url = self._client.format_url(url, **path_format_arguments)
@@ -424,7 +424,7 @@ def get_logs(
424424
url = self.get_logs.metadata['url']
425425
path_format_arguments = {
426426
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
427-
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
427+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
428428
'scriptName': self._serialize.url("script_name", script_name, 'str', max_length=90, min_length=1)
429429
}
430430
url = self._client.format_url(url, **path_format_arguments)
@@ -491,7 +491,7 @@ def get_logs_default(
491491
url = self.get_logs_default.metadata['url']
492492
path_format_arguments = {
493493
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
494-
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
494+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
495495
'scriptName': self._serialize.url("script_name", script_name, 'str', max_length=90, min_length=1)
496496
}
497497
url = self._client.format_url(url, **path_format_arguments)
@@ -554,7 +554,7 @@ def prepare_request(next_link=None):
554554
url = self.list_by_resource_group.metadata['url']
555555
path_format_arguments = {
556556
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
557-
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$')
557+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1)
558558
}
559559
url = self._client.format_url(url, **path_format_arguments)
560560

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/_resource_management_client.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class ResourceManagementClient(MultiApiClientMixin, SDKClient):
4646
:type profile: azure.profiles.KnownProfiles
4747
"""
4848

49-
DEFAULT_API_VERSION = '2020-10-01'
49+
DEFAULT_API_VERSION = '2021-01-01'
5050
_PROFILE_TAG = "azure.mgmt.resource.resources.ResourceManagementClient"
5151
LATEST_PROFILE = ProfileDefinition({
5252
_PROFILE_TAG: {
@@ -85,6 +85,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
8585
* 2019-10-01: :mod:`v2019_10_01.models<azure.mgmt.resource.resources.v2019_10_01.models>`
8686
* 2020-06-01: :mod:`v2020_06_01.models<azure.mgmt.resource.resources.v2020_06_01.models>`
8787
* 2020-10-01: :mod:`v2020_10_01.models<azure.mgmt.resource.resources.v2020_10_01.models>`
88+
* 2021-01-01: :mod:`v2021_01_01.models<azure.mgmt.resource.resources.v2021_01_01.models>`
8889
"""
8990
if api_version == '2016-02-01':
9091
from .v2016_02_01 import models
@@ -125,6 +126,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
125126
elif api_version == '2020-10-01':
126127
from .v2020_10_01 import models
127128
return models
129+
elif api_version == '2021-01-01':
130+
from .v2021_01_01 import models
131+
return models
128132
raise NotImplementedError("APIVersion {} is not available".format(api_version))
129133

130134
@property
@@ -144,6 +148,7 @@ def deployment_operations(self):
144148
* 2019-10-01: :class:`DeploymentOperations<azure.mgmt.resource.resources.v2019_10_01.operations.DeploymentOperations>`
145149
* 2020-06-01: :class:`DeploymentOperations<azure.mgmt.resource.resources.v2020_06_01.operations.DeploymentOperations>`
146150
* 2020-10-01: :class:`DeploymentOperations<azure.mgmt.resource.resources.v2020_10_01.operations.DeploymentOperations>`
151+
* 2021-01-01: :class:`DeploymentOperations<azure.mgmt.resource.resources.v2021_01_01.operations.DeploymentOperations>`
147152
"""
148153
api_version = self._get_api_version('deployment_operations')
149154
if api_version == '2016-02-01':
@@ -172,6 +177,8 @@ def deployment_operations(self):
172177
from .v2020_06_01.operations import DeploymentOperations as OperationClass
173178
elif api_version == '2020-10-01':
174179
from .v2020_10_01.operations import DeploymentOperations as OperationClass
180+
elif api_version == '2021-01-01':
181+
from .v2021_01_01.operations import DeploymentOperations as OperationClass
175182
else:
176183
raise NotImplementedError("APIVersion {} is not available".format(api_version))
177184
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -193,6 +200,7 @@ def deployments(self):
193200
* 2019-10-01: :class:`DeploymentsOperations<azure.mgmt.resource.resources.v2019_10_01.operations.DeploymentsOperations>`
194201
* 2020-06-01: :class:`DeploymentsOperations<azure.mgmt.resource.resources.v2020_06_01.operations.DeploymentsOperations>`
195202
* 2020-10-01: :class:`DeploymentsOperations<azure.mgmt.resource.resources.v2020_10_01.operations.DeploymentsOperations>`
203+
* 2021-01-01: :class:`DeploymentsOperations<azure.mgmt.resource.resources.v2021_01_01.operations.DeploymentsOperations>`
196204
"""
197205
api_version = self._get_api_version('deployments')
198206
if api_version == '2016-02-01':
@@ -221,6 +229,8 @@ def deployments(self):
221229
from .v2020_06_01.operations import DeploymentsOperations as OperationClass
222230
elif api_version == '2020-10-01':
223231
from .v2020_10_01.operations import DeploymentsOperations as OperationClass
232+
elif api_version == '2021-01-01':
233+
from .v2021_01_01.operations import DeploymentsOperations as OperationClass
224234
else:
225235
raise NotImplementedError("APIVersion {} is not available".format(api_version))
226236
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -238,6 +248,7 @@ def operations(self):
238248
* 2019-10-01: :class:`Operations<azure.mgmt.resource.resources.v2019_10_01.operations.Operations>`
239249
* 2020-06-01: :class:`Operations<azure.mgmt.resource.resources.v2020_06_01.operations.Operations>`
240250
* 2020-10-01: :class:`Operations<azure.mgmt.resource.resources.v2020_10_01.operations.Operations>`
251+
* 2021-01-01: :class:`Operations<azure.mgmt.resource.resources.v2021_01_01.operations.Operations>`
241252
"""
242253
api_version = self._get_api_version('operations')
243254
if api_version == '2018-05-01':
@@ -258,6 +269,8 @@ def operations(self):
258269
from .v2020_06_01.operations import Operations as OperationClass
259270
elif api_version == '2020-10-01':
260271
from .v2020_10_01.operations import Operations as OperationClass
272+
elif api_version == '2021-01-01':
273+
from .v2021_01_01.operations import Operations as OperationClass
261274
else:
262275
raise NotImplementedError("APIVersion {} is not available".format(api_version))
263276
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -267,10 +280,13 @@ def provider_resource_types(self):
267280
"""Instance depends on the API version:
268281
269282
* 2020-10-01: :class:`ProviderResourceTypesOperations<azure.mgmt.resource.resources.v2020_10_01.operations.ProviderResourceTypesOperations>`
283+
* 2021-01-01: :class:`ProviderResourceTypesOperations<azure.mgmt.resource.resources.v2021_01_01.operations.ProviderResourceTypesOperations>`
270284
"""
271285
api_version = self._get_api_version('provider_resource_types')
272286
if api_version == '2020-10-01':
273287
from .v2020_10_01.operations import ProviderResourceTypesOperations as OperationClass
288+
elif api_version == '2021-01-01':
289+
from .v2021_01_01.operations import ProviderResourceTypesOperations as OperationClass
274290
else:
275291
raise NotImplementedError("APIVersion {} is not available".format(api_version))
276292
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -292,6 +308,7 @@ def providers(self):
292308
* 2019-10-01: :class:`ProvidersOperations<azure.mgmt.resource.resources.v2019_10_01.operations.ProvidersOperations>`
293309
* 2020-06-01: :class:`ProvidersOperations<azure.mgmt.resource.resources.v2020_06_01.operations.ProvidersOperations>`
294310
* 2020-10-01: :class:`ProvidersOperations<azure.mgmt.resource.resources.v2020_10_01.operations.ProvidersOperations>`
311+
* 2021-01-01: :class:`ProvidersOperations<azure.mgmt.resource.resources.v2021_01_01.operations.ProvidersOperations>`
295312
"""
296313
api_version = self._get_api_version('providers')
297314
if api_version == '2016-02-01':
@@ -320,6 +337,8 @@ def providers(self):
320337
from .v2020_06_01.operations import ProvidersOperations as OperationClass
321338
elif api_version == '2020-10-01':
322339
from .v2020_10_01.operations import ProvidersOperations as OperationClass
340+
elif api_version == '2021-01-01':
341+
from .v2021_01_01.operations import ProvidersOperations as OperationClass
323342
else:
324343
raise NotImplementedError("APIVersion {} is not available".format(api_version))
325344
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -341,6 +360,7 @@ def resource_groups(self):
341360
* 2019-10-01: :class:`ResourceGroupsOperations<azure.mgmt.resource.resources.v2019_10_01.operations.ResourceGroupsOperations>`
342361
* 2020-06-01: :class:`ResourceGroupsOperations<azure.mgmt.resource.resources.v2020_06_01.operations.ResourceGroupsOperations>`
343362
* 2020-10-01: :class:`ResourceGroupsOperations<azure.mgmt.resource.resources.v2020_10_01.operations.ResourceGroupsOperations>`
363+
* 2021-01-01: :class:`ResourceGroupsOperations<azure.mgmt.resource.resources.v2021_01_01.operations.ResourceGroupsOperations>`
344364
"""
345365
api_version = self._get_api_version('resource_groups')
346366
if api_version == '2016-02-01':
@@ -369,6 +389,8 @@ def resource_groups(self):
369389
from .v2020_06_01.operations import ResourceGroupsOperations as OperationClass
370390
elif api_version == '2020-10-01':
371391
from .v2020_10_01.operations import ResourceGroupsOperations as OperationClass
392+
elif api_version == '2021-01-01':
393+
from .v2021_01_01.operations import ResourceGroupsOperations as OperationClass
372394
else:
373395
raise NotImplementedError("APIVersion {} is not available".format(api_version))
374396
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -390,6 +412,7 @@ def resources(self):
390412
* 2019-10-01: :class:`ResourcesOperations<azure.mgmt.resource.resources.v2019_10_01.operations.ResourcesOperations>`
391413
* 2020-06-01: :class:`ResourcesOperations<azure.mgmt.resource.resources.v2020_06_01.operations.ResourcesOperations>`
392414
* 2020-10-01: :class:`ResourcesOperations<azure.mgmt.resource.resources.v2020_10_01.operations.ResourcesOperations>`
415+
* 2021-01-01: :class:`ResourcesOperations<azure.mgmt.resource.resources.v2021_01_01.operations.ResourcesOperations>`
393416
"""
394417
api_version = self._get_api_version('resources')
395418
if api_version == '2016-02-01':
@@ -418,6 +441,8 @@ def resources(self):
418441
from .v2020_06_01.operations import ResourcesOperations as OperationClass
419442
elif api_version == '2020-10-01':
420443
from .v2020_10_01.operations import ResourcesOperations as OperationClass
444+
elif api_version == '2021-01-01':
445+
from .v2021_01_01.operations import ResourcesOperations as OperationClass
421446
else:
422447
raise NotImplementedError("APIVersion {} is not available".format(api_version))
423448
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -439,6 +464,7 @@ def tags(self):
439464
* 2019-10-01: :class:`TagsOperations<azure.mgmt.resource.resources.v2019_10_01.operations.TagsOperations>`
440465
* 2020-06-01: :class:`TagsOperations<azure.mgmt.resource.resources.v2020_06_01.operations.TagsOperations>`
441466
* 2020-10-01: :class:`TagsOperations<azure.mgmt.resource.resources.v2020_10_01.operations.TagsOperations>`
467+
* 2021-01-01: :class:`TagsOperations<azure.mgmt.resource.resources.v2021_01_01.operations.TagsOperations>`
442468
"""
443469
api_version = self._get_api_version('tags')
444470
if api_version == '2016-02-01':
@@ -467,6 +493,8 @@ def tags(self):
467493
from .v2020_06_01.operations import TagsOperations as OperationClass
468494
elif api_version == '2020-10-01':
469495
from .v2020_10_01.operations import TagsOperations as OperationClass
496+
elif api_version == '2021-01-01':
497+
from .v2021_01_01.operations import TagsOperations as OperationClass
470498
else:
471499
raise NotImplementedError("APIVersion {} is not available".format(api_version))
472500
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
# Licensed under the MIT License. See License.txt in the project root for
55
# license information.
66
# --------------------------------------------------------------------------
7-
from .v2020_10_01.models import *
7+
from .v2021_01_01.models import *

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/models/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
from ._models_py3 import TargetResource
5353
from ._models_py3 import TemplateHashResult
5454
from ._models_py3 import TemplateLink
55+
from ._models_py3 import ZoneMapping
5556
except (SyntaxError, ImportError):
5657
from ._models import AliasPathType
5758
from ._models import AliasType
@@ -95,6 +96,7 @@
9596
from ._models import TargetResource
9697
from ._models import TemplateHashResult
9798
from ._models import TemplateLink
99+
from ._models import ZoneMapping
98100
from ._paged_models import DeploymentExtendedPaged
99101
from ._paged_models import DeploymentOperationPaged
100102
from ._paged_models import GenericResourceExpandedPaged
@@ -149,6 +151,7 @@
149151
'TargetResource',
150152
'TemplateHashResult',
151153
'TemplateLink',
154+
'ZoneMapping',
152155
'DeploymentExtendedPaged',
153156
'ProviderPaged',
154157
'GenericResourceExpandedPaged',

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,9 @@ class ProviderResourceType(Model):
964964
list[~azure.mgmt.resource.resources.v2016_09_01.models.AliasType]
965965
:param api_versions: The API version.
966966
:type api_versions: list[str]
967+
:param zone_mappings:
968+
:type zone_mappings:
969+
list[~azure.mgmt.resource.resources.v2016_09_01.models.ZoneMapping]
967970
:param properties: The properties.
968971
:type properties: dict[str, str]
969972
"""
@@ -973,6 +976,7 @@ class ProviderResourceType(Model):
973976
'locations': {'key': 'locations', 'type': '[str]'},
974977
'aliases': {'key': 'aliases', 'type': '[AliasType]'},
975978
'api_versions': {'key': 'apiVersions', 'type': '[str]'},
979+
'zone_mappings': {'key': 'zoneMappings', 'type': '[ZoneMapping]'},
976980
'properties': {'key': 'properties', 'type': '{str}'},
977981
}
978982

@@ -982,6 +986,7 @@ def __init__(self, **kwargs):
982986
self.locations = kwargs.get('locations', None)
983987
self.aliases = kwargs.get('aliases', None)
984988
self.api_versions = kwargs.get('api_versions', None)
989+
self.zone_mappings = kwargs.get('zone_mappings', None)
985990
self.properties = kwargs.get('properties', None)
986991

987992

@@ -1401,3 +1406,23 @@ def __init__(self, **kwargs):
14011406
super(TemplateLink, self).__init__(**kwargs)
14021407
self.uri = kwargs.get('uri', None)
14031408
self.content_version = kwargs.get('content_version', None)
1409+
1410+
1411+
class ZoneMapping(Model):
1412+
"""ZoneMapping.
1413+
1414+
:param location: The location of the zone mapping.
1415+
:type location: str
1416+
:param zones:
1417+
:type zones: list[str]
1418+
"""
1419+
1420+
_attribute_map = {
1421+
'location': {'key': 'location', 'type': 'str'},
1422+
'zones': {'key': 'zones', 'type': '[str]'},
1423+
}
1424+
1425+
def __init__(self, **kwargs):
1426+
super(ZoneMapping, self).__init__(**kwargs)
1427+
self.location = kwargs.get('location', None)
1428+
self.zones = kwargs.get('zones', None)

0 commit comments

Comments
 (0)