Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
28 changes: 22 additions & 6 deletions sdk/iothub/azure-mgmt-iothub/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
{
"commit": "396209531039d3e211cb1ec0982606dbbdf64ac2",
"commit": "bcddb87efe7168f472d73482e1185881857be47e",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"autorest": "3.9.7",
"use": [
"@autorest/python@6.4.3",
"@autorest/modelerfour@4.24.3"
"@autorest/python@6.7.1",
"@autorest/modelerfour@4.26.2"
],
"autorest_command": "autorest specification/iothub/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.4.3 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"readme": "specification/iothub/resource-manager/readme.md"
"autorest_command": "autorest specification/iothub/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
"readme": "specification/iothub/resource-manager/readme.md",
"package-preview-2023-06": "2023-08-14 22:58:07 -0700 d99f18b18405cd446f7abc2c9e6b3884f5c549f8 Microsoft.Devices/preview/2023-06-30-preview/iothub.json",
"package-preview-2022-11": "2023-03-14 21:37:19 -0700 7e5861ad01a796a72617080e89e42f428e66242e Microsoft.Devices/preview/2022-11-15-preview/iothub.json",
"package-preview-2022-04-30": "2022-08-09 20:31:29 -0700 1f75c8b5d3f55387d6e07e7f2f879a88f529180d Microsoft.Devices/preview/2022-04-30-preview/iothub.json",
"package-2021-07-02": "2023-01-27 19:16:47 -0800 0b0f8d5b088da606ffbb8b2828dc366982f106e5 Microsoft.Devices/stable/2021-07-02/iothub.json",
"package-2021-07": "2023-01-27 19:16:47 -0800 0b0f8d5b088da606ffbb8b2828dc366982f106e5 Microsoft.Devices/stable/2021-07-02/iothub.json",
"package-2021-03": "2021-05-07 19:43:30 -0700 4b7dca50a9a7559865803927a87a06ad0d73ff06 Microsoft.Devices/stable/2021-03-31/iothub.json",
"package-preview-2021-03": "2021-04-05 22:04:32 -0700 2331a635ead0549b8c0f3891bf9bf2e5e5ad76bc Microsoft.Devices/preview/2021-03-03-preview/iothub.json",
"package-2020-03": "2021-05-05 01:19:33 -0700 8c76ee1ab76c977e1bdd4abc5369704684576111 Microsoft.Devices/stable/2020-03-01/iothub.json",
"package-2019-11": "2021-04-27 02:22:18 -0700 8873dabb56a800c037ca56beab11dd5a9ed988ad Microsoft.Devices/stable/2019-11-04/iothub.json",
"package-preview-2019-07": "2021-04-27 02:22:18 -0700 8873dabb56a800c037ca56beab11dd5a9ed988ad Microsoft.Devices/preview/2019-07-01-preview/iothub.json",
"package-2019-03": "2021-04-27 02:22:18 -0700 8873dabb56a800c037ca56beab11dd5a9ed988ad Microsoft.Devices/stable/2019-03-22/iothub.json",
"package-2018-04": "2021-04-27 02:22:18 -0700 8873dabb56a800c037ca56beab11dd5a9ed988ad Microsoft.Devices/stable/2018-04-01/iothub.json",
"package-2018-01": "2021-04-27 02:22:18 -0700 8873dabb56a800c037ca56beab11dd5a9ed988ad Microsoft.Devices/stable/2018-01-22/iothub.json",
"package-2017-07": "2021-04-27 02:22:18 -0700 8873dabb56a800c037ca56beab11dd5a9ed988ad Microsoft.Devices/stable/2017-07-01/iothub.json",
"package-2017-01": "2021-04-27 02:22:18 -0700 8873dabb56a800c037ca56beab11dd5a9ed988ad Microsoft.Devices/stable/2017-01-19/iothub.json",
"package-2016-02": "2021-04-27 02:22:18 -0700 8873dabb56a800c037ca56beab11dd5a9ed988ad Microsoft.Devices/stable/2016-02-03/iothub.json"
}
41 changes: 34 additions & 7 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 @@ -71,6 +71,8 @@ def __init__(
profile: KnownProfiles=KnownProfiles.default,
**kwargs: Any
):
if api_version:
kwargs.setdefault('api_version', api_version)
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 @@ -101,6 +103,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2021-07-02: :mod:`v2021_07_02.models<azure.mgmt.iothub.v2021_07_02.models>`
* 2022-04-30-preview: :mod:`v2022_04_30_preview.models<azure.mgmt.iothub.v2022_04_30_preview.models>`
* 2022-11-15-preview: :mod:`v2022_11_15_preview.models<azure.mgmt.iothub.v2022_11_15_preview.models>`
* 2023-06-30-preview: :mod:`v2023_06_30_preview.models<azure.mgmt.iothub.v2023_06_30_preview.models>`
"""
if api_version == '2016-02-03':
from .v2016_02_03 import models
Expand Down Expand Up @@ -147,6 +150,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2022-11-15-preview':
from .v2022_11_15_preview import models
return models
elif api_version == '2023-06-30-preview':
from .v2023_06_30_preview import models
return models
raise ValueError("API version {} is not available".format(api_version))

@property
Expand All @@ -166,6 +172,7 @@ def certificates(self):
* 2021-07-02: :class:`CertificatesOperations<azure.mgmt.iothub.v2021_07_02.operations.CertificatesOperations>`
* 2022-04-30-preview: :class:`CertificatesOperations<azure.mgmt.iothub.v2022_04_30_preview.operations.CertificatesOperations>`
* 2022-11-15-preview: :class:`CertificatesOperations<azure.mgmt.iothub.v2022_11_15_preview.operations.CertificatesOperations>`
* 2023-06-30-preview: :class:`CertificatesOperations<azure.mgmt.iothub.v2023_06_30_preview.operations.CertificatesOperations>`
"""
api_version = self._get_api_version('certificates')
if api_version == '2017-07-01':
Expand Down Expand Up @@ -194,10 +201,12 @@ def certificates(self):
from .v2022_04_30_preview.operations import CertificatesOperations as OperationClass
elif api_version == '2022-11-15-preview':
from .v2022_11_15_preview.operations import CertificatesOperations as OperationClass
elif api_version == '2023-06-30-preview':
from .v2023_06_30_preview.operations import CertificatesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'certificates'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

@property
def iot_hub(self):
Expand All @@ -213,6 +222,7 @@ def iot_hub(self):
* 2021-07-02: :class:`IotHubOperations<azure.mgmt.iothub.v2021_07_02.operations.IotHubOperations>`
* 2022-04-30-preview: :class:`IotHubOperations<azure.mgmt.iothub.v2022_04_30_preview.operations.IotHubOperations>`
* 2022-11-15-preview: :class:`IotHubOperations<azure.mgmt.iothub.v2022_11_15_preview.operations.IotHubOperations>`
* 2023-06-30-preview: :class:`IotHubOperations<azure.mgmt.iothub.v2023_06_30_preview.operations.IotHubOperations>`
"""
api_version = self._get_api_version('iot_hub')
if api_version == '2019-03-22':
Expand All @@ -235,10 +245,12 @@ def iot_hub(self):
from .v2022_04_30_preview.operations import IotHubOperations as OperationClass
elif api_version == '2022-11-15-preview':
from .v2022_11_15_preview.operations import IotHubOperations as OperationClass
elif api_version == '2023-06-30-preview':
from .v2023_06_30_preview.operations import IotHubOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'iot_hub'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

@property
def iot_hub_resource(self):
Expand All @@ -259,6 +271,7 @@ def iot_hub_resource(self):
* 2021-07-02: :class:`IotHubResourceOperations<azure.mgmt.iothub.v2021_07_02.operations.IotHubResourceOperations>`
* 2022-04-30-preview: :class:`IotHubResourceOperations<azure.mgmt.iothub.v2022_04_30_preview.operations.IotHubResourceOperations>`
* 2022-11-15-preview: :class:`IotHubResourceOperations<azure.mgmt.iothub.v2022_11_15_preview.operations.IotHubResourceOperations>`
* 2023-06-30-preview: :class:`IotHubResourceOperations<azure.mgmt.iothub.v2023_06_30_preview.operations.IotHubResourceOperations>`
"""
api_version = self._get_api_version('iot_hub_resource')
if api_version == '2016-02-03':
Expand Down Expand Up @@ -291,10 +304,12 @@ def iot_hub_resource(self):
from .v2022_04_30_preview.operations import IotHubResourceOperations as OperationClass
elif api_version == '2022-11-15-preview':
from .v2022_11_15_preview.operations import IotHubResourceOperations as OperationClass
elif api_version == '2023-06-30-preview':
from .v2023_06_30_preview.operations import IotHubResourceOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'iot_hub_resource'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

@property
def operations(self):
Expand All @@ -313,6 +328,7 @@ def operations(self):
* 2021-07-02: :class:`Operations<azure.mgmt.iothub.v2021_07_02.operations.Operations>`
* 2022-04-30-preview: :class:`Operations<azure.mgmt.iothub.v2022_04_30_preview.operations.Operations>`
* 2022-11-15-preview: :class:`Operations<azure.mgmt.iothub.v2022_11_15_preview.operations.Operations>`
* 2023-06-30-preview: :class:`Operations<azure.mgmt.iothub.v2023_06_30_preview.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2017-07-01':
Expand Down Expand Up @@ -341,10 +357,12 @@ def operations(self):
from .v2022_04_30_preview.operations import Operations as OperationClass
elif api_version == '2022-11-15-preview':
from .v2022_11_15_preview.operations import Operations as OperationClass
elif api_version == '2023-06-30-preview':
from .v2023_06_30_preview.operations import Operations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'operations'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

@property
def private_endpoint_connections(self):
Expand All @@ -357,6 +375,7 @@ def private_endpoint_connections(self):
* 2021-07-02: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.iothub.v2021_07_02.operations.PrivateEndpointConnectionsOperations>`
* 2022-04-30-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.iothub.v2022_04_30_preview.operations.PrivateEndpointConnectionsOperations>`
* 2022-11-15-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.iothub.v2022_11_15_preview.operations.PrivateEndpointConnectionsOperations>`
* 2023-06-30-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.iothub.v2023_06_30_preview.operations.PrivateEndpointConnectionsOperations>`
"""
api_version = self._get_api_version('private_endpoint_connections')
if api_version == '2020-03-01':
Expand All @@ -373,10 +392,12 @@ def private_endpoint_connections(self):
from .v2022_04_30_preview.operations import PrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2022-11-15-preview':
from .v2022_11_15_preview.operations import PrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2023-06-30-preview':
from .v2023_06_30_preview.operations import PrivateEndpointConnectionsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

@property
def private_link_resources(self):
Expand All @@ -389,6 +410,7 @@ def private_link_resources(self):
* 2021-07-02: :class:`PrivateLinkResourcesOperations<azure.mgmt.iothub.v2021_07_02.operations.PrivateLinkResourcesOperations>`
* 2022-04-30-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.iothub.v2022_04_30_preview.operations.PrivateLinkResourcesOperations>`
* 2022-11-15-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.iothub.v2022_11_15_preview.operations.PrivateLinkResourcesOperations>`
* 2023-06-30-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.iothub.v2023_06_30_preview.operations.PrivateLinkResourcesOperations>`
"""
api_version = self._get_api_version('private_link_resources')
if api_version == '2020-03-01':
Expand All @@ -405,10 +427,12 @@ def private_link_resources(self):
from .v2022_04_30_preview.operations import PrivateLinkResourcesOperations as OperationClass
elif api_version == '2022-11-15-preview':
from .v2022_11_15_preview.operations import PrivateLinkResourcesOperations as OperationClass
elif api_version == '2023-06-30-preview':
from .v2023_06_30_preview.operations import PrivateLinkResourcesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

@property
def resource_provider_common(self):
Expand All @@ -425,6 +449,7 @@ def resource_provider_common(self):
* 2021-07-02: :class:`ResourceProviderCommonOperations<azure.mgmt.iothub.v2021_07_02.operations.ResourceProviderCommonOperations>`
* 2022-04-30-preview: :class:`ResourceProviderCommonOperations<azure.mgmt.iothub.v2022_04_30_preview.operations.ResourceProviderCommonOperations>`
* 2022-11-15-preview: :class:`ResourceProviderCommonOperations<azure.mgmt.iothub.v2022_11_15_preview.operations.ResourceProviderCommonOperations>`
* 2023-06-30-preview: :class:`ResourceProviderCommonOperations<azure.mgmt.iothub.v2023_06_30_preview.operations.ResourceProviderCommonOperations>`
"""
api_version = self._get_api_version('resource_provider_common')
if api_version == '2018-04-01':
Expand All @@ -449,10 +474,12 @@ def resource_provider_common(self):
from .v2022_04_30_preview.operations import ResourceProviderCommonOperations as OperationClass
elif api_version == '2022-11-15-preview':
from .v2022_11_15_preview.operations import ResourceProviderCommonOperations as OperationClass
elif api_version == '2023-06-30-preview':
from .v2023_06_30_preview.operations import ResourceProviderCommonOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'resource_provider_common'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)

def close(self):
self._client.close()
Expand Down
Loading