Skip to content

Commit 1bd3e83

Browse files
author
SDKAuto
committed
CodeGen from PR 13945 in Azure/azure-rest-api-specs
Merge 9fb392c3cc6d332236ea007c20f1481428e62521 into 571282b
1 parent d794aee commit 1bd3e83

File tree

99 files changed

+3413
-157
lines changed

Some content is hidden

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

99 files changed

+3413
-157
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"autorest": "3.4.2",
2+
"autorest": "3.4.5",
33
"use": [
4-
"@autorest/[email protected].0",
5-
"@autorest/[email protected].1"
4+
"@autorest/[email protected].3",
5+
"@autorest/[email protected].2"
66
],
7-
"commit": "6816683ce2d163a8ba62f426202fdcfbe7b68e35",
7+
"commit": "3cda1d17fc66c39b4ebc99d435bbb509abe28295",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/resources/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected].0 --use=@autorest/[email protected].1 --version=3.4.2",
9+
"autorest_command": "autorest specification/resources/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected].3 --use=@autorest/[email protected].2 --version=3.4.5",
1010
"readme": "specification/resources/resource-manager/readme.md"
1111
}

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "18.0.0"
9+
VERSION = "1.0.0b1"

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "18.0.0"
9+
VERSION = "1.0.0b1"

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,31 @@ class FeatureClientConfiguration(Configuration):
3030
3131
:param credential: Credential needed for the client to connect to Azure.
3232
:type credential: ~azure.core.credentials.TokenCredential
33-
:param subscription_id: The ID of the target subscription.
33+
:param subscription_id: The Azure subscription ID.
3434
:type subscription_id: str
35+
:param provider_namespace: The provider namespace.
36+
:type provider_namespace: str
3537
"""
3638

3739
def __init__(
3840
self,
3941
credential, # type: "TokenCredential"
4042
subscription_id, # type: str
43+
provider_namespace, # type: str
4144
**kwargs # type: Any
4245
):
4346
# type: (...) -> None
4447
if credential is None:
4548
raise ValueError("Parameter 'credential' must not be None.")
4649
if subscription_id is None:
4750
raise ValueError("Parameter 'subscription_id' must not be None.")
51+
if provider_namespace is None:
52+
raise ValueError("Parameter 'provider_namespace' must not be None.")
4853
super(FeatureClientConfiguration, self).__init__(**kwargs)
4954

5055
self.credential = credential
5156
self.subscription_id = subscription_id
57+
self.provider_namespace = provider_namespace
5258
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5359
kwargs.setdefault('sdk_moniker', 'azure-mgmt-resource/{}'.format(VERSION))
5460
self._configure(**kwargs)

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/_feature_client.py

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ class FeatureClient(FeatureClientOperationsMixin, MultiApiClientMixin, _SDKClien
4646
4747
:param credential: Credential needed for the client to connect to Azure.
4848
:type credential: ~azure.core.credentials.TokenCredential
49-
:param subscription_id: The ID of the target subscription.
49+
:param subscription_id: The Azure subscription ID.
5050
:type subscription_id: str
51+
:param provider_namespace: The provider namespace.
52+
:type provider_namespace: str
5153
:param api_version: API version to use if no profile is provided, or if missing in profile.
5254
:type api_version: str
5355
:param base_url: Service URL
@@ -56,7 +58,7 @@ class FeatureClient(FeatureClientOperationsMixin, MultiApiClientMixin, _SDKClien
5658
:type profile: azure.profiles.KnownProfiles
5759
"""
5860

59-
DEFAULT_API_VERSION = '2015-12-01'
61+
DEFAULT_API_VERSION = '2021-07-01'
6062
_PROFILE_TAG = "azure.mgmt.resource.features.FeatureClient"
6163
LATEST_PROFILE = ProfileDefinition({
6264
_PROFILE_TAG: {
@@ -69,14 +71,15 @@ def __init__(
6971
self,
7072
credential, # type: "TokenCredential"
7173
subscription_id, # type: str
74+
provider_namespace, # type: str
7275
api_version=None, # type: Optional[str]
7376
base_url=None, # type: Optional[str]
7477
profile=KnownProfiles.default, # type: KnownProfiles
7578
**kwargs # type: Any
7679
):
7780
if not base_url:
7881
base_url = 'https://management.azure.com'
79-
self._config = FeatureClientConfiguration(credential, subscription_id, **kwargs)
82+
self._config = FeatureClientConfiguration(credential, subscription_id, provider_namespace, **kwargs)
8083
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
8184
super(FeatureClient, self).__init__(
8285
api_version=api_version,
@@ -92,25 +95,45 @@ def models(cls, api_version=DEFAULT_API_VERSION):
9295
"""Module depends on the API version:
9396
9497
* 2015-12-01: :mod:`v2015_12_01.models<azure.mgmt.resource.features.v2015_12_01.models>`
98+
* 2021-07-01: :mod:`v2021_07_01.models<azure.mgmt.resource.features.v2021_07_01.models>`
9599
"""
96100
if api_version == '2015-12-01':
97101
from .v2015_12_01 import models
98102
return models
103+
elif api_version == '2021-07-01':
104+
from .v2021_07_01 import models
105+
return models
99106
raise ValueError("API version {} is not available".format(api_version))
100107

101108
@property
102109
def features(self):
103110
"""Instance depends on the API version:
104111
105112
* 2015-12-01: :class:`FeaturesOperations<azure.mgmt.resource.features.v2015_12_01.operations.FeaturesOperations>`
113+
* 2021-07-01: :class:`FeaturesOperations<azure.mgmt.resource.features.v2021_07_01.operations.FeaturesOperations>`
106114
"""
107115
api_version = self._get_api_version('features')
108116
if api_version == '2015-12-01':
109117
from .v2015_12_01.operations import FeaturesOperations as OperationClass
118+
elif api_version == '2021-07-01':
119+
from .v2021_07_01.operations import FeaturesOperations as OperationClass
110120
else:
111121
raise ValueError("API version {} does not have operation group 'features'".format(api_version))
112122
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
113123

124+
@property
125+
def subscription_feature_registrations(self):
126+
"""Instance depends on the API version:
127+
128+
* 2021-07-01: :class:`SubscriptionFeatureRegistrationsOperations<azure.mgmt.resource.features.v2021_07_01.operations.SubscriptionFeatureRegistrationsOperations>`
129+
"""
130+
api_version = self._get_api_version('subscription_feature_registrations')
131+
if api_version == '2021-07-01':
132+
from .v2021_07_01.operations import SubscriptionFeatureRegistrationsOperations as OperationClass
133+
else:
134+
raise ValueError("API version {} does not have operation group 'subscription_feature_registrations'".format(api_version))
135+
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
136+
114137
def close(self):
115138
self._client.close()
116139
def __enter__(self):

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/_operations_mixin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@ def list_operations(
3333
3434
:keyword callable cls: A custom type or function that will be passed the direct response
3535
:return: An iterator like instance of either OperationListResult or the result of cls(response)
36-
:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.resource.features.v2015_12_01.models.OperationListResult]
36+
:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.resource.features.v2021_07_01.models.OperationListResult]
3737
:raises: ~azure.core.exceptions.HttpResponseError
3838
"""
3939
api_version = self._get_api_version('list_operations')
4040
if api_version == '2015-12-01':
4141
from .v2015_12_01.operations import FeatureClientOperationsMixin as OperationClass
42+
elif api_version == '2021-07-01':
43+
from .v2021_07_01.operations import FeatureClientOperationsMixin as OperationClass
4244
else:
4345
raise ValueError("API version {} does not have operation 'list_operations'".format(api_version))
4446
mixin_instance = OperationClass()

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,30 @@ class FeatureClientConfiguration(Configuration):
2828
2929
:param credential: Credential needed for the client to connect to Azure.
3030
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
31-
:param subscription_id: The ID of the target subscription.
31+
:param subscription_id: The Azure subscription ID.
3232
:type subscription_id: str
33+
:param provider_namespace: The provider namespace.
34+
:type provider_namespace: str
3335
"""
3436

3537
def __init__(
3638
self,
3739
credential: "AsyncTokenCredential",
3840
subscription_id: str,
41+
provider_namespace: str,
3942
**kwargs # type: Any
4043
) -> None:
4144
if credential is None:
4245
raise ValueError("Parameter 'credential' must not be None.")
4346
if subscription_id is None:
4447
raise ValueError("Parameter 'subscription_id' must not be None.")
48+
if provider_namespace is None:
49+
raise ValueError("Parameter 'provider_namespace' must not be None.")
4550
super(FeatureClientConfiguration, self).__init__(**kwargs)
4651

4752
self.credential = credential
4853
self.subscription_id = subscription_id
54+
self.provider_namespace = provider_namespace
4955
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5056
kwargs.setdefault('sdk_moniker', 'azure-mgmt-resource/{}'.format(VERSION))
5157
self._configure(**kwargs)

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/aio/_feature_client.py

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ class FeatureClient(FeatureClientOperationsMixin, MultiApiClientMixin, _SDKClien
4444
4545
:param credential: Credential needed for the client to connect to Azure.
4646
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
47-
:param subscription_id: The ID of the target subscription.
47+
:param subscription_id: The Azure subscription ID.
4848
:type subscription_id: str
49+
:param provider_namespace: The provider namespace.
50+
:type provider_namespace: str
4951
:param api_version: API version to use if no profile is provided, or if missing in profile.
5052
:type api_version: str
5153
:param base_url: Service URL
@@ -54,7 +56,7 @@ class FeatureClient(FeatureClientOperationsMixin, MultiApiClientMixin, _SDKClien
5456
:type profile: azure.profiles.KnownProfiles
5557
"""
5658

57-
DEFAULT_API_VERSION = '2015-12-01'
59+
DEFAULT_API_VERSION = '2021-07-01'
5860
_PROFILE_TAG = "azure.mgmt.resource.features.FeatureClient"
5961
LATEST_PROFILE = ProfileDefinition({
6062
_PROFILE_TAG: {
@@ -67,14 +69,15 @@ def __init__(
6769
self,
6870
credential: "AsyncTokenCredential",
6971
subscription_id: str,
72+
provider_namespace: str,
7073
api_version: Optional[str] = None,
7174
base_url: Optional[str] = None,
7275
profile: KnownProfiles = KnownProfiles.default,
7376
**kwargs # type: Any
7477
) -> None:
7578
if not base_url:
7679
base_url = 'https://management.azure.com'
77-
self._config = FeatureClientConfiguration(credential, subscription_id, **kwargs)
80+
self._config = FeatureClientConfiguration(credential, subscription_id, provider_namespace, **kwargs)
7881
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
7982
super(FeatureClient, self).__init__(
8083
api_version=api_version,
@@ -90,25 +93,45 @@ def models(cls, api_version=DEFAULT_API_VERSION):
9093
"""Module depends on the API version:
9194
9295
* 2015-12-01: :mod:`v2015_12_01.models<azure.mgmt.resource.features.v2015_12_01.models>`
96+
* 2021-07-01: :mod:`v2021_07_01.models<azure.mgmt.resource.features.v2021_07_01.models>`
9397
"""
9498
if api_version == '2015-12-01':
9599
from ..v2015_12_01 import models
96100
return models
101+
elif api_version == '2021-07-01':
102+
from ..v2021_07_01 import models
103+
return models
97104
raise ValueError("API version {} is not available".format(api_version))
98105

99106
@property
100107
def features(self):
101108
"""Instance depends on the API version:
102109
103110
* 2015-12-01: :class:`FeaturesOperations<azure.mgmt.resource.features.v2015_12_01.aio.operations.FeaturesOperations>`
111+
* 2021-07-01: :class:`FeaturesOperations<azure.mgmt.resource.features.v2021_07_01.aio.operations.FeaturesOperations>`
104112
"""
105113
api_version = self._get_api_version('features')
106114
if api_version == '2015-12-01':
107115
from ..v2015_12_01.aio.operations import FeaturesOperations as OperationClass
116+
elif api_version == '2021-07-01':
117+
from ..v2021_07_01.aio.operations import FeaturesOperations as OperationClass
108118
else:
109119
raise ValueError("API version {} does not have operation group 'features'".format(api_version))
110120
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
111121

122+
@property
123+
def subscription_feature_registrations(self):
124+
"""Instance depends on the API version:
125+
126+
* 2021-07-01: :class:`SubscriptionFeatureRegistrationsOperations<azure.mgmt.resource.features.v2021_07_01.aio.operations.SubscriptionFeatureRegistrationsOperations>`
127+
"""
128+
api_version = self._get_api_version('subscription_feature_registrations')
129+
if api_version == '2021-07-01':
130+
from ..v2021_07_01.aio.operations import SubscriptionFeatureRegistrationsOperations as OperationClass
131+
else:
132+
raise ValueError("API version {} does not have operation group 'subscription_feature_registrations'".format(api_version))
133+
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
134+
112135
async def close(self):
113136
await self._client.close()
114137
async def __aenter__(self):

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/aio/_operations_mixin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ def list_operations(
2929
3030
:keyword callable cls: A custom type or function that will be passed the direct response
3131
:return: An iterator like instance of either OperationListResult or the result of cls(response)
32-
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.resource.features.v2015_12_01.models.OperationListResult]
32+
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.resource.features.v2021_07_01.models.OperationListResult]
3333
:raises: ~azure.core.exceptions.HttpResponseError
3434
"""
3535
api_version = self._get_api_version('list_operations')
3636
if api_version == '2015-12-01':
3737
from ..v2015_12_01.aio.operations import FeatureClientOperationsMixin as OperationClass
38+
elif api_version == '2021-07-01':
39+
from ..v2021_07_01.aio.operations import FeatureClientOperationsMixin as OperationClass
3840
else:
3941
raise ValueError("API version {} does not have operation 'list_operations'".format(api_version))
4042
mixin_instance = OperationClass()

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/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 .v2015_12_01.models import *
7+
from .v2021_07_01.models import *

0 commit comments

Comments
 (0)