Skip to content

Commit d8135a7

Browse files
authored
Generated from 85ab219e8f4f326e7f6b6a5eb2068c4b7ccb5408 (#3200)
IoTHub conf py
1 parent 66b4ec2 commit d8135a7

Some content is hidden

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

48 files changed

+1498
-108
lines changed

azure-mgmt-iothub/azure/mgmt/iothub/iot_hub_client.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
from msrest.service_client import ServiceClient
12+
from msrest.service_client import SDKClient
1313
from msrest import Serializer, Deserializer
1414
from msrestazure import AzureConfiguration
1515
from .version import VERSION
1616
from .operations.operations import Operations
1717
from .operations.iot_hub_resource_operations import IotHubResourceOperations
18+
from .operations.resource_provider_common_operations import ResourceProviderCommonOperations
1819
from .operations.certificates_operations import CertificatesOperations
1920
from . import models
2021

@@ -51,7 +52,7 @@ def __init__(
5152
self.subscription_id = subscription_id
5253

5354

54-
class IotHubClient(object):
55+
class IotHubClient(SDKClient):
5556
"""Use this API to manage the IoT hubs in your Azure subscription.
5657
5758
:ivar config: Configuration for client.
@@ -61,6 +62,8 @@ class IotHubClient(object):
6162
:vartype operations: azure.mgmt.iothub.operations.Operations
6263
:ivar iot_hub_resource: IotHubResource operations
6364
:vartype iot_hub_resource: azure.mgmt.iothub.operations.IotHubResourceOperations
65+
:ivar resource_provider_common: ResourceProviderCommon operations
66+
:vartype resource_provider_common: azure.mgmt.iothub.operations.ResourceProviderCommonOperations
6467
:ivar certificates: Certificates operations
6568
:vartype certificates: azure.mgmt.iothub.operations.CertificatesOperations
6669
@@ -76,7 +79,7 @@ def __init__(
7679
self, credentials, subscription_id, base_url=None):
7780

7881
self.config = IotHubClientConfiguration(credentials, subscription_id, base_url)
79-
self._client = ServiceClient(self.config.credentials, self.config)
82+
super(IotHubClient, self).__init__(self.config.credentials, self.config)
8083

8184
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
8285
self.api_version = '2018-04-01'
@@ -87,5 +90,7 @@ def __init__(
8790
self._client, self.config, self._serialize, self._deserialize)
8891
self.iot_hub_resource = IotHubResourceOperations(
8992
self._client, self.config, self._serialize, self._deserialize)
93+
self.resource_provider_common = ResourceProviderCommonOperations(
94+
self._client, self.config, self._serialize, self._deserialize)
9095
self.certificates = CertificatesOperations(
9196
self._client, self.config, self._serialize, self._deserialize)

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

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
try:
1313
from .certificate_verification_description_py3 import CertificateVerificationDescription
14-
from .certificate_body_description_py3 import CertificateBodyDescription
1514
from .certificate_properties_py3 import CertificateProperties
1615
from .certificate_description_py3 import CertificateDescription
1716
from .certificate_list_description_py3 import CertificateListDescription
17+
from .certificate_body_description_py3 import CertificateBodyDescription
1818
from .certificate_properties_with_nonce_py3 import CertificatePropertiesWithNonce
1919
from .certificate_with_nonce_description_py3 import CertificateWithNonceDescription
2020
from .shared_access_signature_authorization_rule_py3 import SharedAccessSignatureAuthorizationRule
@@ -41,6 +41,7 @@
4141
from .operation_py3 import Operation
4242
from .error_details_py3 import ErrorDetails, ErrorDetailsException
4343
from .iot_hub_quota_metric_info_py3 import IotHubQuotaMetricInfo
44+
from .endpoint_health_data_py3 import EndpointHealthData
4445
from .registry_statistics_py3 import RegistryStatistics
4546
from .job_response_py3 import JobResponse
4647
from .iot_hub_capacity_py3 import IotHubCapacity
@@ -49,14 +50,27 @@
4950
from .event_hub_consumer_group_info_py3 import EventHubConsumerGroupInfo
5051
from .operation_inputs_py3 import OperationInputs
5152
from .iot_hub_name_availability_info_py3 import IotHubNameAvailabilityInfo
53+
from .name_py3 import Name
54+
from .user_subscription_quota_py3 import UserSubscriptionQuota
55+
from .user_subscription_quota_list_result_py3 import UserSubscriptionQuotaListResult
56+
from .routing_message_py3 import RoutingMessage
57+
from .test_all_routes_input_py3 import TestAllRoutesInput
58+
from .matched_route_py3 import MatchedRoute
59+
from .test_all_routes_result_py3 import TestAllRoutesResult
60+
from .test_route_input_py3 import TestRouteInput
61+
from .route_error_position_py3 import RouteErrorPosition
62+
from .route_error_range_py3 import RouteErrorRange
63+
from .route_compilation_error_py3 import RouteCompilationError
64+
from .test_route_result_details_py3 import TestRouteResultDetails
65+
from .test_route_result_py3 import TestRouteResult
5266
from .export_devices_request_py3 import ExportDevicesRequest
5367
from .import_devices_request_py3 import ImportDevicesRequest
5468
except (SyntaxError, ImportError):
5569
from .certificate_verification_description import CertificateVerificationDescription
56-
from .certificate_body_description import CertificateBodyDescription
5770
from .certificate_properties import CertificateProperties
5871
from .certificate_description import CertificateDescription
5972
from .certificate_list_description import CertificateListDescription
73+
from .certificate_body_description import CertificateBodyDescription
6074
from .certificate_properties_with_nonce import CertificatePropertiesWithNonce
6175
from .certificate_with_nonce_description import CertificateWithNonceDescription
6276
from .shared_access_signature_authorization_rule import SharedAccessSignatureAuthorizationRule
@@ -83,6 +97,7 @@
8397
from .operation import Operation
8498
from .error_details import ErrorDetails, ErrorDetailsException
8599
from .iot_hub_quota_metric_info import IotHubQuotaMetricInfo
100+
from .endpoint_health_data import EndpointHealthData
86101
from .registry_statistics import RegistryStatistics
87102
from .job_response import JobResponse
88103
from .iot_hub_capacity import IotHubCapacity
@@ -91,6 +106,19 @@
91106
from .event_hub_consumer_group_info import EventHubConsumerGroupInfo
92107
from .operation_inputs import OperationInputs
93108
from .iot_hub_name_availability_info import IotHubNameAvailabilityInfo
109+
from .name import Name
110+
from .user_subscription_quota import UserSubscriptionQuota
111+
from .user_subscription_quota_list_result import UserSubscriptionQuotaListResult
112+
from .routing_message import RoutingMessage
113+
from .test_all_routes_input import TestAllRoutesInput
114+
from .matched_route import MatchedRoute
115+
from .test_all_routes_result import TestAllRoutesResult
116+
from .test_route_input import TestRouteInput
117+
from .route_error_position import RouteErrorPosition
118+
from .route_error_range import RouteErrorRange
119+
from .route_compilation_error import RouteCompilationError
120+
from .test_route_result_details import TestRouteResultDetails
121+
from .test_route_result import TestRouteResult
94122
from .export_devices_request import ExportDevicesRequest
95123
from .import_devices_request import ImportDevicesRequest
96124
from .operation_paged import OperationPaged
@@ -99,6 +127,7 @@
99127
from .event_hub_consumer_group_info_paged import EventHubConsumerGroupInfoPaged
100128
from .job_response_paged import JobResponsePaged
101129
from .iot_hub_quota_metric_info_paged import IotHubQuotaMetricInfoPaged
130+
from .endpoint_health_data_paged import EndpointHealthDataPaged
102131
from .shared_access_signature_authorization_rule_paged import SharedAccessSignatureAuthorizationRulePaged
103132
from .iot_hub_client_enums import (
104133
AccessRights,
@@ -108,18 +137,21 @@
108137
Capabilities,
109138
IotHubSku,
110139
IotHubSkuTier,
140+
EndpointHealthStatus,
111141
JobType,
112142
JobStatus,
113143
IotHubScaleType,
114144
IotHubNameUnavailabilityReason,
145+
TestResultStatus,
146+
RouteErrorSeverity,
115147
)
116148

117149
__all__ = [
118150
'CertificateVerificationDescription',
119-
'CertificateBodyDescription',
120151
'CertificateProperties',
121152
'CertificateDescription',
122153
'CertificateListDescription',
154+
'CertificateBodyDescription',
123155
'CertificatePropertiesWithNonce',
124156
'CertificateWithNonceDescription',
125157
'SharedAccessSignatureAuthorizationRule',
@@ -146,6 +178,7 @@
146178
'Operation',
147179
'ErrorDetails', 'ErrorDetailsException',
148180
'IotHubQuotaMetricInfo',
181+
'EndpointHealthData',
149182
'RegistryStatistics',
150183
'JobResponse',
151184
'IotHubCapacity',
@@ -154,6 +187,19 @@
154187
'EventHubConsumerGroupInfo',
155188
'OperationInputs',
156189
'IotHubNameAvailabilityInfo',
190+
'Name',
191+
'UserSubscriptionQuota',
192+
'UserSubscriptionQuotaListResult',
193+
'RoutingMessage',
194+
'TestAllRoutesInput',
195+
'MatchedRoute',
196+
'TestAllRoutesResult',
197+
'TestRouteInput',
198+
'RouteErrorPosition',
199+
'RouteErrorRange',
200+
'RouteCompilationError',
201+
'TestRouteResultDetails',
202+
'TestRouteResult',
157203
'ExportDevicesRequest',
158204
'ImportDevicesRequest',
159205
'OperationPaged',
@@ -162,6 +208,7 @@
162208
'EventHubConsumerGroupInfoPaged',
163209
'JobResponsePaged',
164210
'IotHubQuotaMetricInfoPaged',
211+
'EndpointHealthDataPaged',
165212
'SharedAccessSignatureAuthorizationRulePaged',
166213
'AccessRights',
167214
'IpFilterActionType',
@@ -170,8 +217,11 @@
170217
'Capabilities',
171218
'IotHubSku',
172219
'IotHubSkuTier',
220+
'EndpointHealthStatus',
173221
'JobType',
174222
'JobStatus',
175223
'IotHubScaleType',
176224
'IotHubNameUnavailabilityReason',
225+
'TestResultStatus',
226+
'RouteErrorSeverity',
177227
]

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ class CertificateProperties(Model):
3030
:vartype created: datetime
3131
:ivar updated: The certificate's last update date and time.
3232
:vartype updated: datetime
33+
:param certificate: The certificate content
34+
:type certificate: str
3335
"""
3436

3537
_validation = {
@@ -48,6 +50,7 @@ class CertificateProperties(Model):
4850
'is_verified': {'key': 'isVerified', 'type': 'bool'},
4951
'created': {'key': 'created', 'type': 'rfc-1123'},
5052
'updated': {'key': 'updated', 'type': 'rfc-1123'},
53+
'certificate': {'key': 'certificate', 'type': 'str'},
5154
}
5255

5356
def __init__(self, **kwargs):
@@ -58,3 +61,4 @@ def __init__(self, **kwargs):
5861
self.is_verified = None
5962
self.created = None
6063
self.updated = None
64+
self.certificate = kwargs.get('certificate', None)

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ class CertificateProperties(Model):
3030
:vartype created: datetime
3131
:ivar updated: The certificate's last update date and time.
3232
:vartype updated: datetime
33+
:param certificate: The certificate content
34+
:type certificate: str
3335
"""
3436

3537
_validation = {
@@ -48,13 +50,15 @@ class CertificateProperties(Model):
4850
'is_verified': {'key': 'isVerified', 'type': 'bool'},
4951
'created': {'key': 'created', 'type': 'rfc-1123'},
5052
'updated': {'key': 'updated', 'type': 'rfc-1123'},
53+
'certificate': {'key': 'certificate', 'type': 'str'},
5154
}
5255

53-
def __init__(self, **kwargs) -> None:
56+
def __init__(self, *, certificate: str=None, **kwargs) -> None:
5457
super(CertificateProperties, self).__init__(**kwargs)
5558
self.subject = None
5659
self.expiry = None
5760
self.thumbprint = None
5861
self.is_verified = None
5962
self.created = None
6063
self.updated = None
64+
self.certificate = certificate

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ class CertificatePropertiesWithNonce(Model):
3434
:ivar verification_code: The certificate's verification code that will be
3535
used for proof of possession.
3636
:vartype verification_code: str
37+
:ivar certificate: The certificate content
38+
:vartype certificate: str
3739
"""
3840

3941
_validation = {
@@ -44,6 +46,7 @@ class CertificatePropertiesWithNonce(Model):
4446
'created': {'readonly': True},
4547
'updated': {'readonly': True},
4648
'verification_code': {'readonly': True},
49+
'certificate': {'readonly': True},
4750
}
4851

4952
_attribute_map = {
@@ -54,6 +57,7 @@ class CertificatePropertiesWithNonce(Model):
5457
'created': {'key': 'created', 'type': 'rfc-1123'},
5558
'updated': {'key': 'updated', 'type': 'rfc-1123'},
5659
'verification_code': {'key': 'verificationCode', 'type': 'str'},
60+
'certificate': {'key': 'certificate', 'type': 'str'},
5761
}
5862

5963
def __init__(self, **kwargs):
@@ -65,3 +69,4 @@ def __init__(self, **kwargs):
6569
self.created = None
6670
self.updated = None
6771
self.verification_code = None
72+
self.certificate = None

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ class CertificatePropertiesWithNonce(Model):
3434
:ivar verification_code: The certificate's verification code that will be
3535
used for proof of possession.
3636
:vartype verification_code: str
37+
:ivar certificate: The certificate content
38+
:vartype certificate: str
3739
"""
3840

3941
_validation = {
@@ -44,6 +46,7 @@ class CertificatePropertiesWithNonce(Model):
4446
'created': {'readonly': True},
4547
'updated': {'readonly': True},
4648
'verification_code': {'readonly': True},
49+
'certificate': {'readonly': True},
4750
}
4851

4952
_attribute_map = {
@@ -54,6 +57,7 @@ class CertificatePropertiesWithNonce(Model):
5457
'created': {'key': 'created', 'type': 'rfc-1123'},
5558
'updated': {'key': 'updated', 'type': 'rfc-1123'},
5659
'verification_code': {'key': 'verificationCode', 'type': 'str'},
60+
'certificate': {'key': 'certificate', 'type': 'str'},
5761
}
5862

5963
def __init__(self, **kwargs) -> None:
@@ -65,3 +69,4 @@ def __init__(self, **kwargs) -> None:
6569
self.created = None
6670
self.updated = None
6771
self.verification_code = None
72+
self.certificate = None
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
14+
15+
class EndpointHealthData(Model):
16+
"""The health data for an endpoint.
17+
18+
:param endpoint_id: Id of the endpoint
19+
:type endpoint_id: str
20+
:param health_status: Health status. Possible values include: 'unknown',
21+
'healthy', 'unhealthy', 'dead'
22+
:type health_status: str or ~azure.mgmt.iothub.models.EndpointHealthStatus
23+
"""
24+
25+
_attribute_map = {
26+
'endpoint_id': {'key': 'endpointId', 'type': 'str'},
27+
'health_status': {'key': 'healthStatus', 'type': 'str'},
28+
}
29+
30+
def __init__(self, **kwargs):
31+
super(EndpointHealthData, self).__init__(**kwargs)
32+
self.endpoint_id = kwargs.get('endpoint_id', None)
33+
self.health_status = kwargs.get('health_status', None)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.paging import Paged
13+
14+
15+
class EndpointHealthDataPaged(Paged):
16+
"""
17+
A paging container for iterating over a list of :class:`EndpointHealthData <azure.mgmt.iothub.models.EndpointHealthData>` object
18+
"""
19+
20+
_attribute_map = {
21+
'next_link': {'key': 'nextLink', 'type': 'str'},
22+
'current_page': {'key': 'value', 'type': '[EndpointHealthData]'}
23+
}
24+
25+
def __init__(self, *args, **kwargs):
26+
27+
super(EndpointHealthDataPaged, self).__init__(*args, **kwargs)

0 commit comments

Comments
 (0)