Skip to content

Commit 6f76e79

Browse files
author
SDKAuto
committed
CodeGen from PR 17304 in Azure/azure-rest-api-specs
Merge a49e7a01941f7ce5e858874015a2f84c060922f6 into 8a061f1
1 parent a968613 commit 6f76e79

File tree

327 files changed

+59193
-56574
lines changed

Some content is hidden

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

327 files changed

+59193
-56574
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.5",
2+
"autorest": "3.7.2",
33
"use": [
4-
"@autorest/python@5.8.4",
5-
"@autorest/[email protected].2"
4+
"@autorest/python@5.12.0",
5+
"@autorest/[email protected].3"
66
],
7-
"commit": "1f327d204d0c1835d7ee675d93b423028341a6b7",
7+
"commit": "ad372b7496da32e8caa7741a1de76a9fab9ba479",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/iothub/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/python@5.8.4 --use=@autorest/[email protected].2 --version=3.4.5",
9+
"autorest_command": "autorest specification/iothub/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/[email protected].3 --version=3.7.2",
1010
"readme": "specification/iothub/resource-manager/readme.md"
1111
}

sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
from azure.core.configuration import Configuration
1414
from azure.core.pipeline import policies
15-
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
15+
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1616

1717
from ._version import VERSION
1818

@@ -68,4 +68,4 @@ def _configure(
6868
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
6969
self.authentication_policy = kwargs.get('authentication_policy')
7070
if self.credential and not self.authentication_policy:
71-
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
71+
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)

sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
from typing import Any, Optional
2424

2525
from azure.core.credentials import TokenCredential
26-
from azure.core.pipeline.transport import HttpRequest, HttpResponse
2726

2827
class _SDKClient(object):
2928
def __init__(self, *args, **kwargs):
@@ -56,7 +55,7 @@ class IotHubClient(MultiApiClientMixin, _SDKClient):
5655
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
5756
"""
5857

59-
DEFAULT_API_VERSION = '2021-07-01'
58+
DEFAULT_API_VERSION = '2021-07-02'
6059
_PROFILE_TAG = "azure.mgmt.iothub.IotHubClient"
6160
LATEST_PROFILE = ProfileDefinition({
6261
_PROFILE_TAG: {
@@ -70,12 +69,10 @@ def __init__(
7069
credential, # type: "TokenCredential"
7170
subscription_id, # type: str
7271
api_version=None, # type: Optional[str]
73-
base_url=None, # type: Optional[str]
72+
base_url="https://management.azure.com", # type: str
7473
profile=KnownProfiles.default, # type: KnownProfiles
7574
**kwargs # type: Any
7675
):
77-
if not base_url:
78-
base_url = 'https://management.azure.com'
7976
self._config = IotHubClientConfiguration(credential, subscription_id, **kwargs)
8077
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
8178
super(IotHubClient, self).__init__(
@@ -103,6 +100,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
103100
* 2021-03-03-preview: :mod:`v2021_03_03_preview.models<azure.mgmt.iothub.v2021_03_03_preview.models>`
104101
* 2021-03-31: :mod:`v2021_03_31.models<azure.mgmt.iothub.v2021_03_31.models>`
105102
* 2021-07-01: :mod:`v2021_07_01.models<azure.mgmt.iothub.v2021_07_01.models>`
103+
* 2021-07-02: :mod:`v2021_07_02.models<azure.mgmt.iothub.v2021_07_02.models>`
106104
"""
107105
if api_version == '2016-02-03':
108106
from .v2016_02_03 import models
@@ -140,6 +138,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
140138
elif api_version == '2021-07-01':
141139
from .v2021_07_01 import models
142140
return models
141+
elif api_version == '2021-07-02':
142+
from .v2021_07_02 import models
143+
return models
143144
raise ValueError("API version {} is not available".format(api_version))
144145

145146
@property
@@ -156,6 +157,7 @@ def certificates(self):
156157
* 2021-03-03-preview: :class:`CertificatesOperations<azure.mgmt.iothub.v2021_03_03_preview.operations.CertificatesOperations>`
157158
* 2021-03-31: :class:`CertificatesOperations<azure.mgmt.iothub.v2021_03_31.operations.CertificatesOperations>`
158159
* 2021-07-01: :class:`CertificatesOperations<azure.mgmt.iothub.v2021_07_01.operations.CertificatesOperations>`
160+
* 2021-07-02: :class:`CertificatesOperations<azure.mgmt.iothub.v2021_07_02.operations.CertificatesOperations>`
159161
"""
160162
api_version = self._get_api_version('certificates')
161163
if api_version == '2017-07-01':
@@ -178,6 +180,8 @@ def certificates(self):
178180
from .v2021_03_31.operations import CertificatesOperations as OperationClass
179181
elif api_version == '2021-07-01':
180182
from .v2021_07_01.operations import CertificatesOperations as OperationClass
183+
elif api_version == '2021-07-02':
184+
from .v2021_07_02.operations import CertificatesOperations as OperationClass
181185
else:
182186
raise ValueError("API version {} does not have operation group 'certificates'".format(api_version))
183187
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -193,6 +197,7 @@ def iot_hub(self):
193197
* 2021-03-03-preview: :class:`IotHubOperations<azure.mgmt.iothub.v2021_03_03_preview.operations.IotHubOperations>`
194198
* 2021-03-31: :class:`IotHubOperations<azure.mgmt.iothub.v2021_03_31.operations.IotHubOperations>`
195199
* 2021-07-01: :class:`IotHubOperations<azure.mgmt.iothub.v2021_07_01.operations.IotHubOperations>`
200+
* 2021-07-02: :class:`IotHubOperations<azure.mgmt.iothub.v2021_07_02.operations.IotHubOperations>`
196201
"""
197202
api_version = self._get_api_version('iot_hub')
198203
if api_version == '2019-03-22':
@@ -209,6 +214,8 @@ def iot_hub(self):
209214
from .v2021_03_31.operations import IotHubOperations as OperationClass
210215
elif api_version == '2021-07-01':
211216
from .v2021_07_01.operations import IotHubOperations as OperationClass
217+
elif api_version == '2021-07-02':
218+
from .v2021_07_02.operations import IotHubOperations as OperationClass
212219
else:
213220
raise ValueError("API version {} does not have operation group 'iot_hub'".format(api_version))
214221
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -229,6 +236,7 @@ def iot_hub_resource(self):
229236
* 2021-03-03-preview: :class:`IotHubResourceOperations<azure.mgmt.iothub.v2021_03_03_preview.operations.IotHubResourceOperations>`
230237
* 2021-03-31: :class:`IotHubResourceOperations<azure.mgmt.iothub.v2021_03_31.operations.IotHubResourceOperations>`
231238
* 2021-07-01: :class:`IotHubResourceOperations<azure.mgmt.iothub.v2021_07_01.operations.IotHubResourceOperations>`
239+
* 2021-07-02: :class:`IotHubResourceOperations<azure.mgmt.iothub.v2021_07_02.operations.IotHubResourceOperations>`
232240
"""
233241
api_version = self._get_api_version('iot_hub_resource')
234242
if api_version == '2016-02-03':
@@ -255,6 +263,8 @@ def iot_hub_resource(self):
255263
from .v2021_03_31.operations import IotHubResourceOperations as OperationClass
256264
elif api_version == '2021-07-01':
257265
from .v2021_07_01.operations import IotHubResourceOperations as OperationClass
266+
elif api_version == '2021-07-02':
267+
from .v2021_07_02.operations import IotHubResourceOperations as OperationClass
258268
else:
259269
raise ValueError("API version {} does not have operation group 'iot_hub_resource'".format(api_version))
260270
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -273,6 +283,7 @@ def operations(self):
273283
* 2021-03-03-preview: :class:`Operations<azure.mgmt.iothub.v2021_03_03_preview.operations.Operations>`
274284
* 2021-03-31: :class:`Operations<azure.mgmt.iothub.v2021_03_31.operations.Operations>`
275285
* 2021-07-01: :class:`Operations<azure.mgmt.iothub.v2021_07_01.operations.Operations>`
286+
* 2021-07-02: :class:`Operations<azure.mgmt.iothub.v2021_07_02.operations.Operations>`
276287
"""
277288
api_version = self._get_api_version('operations')
278289
if api_version == '2017-07-01':
@@ -295,6 +306,8 @@ def operations(self):
295306
from .v2021_03_31.operations import Operations as OperationClass
296307
elif api_version == '2021-07-01':
297308
from .v2021_07_01.operations import Operations as OperationClass
309+
elif api_version == '2021-07-02':
310+
from .v2021_07_02.operations import Operations as OperationClass
298311
else:
299312
raise ValueError("API version {} does not have operation group 'operations'".format(api_version))
300313
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -307,6 +320,7 @@ def private_endpoint_connections(self):
307320
* 2021-03-03-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.iothub.v2021_03_03_preview.operations.PrivateEndpointConnectionsOperations>`
308321
* 2021-03-31: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.iothub.v2021_03_31.operations.PrivateEndpointConnectionsOperations>`
309322
* 2021-07-01: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.iothub.v2021_07_01.operations.PrivateEndpointConnectionsOperations>`
323+
* 2021-07-02: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.iothub.v2021_07_02.operations.PrivateEndpointConnectionsOperations>`
310324
"""
311325
api_version = self._get_api_version('private_endpoint_connections')
312326
if api_version == '2020-03-01':
@@ -317,6 +331,8 @@ def private_endpoint_connections(self):
317331
from .v2021_03_31.operations import PrivateEndpointConnectionsOperations as OperationClass
318332
elif api_version == '2021-07-01':
319333
from .v2021_07_01.operations import PrivateEndpointConnectionsOperations as OperationClass
334+
elif api_version == '2021-07-02':
335+
from .v2021_07_02.operations import PrivateEndpointConnectionsOperations as OperationClass
320336
else:
321337
raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version))
322338
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -329,6 +345,7 @@ def private_link_resources(self):
329345
* 2021-03-03-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.iothub.v2021_03_03_preview.operations.PrivateLinkResourcesOperations>`
330346
* 2021-03-31: :class:`PrivateLinkResourcesOperations<azure.mgmt.iothub.v2021_03_31.operations.PrivateLinkResourcesOperations>`
331347
* 2021-07-01: :class:`PrivateLinkResourcesOperations<azure.mgmt.iothub.v2021_07_01.operations.PrivateLinkResourcesOperations>`
348+
* 2021-07-02: :class:`PrivateLinkResourcesOperations<azure.mgmt.iothub.v2021_07_02.operations.PrivateLinkResourcesOperations>`
332349
"""
333350
api_version = self._get_api_version('private_link_resources')
334351
if api_version == '2020-03-01':
@@ -339,6 +356,8 @@ def private_link_resources(self):
339356
from .v2021_03_31.operations import PrivateLinkResourcesOperations as OperationClass
340357
elif api_version == '2021-07-01':
341358
from .v2021_07_01.operations import PrivateLinkResourcesOperations as OperationClass
359+
elif api_version == '2021-07-02':
360+
from .v2021_07_02.operations import PrivateLinkResourcesOperations as OperationClass
342361
else:
343362
raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version))
344363
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -355,6 +374,7 @@ def resource_provider_common(self):
355374
* 2021-03-03-preview: :class:`ResourceProviderCommonOperations<azure.mgmt.iothub.v2021_03_03_preview.operations.ResourceProviderCommonOperations>`
356375
* 2021-03-31: :class:`ResourceProviderCommonOperations<azure.mgmt.iothub.v2021_03_31.operations.ResourceProviderCommonOperations>`
357376
* 2021-07-01: :class:`ResourceProviderCommonOperations<azure.mgmt.iothub.v2021_07_01.operations.ResourceProviderCommonOperations>`
377+
* 2021-07-02: :class:`ResourceProviderCommonOperations<azure.mgmt.iothub.v2021_07_02.operations.ResourceProviderCommonOperations>`
358378
"""
359379
api_version = self._get_api_version('resource_provider_common')
360380
if api_version == '2018-04-01':
@@ -373,6 +393,8 @@ def resource_provider_common(self):
373393
from .v2021_03_31.operations import ResourceProviderCommonOperations as OperationClass
374394
elif api_version == '2021-07-01':
375395
from .v2021_07_01.operations import ResourceProviderCommonOperations as OperationClass
396+
elif api_version == '2021-07-02':
397+
from .v2021_07_02.operations import ResourceProviderCommonOperations as OperationClass
376398
else:
377399
raise ValueError("API version {} does not have operation group 'resource_provider_common'".format(api_version))
378400
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
from azure.core.configuration import Configuration
1414
from azure.core.pipeline import policies
15-
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
15+
from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy
1616

1717
from .._version import VERSION
1818

@@ -64,4 +64,4 @@ def _configure(
6464
self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs)
6565
self.authentication_policy = kwargs.get('authentication_policy')
6666
if self.credential and not self.authentication_policy:
67-
self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
67+
self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)

0 commit comments

Comments
 (0)