Skip to content

[AutoRelease] t2-iothub-2025-08-12-86104(can only be merged by SDK owner) #42474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions sdk/iothub/azure-mgmt-iothub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History

## 0.0.0(it should be perview) (2025-08-12)



## 4.0.0 (2025-04-09)

### Breaking Changes
Expand Down
1 change: 0 additions & 1 deletion sdk/iothub/azure-mgmt-iothub/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
include _meta.json
recursive-include tests *.py *.json
recursive-include samples *.py *.md
include *.md
Expand Down
4 changes: 2 additions & 2 deletions sdk/iothub/azure-mgmt-iothub/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Microsoft Azure SDK for Python

This is the Microsoft Azure IoT Hub Management Client Library.
This package has been tested with Python 3.8+.
This package has been tested with Python 3.9+.
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).

## _Disclaimer_
Expand All @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For

### Prerequisites

- Python 3.8+ is required to use this package.
- Python 3.9+ is required to use this package.
- [Azure subscription](https://azure.microsoft.com/free/)

### Install the package
Expand Down
11 changes: 0 additions & 11 deletions sdk/iothub/azure-mgmt-iothub/_meta.json

This file was deleted.

11 changes: 11 additions & 0 deletions sdk/iothub/azure-mgmt-iothub/_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commit": "0307bdd430fe36619222da73db13030f3bc9ce38",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.10.2",
"use": [
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"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/[email protected] --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
"readme": "specification/iothub/resource-manager/readme.md"
}
26 changes: 19 additions & 7 deletions sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,28 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
# pylint: disable=wrong-import-position

from ._iot_hub_client import IotHubClient
__all__ = ['IotHubClient']
from typing import TYPE_CHECKING

try:
from ._patch import patch_sdk # type: ignore
patch_sdk()
except ImportError:
pass
if TYPE_CHECKING:
from ._patch import * # pylint: disable=unused-wildcard-import

from ._iot_hub_client import IotHubClient # type: ignore
from ._version import VERSION

__version__ = VERSION

try:
from ._patch import __all__ as _patch_all
from ._patch import *
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"IotHubClient",
]
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore

_patch_sdk()
56 changes: 27 additions & 29 deletions sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_configuration.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# 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.
#
# 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.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from typing import Any, TYPE_CHECKING

from azure.core.pipeline import policies
Expand All @@ -16,10 +14,10 @@
from ._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential

class IotHubClientConfiguration:

class IotHubClientConfiguration: # pylint: disable=too-many-instance-attributes
"""Configuration for IotHubClient.
Note that all parameters used to create this instance are saved as instance
Expand All @@ -29,38 +27,38 @@ class IotHubClientConfiguration:
: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
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(
self,
credential: "TokenCredential",
subscription_id: str,
**kwargs: Any
):
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
api_version: str = kwargs.pop("api_version", "2023-06-30-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")

self.credential = credential
self.subscription_id = subscription_id
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'azure-mgmt-iothub/{}'.format(VERSION))
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))
self.polling_interval = kwargs.get("polling_interval", 30)
self._configure(**kwargs)

def _configure(
self,
**kwargs: Any
):
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
def _configure(self, **kwargs: Any) -> None:
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
self.authentication_policy = kwargs.get("authentication_policy")
if self.credential and not self.authentication_policy:
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = ARMChallengeAuthenticationPolicy(
self.credential, *self.credential_scopes, **kwargs
)
Loading
Loading