Skip to content

Commit 46206f1

Browse files
Azure CLI BotSDKAutoRAY-316
authored
[AutoRelease] t2-iothub-2021-05-14-97452 (#18753)
* CodeGen from PR 14349 in Azure/azure-rest-api-specs iothub readme config (#14349) * version,CHANGELOG * test * test config Co-authored-by: SDKAuto <[email protected]> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: Zed Lei <[email protected]> Co-authored-by: Zed <[email protected]>
1 parent c6aa5d8 commit 46206f1

File tree

203 files changed

+43310
-3174
lines changed

Some content is hidden

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

203 files changed

+43310
-3174
lines changed

sdk/iothub/azure-mgmt-iothub/CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
# Release History
22

3+
## 2.0.0 (2021-05-14)
4+
5+
**Features**
6+
7+
- Model EndpointHealthData has a new parameter last_send_attempt_time
8+
- Model EndpointHealthData has a new parameter last_known_error_time
9+
- Model EndpointHealthData has a new parameter last_known_error
10+
- Model EndpointHealthData has a new parameter last_successful_send_attempt_time
11+
- Model ImportDevicesRequest has a new parameter identity
12+
- Model ImportDevicesRequest has a new parameter configurations_blob_name
13+
- Model ImportDevicesRequest has a new parameter include_configurations
14+
- Model RoutingServiceBusTopicEndpointProperties has a new parameter identity
15+
- Model RoutingStorageContainerProperties has a new parameter identity
16+
- Model StorageEndpointProperties has a new parameter identity
17+
- Model IotHubDescription has a new parameter identity
18+
- Model IotHubProperties has a new parameter network_rule_sets
19+
- Model ExportDevicesRequest has a new parameter identity
20+
- Model ExportDevicesRequest has a new parameter configurations_blob_name
21+
- Model ExportDevicesRequest has a new parameter include_configurations
22+
- Model RoutingServiceBusQueueEndpointProperties has a new parameter identity
23+
- Model RoutingEventHubProperties has a new parameter identity
24+
25+
**Breaking changes**
26+
27+
- Operation IotHubResourceOperations.create_event_hub_consumer_group has a new signature
28+
329
## 1.0.0 (2020-12-18)
430

531
- GA release

sdk/iothub/azure-mgmt-iothub/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include _meta.json
12
recursive-include tests *.py *.yaml
23
include *.md
34
include azure/__init__.py
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"autorest": "3.3.0",
3+
"use": "@autorest/[email protected]",
4+
"commit": "495e6fd12856cf3d909125b1119c83a3a9f18a8a",
5+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
6+
"autorest_command": "autorest specification/iothub/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected] --version=3.3.0",
7+
"readme": "specification/iothub/resource-manager/readme.md"
8+
}

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,19 @@
88
# Changes may cause incorrect behavior and will be lost if the code is
99
# regenerated.
1010
# --------------------------------------------------------------------------
11-
from typing import Any
11+
from typing import TYPE_CHECKING
1212

1313
from azure.core.configuration import Configuration
1414
from azure.core.pipeline import policies
1515
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
1616

1717
from ._version import VERSION
1818

19+
if TYPE_CHECKING:
20+
# pylint: disable=unused-import,ungrouped-imports
21+
from typing import Any
22+
23+
from azure.core.credentials import TokenCredential
1924

2025
class IotHubClientConfiguration(Configuration):
2126
"""Configuration for IotHubClient.

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

Lines changed: 88 additions & 9 deletions
Large diffs are not rendered by default.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "1.0.0"
9+
VERSION = "2.0.0"

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@
88
# Changes may cause incorrect behavior and will be lost if the code is
99
# regenerated.
1010
# --------------------------------------------------------------------------
11-
from typing import Any
11+
from typing import Any, TYPE_CHECKING
1212

1313
from azure.core.configuration import Configuration
1414
from azure.core.pipeline import policies
1515
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
1616

1717
from .._version import VERSION
1818

19+
if TYPE_CHECKING:
20+
# pylint: disable=unused-import,ungrouped-imports
21+
from azure.core.credentials_async import AsyncTokenCredential
1922

2023
class IotHubClientConfiguration(Configuration):
2124
"""Configuration for IotHubClient.
@@ -31,8 +34,8 @@ class IotHubClientConfiguration(Configuration):
3134

3235
def __init__(
3336
self,
34-
credential, # type: "AsyncTokenCredential"
35-
subscription_id, # type: str
37+
credential: "AsyncTokenCredential",
38+
subscription_id: str,
3639
**kwargs # type: Any
3740
) -> None:
3841
if credential is None:

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

Lines changed: 88 additions & 11 deletions
Large diffs are not rendered by default.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
# Licensed under the MIT License. See License.txt in the project root for
55
# license information.
66
# --------------------------------------------------------------------------
7-
from .v2020_03_01.models import *
7+
from .v2021_03_31.models import *

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

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from typing import Any, Optional
1717

1818
from azure.core.credentials import TokenCredential
19+
from azure.core.pipeline.transport import HttpRequest, HttpResponse
1920

2021
from ._configuration import IotHubClientConfiguration
2122
from .operations import IotHubResourceOperations
@@ -26,7 +27,7 @@ class IotHubClient(object):
2627
"""Use this API to manage the IoT hubs in your Azure subscription.
2728
2829
:ivar iot_hub_resource: IotHubResourceOperations operations
29-
:vartype iot_hub_resource: azure.mgmt.iothub.operations.IotHubResourceOperations
30+
:vartype iot_hub_resource: azure.mgmt.iothub.v2016_02_03.operations.IotHubResourceOperations
3031
:param credential: Credential needed for the client to connect to Azure.
3132
:type credential: ~azure.core.credentials.TokenCredential
3233
:param subscription_id: The subscription identifier.
@@ -56,6 +57,24 @@ def __init__(
5657
self.iot_hub_resource = IotHubResourceOperations(
5758
self._client, self._config, self._serialize, self._deserialize)
5859

60+
def _send_request(self, http_request, **kwargs):
61+
# type: (HttpRequest, Any) -> HttpResponse
62+
"""Runs the network request through the client's chained policies.
63+
64+
:param http_request: The network request you want to make. Required.
65+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
66+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
67+
:return: The response of your network call. Does not do error handling on your response.
68+
:rtype: ~azure.core.pipeline.transport.HttpResponse
69+
"""
70+
path_format_arguments = {
71+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
72+
}
73+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
74+
stream = kwargs.pop("stream", True)
75+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
76+
return pipeline_response.http_response
77+
5978
def close(self):
6079
# type: () -> None
6180
self._client.close()

0 commit comments

Comments
 (0)