Skip to content

Commit 6dbd15b

Browse files
author
SDK Automation
committed
Generated from 544ccacf4eba646206fffab2147bb6e1669c2575
Rollback java support for Resources API version 2020-06-01
1 parent deb77e6 commit 6dbd15b

19 files changed

+11911
-2
lines changed

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

Lines changed: 26 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 = '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: {
@@ -82,6 +82,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
8282
* 2019-07-01: :mod:`v2019_07_01.models<azure.mgmt.resource.resources.v2019_07_01.models>`
8383
* 2019-08-01: :mod:`v2019_08_01.models<azure.mgmt.resource.resources.v2019_08_01.models>`
8484
* 2019-10-01: :mod:`v2019_10_01.models<azure.mgmt.resource.resources.v2019_10_01.models>`
85+
* 2020-06-01: :mod:`v2020_06_01.models<azure.mgmt.resource.resources.v2020_06_01.models>`
8586
"""
8687
if api_version == '2016-02-01':
8788
from .v2016_02_01 import models
@@ -113,6 +114,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
113114
elif api_version == '2019-10-01':
114115
from .v2019_10_01 import models
115116
return models
117+
elif api_version == '2020-06-01':
118+
from .v2020_06_01 import models
119+
return models
116120
raise NotImplementedError("APIVersion {} is not available".format(api_version))
117121

118122
@property
@@ -129,6 +133,7 @@ def deployment_operations(self):
129133
* 2019-07-01: :class:`DeploymentOperations<azure.mgmt.resource.resources.v2019_07_01.operations.DeploymentOperations>`
130134
* 2019-08-01: :class:`DeploymentOperations<azure.mgmt.resource.resources.v2019_08_01.operations.DeploymentOperations>`
131135
* 2019-10-01: :class:`DeploymentOperations<azure.mgmt.resource.resources.v2019_10_01.operations.DeploymentOperations>`
136+
* 2020-06-01: :class:`DeploymentOperations<azure.mgmt.resource.resources.v2020_06_01.operations.DeploymentOperations>`
132137
"""
133138
api_version = self._get_api_version('deployment_operations')
134139
if api_version == '2016-02-01':
@@ -151,6 +156,8 @@ def deployment_operations(self):
151156
from .v2019_08_01.operations import DeploymentOperations as OperationClass
152157
elif api_version == '2019-10-01':
153158
from .v2019_10_01.operations import DeploymentOperations as OperationClass
159+
elif api_version == '2020-06-01':
160+
from .v2020_06_01.operations import DeploymentOperations as OperationClass
154161
else:
155162
raise NotImplementedError("APIVersion {} is not available".format(api_version))
156163
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -169,6 +176,7 @@ def deployments(self):
169176
* 2019-07-01: :class:`DeploymentsOperations<azure.mgmt.resource.resources.v2019_07_01.operations.DeploymentsOperations>`
170177
* 2019-08-01: :class:`DeploymentsOperations<azure.mgmt.resource.resources.v2019_08_01.operations.DeploymentsOperations>`
171178
* 2019-10-01: :class:`DeploymentsOperations<azure.mgmt.resource.resources.v2019_10_01.operations.DeploymentsOperations>`
179+
* 2020-06-01: :class:`DeploymentsOperations<azure.mgmt.resource.resources.v2020_06_01.operations.DeploymentsOperations>`
172180
"""
173181
api_version = self._get_api_version('deployments')
174182
if api_version == '2016-02-01':
@@ -191,6 +199,8 @@ def deployments(self):
191199
from .v2019_08_01.operations import DeploymentsOperations as OperationClass
192200
elif api_version == '2019-10-01':
193201
from .v2019_10_01.operations import DeploymentsOperations as OperationClass
202+
elif api_version == '2020-06-01':
203+
from .v2020_06_01.operations import DeploymentsOperations as OperationClass
194204
else:
195205
raise NotImplementedError("APIVersion {} is not available".format(api_version))
196206
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -205,6 +215,7 @@ def operations(self):
205215
* 2019-07-01: :class:`Operations<azure.mgmt.resource.resources.v2019_07_01.operations.Operations>`
206216
* 2019-08-01: :class:`Operations<azure.mgmt.resource.resources.v2019_08_01.operations.Operations>`
207217
* 2019-10-01: :class:`Operations<azure.mgmt.resource.resources.v2019_10_01.operations.Operations>`
218+
* 2020-06-01: :class:`Operations<azure.mgmt.resource.resources.v2020_06_01.operations.Operations>`
208219
"""
209220
api_version = self._get_api_version('operations')
210221
if api_version == '2018-05-01':
@@ -219,6 +230,8 @@ def operations(self):
219230
from .v2019_08_01.operations import Operations as OperationClass
220231
elif api_version == '2019-10-01':
221232
from .v2019_10_01.operations import Operations as OperationClass
233+
elif api_version == '2020-06-01':
234+
from .v2020_06_01.operations import Operations as OperationClass
222235
else:
223236
raise NotImplementedError("APIVersion {} is not available".format(api_version))
224237
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -237,6 +250,7 @@ def providers(self):
237250
* 2019-07-01: :class:`ProvidersOperations<azure.mgmt.resource.resources.v2019_07_01.operations.ProvidersOperations>`
238251
* 2019-08-01: :class:`ProvidersOperations<azure.mgmt.resource.resources.v2019_08_01.operations.ProvidersOperations>`
239252
* 2019-10-01: :class:`ProvidersOperations<azure.mgmt.resource.resources.v2019_10_01.operations.ProvidersOperations>`
253+
* 2020-06-01: :class:`ProvidersOperations<azure.mgmt.resource.resources.v2020_06_01.operations.ProvidersOperations>`
240254
"""
241255
api_version = self._get_api_version('providers')
242256
if api_version == '2016-02-01':
@@ -259,6 +273,8 @@ def providers(self):
259273
from .v2019_08_01.operations import ProvidersOperations as OperationClass
260274
elif api_version == '2019-10-01':
261275
from .v2019_10_01.operations import ProvidersOperations as OperationClass
276+
elif api_version == '2020-06-01':
277+
from .v2020_06_01.operations import ProvidersOperations as OperationClass
262278
else:
263279
raise NotImplementedError("APIVersion {} is not available".format(api_version))
264280
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -277,6 +293,7 @@ def resource_groups(self):
277293
* 2019-07-01: :class:`ResourceGroupsOperations<azure.mgmt.resource.resources.v2019_07_01.operations.ResourceGroupsOperations>`
278294
* 2019-08-01: :class:`ResourceGroupsOperations<azure.mgmt.resource.resources.v2019_08_01.operations.ResourceGroupsOperations>`
279295
* 2019-10-01: :class:`ResourceGroupsOperations<azure.mgmt.resource.resources.v2019_10_01.operations.ResourceGroupsOperations>`
296+
* 2020-06-01: :class:`ResourceGroupsOperations<azure.mgmt.resource.resources.v2020_06_01.operations.ResourceGroupsOperations>`
280297
"""
281298
api_version = self._get_api_version('resource_groups')
282299
if api_version == '2016-02-01':
@@ -299,6 +316,8 @@ def resource_groups(self):
299316
from .v2019_08_01.operations import ResourceGroupsOperations as OperationClass
300317
elif api_version == '2019-10-01':
301318
from .v2019_10_01.operations import ResourceGroupsOperations as OperationClass
319+
elif api_version == '2020-06-01':
320+
from .v2020_06_01.operations import ResourceGroupsOperations as OperationClass
302321
else:
303322
raise NotImplementedError("APIVersion {} is not available".format(api_version))
304323
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -317,6 +336,7 @@ def resources(self):
317336
* 2019-07-01: :class:`ResourcesOperations<azure.mgmt.resource.resources.v2019_07_01.operations.ResourcesOperations>`
318337
* 2019-08-01: :class:`ResourcesOperations<azure.mgmt.resource.resources.v2019_08_01.operations.ResourcesOperations>`
319338
* 2019-10-01: :class:`ResourcesOperations<azure.mgmt.resource.resources.v2019_10_01.operations.ResourcesOperations>`
339+
* 2020-06-01: :class:`ResourcesOperations<azure.mgmt.resource.resources.v2020_06_01.operations.ResourcesOperations>`
320340
"""
321341
api_version = self._get_api_version('resources')
322342
if api_version == '2016-02-01':
@@ -339,6 +359,8 @@ def resources(self):
339359
from .v2019_08_01.operations import ResourcesOperations as OperationClass
340360
elif api_version == '2019-10-01':
341361
from .v2019_10_01.operations import ResourcesOperations as OperationClass
362+
elif api_version == '2020-06-01':
363+
from .v2020_06_01.operations import ResourcesOperations as OperationClass
342364
else:
343365
raise NotImplementedError("APIVersion {} is not available".format(api_version))
344366
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -357,6 +379,7 @@ def tags(self):
357379
* 2019-07-01: :class:`TagsOperations<azure.mgmt.resource.resources.v2019_07_01.operations.TagsOperations>`
358380
* 2019-08-01: :class:`TagsOperations<azure.mgmt.resource.resources.v2019_08_01.operations.TagsOperations>`
359381
* 2019-10-01: :class:`TagsOperations<azure.mgmt.resource.resources.v2019_10_01.operations.TagsOperations>`
382+
* 2020-06-01: :class:`TagsOperations<azure.mgmt.resource.resources.v2020_06_01.operations.TagsOperations>`
360383
"""
361384
api_version = self._get_api_version('tags')
362385
if api_version == '2016-02-01':
@@ -379,6 +402,8 @@ def tags(self):
379402
from .v2019_08_01.operations import TagsOperations as OperationClass
380403
elif api_version == '2019-10-01':
381404
from .v2019_10_01.operations import TagsOperations as OperationClass
405+
elif api_version == '2020-06-01':
406+
from .v2020_06_01.operations import TagsOperations as OperationClass
382407
else:
383408
raise NotImplementedError("APIVersion {} is not available".format(api_version))
384409
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 .v2019_10_01.models import *
7+
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: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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 str base_url: Service URL
27+
"""
28+
29+
def __init__(
30+
self, credentials, subscription_id, base_url=None):
31+
32+
if credentials is None:
33+
raise ValueError("Parameter 'credentials' must not be None.")
34+
if subscription_id is None:
35+
raise ValueError("Parameter 'subscription_id' must not be None.")
36+
if not base_url:
37+
base_url = 'https://management.azure.com'
38+
39+
super(ResourceManagementClientConfiguration, self).__init__(base_url)
40+
41+
# Starting Autorest.Python 4.0.64, make connection pool activated by default
42+
self.keep_alive = True
43+
44+
self.add_user_agent('azure-mgmt-resource/{}'.format(VERSION))
45+
self.add_user_agent('Azure-SDK-For-Python')
46+
47+
self.credentials = credentials
48+
self.subscription_id = subscription_id
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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 TagsOperations
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: Tags operations
43+
:vartype tags: azure.mgmt.resource.resources.v2020_06_01.operations.TagsOperations
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 str base_url: Service URL
53+
"""
54+
55+
def __init__(
56+
self, credentials, subscription_id, base_url=None):
57+
58+
self.config = ResourceManagementClientConfiguration(credentials, subscription_id, base_url)
59+
super(ResourceManagementClient, self).__init__(self.config.credentials, self.config)
60+
61+
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
62+
self.api_version = '2020-06-01'
63+
self._serialize = Serializer(client_models)
64+
self._deserialize = Deserializer(client_models)
65+
66+
self.operations = Operations(
67+
self._client, self.config, self._serialize, self._deserialize)
68+
self.deployments = DeploymentsOperations(
69+
self._client, self.config, self._serialize, self._deserialize)
70+
self.providers = ProvidersOperations(
71+
self._client, self.config, self._serialize, self._deserialize)
72+
self.resources = ResourcesOperations(
73+
self._client, self.config, self._serialize, self._deserialize)
74+
self.resource_groups = ResourceGroupsOperations(
75+
self._client, self.config, self._serialize, self._deserialize)
76+
self.tags = TagsOperations(
77+
self._client, self.config, self._serialize, self._deserialize)
78+
self.deployment_operations = DeploymentOperations(
79+
self._client, self.config, self._serialize, self._deserialize)

0 commit comments

Comments
 (0)