Skip to content

Commit

Permalink
[AutoRelease] t2-iothub-2022-01-21-08853 (#22613)
Browse files Browse the repository at this point in the history
* CodeGen from PR 17304 in Azure/azure-rest-api-specs
Updating tag (#17304)

* Updating tag

* Update readme.go.md

* Update readme.go.md

* Update readme.java.md

* Update readme.go.md

* Update readme.python.md

* Update readme.python.md

adjusting version

* version,CHANGELOG

* test

* Update CHANGELOG.md

Co-authored-by: SDKAuto <sdkautomation@microsoft.com>
Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com>
  • Loading branch information
3 people authored Jan 29, 2022
1 parent 6fc4b6f commit ebcc391
Show file tree
Hide file tree
Showing 332 changed files with 59,273 additions and 56,643 deletions.
7 changes: 7 additions & 0 deletions sdk/iothub/azure-mgmt-iothub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Release History

## 2.2.0 (2022-01-29)

**Features**

- Model IotHubDescription has a new parameter system_data
- Model IotHubProperties has a new parameter enable_data_residency

## 2.1.0 (2021-08-25)

**Features**
Expand Down
10 changes: 5 additions & 5 deletions sdk/iothub/azure-mgmt-iothub/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.4.5",
"autorest": "3.7.2",
"use": [
"@autorest/python@5.8.4",
"@autorest/modelerfour@4.19.2"
"@autorest/python@5.12.0",
"@autorest/modelerfour@4.19.3"
],
"commit": "1f327d204d0c1835d7ee675d93b423028341a6b7",
"commit": "f9a6cb686bcc0f1b23761db19f2491c5c4df95cb",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"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/modelerfour@4.19.2 --version=3.4.5",
"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/modelerfour@4.19.3 --version=3.7.2",
"readme": "specification/iothub/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy

from ._version import VERSION

Expand Down Expand Up @@ -68,4 +68,4 @@ def _configure(
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
32 changes: 27 additions & 5 deletions sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from typing import Any, Optional

from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpRequest, HttpResponse

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

DEFAULT_API_VERSION = '2021-07-01'
DEFAULT_API_VERSION = '2021-07-02'
_PROFILE_TAG = "azure.mgmt.iothub.IotHubClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
Expand All @@ -70,12 +69,10 @@ def __init__(
credential, # type: "TokenCredential"
subscription_id, # type: str
api_version=None, # type: Optional[str]
base_url=None, # type: Optional[str]
base_url="https://management.azure.com", # type: str
profile=KnownProfiles.default, # type: KnownProfiles
**kwargs # type: Any
):
if not base_url:
base_url = 'https://management.azure.com'
self._config = IotHubClientConfiguration(credential, subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
super(IotHubClient, self).__init__(
Expand Down Expand Up @@ -103,6 +100,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2021-03-03-preview: :mod:`v2021_03_03_preview.models<azure.mgmt.iothub.v2021_03_03_preview.models>`
* 2021-03-31: :mod:`v2021_03_31.models<azure.mgmt.iothub.v2021_03_31.models>`
* 2021-07-01: :mod:`v2021_07_01.models<azure.mgmt.iothub.v2021_07_01.models>`
* 2021-07-02: :mod:`v2021_07_02.models<azure.mgmt.iothub.v2021_07_02.models>`
"""
if api_version == '2016-02-03':
from .v2016_02_03 import models
Expand Down Expand Up @@ -140,6 +138,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2021-07-01':
from .v2021_07_01 import models
return models
elif api_version == '2021-07-02':
from .v2021_07_02 import models
return models
raise ValueError("API version {} is not available".format(api_version))

@property
Expand All @@ -156,6 +157,7 @@ def certificates(self):
* 2021-03-03-preview: :class:`CertificatesOperations<azure.mgmt.iothub.v2021_03_03_preview.operations.CertificatesOperations>`
* 2021-03-31: :class:`CertificatesOperations<azure.mgmt.iothub.v2021_03_31.operations.CertificatesOperations>`
* 2021-07-01: :class:`CertificatesOperations<azure.mgmt.iothub.v2021_07_01.operations.CertificatesOperations>`
* 2021-07-02: :class:`CertificatesOperations<azure.mgmt.iothub.v2021_07_02.operations.CertificatesOperations>`
"""
api_version = self._get_api_version('certificates')
if api_version == '2017-07-01':
Expand All @@ -178,6 +180,8 @@ def certificates(self):
from .v2021_03_31.operations import CertificatesOperations as OperationClass
elif api_version == '2021-07-01':
from .v2021_07_01.operations import CertificatesOperations as OperationClass
elif api_version == '2021-07-02':
from .v2021_07_02.operations import CertificatesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'certificates'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -193,6 +197,7 @@ def iot_hub(self):
* 2021-03-03-preview: :class:`IotHubOperations<azure.mgmt.iothub.v2021_03_03_preview.operations.IotHubOperations>`
* 2021-03-31: :class:`IotHubOperations<azure.mgmt.iothub.v2021_03_31.operations.IotHubOperations>`
* 2021-07-01: :class:`IotHubOperations<azure.mgmt.iothub.v2021_07_01.operations.IotHubOperations>`
* 2021-07-02: :class:`IotHubOperations<azure.mgmt.iothub.v2021_07_02.operations.IotHubOperations>`
"""
api_version = self._get_api_version('iot_hub')
if api_version == '2019-03-22':
Expand All @@ -209,6 +214,8 @@ def iot_hub(self):
from .v2021_03_31.operations import IotHubOperations as OperationClass
elif api_version == '2021-07-01':
from .v2021_07_01.operations import IotHubOperations as OperationClass
elif api_version == '2021-07-02':
from .v2021_07_02.operations import IotHubOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'iot_hub'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -229,6 +236,7 @@ def iot_hub_resource(self):
* 2021-03-03-preview: :class:`IotHubResourceOperations<azure.mgmt.iothub.v2021_03_03_preview.operations.IotHubResourceOperations>`
* 2021-03-31: :class:`IotHubResourceOperations<azure.mgmt.iothub.v2021_03_31.operations.IotHubResourceOperations>`
* 2021-07-01: :class:`IotHubResourceOperations<azure.mgmt.iothub.v2021_07_01.operations.IotHubResourceOperations>`
* 2021-07-02: :class:`IotHubResourceOperations<azure.mgmt.iothub.v2021_07_02.operations.IotHubResourceOperations>`
"""
api_version = self._get_api_version('iot_hub_resource')
if api_version == '2016-02-03':
Expand All @@ -255,6 +263,8 @@ def iot_hub_resource(self):
from .v2021_03_31.operations import IotHubResourceOperations as OperationClass
elif api_version == '2021-07-01':
from .v2021_07_01.operations import IotHubResourceOperations as OperationClass
elif api_version == '2021-07-02':
from .v2021_07_02.operations import IotHubResourceOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'iot_hub_resource'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -273,6 +283,7 @@ def operations(self):
* 2021-03-03-preview: :class:`Operations<azure.mgmt.iothub.v2021_03_03_preview.operations.Operations>`
* 2021-03-31: :class:`Operations<azure.mgmt.iothub.v2021_03_31.operations.Operations>`
* 2021-07-01: :class:`Operations<azure.mgmt.iothub.v2021_07_01.operations.Operations>`
* 2021-07-02: :class:`Operations<azure.mgmt.iothub.v2021_07_02.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2017-07-01':
Expand All @@ -295,6 +306,8 @@ def operations(self):
from .v2021_03_31.operations import Operations as OperationClass
elif api_version == '2021-07-01':
from .v2021_07_01.operations import Operations as OperationClass
elif api_version == '2021-07-02':
from .v2021_07_02.operations import Operations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'operations'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -307,6 +320,7 @@ def private_endpoint_connections(self):
* 2021-03-03-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.iothub.v2021_03_03_preview.operations.PrivateEndpointConnectionsOperations>`
* 2021-03-31: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.iothub.v2021_03_31.operations.PrivateEndpointConnectionsOperations>`
* 2021-07-01: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.iothub.v2021_07_01.operations.PrivateEndpointConnectionsOperations>`
* 2021-07-02: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.iothub.v2021_07_02.operations.PrivateEndpointConnectionsOperations>`
"""
api_version = self._get_api_version('private_endpoint_connections')
if api_version == '2020-03-01':
Expand All @@ -317,6 +331,8 @@ def private_endpoint_connections(self):
from .v2021_03_31.operations import PrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2021-07-01':
from .v2021_07_01.operations import PrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2021-07-02':
from .v2021_07_02.operations import PrivateEndpointConnectionsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -329,6 +345,7 @@ def private_link_resources(self):
* 2021-03-03-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.iothub.v2021_03_03_preview.operations.PrivateLinkResourcesOperations>`
* 2021-03-31: :class:`PrivateLinkResourcesOperations<azure.mgmt.iothub.v2021_03_31.operations.PrivateLinkResourcesOperations>`
* 2021-07-01: :class:`PrivateLinkResourcesOperations<azure.mgmt.iothub.v2021_07_01.operations.PrivateLinkResourcesOperations>`
* 2021-07-02: :class:`PrivateLinkResourcesOperations<azure.mgmt.iothub.v2021_07_02.operations.PrivateLinkResourcesOperations>`
"""
api_version = self._get_api_version('private_link_resources')
if api_version == '2020-03-01':
Expand All @@ -339,6 +356,8 @@ def private_link_resources(self):
from .v2021_03_31.operations import PrivateLinkResourcesOperations as OperationClass
elif api_version == '2021-07-01':
from .v2021_07_01.operations import PrivateLinkResourcesOperations as OperationClass
elif api_version == '2021-07-02':
from .v2021_07_02.operations import PrivateLinkResourcesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -355,6 +374,7 @@ def resource_provider_common(self):
* 2021-03-03-preview: :class:`ResourceProviderCommonOperations<azure.mgmt.iothub.v2021_03_03_preview.operations.ResourceProviderCommonOperations>`
* 2021-03-31: :class:`ResourceProviderCommonOperations<azure.mgmt.iothub.v2021_03_31.operations.ResourceProviderCommonOperations>`
* 2021-07-01: :class:`ResourceProviderCommonOperations<azure.mgmt.iothub.v2021_07_01.operations.ResourceProviderCommonOperations>`
* 2021-07-02: :class:`ResourceProviderCommonOperations<azure.mgmt.iothub.v2021_07_02.operations.ResourceProviderCommonOperations>`
"""
api_version = self._get_api_version('resource_provider_common')
if api_version == '2018-04-01':
Expand All @@ -373,6 +393,8 @@ def resource_provider_common(self):
from .v2021_03_31.operations import ResourceProviderCommonOperations as OperationClass
elif api_version == '2021-07-01':
from .v2021_07_01.operations import ResourceProviderCommonOperations as OperationClass
elif api_version == '2021-07-02':
from .v2021_07_02.operations import ResourceProviderCommonOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'resource_provider_common'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand Down
2 changes: 1 addition & 1 deletion sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "2.1.0"
VERSION = "2.2.0"
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy

from .._version import VERSION

Expand Down Expand Up @@ -64,4 +64,4 @@ def _configure(
self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
Loading

0 comments on commit ebcc391

Please sign in to comment.