Skip to content

Commit 0f41a13

Browse files
author
SDK Automation
committed
Update from release/v3
1 parent deb77e6 commit 0f41a13

20 files changed

+11929
-2
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,20 @@ class ResourceManagementClientConfiguration(AzureConfiguration):
2323
object<msrestazure.azure_active_directory>`
2424
:param subscription_id: The ID of the target subscription.
2525
:type subscription_id: str
26+
:param subscription_id1: The ID of the source subscription.
27+
:type subscription_id1: str
2628
:param str base_url: Service URL
2729
"""
2830

2931
def __init__(
30-
self, credentials, subscription_id, base_url=None):
32+
self, credentials, subscription_id, subscription_id1, base_url=None):
3133

3234
if credentials is None:
3335
raise ValueError("Parameter 'credentials' must not be None.")
3436
if subscription_id is None:
3537
raise ValueError("Parameter 'subscription_id' must not be None.")
38+
if subscription_id1 is None:
39+
raise ValueError("Parameter 'subscription_id1' must not be None.")
3640
if not base_url:
3741
base_url = 'https://management.azure.com'
3842

@@ -46,3 +50,4 @@ def __init__(
4650

4751
self.credentials = credentials
4852
self.subscription_id = subscription_id
53+
self.subscription_id1 = subscription_id1

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

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

49-
DEFAULT_API_VERSION = '2019-10-01'
49+
DEFAULT_API_VERSION = '2020-06-01'
5050
_PROFILE_TAG = "azure.mgmt.resource.resources.ResourceManagementClient"
5151
LATEST_PROFILE = ProfileDefinition({
5252
_PROFILE_TAG: {
5353
None: DEFAULT_API_VERSION,
54+
'tags': '2019-10-01',
5455
}},
5556
_PROFILE_TAG + " latest"
5657
)
@@ -82,6 +83,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
8283
* 2019-07-01: :mod:`v2019_07_01.models<azure.mgmt.resource.resources.v2019_07_01.models>`
8384
* 2019-08-01: :mod:`v2019_08_01.models<azure.mgmt.resource.resources.v2019_08_01.models>`
8485
* 2019-10-01: :mod:`v2019_10_01.models<azure.mgmt.resource.resources.v2019_10_01.models>`
86+
* 2020-06-01: :mod:`v2020_06_01.models<azure.mgmt.resource.resources.v2020_06_01.models>`
8587
"""
8688
if api_version == '2016-02-01':
8789
from .v2016_02_01 import models
@@ -113,6 +115,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
113115
elif api_version == '2019-10-01':
114116
from .v2019_10_01 import models
115117
return models
118+
elif api_version == '2020-06-01':
119+
from .v2020_06_01 import models
120+
return models
116121
raise NotImplementedError("APIVersion {} is not available".format(api_version))
117122

118123
@property
@@ -129,6 +134,7 @@ def deployment_operations(self):
129134
* 2019-07-01: :class:`DeploymentOperations<azure.mgmt.resource.resources.v2019_07_01.operations.DeploymentOperations>`
130135
* 2019-08-01: :class:`DeploymentOperations<azure.mgmt.resource.resources.v2019_08_01.operations.DeploymentOperations>`
131136
* 2019-10-01: :class:`DeploymentOperations<azure.mgmt.resource.resources.v2019_10_01.operations.DeploymentOperations>`
137+
* 2020-06-01: :class:`DeploymentOperations<azure.mgmt.resource.resources.v2020_06_01.operations.DeploymentOperations>`
132138
"""
133139
api_version = self._get_api_version('deployment_operations')
134140
if api_version == '2016-02-01':
@@ -151,6 +157,8 @@ def deployment_operations(self):
151157
from .v2019_08_01.operations import DeploymentOperations as OperationClass
152158
elif api_version == '2019-10-01':
153159
from .v2019_10_01.operations import DeploymentOperations as OperationClass
160+
elif api_version == '2020-06-01':
161+
from .v2020_06_01.operations import DeploymentOperations as OperationClass
154162
else:
155163
raise NotImplementedError("APIVersion {} is not available".format(api_version))
156164
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -169,6 +177,7 @@ def deployments(self):
169177
* 2019-07-01: :class:`DeploymentsOperations<azure.mgmt.resource.resources.v2019_07_01.operations.DeploymentsOperations>`
170178
* 2019-08-01: :class:`DeploymentsOperations<azure.mgmt.resource.resources.v2019_08_01.operations.DeploymentsOperations>`
171179
* 2019-10-01: :class:`DeploymentsOperations<azure.mgmt.resource.resources.v2019_10_01.operations.DeploymentsOperations>`
180+
* 2020-06-01: :class:`DeploymentsOperations<azure.mgmt.resource.resources.v2020_06_01.operations.DeploymentsOperations>`
172181
"""
173182
api_version = self._get_api_version('deployments')
174183
if api_version == '2016-02-01':
@@ -191,6 +200,8 @@ def deployments(self):
191200
from .v2019_08_01.operations import DeploymentsOperations as OperationClass
192201
elif api_version == '2019-10-01':
193202
from .v2019_10_01.operations import DeploymentsOperations as OperationClass
203+
elif api_version == '2020-06-01':
204+
from .v2020_06_01.operations import DeploymentsOperations as OperationClass
194205
else:
195206
raise NotImplementedError("APIVersion {} is not available".format(api_version))
196207
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -205,6 +216,7 @@ def operations(self):
205216
* 2019-07-01: :class:`Operations<azure.mgmt.resource.resources.v2019_07_01.operations.Operations>`
206217
* 2019-08-01: :class:`Operations<azure.mgmt.resource.resources.v2019_08_01.operations.Operations>`
207218
* 2019-10-01: :class:`Operations<azure.mgmt.resource.resources.v2019_10_01.operations.Operations>`
219+
* 2020-06-01: :class:`Operations<azure.mgmt.resource.resources.v2020_06_01.operations.Operations>`
208220
"""
209221
api_version = self._get_api_version('operations')
210222
if api_version == '2018-05-01':
@@ -219,6 +231,8 @@ def operations(self):
219231
from .v2019_08_01.operations import Operations as OperationClass
220232
elif api_version == '2019-10-01':
221233
from .v2019_10_01.operations import Operations as OperationClass
234+
elif api_version == '2020-06-01':
235+
from .v2020_06_01.operations import Operations as OperationClass
222236
else:
223237
raise NotImplementedError("APIVersion {} is not available".format(api_version))
224238
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -237,6 +251,7 @@ def providers(self):
237251
* 2019-07-01: :class:`ProvidersOperations<azure.mgmt.resource.resources.v2019_07_01.operations.ProvidersOperations>`
238252
* 2019-08-01: :class:`ProvidersOperations<azure.mgmt.resource.resources.v2019_08_01.operations.ProvidersOperations>`
239253
* 2019-10-01: :class:`ProvidersOperations<azure.mgmt.resource.resources.v2019_10_01.operations.ProvidersOperations>`
254+
* 2020-06-01: :class:`ProvidersOperations<azure.mgmt.resource.resources.v2020_06_01.operations.ProvidersOperations>`
240255
"""
241256
api_version = self._get_api_version('providers')
242257
if api_version == '2016-02-01':
@@ -259,6 +274,8 @@ def providers(self):
259274
from .v2019_08_01.operations import ProvidersOperations as OperationClass
260275
elif api_version == '2019-10-01':
261276
from .v2019_10_01.operations import ProvidersOperations as OperationClass
277+
elif api_version == '2020-06-01':
278+
from .v2020_06_01.operations import ProvidersOperations as OperationClass
262279
else:
263280
raise NotImplementedError("APIVersion {} is not available".format(api_version))
264281
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -277,6 +294,7 @@ def resource_groups(self):
277294
* 2019-07-01: :class:`ResourceGroupsOperations<azure.mgmt.resource.resources.v2019_07_01.operations.ResourceGroupsOperations>`
278295
* 2019-08-01: :class:`ResourceGroupsOperations<azure.mgmt.resource.resources.v2019_08_01.operations.ResourceGroupsOperations>`
279296
* 2019-10-01: :class:`ResourceGroupsOperations<azure.mgmt.resource.resources.v2019_10_01.operations.ResourceGroupsOperations>`
297+
* 2020-06-01: :class:`ResourceGroupsOperations<azure.mgmt.resource.resources.v2020_06_01.operations.ResourceGroupsOperations>`
280298
"""
281299
api_version = self._get_api_version('resource_groups')
282300
if api_version == '2016-02-01':
@@ -299,6 +317,8 @@ def resource_groups(self):
299317
from .v2019_08_01.operations import ResourceGroupsOperations as OperationClass
300318
elif api_version == '2019-10-01':
301319
from .v2019_10_01.operations import ResourceGroupsOperations as OperationClass
320+
elif api_version == '2020-06-01':
321+
from .v2020_06_01.operations import ResourceGroupsOperations as OperationClass
302322
else:
303323
raise NotImplementedError("APIVersion {} is not available".format(api_version))
304324
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -317,6 +337,7 @@ def resources(self):
317337
* 2019-07-01: :class:`ResourcesOperations<azure.mgmt.resource.resources.v2019_07_01.operations.ResourcesOperations>`
318338
* 2019-08-01: :class:`ResourcesOperations<azure.mgmt.resource.resources.v2019_08_01.operations.ResourcesOperations>`
319339
* 2019-10-01: :class:`ResourcesOperations<azure.mgmt.resource.resources.v2019_10_01.operations.ResourcesOperations>`
340+
* 2020-06-01: :class:`ResourcesOperations<azure.mgmt.resource.resources.v2020_06_01.operations.ResourcesOperations>`
320341
"""
321342
api_version = self._get_api_version('resources')
322343
if api_version == '2016-02-01':
@@ -339,6 +360,8 @@ def resources(self):
339360
from .v2019_08_01.operations import ResourcesOperations as OperationClass
340361
elif api_version == '2019-10-01':
341362
from .v2019_10_01.operations import ResourcesOperations as OperationClass
363+
elif api_version == '2020-06-01':
364+
from .v2020_06_01.operations import ResourcesOperations as OperationClass
342365
else:
343366
raise NotImplementedError("APIVersion {} is not available".format(api_version))
344367
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -382,3 +405,16 @@ def tags(self):
382405
else:
383406
raise NotImplementedError("APIVersion {} is not available".format(api_version))
384407
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
408+
409+
@property
410+
def tags_operation(self):
411+
"""Instance depends on the API version:
412+
413+
* 2020-06-01: :class:`TagsOperationOperations<azure.mgmt.resource.resources.v2020_06_01.operations.TagsOperationOperations>`
414+
"""
415+
api_version = self._get_api_version('tags_operation')
416+
if api_version == '2020-06-01':
417+
from .v2020_06_01.operations import TagsOperationOperations as OperationClass
418+
else:
419+
raise NotImplementedError("APIVersion {} is not available".format(api_version))
420+
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 & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
# license information.
66
# --------------------------------------------------------------------------
77
from .v2019_10_01.models import *
8+
from .v2020_06_01.models import *
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from ._configuration import ResourceManagementClientConfiguration
13+
from ._resource_management_client import ResourceManagementClient
14+
__all__ = ['ResourceManagementClient', 'ResourceManagementClientConfiguration']
15+
16+
from .version import VERSION
17+
18+
__version__ = VERSION
19+
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
from msrestazure import AzureConfiguration
12+
13+
from .version import VERSION
14+
15+
16+
class ResourceManagementClientConfiguration(AzureConfiguration):
17+
"""Configuration for ResourceManagementClient
18+
Note that all parameters used to create this instance are saved as instance
19+
attributes.
20+
21+
:param credentials: Credentials needed for the client to connect to Azure.
22+
:type credentials: :mod:`A msrestazure Credentials
23+
object<msrestazure.azure_active_directory>`
24+
:param subscription_id: The ID of the target subscription.
25+
:type subscription_id: str
26+
:param subscription_id1: The ID of the source subscription.
27+
:type subscription_id1: str
28+
:param str base_url: Service URL
29+
"""
30+
31+
def __init__(
32+
self, credentials, subscription_id, subscription_id1, base_url=None):
33+
34+
if credentials is None:
35+
raise ValueError("Parameter 'credentials' must not be None.")
36+
if subscription_id is None:
37+
raise ValueError("Parameter 'subscription_id' must not be None.")
38+
if subscription_id1 is None:
39+
raise ValueError("Parameter 'subscription_id1' must not be None.")
40+
if not base_url:
41+
base_url = 'https://management.azure.com'
42+
43+
super(ResourceManagementClientConfiguration, self).__init__(base_url)
44+
45+
# Starting Autorest.Python 4.0.64, make connection pool activated by default
46+
self.keep_alive = True
47+
48+
self.add_user_agent('azure-mgmt-resource/{}'.format(VERSION))
49+
self.add_user_agent('Azure-SDK-For-Python')
50+
51+
self.credentials = credentials
52+
self.subscription_id = subscription_id
53+
self.subscription_id1 = subscription_id1
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.service_client import SDKClient
13+
from msrest import Serializer, Deserializer
14+
15+
from ._configuration import ResourceManagementClientConfiguration
16+
from .operations import Operations
17+
from .operations import DeploymentsOperations
18+
from .operations import ProvidersOperations
19+
from .operations import ResourcesOperations
20+
from .operations import ResourceGroupsOperations
21+
from .operations import TagsOperationOperations
22+
from .operations import DeploymentOperations
23+
from . import models
24+
25+
26+
class ResourceManagementClient(SDKClient):
27+
"""Provides operations for working with resources and resource groups.
28+
29+
:ivar config: Configuration for client.
30+
:vartype config: ResourceManagementClientConfiguration
31+
32+
:ivar operations: Operations operations
33+
:vartype operations: azure.mgmt.resource.resources.v2020_06_01.operations.Operations
34+
:ivar deployments: Deployments operations
35+
:vartype deployments: azure.mgmt.resource.resources.v2020_06_01.operations.DeploymentsOperations
36+
:ivar providers: Providers operations
37+
:vartype providers: azure.mgmt.resource.resources.v2020_06_01.operations.ProvidersOperations
38+
:ivar resources: Resources operations
39+
:vartype resources: azure.mgmt.resource.resources.v2020_06_01.operations.ResourcesOperations
40+
:ivar resource_groups: ResourceGroups operations
41+
:vartype resource_groups: azure.mgmt.resource.resources.v2020_06_01.operations.ResourceGroupsOperations
42+
:ivar tags_operation: TagsOperation operations
43+
:vartype tags_operation: azure.mgmt.resource.resources.v2020_06_01.operations.TagsOperationOperations
44+
:ivar deployment_operations: DeploymentOperations operations
45+
:vartype deployment_operations: azure.mgmt.resource.resources.v2020_06_01.operations.DeploymentOperations
46+
47+
:param credentials: Credentials needed for the client to connect to Azure.
48+
:type credentials: :mod:`A msrestazure Credentials
49+
object<msrestazure.azure_active_directory>`
50+
:param subscription_id: The ID of the target subscription.
51+
:type subscription_id: str
52+
:param subscription_id1: The ID of the source subscription.
53+
:type subscription_id1: str
54+
:param str base_url: Service URL
55+
"""
56+
57+
def __init__(
58+
self, credentials, subscription_id, subscription_id1, base_url=None):
59+
60+
self.config = ResourceManagementClientConfiguration(credentials, subscription_id, subscription_id1, base_url)
61+
super(ResourceManagementClient, self).__init__(self.config.credentials, self.config)
62+
63+
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
64+
self.api_version = '2020-06-01'
65+
self._serialize = Serializer(client_models)
66+
self._deserialize = Deserializer(client_models)
67+
68+
self.operations = Operations(
69+
self._client, self.config, self._serialize, self._deserialize)
70+
self.deployments = DeploymentsOperations(
71+
self._client, self.config, self._serialize, self._deserialize)
72+
self.providers = ProvidersOperations(
73+
self._client, self.config, self._serialize, self._deserialize)
74+
self.resources = ResourcesOperations(
75+
self._client, self.config, self._serialize, self._deserialize)
76+
self.resource_groups = ResourceGroupsOperations(
77+
self._client, self.config, self._serialize, self._deserialize)
78+
self.tags_operation = TagsOperationOperations(
79+
self._client, self.config, self._serialize, self._deserialize)
80+
self.deployment_operations = DeploymentOperations(
81+
self._client, self.config, self._serialize, self._deserialize)

0 commit comments

Comments
 (0)