diff --git a/sdk/iothub/azure-mgmt-iothub/CHANGELOG.md b/sdk/iothub/azure-mgmt-iothub/CHANGELOG.md index cde7ee02a1a0..e1c4d3759774 100644 --- a/sdk/iothub/azure-mgmt-iothub/CHANGELOG.md +++ b/sdk/iothub/azure-mgmt-iothub/CHANGELOG.md @@ -1,5 +1,17 @@ # Release History +## 5.0.0b2 (2025-10-20) + +### Features Added + + - Model `IotHubClient` added parameter `cloud_setting` in method `__init__` + - Model `CertificateProperties` added property `policy_resource_id` + - Model `CertificatePropertiesWithNonce` added property `policy_resource_id` + - Model `IotHubProperties` added property `device_registry` + - Enum `IotHubSku` added member `GEN2` + - Enum `IotHubSkuTier` added member `GENERATION2` + - Added model `DeviceRegistry` + ## 5.0.0b1 (2025-08-14) ### Breaking Changes diff --git a/sdk/iothub/azure-mgmt-iothub/MANIFEST.in b/sdk/iothub/azure-mgmt-iothub/MANIFEST.in index 7414e4baf761..86985f971c5b 100644 --- a/sdk/iothub/azure-mgmt-iothub/MANIFEST.in +++ b/sdk/iothub/azure-mgmt-iothub/MANIFEST.in @@ -1,7 +1,7 @@ -recursive-include tests *.py *.json -recursive-include samples *.py *.md include *.md -include azure/__init__.py -include azure/mgmt/__init__.py include LICENSE include azure/mgmt/iothub/py.typed +recursive-include tests *.py +recursive-include samples *.py *.md +include azure/__init__.py +include azure/mgmt/__init__.py diff --git a/sdk/iothub/azure-mgmt-iothub/_metadata.json b/sdk/iothub/azure-mgmt-iothub/_metadata.json index 6d298c1eaed9..1b374e52ce2b 100644 --- a/sdk/iothub/azure-mgmt-iothub/_metadata.json +++ b/sdk/iothub/azure-mgmt-iothub/_metadata.json @@ -1,11 +1,11 @@ { - "commit": "1bdafdbace5d4cc7eb461433adac4a45af87c186", + "commit": "131b265e5626c867683ddb4770610348fc98d740", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.10.2", "use": [ - "@autorest/python@6.38.2", + "@autorest/python@6.40.0", "@autorest/modelerfour@4.27.0" ], - "autorest_command": "autorest specification/iothub/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --keep-setup-py=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --tag=package-preview-2023-06 --use=@autorest/python@6.38.2 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", - "readme": "specification/iothub/resource-manager/readme.md" + "autorest_command": "autorest specification/iothub/resource-manager/Microsoft.Devices/IoTHub/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.40.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", + "readme": "specification/iothub/resource-manager/Microsoft.Devices/IoTHub/readme.md" } \ No newline at end of file diff --git a/sdk/iothub/azure-mgmt-iothub/apiview-properties.json b/sdk/iothub/azure-mgmt-iothub/apiview-properties.json index 4d5d9ef96300..b20f4aec7756 100644 --- a/sdk/iothub/azure-mgmt-iothub/apiview-properties.json +++ b/sdk/iothub/azure-mgmt-iothub/apiview-properties.json @@ -11,6 +11,7 @@ "azure.mgmt.iothub.models.CertificateVerificationDescription": null, "azure.mgmt.iothub.models.CertificateWithNonceDescription": null, "azure.mgmt.iothub.models.CloudToDeviceProperties": null, + "azure.mgmt.iothub.models.DeviceRegistry": null, "azure.mgmt.iothub.models.EncryptionPropertiesDescription": null, "azure.mgmt.iothub.models.EndpointHealthData": null, "azure.mgmt.iothub.models.EndpointHealthDataListResult": null, diff --git a/sdk/iothub/azure-mgmt-iothub/azure/__init__.py b/sdk/iothub/azure-mgmt-iothub/azure/__init__.py index 8db66d3d0f0f..d55ccad1f573 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/__init__.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/__init__.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/__init__.py index 8db66d3d0f0f..d55ccad1f573 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/__init__.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/__init__.py @@ -1 +1 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_configuration.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_configuration.py index e006dbc459b7..31d18a2c158d 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_configuration.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_configuration.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy @@ -14,6 +14,7 @@ from ._version import VERSION if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials import TokenCredential @@ -27,13 +28,22 @@ class IotHubClientConfiguration: # pylint: disable=too-many-instance-attributes :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The subscription identifier. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2023-06-30-preview". Note that overriding + :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :type cloud_setting: ~azure.core.AzureClouds + :keyword api_version: Api Version. Default value is "2025-08-01-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ - def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: - api_version: str = kwargs.pop("api_version", "2023-06-30-preview") + def __init__( + self, + credential: "TokenCredential", + subscription_id: str, + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any + ) -> None: + api_version: str = kwargs.pop("api_version", "2025-08-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -42,6 +52,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs self.credential = credential self.subscription_id = subscription_id + self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) kwargs.setdefault("sdk_moniker", "mgmt-iothub/{}".format(VERSION)) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py index 36f1823e3e7a..4f7527567126 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py @@ -31,6 +31,7 @@ ) if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials import TokenCredential @@ -59,7 +60,10 @@ class IotHubClient: # pylint: disable=too-many-instance-attributes :type subscription_id: str :param base_url: Service URL. Default value is None. :type base_url: str - :keyword api_version: Api Version. Default value is "2023-06-30-preview". Note that overriding + :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :paramtype cloud_setting: ~azure.core.AzureClouds + :keyword api_version: Api Version. Default value is "2025-08-01-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no @@ -67,15 +71,25 @@ class IotHubClient: # pylint: disable=too-many-instance-attributes """ def __init__( - self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any + self, + credential: "TokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + *, + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any ) -> None: - _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _cloud = cloud_setting or settings.current.azure_cloud # type: ignore _endpoints = get_arm_endpoints(_cloud) if not base_url: base_url = _endpoints["resource_manager"] credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = IotHubClientConfiguration( - credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs + credential=credential, + subscription_id=subscription_id, + cloud_setting=cloud_setting, + credential_scopes=credential_scopes, + **kwargs ) _policies = kwargs.pop("policies", None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_utils/serialization.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_utils/serialization.py index f5187701d7be..5f250836cf4b 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_utils/serialization.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_utils/serialization.py @@ -21,7 +21,6 @@ import sys import codecs from typing import ( - Dict, Any, cast, Optional, @@ -31,7 +30,6 @@ Mapping, Callable, MutableMapping, - List, ) try: @@ -229,12 +227,12 @@ class Model: serialization and deserialization. """ - _subtype_map: Dict[str, Dict[str, Any]] = {} - _attribute_map: Dict[str, Dict[str, Any]] = {} - _validation: Dict[str, Dict[str, Any]] = {} + _subtype_map: dict[str, dict[str, Any]] = {} + _attribute_map: dict[str, dict[str, Any]] = {} + _validation: dict[str, dict[str, Any]] = {} def __init__(self, **kwargs: Any) -> None: - self.additional_properties: Optional[Dict[str, Any]] = {} + self.additional_properties: Optional[dict[str, Any]] = {} for k in kwargs: # pylint: disable=consider-using-dict-items if k not in self._attribute_map: _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) @@ -311,7 +309,7 @@ def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: def as_dict( self, keep_readonly: bool = True, - key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, + key_transformer: Callable[[str, dict[str, Any], Any], Any] = attribute_transformer, **kwargs: Any ) -> JSON: """Return a dict that can be serialized using json.dump. @@ -380,7 +378,7 @@ def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: def from_dict( cls, data: Any, - key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, + key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None, ) -> Self: """Parse a dict using given key extractor return a model. @@ -414,7 +412,7 @@ def _flatten_subtype(cls, key, objects): return {} result = dict(cls._subtype_map[key]) for valuetype in cls._subtype_map[key].values(): - result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access + result |= objects[valuetype]._flatten_subtype(key, objects) # pylint: disable=protected-access return result @classmethod @@ -528,7 +526,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: "[]": self.serialize_iter, "{}": self.serialize_dict, } - self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.dependencies: dict[str, type] = dict(classes) if classes else {} self.key_transformer = full_restapi_key_transformer self.client_side_validation = True @@ -579,7 +577,7 @@ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, to if attr_name == "additional_properties" and attr_desc["key"] == "": if target_obj.additional_properties is not None: - serialized.update(target_obj.additional_properties) + serialized |= target_obj.additional_properties continue try: @@ -1184,7 +1182,7 @@ def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argumen while "." in key: # Need the cast, as for some reasons "split" is typed as list[str | Any] - dict_keys = cast(List[str], _FLATTEN.split(key)) + dict_keys = cast(list[str], _FLATTEN.split(key)) if len(dict_keys) == 1: key = _decode_attribute_map_key(dict_keys[0]) break @@ -1386,7 +1384,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: "duration": (isodate.Duration, datetime.timedelta), "iso-8601": (datetime.datetime), } - self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.dependencies: dict[str, type] = dict(classes) if classes else {} self.key_extractors = [rest_key_extractor, xml_key_extractor] # Additional properties only works if the "rest_key_extractor" is used to # extract the keys. Making it to work whatever the key extractor is too much diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_version.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_version.py index 3f948557870d..c84ffc6cc441 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_version.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "5.0.0b1" +VERSION = "5.0.0b2" diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_configuration.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_configuration.py index 3d6cfa29acf1..0b464e1d37f1 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_configuration.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_configuration.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy @@ -14,6 +14,7 @@ from .._version import VERSION if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials_async import AsyncTokenCredential @@ -27,13 +28,22 @@ class IotHubClientConfiguration: # pylint: disable=too-many-instance-attributes :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The subscription identifier. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2023-06-30-preview". Note that overriding + :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :type cloud_setting: ~azure.core.AzureClouds + :keyword api_version: Api Version. Default value is "2025-08-01-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ - def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: - api_version: str = kwargs.pop("api_version", "2023-06-30-preview") + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any + ) -> None: + api_version: str = kwargs.pop("api_version", "2025-08-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -42,6 +52,7 @@ def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **k self.credential = credential self.subscription_id = subscription_id + self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) kwargs.setdefault("sdk_moniker", "mgmt-iothub/{}".format(VERSION)) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_iot_hub_client.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_iot_hub_client.py index 580e000ef8df..bbb3ba50aada 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_iot_hub_client.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/_iot_hub_client.py @@ -31,6 +31,7 @@ ) if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials_async import AsyncTokenCredential @@ -60,7 +61,10 @@ class IotHubClient: # pylint: disable=too-many-instance-attributes :type subscription_id: str :param base_url: Service URL. Default value is None. :type base_url: str - :keyword api_version: Api Version. Default value is "2023-06-30-preview". Note that overriding + :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :paramtype cloud_setting: ~azure.core.AzureClouds + :keyword api_version: Api Version. Default value is "2025-08-01-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no @@ -68,15 +72,25 @@ class IotHubClient: # pylint: disable=too-many-instance-attributes """ def __init__( - self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + *, + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any ) -> None: - _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _cloud = cloud_setting or settings.current.azure_cloud # type: ignore _endpoints = get_arm_endpoints(_cloud) if not base_url: base_url = _endpoints["resource_manager"] credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = IotHubClientConfiguration( - credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs + credential=credential, + subscription_id=subscription_id, + cloud_setting=cloud_setting, + credential_scopes=credential_scopes, + **kwargs ) _policies = kwargs.pop("policies", None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_certificates_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_certificates_operations.py index 43db983b25e2..ca1cfe420538 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_certificates_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_certificates_operations.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload from azure.core import AsyncPipelineClient from azure.core.exceptions import ( @@ -37,7 +37,8 @@ from .._configuration import IotHubClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class CertificatesOperations: diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_iot_hub_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_iot_hub_operations.py index c088c1470132..c29b3240a77e 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_iot_hub_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_iot_hub_operations.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload from azure.core import AsyncPipelineClient from azure.core.exceptions import ( @@ -34,7 +34,8 @@ from .._configuration import IotHubClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class IotHubOperations: diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_iot_hub_resource_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_iot_hub_resource_operations.py index 6552f574db70..77fea7f3fb74 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_iot_hub_resource_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_iot_hub_resource_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core import AsyncPipelineClient @@ -62,7 +62,8 @@ from .._configuration import IotHubClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class IotHubResourceOperations: # pylint: disable=too-many-public-methods @@ -619,6 +620,7 @@ async def _delete_initial( response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_operations.py index 26ab1660f69d..63b6445d5c08 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from collections.abc import MutableMapping -from typing import Any, Callable, Dict, Optional, TypeVar +from typing import Any, Callable, Optional, TypeVar import urllib.parse from azure.core import AsyncPipelineClient @@ -31,7 +31,8 @@ from .._configuration import IotHubClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class Operations: diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_private_endpoint_connections_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_private_endpoint_connections_operations.py index 88ddbe0e6b55..6e4ce9ac65f3 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_private_endpoint_connections_operations.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- from collections.abc import MutableMapping from io import IOBase -from typing import Any, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload from azure.core import AsyncPipelineClient from azure.core.exceptions import ( @@ -39,7 +39,8 @@ from .._configuration import IotHubClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class PrivateEndpointConnectionsOperations: @@ -449,6 +450,7 @@ async def _delete_initial( response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_private_link_resources_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_private_link_resources_operations.py index fffad25249d0..0bb9fae2105f 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_private_link_resources_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_private_link_resources_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from collections.abc import MutableMapping -from typing import Any, Callable, Dict, Optional, TypeVar +from typing import Any, Callable, Optional, TypeVar from azure.core import AsyncPipelineClient from azure.core.exceptions import ( @@ -29,7 +29,8 @@ from .._configuration import IotHubClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class PrivateLinkResourcesOperations: diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_resource_provider_common_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_resource_provider_common_operations.py index 469d914865f8..10923346d627 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_resource_provider_common_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/aio/operations/_resource_provider_common_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from collections.abc import MutableMapping -from typing import Any, Callable, Dict, Optional, TypeVar +from typing import Any, Callable, Optional, TypeVar from azure.core import AsyncPipelineClient from azure.core.exceptions import ( @@ -29,7 +29,8 @@ from .._configuration import IotHubClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list class ResourceProviderCommonOperations: diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py index 71c1f5710077..f0cb1310025c 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py @@ -24,6 +24,7 @@ CertificateVerificationDescription, CertificateWithNonceDescription, CloudToDeviceProperties, + DeviceRegistry, EncryptionPropertiesDescription, EndpointHealthData, EndpointHealthDataListResult, @@ -143,6 +144,7 @@ "CertificateVerificationDescription", "CertificateWithNonceDescription", "CloudToDeviceProperties", + "DeviceRegistry", "EncryptionPropertiesDescription", "EndpointHealthData", "EndpointHealthDataListResult", diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_iot_hub_client_enums.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_iot_hub_client_enums.py index 8e8bf07cccb6..87aa4b8893ce 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_iot_hub_client_enums.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_iot_hub_client_enums.py @@ -116,6 +116,7 @@ class IotHubSku(str, Enum, metaclass=CaseInsensitiveEnumMeta): B1 = "B1" B2 = "B2" B3 = "B3" + GEN2 = "GEN2" class IotHubSkuTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -124,6 +125,7 @@ class IotHubSkuTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): FREE = "Free" STANDARD = "Standard" BASIC = "Basic" + GENERATION2 = "Generation2" class IpFilterActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py index c3b1dfed2363..5bb6e7e93018 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py @@ -9,7 +9,7 @@ from collections.abc import MutableMapping import datetime -from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Optional, TYPE_CHECKING, Union from .._utils import serialization as _serialization @@ -52,7 +52,7 @@ def __init__( self, *, type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, - user_assigned_identities: Optional[Dict[str, "_models.ArmUserIdentity"]] = None, + user_assigned_identities: Optional[dict[str, "_models.ArmUserIdentity"]] = None, **kwargs: Any ) -> None: """ @@ -185,7 +185,7 @@ class CertificateListDescription(_serialization.Model): "value": {"key": "value", "type": "[CertificateDescription]"}, } - def __init__(self, *, value: Optional[List["_models.CertificateDescription"]] = None, **kwargs: Any) -> None: + def __init__(self, *, value: Optional[list["_models.CertificateDescription"]] = None, **kwargs: Any) -> None: """ :keyword value: The array of Certificate objects. :paramtype value: list[~azure.mgmt.iothub.models.CertificateDescription] @@ -213,6 +213,8 @@ class CertificateProperties(_serialization.Model): :vartype updated: ~datetime.datetime :ivar certificate: The certificate content. :vartype certificate: str + :ivar policy_resource_id: The reference to policy stored in Azure Device Registry (ADR). + :vartype policy_resource_id: str """ _validation = { @@ -231,14 +233,24 @@ class CertificateProperties(_serialization.Model): "created": {"key": "created", "type": "rfc-1123"}, "updated": {"key": "updated", "type": "rfc-1123"}, "certificate": {"key": "certificate", "type": "str"}, + "policy_resource_id": {"key": "policyResourceId", "type": "str"}, } - def __init__(self, *, is_verified: Optional[bool] = None, certificate: Optional[str] = None, **kwargs: Any) -> None: + def __init__( + self, + *, + is_verified: Optional[bool] = None, + certificate: Optional[str] = None, + policy_resource_id: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword is_verified: Determines whether certificate has been verified. :paramtype is_verified: bool :keyword certificate: The certificate content. :paramtype certificate: str + :keyword policy_resource_id: The reference to policy stored in Azure Device Registry (ADR). + :paramtype policy_resource_id: str """ super().__init__(**kwargs) self.subject: Optional[str] = None @@ -248,6 +260,7 @@ def __init__(self, *, is_verified: Optional[bool] = None, certificate: Optional[ self.created: Optional[datetime.datetime] = None self.updated: Optional[datetime.datetime] = None self.certificate = certificate + self.policy_resource_id = policy_resource_id class CertificatePropertiesWithNonce(_serialization.Model): @@ -273,6 +286,8 @@ class CertificatePropertiesWithNonce(_serialization.Model): :vartype verification_code: str :ivar certificate: The certificate content. :vartype certificate: str + :ivar policy_resource_id: The reference to policy stored in Azure Device Registry (ADR). + :vartype policy_resource_id: str """ _validation = { @@ -295,10 +310,14 @@ class CertificatePropertiesWithNonce(_serialization.Model): "updated": {"key": "updated", "type": "rfc-1123"}, "verification_code": {"key": "verificationCode", "type": "str"}, "certificate": {"key": "certificate", "type": "str"}, + "policy_resource_id": {"key": "policyResourceId", "type": "str"}, } - def __init__(self, **kwargs: Any) -> None: - """ """ + def __init__(self, *, policy_resource_id: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword policy_resource_id: The reference to policy stored in Azure Device Registry (ADR). + :paramtype policy_resource_id: str + """ super().__init__(**kwargs) self.subject: Optional[str] = None self.expiry: Optional[datetime.datetime] = None @@ -308,6 +327,7 @@ def __init__(self, **kwargs: Any) -> None: self.updated: Optional[datetime.datetime] = None self.verification_code: Optional[str] = None self.certificate: Optional[str] = None + self.policy_resource_id = policy_resource_id class CertificateVerificationDescription(_serialization.Model): @@ -430,6 +450,37 @@ def __init__( self.feedback = feedback +class DeviceRegistry(_serialization.Model): + """Represents properties related to the Azure Device Registry (ADR). + + :ivar namespace_resource_id: The identifier of the Azure Device Registry namespace associated + with the GEN2 SKU hub. + :vartype namespace_resource_id: str + :ivar identity_resource_id: The identity used to manage the ADR namespace from the data plane. + :vartype identity_resource_id: str + """ + + _attribute_map = { + "namespace_resource_id": {"key": "namespaceResourceId", "type": "str"}, + "identity_resource_id": {"key": "identityResourceId", "type": "str"}, + } + + def __init__( + self, *, namespace_resource_id: Optional[str] = None, identity_resource_id: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword namespace_resource_id: The identifier of the Azure Device Registry namespace + associated with the GEN2 SKU hub. + :paramtype namespace_resource_id: str + :keyword identity_resource_id: The identity used to manage the ADR namespace from the data + plane. + :paramtype identity_resource_id: str + """ + super().__init__(**kwargs) + self.namespace_resource_id = namespace_resource_id + self.identity_resource_id = identity_resource_id + + class EncryptionPropertiesDescription(_serialization.Model): """The encryption properties for the IoT hub. @@ -448,7 +499,7 @@ def __init__( self, *, key_source: Optional[str] = None, - key_vault_properties: Optional[List["_models.KeyVaultKeyProperties"]] = None, + key_vault_properties: Optional[list["_models.KeyVaultKeyProperties"]] = None, **kwargs: Any ) -> None: """ @@ -563,7 +614,7 @@ class EndpointHealthDataListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.EndpointHealthData"]] = None, **kwargs: Any) -> None: + def __init__(self, *, value: Optional[list["_models.EndpointHealthData"]] = None, **kwargs: Any) -> None: """ :keyword value: JSON-serialized array of Endpoint health data. :paramtype value: list[~azure.mgmt.iothub.models.EndpointHealthData] @@ -599,7 +650,7 @@ class EnrichmentProperties(_serialization.Model): "endpoint_names": {"key": "endpointNames", "type": "[str]"}, } - def __init__(self, *, key: str, value: str, endpoint_names: List[str], **kwargs: Any) -> None: + def __init__(self, *, key: str, value: str, endpoint_names: list[str], **kwargs: Any) -> None: """ :keyword key: The key or name for the enrichment property. Required. :paramtype key: str @@ -711,7 +762,7 @@ class EventHubConsumerGroupInfo(_serialization.Model): "etag": {"key": "etag", "type": "str"}, } - def __init__(self, *, properties: Optional[Dict[str, Any]] = None, **kwargs: Any) -> None: + def __init__(self, *, properties: Optional[dict[str, Any]] = None, **kwargs: Any) -> None: """ :keyword properties: The tags. :paramtype properties: dict[str, any] @@ -770,7 +821,7 @@ class EventHubConsumerGroupsListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.EventHubConsumerGroupInfo"]] = None, **kwargs: Any) -> None: + def __init__(self, *, value: Optional[list["_models.EventHubConsumerGroupInfo"]] = None, **kwargs: Any) -> None: """ :keyword value: List of consumer groups objects. :paramtype value: list[~azure.mgmt.iothub.models.EventHubConsumerGroupInfo] @@ -829,7 +880,7 @@ def __init__( super().__init__(**kwargs) self.retention_time_in_days = retention_time_in_days self.partition_count = partition_count - self.partition_ids: Optional[List[str]] = None + self.partition_ids: Optional[list[str]] = None self.path: Optional[str] = None self.endpoint: Optional[str] = None @@ -987,7 +1038,7 @@ def __init__( self, *, source: Union[str, "_models.RoutingSource"], - endpoint_names: List[str], + endpoint_names: list[str], is_enabled: bool, name: Optional[str] = None, condition: Optional[str] = None, @@ -1137,8 +1188,8 @@ def __init__( self, *, group_id: Optional[str] = None, - required_members: Optional[List[str]] = None, - required_zone_names: Optional[List[str]] = None, + required_members: Optional[list[str]] = None, + required_zone_names: Optional[list[str]] = None, **kwargs: Any ) -> None: """ @@ -1316,7 +1367,7 @@ class Resource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: + def __init__(self, *, location: str, tags: Optional[dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword location: The resource location. Required. :paramtype location: str @@ -1388,7 +1439,7 @@ def __init__( *, location: str, sku: "_models.IotHubSkuInfo", - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, etag: Optional[str] = None, properties: Optional["_models.IotHubProperties"] = None, identity: Optional["_models.ArmIdentity"] = None, @@ -1437,7 +1488,7 @@ class IotHubDescriptionListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.IotHubDescription"]] = None, **kwargs: Any) -> None: + def __init__(self, *, value: Optional[list["_models.IotHubDescription"]] = None, **kwargs: Any) -> None: """ :keyword value: The array of IotHubDescription objects. :paramtype value: list[~azure.mgmt.iothub.models.IotHubDescription] @@ -1602,6 +1653,8 @@ class IotHubProperties(_serialization.Model): :ivar ip_version: This property specifies the IP Version the hub is currently utilizing. Known values are: "ipv4", "ipv6", and "ipv4ipv6". :vartype ip_version: str or ~azure.mgmt.iothub.models.IpVersion + :ivar device_registry: Represents properties related to the Azure Device Registry (ADR). + :vartype device_registry: ~azure.mgmt.iothub.models.DeviceRegistry """ _validation = { @@ -1640,26 +1693,27 @@ class IotHubProperties(_serialization.Model): "enable_data_residency": {"key": "enableDataResidency", "type": "bool"}, "root_certificate": {"key": "rootCertificate", "type": "RootCertificateProperties"}, "ip_version": {"key": "ipVersion", "type": "str"}, + "device_registry": {"key": "deviceRegistry", "type": "DeviceRegistry"}, } def __init__( # pylint: disable=too-many-locals self, *, - authorization_policies: Optional[List["_models.SharedAccessSignatureAuthorizationRule"]] = None, + authorization_policies: Optional[list["_models.SharedAccessSignatureAuthorizationRule"]] = None, disable_local_auth: Optional[bool] = None, disable_device_sas: Optional[bool] = None, disable_module_sas: Optional[bool] = None, restrict_outbound_network_access: Optional[bool] = None, - allowed_fqdn_list: Optional[List[str]] = None, + allowed_fqdn_list: Optional[list[str]] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - ip_filter_rules: Optional[List["_models.IpFilterRule"]] = None, + ip_filter_rules: Optional[list["_models.IpFilterRule"]] = None, network_rule_sets: Optional["_models.NetworkRuleSetProperties"] = None, min_tls_version: Optional[str] = None, - private_endpoint_connections: Optional[List["_models.PrivateEndpointConnection"]] = None, - event_hub_endpoints: Optional[Dict[str, "_models.EventHubProperties"]] = None, + private_endpoint_connections: Optional[list["_models.PrivateEndpointConnection"]] = None, + event_hub_endpoints: Optional[dict[str, "_models.EventHubProperties"]] = None, routing: Optional["_models.RoutingProperties"] = None, - storage_endpoints: Optional[Dict[str, "_models.StorageEndpointProperties"]] = None, - messaging_endpoints: Optional[Dict[str, "_models.MessagingEndpointProperties"]] = None, + storage_endpoints: Optional[dict[str, "_models.StorageEndpointProperties"]] = None, + messaging_endpoints: Optional[dict[str, "_models.MessagingEndpointProperties"]] = None, enable_file_upload_notifications: Optional[bool] = None, cloud_to_device: Optional["_models.CloudToDeviceProperties"] = None, comments: Optional[str] = None, @@ -1669,6 +1723,7 @@ def __init__( # pylint: disable=too-many-locals enable_data_residency: Optional[bool] = None, root_certificate: Optional["_models.RootCertificateProperties"] = None, ip_version: Optional[Union[str, "_models.IpVersion"]] = None, + device_registry: Optional["_models.DeviceRegistry"] = None, **kwargs: Any ) -> None: """ @@ -1742,6 +1797,8 @@ def __init__( # pylint: disable=too-many-locals :keyword ip_version: This property specifies the IP Version the hub is currently utilizing. Known values are: "ipv4", "ipv6", and "ipv4ipv6". :paramtype ip_version: str or ~azure.mgmt.iothub.models.IpVersion + :keyword device_registry: Represents properties related to the Azure Device Registry (ADR). + :paramtype device_registry: ~azure.mgmt.iothub.models.DeviceRegistry """ super().__init__(**kwargs) self.authorization_policies = authorization_policies @@ -1768,10 +1825,11 @@ def __init__( # pylint: disable=too-many-locals self.device_streams = device_streams self.features = features self.encryption = encryption - self.locations: Optional[List["_models.IotHubLocationDescription"]] = None + self.locations: Optional[list["_models.IotHubLocationDescription"]] = None self.enable_data_residency = enable_data_residency self.root_certificate = root_certificate self.ip_version = ip_version + self.device_registry = device_registry class IotHubPropertiesDeviceStreams(_serialization.Model): @@ -1785,7 +1843,7 @@ class IotHubPropertiesDeviceStreams(_serialization.Model): "streaming_endpoints": {"key": "streamingEndpoints", "type": "[str]"}, } - def __init__(self, *, streaming_endpoints: Optional[List[str]] = None, **kwargs: Any) -> None: + def __init__(self, *, streaming_endpoints: Optional[list[str]] = None, **kwargs: Any) -> None: """ :keyword streaming_endpoints: List of Device Streams Endpoints. :paramtype streaming_endpoints: list[str] @@ -1847,7 +1905,7 @@ class IotHubQuotaMetricInfoListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.IotHubQuotaMetricInfo"]] = None, **kwargs: Any) -> None: + def __init__(self, *, value: Optional[list["_models.IotHubQuotaMetricInfo"]] = None, **kwargs: Any) -> None: """ :keyword value: The array of quota metrics objects. :paramtype value: list[~azure.mgmt.iothub.models.IotHubQuotaMetricInfo] @@ -1917,7 +1975,7 @@ class IotHubSkuDescriptionListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.IotHubSkuDescription"]] = None, **kwargs: Any) -> None: + def __init__(self, *, value: Optional[list["_models.IotHubSkuDescription"]] = None, **kwargs: Any) -> None: """ :keyword value: The array of IotHubSkuDescription. :paramtype value: list[~azure.mgmt.iothub.models.IotHubSkuDescription] @@ -1935,10 +1993,10 @@ class IotHubSkuInfo(_serialization.Model): All required parameters must be populated in order to send to server. :ivar name: The name of the SKU. Required. Known values are: "F1", "S1", "S2", "S3", "B1", - "B2", and "B3". + "B2", "B3", and "GEN2". :vartype name: str or ~azure.mgmt.iothub.models.IotHubSku - :ivar tier: The billing tier for the IoT hub. Known values are: "Free", "Standard", and - "Basic". + :ivar tier: The billing tier for the IoT hub. Known values are: "Free", "Standard", "Basic", + and "Generation2". :vartype tier: str or ~azure.mgmt.iothub.models.IotHubSkuTier :ivar capacity: The number of provisioned IoT Hub units. See: https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits. @@ -1959,7 +2017,7 @@ class IotHubSkuInfo(_serialization.Model): def __init__(self, *, name: Union[str, "_models.IotHubSku"], capacity: Optional[int] = None, **kwargs: Any) -> None: """ :keyword name: The name of the SKU. Required. Known values are: "F1", "S1", "S2", "S3", "B1", - "B2", and "B3". + "B2", "B3", and "GEN2". :paramtype name: str or ~azure.mgmt.iothub.models.IotHubSku :keyword capacity: The number of provisioned IoT Hub units. See: https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits. @@ -2098,7 +2156,7 @@ class JobResponseListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.JobResponse"]] = None, **kwargs: Any) -> None: + def __init__(self, *, value: Optional[list["_models.JobResponse"]] = None, **kwargs: Any) -> None: """ :keyword value: The array of JobResponse objects. :paramtype value: list[~azure.mgmt.iothub.models.JobResponse] @@ -2335,7 +2393,7 @@ def __init__( self, *, apply_to_built_in_event_hub_endpoint: bool, - ip_rules: List["_models.NetworkRuleSetIpRule"], + ip_rules: list["_models.NetworkRuleSetIpRule"], default_action: Union[str, "_models.DefaultAction"] = "Deny", **kwargs: Any ) -> None: @@ -2474,7 +2532,7 @@ class OperationListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value: Optional[List["_models.Operation"]] = None + self.value: Optional[list["_models.Operation"]] = None self.next_link: Optional[str] = None @@ -2600,7 +2658,7 @@ class PrivateLinkResources(_serialization.Model): "value": {"key": "value", "type": "[GroupIdInformation]"}, } - def __init__(self, *, value: Optional[List["_models.GroupIdInformation"]] = None, **kwargs: Any) -> None: + def __init__(self, *, value: Optional[list["_models.GroupIdInformation"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of available private link resources for an IotHub. :paramtype value: list[~azure.mgmt.iothub.models.GroupIdInformation] @@ -2865,7 +2923,7 @@ def __init__( *, name: str, source: Union[str, "_models.RoutingSource"], - endpoint_names: List[str], + endpoint_names: list[str], is_enabled: bool, condition: Optional[str] = None, **kwargs: Any @@ -2901,6 +2959,8 @@ def __init__( class RoutingCosmosDBSqlApiProperties(_serialization.Model): """The properties related to a cosmos DB sql container endpoint. + Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to server. :ivar name: The name that identifies this endpoint. The name can only include alphanumeric @@ -2944,6 +3004,7 @@ class RoutingCosmosDBSqlApiProperties(_serialization.Model): _validation = { "name": {"required": True, "pattern": r"^[A-Za-z0-9-._]{1,64}$"}, + "id": {"readonly": True}, "endpoint_uri": {"required": True}, "database_name": {"required": True}, "container_name": {"required": True}, @@ -2972,7 +3033,6 @@ def __init__( endpoint_uri: str, database_name: str, container_name: str, - id: Optional[str] = None, # pylint: disable=redefined-builtin subscription_id: Optional[str] = None, resource_group: Optional[str] = None, authentication_type: Optional[Union[str, "_models.AuthenticationType"]] = None, @@ -2989,8 +3049,6 @@ def __init__( following names are reserved: events, fileNotifications, $default. Endpoint names must be unique across endpoint types. Required. :paramtype name: str - :keyword id: Id of the cosmos DB sql container endpoint. - :paramtype id: str :keyword subscription_id: The subscription identifier of the cosmos DB account. :paramtype subscription_id: str :keyword resource_group: The name of the resource group of the cosmos DB account. @@ -3024,7 +3082,7 @@ def __init__( """ super().__init__(**kwargs) self.name = name - self.id = id + self.id: Optional[str] = None self.subscription_id = subscription_id self.resource_group = resource_group self.endpoint_uri = endpoint_uri @@ -3074,11 +3132,11 @@ class RoutingEndpoints(_serialization.Model): def __init__( self, *, - service_bus_queues: Optional[List["_models.RoutingServiceBusQueueEndpointProperties"]] = None, - service_bus_topics: Optional[List["_models.RoutingServiceBusTopicEndpointProperties"]] = None, - event_hubs: Optional[List["_models.RoutingEventHubProperties"]] = None, - storage_containers: Optional[List["_models.RoutingStorageContainerProperties"]] = None, - cosmos_db_sql_containers: Optional[List["_models.RoutingCosmosDBSqlApiProperties"]] = None, + service_bus_queues: Optional[list["_models.RoutingServiceBusQueueEndpointProperties"]] = None, + service_bus_topics: Optional[list["_models.RoutingServiceBusTopicEndpointProperties"]] = None, + event_hubs: Optional[list["_models.RoutingEventHubProperties"]] = None, + storage_containers: Optional[list["_models.RoutingStorageContainerProperties"]] = None, + cosmos_db_sql_containers: Optional[list["_models.RoutingCosmosDBSqlApiProperties"]] = None, **kwargs: Any ) -> None: """ @@ -3226,8 +3284,8 @@ def __init__( self, *, body: Optional[str] = None, - app_properties: Optional[Dict[str, str]] = None, - system_properties: Optional[Dict[str, str]] = None, + app_properties: Optional[dict[str, str]] = None, + system_properties: Optional[dict[str, str]] = None, **kwargs: Any ) -> None: """ @@ -3278,9 +3336,9 @@ def __init__( self, *, endpoints: Optional["_models.RoutingEndpoints"] = None, - routes: Optional[List["_models.RouteProperties"]] = None, + routes: Optional[list["_models.RouteProperties"]] = None, fallback_route: Optional["_models.FallbackRouteProperties"] = None, - enrichments: Optional[List["_models.EnrichmentProperties"]] = None, + enrichments: Optional[list["_models.EnrichmentProperties"]] = None, **kwargs: Any ) -> None: """ @@ -3788,7 +3846,7 @@ class SharedAccessSignatureAuthorizationRuleListResult(_serialization.Model): # } def __init__( - self, *, value: Optional[List["_models.SharedAccessSignatureAuthorizationRule"]] = None, **kwargs: Any + self, *, value: Optional[list["_models.SharedAccessSignatureAuthorizationRule"]] = None, **kwargs: Any ) -> None: """ :keyword value: The list of shared access policies. @@ -3945,7 +4003,7 @@ class TagsResource(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: + def __init__(self, *, tags: Optional[dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -4008,7 +4066,7 @@ class TestAllRoutesResult(_serialization.Model): "routes": {"key": "routes", "type": "[MatchedRoute]"}, } - def __init__(self, *, routes: Optional[List["_models.MatchedRoute"]] = None, **kwargs: Any) -> None: + def __init__(self, *, routes: Optional[list["_models.MatchedRoute"]] = None, **kwargs: Any) -> None: """ :keyword routes: JSON-serialized array of matched routes. :paramtype routes: list[~azure.mgmt.iothub.models.MatchedRoute] @@ -4106,7 +4164,7 @@ class TestRouteResultDetails(_serialization.Model): } def __init__( - self, *, compilation_errors: Optional[List["_models.RouteCompilationError"]] = None, **kwargs: Any + self, *, compilation_errors: Optional[list["_models.RouteCompilationError"]] = None, **kwargs: Any ) -> None: """ :keyword compilation_errors: JSON-serialized list of route compilation errors. @@ -4196,7 +4254,7 @@ class UserSubscriptionQuotaListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.UserSubscriptionQuota"]] = None, **kwargs: Any) -> None: + def __init__(self, *, value: Optional[list["_models.UserSubscriptionQuota"]] = None, **kwargs: Any) -> None: """ :keyword value: :paramtype value: list[~azure.mgmt.iothub.models.UserSubscriptionQuota] diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py index 2bbe8b00624e..581f3d0acc8e 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from typing import Any, Callable, IO, Optional, TypeVar, Union, overload from azure.core import PipelineClient from azure.core.exceptions import ( @@ -30,7 +30,8 @@ from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -42,7 +43,7 @@ def build_list_by_iot_hub_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -73,7 +74,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -113,7 +114,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -158,7 +159,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -199,7 +200,7 @@ def build_generate_verification_code_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -240,7 +241,7 @@ def build_verify_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py index 3d4817064e25..16635cab005e 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload from azure.core import PipelineClient from azure.core.exceptions import ( @@ -34,7 +34,8 @@ from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -46,7 +47,7 @@ def build_manual_failover_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py index eb34f96ec29c..a7b53fb57117 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core import PipelineClient @@ -36,7 +36,8 @@ from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -46,7 +47,7 @@ def build_get_request(resource_group_name: str, resource_name: str, subscription _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -77,7 +78,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -113,7 +114,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -147,7 +148,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -176,7 +177,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -200,7 +201,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -230,7 +231,7 @@ def build_get_stats_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -261,7 +262,7 @@ def build_get_valid_skus_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -292,7 +293,7 @@ def build_list_event_hub_consumer_groups_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -329,7 +330,7 @@ def build_get_event_hub_consumer_group_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -367,7 +368,7 @@ def build_create_event_hub_consumer_group_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -408,7 +409,7 @@ def build_delete_event_hub_consumer_group_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -441,7 +442,7 @@ def build_list_jobs_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -472,7 +473,7 @@ def build_get_job_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -504,7 +505,7 @@ def build_get_quota_metrics_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -535,7 +536,7 @@ def build_get_endpoint_health_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -564,7 +565,7 @@ def build_check_name_availability_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -595,7 +596,7 @@ def build_test_all_routes_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -629,7 +630,7 @@ def build_test_route_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -663,7 +664,7 @@ def build_list_keys_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -694,7 +695,7 @@ def build_get_keys_for_key_name_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -726,7 +727,7 @@ def build_export_devices_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -760,7 +761,7 @@ def build_import_devices_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1340,6 +1341,7 @@ def _delete_initial(self, resource_group_name: str, resource_name: str, **kwargs response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py index 037c82d12efa..eecb0a376e5b 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from collections.abc import MutableMapping -from typing import Any, Callable, Dict, Optional, TypeVar +from typing import Any, Callable, Optional, TypeVar import urllib.parse from azure.core import PipelineClient @@ -30,7 +30,8 @@ from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -40,7 +41,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_private_endpoint_connections_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_private_endpoint_connections_operations.py index c86f5767b579..f6bbcb350220 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_private_endpoint_connections_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_private_endpoint_connections_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- from collections.abc import MutableMapping from io import IOBase -from typing import Any, Callable, Dict, IO, Iterator, List, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload from azure.core import PipelineClient from azure.core.exceptions import ( @@ -34,7 +34,8 @@ from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -46,7 +47,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -81,7 +82,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -119,7 +120,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -160,7 +161,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -595,6 +596,7 @@ def _delete_initial( response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_private_link_resources_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_private_link_resources_operations.py index 91076ea833fd..c1a7079b3e8a 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_private_link_resources_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_private_link_resources_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from collections.abc import MutableMapping -from typing import Any, Callable, Dict, Optional, TypeVar +from typing import Any, Callable, Optional, TypeVar from azure.core import PipelineClient from azure.core.exceptions import ( @@ -29,7 +29,8 @@ from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -41,7 +42,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -72,7 +73,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py index 029ec0d56f45..3979f4eb2a0e 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from collections.abc import MutableMapping -from typing import Any, Callable, Dict, Optional, TypeVar +from typing import Any, Callable, Optional, TypeVar from azure.core import PipelineClient from azure.core.exceptions import ( @@ -28,7 +28,8 @@ from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -38,7 +39,7 @@ def build_get_subscription_quota_request(subscription_id: str, **kwargs: Any) -> _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-06-30-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/check_name_availability.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/check_name_availability.py index 2e1b523ca2d1..4aaa65636fd0 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/check_name_availability.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/check_name_availability.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/checkNameAvailability.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/checkNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/create_or_replace_certificates_with_device_registry_policy.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/create_or_replace_certificates_with_device_registry_policy.py new file mode 100644 index 000000000000..a9f243cb1f46 --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/create_or_replace_certificates_with_device_registry_policy.py @@ -0,0 +1,45 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.iothub import IotHubClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-iothub +# USAGE + python create_or_replace_certificates_with_device_registry_policy.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = IotHubClient( + credential=DefaultAzureCredential(), + subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + ) + + response = client.certificates.create_or_update( + resource_group_name="myResourceGroup", + resource_name="testHub", + certificate_name="cert", + certificate_description={"properties": {"certificate": "############################################"}}, + ) + print(response) + + +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/CreateOrReplace_Certificates_With_DeviceRegistryPolicy.json +if __name__ == "__main__": + main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/create_or_replace_io_thub_with_device_registry.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/create_or_replace_io_thub_with_device_registry.py new file mode 100644 index 000000000000..6dce37dabb25 --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/create_or_replace_io_thub_with_device_registry.py @@ -0,0 +1,102 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.iothub import IotHubClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-iothub +# USAGE + python create_or_replace_io_thub_with_device_registry.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = IotHubClient( + credential=DefaultAzureCredential(), + subscription_id="91d12660-3dec-467a-be2a-213b5544ddc0", + ) + + response = client.iot_hub_resource.begin_create_or_update( + resource_group_name="myResourceGroup", + resource_name="testHub", + iot_hub_description={ + "etag": "AAAAAAFD6M4=", + "location": "centraluseuap", + "properties": { + "cloudToDevice": { + "defaultTtlAsIso8601": "PT1H", + "feedback": {"lockDurationAsIso8601": "PT1M", "maxDeliveryCount": 10, "ttlAsIso8601": "PT1H"}, + "maxDeliveryCount": 10, + }, + "deviceRegistry": { + "identityResourceId": "/subscriptions/ae24ff83-d2ca-4fc8-9717-05dae4bba489/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testIdentity", + "namespaceResourceId": "/subscriptions/ae24ff83-d2ca-4fc8-9717-05dae4bba489/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/namespaces/testNamespace", + }, + "enableDataResidency": True, + "enableFileUploadNotifications": False, + "eventHubEndpoints": {"events": {"partitionCount": 2, "retentionTimeInDays": 1}}, + "features": "None", + "ipFilterRules": [], + "ipVersion": "ipv4ipv6", + "messagingEndpoints": { + "fileNotifications": { + "lockDurationAsIso8601": "PT1M", + "maxDeliveryCount": 10, + "ttlAsIso8601": "PT1H", + } + }, + "minTlsVersion": "1.2", + "networkRuleSets": { + "applyToBuiltInEventHubEndpoint": True, + "defaultAction": "Deny", + "ipRules": [ + {"action": "Allow", "filterName": "rule1", "ipMask": "131.117.159.53"}, + {"action": "Allow", "filterName": "rule2", "ipMask": "157.55.59.128/25"}, + ], + }, + "rootCertificate": {"enableRootCertificateV2": True}, + "routing": { + "endpoints": { + "eventHubs": [], + "serviceBusQueues": [], + "serviceBusTopics": [], + "storageContainers": [], + }, + "fallbackRoute": { + "condition": "true", + "endpointNames": ["events"], + "isEnabled": True, + "name": "$fallback", + "source": "DeviceMessages", + }, + "routes": [], + }, + "storageEndpoints": { + "$default": {"connectionString": "", "containerName": "", "sasTtlAsIso8601": "PT1H"} + }, + }, + "sku": {"capacity": 1, "name": "GEN2"}, + "tags": {}, + }, + ).result() + print(response) + + +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/CreateOrReplace_IoTHub_With_DeviceRegistry.json +if __name__ == "__main__": + main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iot_hub_manual_failover.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iot_hub_manual_failover.py index 7cec2cc0e9c9..ae59014d8375 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iot_hub_manual_failover.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iot_hub_manual_failover.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/IotHub_ManualFailover.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/IotHub_ManualFailover.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certificatescreateorupdate.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certificatescreateorupdate.py index 96038652967a..e95e4027e6a0 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certificatescreateorupdate.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certificatescreateorupdate.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_certificatescreateorupdate.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_certificatescreateorupdate.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certificatesdelete.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certificatesdelete.py index 35d3301450ed..5a04b8e2bb18 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certificatesdelete.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certificatesdelete.py @@ -39,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_certificatesdelete.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_certificatesdelete.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certverify.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certverify.py index c6ffec1a5389..b7ba35132f50 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certverify.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_certverify.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_certverify.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_certverify.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_create_or_update.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_create_or_update.py index b63f246b9121..96569686e3bf 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_create_or_update.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_create_or_update.py @@ -93,6 +93,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_createOrUpdate.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_createOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_createconsumergroup.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_createconsumergroup.py index 62d941c9b344..8961d0e1dbee 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_createconsumergroup.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_createconsumergroup.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_createconsumergroup.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_createconsumergroup.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_delete.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_delete.py index 1ae3622c22fc..c38cefb02ed5 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_delete.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_delete.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_delete.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_delete.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_deleteconsumergroup.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_deleteconsumergroup.py index 7af9962988e8..344a067729b9 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_deleteconsumergroup.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_deleteconsumergroup.py @@ -39,6 +39,6 @@ def main(): ) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_deleteconsumergroup.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_deleteconsumergroup.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_deleteprivateendpointconnection.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_deleteprivateendpointconnection.py index 20fb8d5006fb..48e6c9798624 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_deleteprivateendpointconnection.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_deleteprivateendpointconnection.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_deleteprivateendpointconnection.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_deleteprivateendpointconnection.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_exportdevices.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_exportdevices.py index 4cbc19bb86d7..895983367175 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_exportdevices.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_exportdevices.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_exportdevices.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_exportdevices.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_generateverificationcode.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_generateverificationcode.py index 256e85cd6a3d..b32504a81f83 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_generateverificationcode.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_generateverificationcode.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_generateverificationcode.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_generateverificationcode.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_get.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_get.py index 71caa8c1ee26..4e36989b71b4 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_get.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_get.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_get.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getcertificate.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getcertificate.py index cd87bc25376a..4ebb99350a2e 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getcertificate.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getcertificate.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_getcertificate.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_getcertificate.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getconsumergroup.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getconsumergroup.py index a0df04338f2c..0de7ddec46fd 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getconsumergroup.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getconsumergroup.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_getconsumergroup.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_getconsumergroup.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getjob.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getjob.py index b93b10b85472..d8cc47896713 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getjob.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getjob.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_getjob.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_getjob.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getkey.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getkey.py index fdc6481605e6..f5e6954934a2 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getkey.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getkey.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_getkey.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_getkey.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getprivateendpointconnection.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getprivateendpointconnection.py index d0cad845fadd..62e733db33a1 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getprivateendpointconnection.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getprivateendpointconnection.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_getprivateendpointconnection.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_getprivateendpointconnection.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getprivatelinkresources.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getprivatelinkresources.py index eabaae754c2c..724ab0ea16c9 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getprivatelinkresources.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getprivatelinkresources.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_getprivatelinkresources.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_getprivatelinkresources.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getskus.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getskus.py index 3137b2c1dbb5..78db3b086026 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getskus.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_getskus.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_getskus.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_getskus.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_importdevices.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_importdevices.py index ab10ec192c82..920ed0d13eba 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_importdevices.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_importdevices.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_importdevices.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_importdevices.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listbyrg.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listbyrg.py index 9879d0d4d9e0..75305a91b1a9 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listbyrg.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listbyrg.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_listbyrg.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_listbyrg.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listbysubscription.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listbysubscription.py index 84a92c965fd0..d2e4c3f6346e 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listbysubscription.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listbysubscription.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_listbysubscription.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_listbysubscription.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listcertificates.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listcertificates.py index cf33107ae941..415c7629aaf2 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listcertificates.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listcertificates.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_listcertificates.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_listcertificates.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listehgroups.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listehgroups.py index 42291aae9b5c..9d2e0ea8e203 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listehgroups.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listehgroups.py @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_listehgroups.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_listehgroups.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listjobs.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listjobs.py index 9ce4fd0c1ce0..c6b4b1953c0b 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listjobs.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listjobs.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_listjobs.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_listjobs.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listkeys.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listkeys.py index d4869ec65dc2..74810e4b0b90 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listkeys.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listkeys.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_listkeys.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_listkeys.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listprivateendpointconnections.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listprivateendpointconnections.py index 72c5c197a3b1..338f56f1db80 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listprivateendpointconnections.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listprivateendpointconnections.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_listprivateendpointconnections.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_listprivateendpointconnections.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listprivatelinkresources.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listprivatelinkresources.py index c69b54ff2da1..45ae7b4b8e62 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listprivatelinkresources.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_listprivatelinkresources.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_listprivatelinkresources.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_listprivatelinkresources.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_operations.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_operations.py index 63dfd4d2f795..483460b162ff 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_operations.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_operations.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_operations.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_quotametrics.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_quotametrics.py index 84cdd065c5f8..4925c7422c15 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_quotametrics.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_quotametrics.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_quotametrics.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_quotametrics.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_routingendpointhealth.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_routingendpointhealth.py index c60af95aefbc..146ec5dba4fe 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_routingendpointhealth.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_routingendpointhealth.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_routingendpointhealth.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_routingendpointhealth.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_stats.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_stats.py index f7a43a171238..3487ebd523f5 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_stats.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_stats.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_stats.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_stats.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_testallroutes.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_testallroutes.py index acfcd5b29a49..7a97d84080f1 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_testallroutes.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_testallroutes.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_testallroutes.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_testallroutes.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_testnewroute.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_testnewroute.py index ce0728cebaf0..f241236677da 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_testnewroute.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_testnewroute.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_testnewroute.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_testnewroute.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_updateprivateendpointconnection.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_updateprivateendpointconnection.py index e23fdaacfb62..4bcaf16a699e 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_updateprivateendpointconnection.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_updateprivateendpointconnection.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_updateprivateendpointconnection.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_updateprivateendpointconnection.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_usages.py b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_usages.py index 8a85f1d9448a..13be51a16f38 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_usages.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_samples/iothub_usages.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/preview/2023-06-30-preview/examples/iothub_usages.json +# x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/IoTHub/preview/2025-08-01-preview/examples/iothub_usages.json if __name__ == "__main__": main() diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_certificates_operations.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_certificates_operations.py index e1c354797bef..24487c7b65e2 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_certificates_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_certificates_operations.py @@ -24,7 +24,7 @@ def test_certificates_list_by_iot_hub(self, resource_group): response = self.client.certificates.list_by_iot_hub( resource_group_name=resource_group.name, resource_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_certificates_get(self, resource_group): resource_group_name=resource_group.name, resource_name="str", certificate_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -59,13 +59,14 @@ def test_certificates_create_or_update(self, resource_group): "created": "2020-02-20 00:00:00", "expiry": "2020-02-20 00:00:00", "isVerified": bool, + "policyResourceId": "str", "subject": "str", "thumbprint": "str", "updated": "2020-02-20 00:00:00", }, "type": "str", }, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -79,7 +80,7 @@ def test_certificates_delete(self, resource_group): resource_name="str", certificate_name="str", if_match="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -93,7 +94,7 @@ def test_certificates_generate_verification_code(self, resource_group): resource_name="str", certificate_name="str", if_match="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -108,7 +109,7 @@ def test_certificates_verify(self, resource_group): certificate_name="str", if_match="str", certificate_verification_body={"certificate": "str"}, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_certificates_operations_async.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_certificates_operations_async.py index 02f55b70a88d..f4af89cb2b1a 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_certificates_operations_async.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_certificates_operations_async.py @@ -25,7 +25,7 @@ async def test_certificates_list_by_iot_hub(self, resource_group): response = await self.client.certificates.list_by_iot_hub( resource_group_name=resource_group.name, resource_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_certificates_get(self, resource_group): resource_group_name=resource_group.name, resource_name="str", certificate_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -60,13 +60,14 @@ async def test_certificates_create_or_update(self, resource_group): "created": "2020-02-20 00:00:00", "expiry": "2020-02-20 00:00:00", "isVerified": bool, + "policyResourceId": "str", "subject": "str", "thumbprint": "str", "updated": "2020-02-20 00:00:00", }, "type": "str", }, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -80,7 +81,7 @@ async def test_certificates_delete(self, resource_group): resource_name="str", certificate_name="str", if_match="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -94,7 +95,7 @@ async def test_certificates_generate_verification_code(self, resource_group): resource_name="str", certificate_name="str", if_match="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -109,7 +110,7 @@ async def test_certificates_verify(self, resource_group): certificate_name="str", if_match="str", certificate_verification_body={"certificate": "str"}, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_operations.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_operations.py index 1e6339c8e3ed..fb5e8b0718bc 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_operations.py @@ -25,7 +25,7 @@ def test_iot_hub_begin_manual_failover(self, resource_group): iot_hub_name="str", resource_group_name=resource_group.name, failover_input={"failoverRegion": "str"}, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_operations_async.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_operations_async.py index 687c3c4e8bbf..a3c5082eef8f 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_operations_async.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_operations_async.py @@ -27,7 +27,7 @@ async def test_iot_hub_begin_manual_failover(self, resource_group): iot_hub_name="str", resource_group_name=resource_group.name, failover_input={"failoverRegion": "str"}, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_resource_operations.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_resource_operations.py index a162ddbdd499..c2631c500d3e 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_resource_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_resource_operations.py @@ -24,7 +24,7 @@ def test_iot_hub_resource_get(self, resource_group): response = self.client.iot_hub_resource.get( resource_group_name=resource_group.name, resource_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -63,6 +63,7 @@ def test_iot_hub_resource_begin_create_or_update(self, resource_group): "maxDeliveryCount": 0, }, "comments": "str", + "deviceRegistry": {"identityResourceId": "str", "namespaceResourceId": "str"}, "deviceStreams": {"streamingEndpoints": ["str"]}, "disableDeviceSAS": bool, "disableLocalAuth": bool, @@ -235,7 +236,7 @@ def test_iot_hub_resource_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -248,7 +249,7 @@ def test_iot_hub_resource_begin_update(self, resource_group): resource_group_name=resource_group.name, resource_name="str", iot_hub_tags={"tags": {"str": "str"}}, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -260,7 +261,7 @@ def test_iot_hub_resource_begin_delete(self, resource_group): response = self.client.iot_hub_resource.begin_delete( resource_group_name=resource_group.name, resource_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -270,7 +271,7 @@ def test_iot_hub_resource_begin_delete(self, resource_group): @recorded_by_proxy def test_iot_hub_resource_list_by_subscription(self, resource_group): response = self.client.iot_hub_resource.list_by_subscription( - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -281,7 +282,7 @@ def test_iot_hub_resource_list_by_subscription(self, resource_group): def test_iot_hub_resource_list_by_resource_group(self, resource_group): response = self.client.iot_hub_resource.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -293,7 +294,7 @@ def test_iot_hub_resource_get_stats(self, resource_group): response = self.client.iot_hub_resource.get_stats( resource_group_name=resource_group.name, resource_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -305,7 +306,7 @@ def test_iot_hub_resource_get_valid_skus(self, resource_group): response = self.client.iot_hub_resource.get_valid_skus( resource_group_name=resource_group.name, resource_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -318,7 +319,7 @@ def test_iot_hub_resource_list_event_hub_consumer_groups(self, resource_group): resource_group_name=resource_group.name, resource_name="str", event_hub_endpoint_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -332,7 +333,7 @@ def test_iot_hub_resource_get_event_hub_consumer_group(self, resource_group): resource_name="str", event_hub_endpoint_name="str", name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -347,7 +348,7 @@ def test_iot_hub_resource_create_event_hub_consumer_group(self, resource_group): event_hub_endpoint_name="str", name="str", consumer_group_body={"properties": {"name": "str"}}, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -361,7 +362,7 @@ def test_iot_hub_resource_delete_event_hub_consumer_group(self, resource_group): resource_name="str", event_hub_endpoint_name="str", name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -373,7 +374,7 @@ def test_iot_hub_resource_list_jobs(self, resource_group): response = self.client.iot_hub_resource.list_jobs( resource_group_name=resource_group.name, resource_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -386,7 +387,7 @@ def test_iot_hub_resource_get_job(self, resource_group): resource_group_name=resource_group.name, resource_name="str", job_id="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -398,7 +399,7 @@ def test_iot_hub_resource_get_quota_metrics(self, resource_group): response = self.client.iot_hub_resource.get_quota_metrics( resource_group_name=resource_group.name, resource_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -410,7 +411,7 @@ def test_iot_hub_resource_get_endpoint_health(self, resource_group): response = self.client.iot_hub_resource.get_endpoint_health( resource_group_name=resource_group.name, iot_hub_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -421,7 +422,7 @@ def test_iot_hub_resource_get_endpoint_health(self, resource_group): def test_iot_hub_resource_check_name_availability(self, resource_group): response = self.client.iot_hub_resource.check_name_availability( operation_inputs={"name": "str"}, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -438,7 +439,7 @@ def test_iot_hub_resource_test_all_routes(self, resource_group): "routingSource": "str", "twin": {"properties": {"desired": {}, "reported": {}}, "tags": {}}, }, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -461,7 +462,7 @@ def test_iot_hub_resource_test_route(self, resource_group): "message": {"appProperties": {"str": "str"}, "body": "str", "systemProperties": {"str": "str"}}, "twin": {"properties": {"desired": {}, "reported": {}}, "tags": {}}, }, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -473,7 +474,7 @@ def test_iot_hub_resource_list_keys(self, resource_group): response = self.client.iot_hub_resource.list_keys( resource_group_name=resource_group.name, resource_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -486,7 +487,7 @@ def test_iot_hub_resource_get_keys_for_key_name(self, resource_group): resource_group_name=resource_group.name, resource_name="str", key_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -507,7 +508,7 @@ def test_iot_hub_resource_export_devices(self, resource_group): "identity": {"userAssignedIdentity": "str"}, "includeConfigurations": bool, }, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -529,7 +530,7 @@ def test_iot_hub_resource_import_devices(self, resource_group): "inputBlobName": "str", "outputBlobName": "str", }, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_resource_operations_async.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_resource_operations_async.py index 9b102520a9dd..3c7bbd9cfeae 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_resource_operations_async.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_iot_hub_resource_operations_async.py @@ -25,7 +25,7 @@ async def test_iot_hub_resource_get(self, resource_group): response = await self.client.iot_hub_resource.get( resource_group_name=resource_group.name, resource_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -65,6 +65,7 @@ async def test_iot_hub_resource_begin_create_or_update(self, resource_group): "maxDeliveryCount": 0, }, "comments": "str", + "deviceRegistry": {"identityResourceId": "str", "namespaceResourceId": "str"}, "deviceStreams": {"streamingEndpoints": ["str"]}, "disableDeviceSAS": bool, "disableLocalAuth": bool, @@ -242,7 +243,7 @@ async def test_iot_hub_resource_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -257,7 +258,7 @@ async def test_iot_hub_resource_begin_update(self, resource_group): resource_group_name=resource_group.name, resource_name="str", iot_hub_tags={"tags": {"str": "str"}}, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -271,7 +272,7 @@ async def test_iot_hub_resource_begin_delete(self, resource_group): await self.client.iot_hub_resource.begin_delete( resource_group_name=resource_group.name, resource_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -282,7 +283,7 @@ async def test_iot_hub_resource_begin_delete(self, resource_group): @recorded_by_proxy_async async def test_iot_hub_resource_list_by_subscription(self, resource_group): response = self.client.iot_hub_resource.list_by_subscription( - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -293,7 +294,7 @@ async def test_iot_hub_resource_list_by_subscription(self, resource_group): async def test_iot_hub_resource_list_by_resource_group(self, resource_group): response = self.client.iot_hub_resource.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -305,7 +306,7 @@ async def test_iot_hub_resource_get_stats(self, resource_group): response = await self.client.iot_hub_resource.get_stats( resource_group_name=resource_group.name, resource_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -317,7 +318,7 @@ async def test_iot_hub_resource_get_valid_skus(self, resource_group): response = self.client.iot_hub_resource.get_valid_skus( resource_group_name=resource_group.name, resource_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -330,7 +331,7 @@ async def test_iot_hub_resource_list_event_hub_consumer_groups(self, resource_gr resource_group_name=resource_group.name, resource_name="str", event_hub_endpoint_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -344,7 +345,7 @@ async def test_iot_hub_resource_get_event_hub_consumer_group(self, resource_grou resource_name="str", event_hub_endpoint_name="str", name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -359,7 +360,7 @@ async def test_iot_hub_resource_create_event_hub_consumer_group(self, resource_g event_hub_endpoint_name="str", name="str", consumer_group_body={"properties": {"name": "str"}}, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -373,7 +374,7 @@ async def test_iot_hub_resource_delete_event_hub_consumer_group(self, resource_g resource_name="str", event_hub_endpoint_name="str", name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -385,7 +386,7 @@ async def test_iot_hub_resource_list_jobs(self, resource_group): response = self.client.iot_hub_resource.list_jobs( resource_group_name=resource_group.name, resource_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -398,7 +399,7 @@ async def test_iot_hub_resource_get_job(self, resource_group): resource_group_name=resource_group.name, resource_name="str", job_id="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -410,7 +411,7 @@ async def test_iot_hub_resource_get_quota_metrics(self, resource_group): response = self.client.iot_hub_resource.get_quota_metrics( resource_group_name=resource_group.name, resource_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -422,7 +423,7 @@ async def test_iot_hub_resource_get_endpoint_health(self, resource_group): response = self.client.iot_hub_resource.get_endpoint_health( resource_group_name=resource_group.name, iot_hub_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -433,7 +434,7 @@ async def test_iot_hub_resource_get_endpoint_health(self, resource_group): async def test_iot_hub_resource_check_name_availability(self, resource_group): response = await self.client.iot_hub_resource.check_name_availability( operation_inputs={"name": "str"}, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -450,7 +451,7 @@ async def test_iot_hub_resource_test_all_routes(self, resource_group): "routingSource": "str", "twin": {"properties": {"desired": {}, "reported": {}}, "tags": {}}, }, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -473,7 +474,7 @@ async def test_iot_hub_resource_test_route(self, resource_group): "message": {"appProperties": {"str": "str"}, "body": "str", "systemProperties": {"str": "str"}}, "twin": {"properties": {"desired": {}, "reported": {}}, "tags": {}}, }, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -485,7 +486,7 @@ async def test_iot_hub_resource_list_keys(self, resource_group): response = self.client.iot_hub_resource.list_keys( resource_group_name=resource_group.name, resource_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -498,7 +499,7 @@ async def test_iot_hub_resource_get_keys_for_key_name(self, resource_group): resource_group_name=resource_group.name, resource_name="str", key_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -519,7 +520,7 @@ async def test_iot_hub_resource_export_devices(self, resource_group): "identity": {"userAssignedIdentity": "str"}, "includeConfigurations": bool, }, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -541,7 +542,7 @@ async def test_iot_hub_resource_import_devices(self, resource_group): "inputBlobName": "str", "outputBlobName": "str", }, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_operations.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_operations.py index 7f5b3ba6b425..9d983041c2eb 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_operations.py @@ -22,7 +22,7 @@ def setup_method(self, method): @recorded_by_proxy def test_operations_list(self, resource_group): response = self.client.operations.list( - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_operations_async.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_operations_async.py index 889483d7c2e7..8b017907bb3f 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_operations_async.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_operations_async.py @@ -23,7 +23,7 @@ def setup_method(self, method): @recorded_by_proxy_async async def test_operations_list(self, resource_group): response = self.client.operations.list( - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_endpoint_connections_operations.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_endpoint_connections_operations.py index 29cf0cc9fb1b..36e001827a1c 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_endpoint_connections_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_endpoint_connections_operations.py @@ -24,7 +24,7 @@ def test_private_endpoint_connections_list(self, resource_group): response = self.client.private_endpoint_connections.list( resource_group_name=resource_group.name, resource_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_private_endpoint_connections_get(self, resource_group): resource_group_name=resource_group.name, resource_name="str", private_endpoint_connection_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -63,7 +63,7 @@ def test_private_endpoint_connections_begin_update(self, resource_group): "name": "str", "type": "str", }, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -76,7 +76,7 @@ def test_private_endpoint_connections_begin_delete(self, resource_group): resource_group_name=resource_group.name, resource_name="str", private_endpoint_connection_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_endpoint_connections_operations_async.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_endpoint_connections_operations_async.py index d645161c9fcb..2331aa89be0a 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_endpoint_connections_operations_async.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_endpoint_connections_operations_async.py @@ -25,7 +25,7 @@ async def test_private_endpoint_connections_list(self, resource_group): response = await self.client.private_endpoint_connections.list( resource_group_name=resource_group.name, resource_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_private_endpoint_connections_get(self, resource_group): resource_group_name=resource_group.name, resource_name="str", private_endpoint_connection_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -65,7 +65,7 @@ async def test_private_endpoint_connections_begin_update(self, resource_group): "name": "str", "type": "str", }, - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -80,7 +80,7 @@ async def test_private_endpoint_connections_begin_delete(self, resource_group): resource_group_name=resource_group.name, resource_name="str", private_endpoint_connection_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_link_resources_operations.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_link_resources_operations.py index a1e44f9fefa9..f0c508b87b9b 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_link_resources_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_link_resources_operations.py @@ -24,7 +24,7 @@ def test_private_link_resources_list(self, resource_group): response = self.client.private_link_resources.list( resource_group_name=resource_group.name, resource_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_private_link_resources_get(self, resource_group): resource_group_name=resource_group.name, resource_name="str", group_id="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_link_resources_operations_async.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_link_resources_operations_async.py index 99d07cbb0cdd..eb3fbe96e1a8 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_link_resources_operations_async.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_private_link_resources_operations_async.py @@ -25,7 +25,7 @@ async def test_private_link_resources_list(self, resource_group): response = await self.client.private_link_resources.list( resource_group_name=resource_group.name, resource_name="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_private_link_resources_get(self, resource_group): resource_group_name=resource_group.name, resource_name="str", group_id="str", - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_resource_provider_common_operations.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_resource_provider_common_operations.py index 73a9368756e3..cf5f321b26c6 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_resource_provider_common_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_resource_provider_common_operations.py @@ -22,7 +22,7 @@ def setup_method(self, method): @recorded_by_proxy def test_resource_provider_common_get_subscription_quota(self, resource_group): response = self.client.resource_provider_common.get_subscription_quota( - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_resource_provider_common_operations_async.py b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_resource_provider_common_operations_async.py index d8dc6b6cba97..04b823113e38 100644 --- a/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_resource_provider_common_operations_async.py +++ b/sdk/iothub/azure-mgmt-iothub/generated_tests/test_iot_hub_resource_provider_common_operations_async.py @@ -23,7 +23,7 @@ def setup_method(self, method): @recorded_by_proxy_async async def test_resource_provider_common_get_subscription_quota(self, resource_group): response = await self.client.resource_provider_common.get_subscription_quota( - api_version="2023-06-30-preview", + api_version="2025-08-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/iothub/azure-mgmt-iothub/pyproject.toml b/sdk/iothub/azure-mgmt-iothub/pyproject.toml index 563b5351f389..dee93ee992bd 100644 --- a/sdk/iothub/azure-mgmt-iothub/pyproject.toml +++ b/sdk/iothub/azure-mgmt-iothub/pyproject.toml @@ -1,3 +1,70 @@ +[build-system] +requires = [ + "setuptools>=77.0.3", + "wheel", +] +build-backend = "setuptools.build_meta" + +[project] +name = "azure-mgmt-iothub" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Azure Iothub Management Client Library for Python" +license = "MIT" +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", +] +requires-python = ">=3.9" +keywords = [ + "azure", + "azure sdk", +] +dependencies = [ + "msrest>=0.7.1", + "azure-mgmt-core>=1.6.0", + "typing-extensions>=4.6.0", +] +dynamic = [ + "version", + "readme", +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python" + +[tool.setuptools.dynamic.version] +attr = "azure.mgmt.iothub._version.VERSION" + +[tool.setuptools.dynamic.readme] +file = [ + "README.md", + "CHANGELOG.md", +] +content-type = "text/markdown" + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "samples*", + "doc*", + "azure", + "azure.mgmt", +] + +[tool.setuptools.package-data] +pytyped = [ + "py.typed", +] + [tool.azure-sdk-build] breaking = false mypy = false @@ -13,3 +80,7 @@ is_stable = false is_arm = true sample_link = "" title = "IotHubClient" +package_nspkg = "azure-mgmt-nspkg" +need_msrestazure = false +need_azuremgmtcore = true +exclude_folders = "" diff --git a/sdk/iothub/azure-mgmt-iothub/setup.py b/sdk/iothub/azure-mgmt-iothub/setup.py deleted file mode 100644 index d0ce6746026d..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/setup.py +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env python - -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-iothub" -PACKAGE_PPRINT_NAME = "IoT Hub Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace("-", "/") -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace("-", ".") - -# Version extraction inspired from 'requests' -with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), - "r", -) as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - -with open("README.md", encoding="utf-8") as f: - readme = f.read() -with open("CHANGELOG.md", encoding="utf-8") as f: - changelog = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=readme + "\n\n" + changelog, - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python", - keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.mgmt", - ] - ), - include_package_data=True, - package_data={ - "pytyped": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "typing-extensions>=4.6.0", - "azure-common>=1.1", - "azure-mgmt-core>=1.6.0", - ], - python_requires=">=3.9", -)