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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions azure-mgmt-iothub/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
Release History
===============

0.8.0 (2019-05-10)
++++++++++++++++++

**Features**

- Model RoutingProperties has a new parameter enrichments
- Added operation group IotHubOperations

**Breaking changes**

- Model IotHubProperties no longer has parameter operations_monitoring_properties

0.7.0 (2018-12-14)
++++++++++++++++++

Expand Down
2 changes: 2 additions & 0 deletions azure-mgmt-iothub/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
recursive-include tests *.py *.yaml
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

19 changes: 0 additions & 19 deletions azure-mgmt-iothub/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell

pip freeze

If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell

pip uninstall azure


Usage
=====

Expand Down
7 changes: 6 additions & 1 deletion azure-mgmt-iothub/azure/mgmt/iothub/iot_hub_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from .operations.iot_hub_resource_operations import IotHubResourceOperations
from .operations.resource_provider_common_operations import ResourceProviderCommonOperations
from .operations.certificates_operations import CertificatesOperations
from .operations.iot_hub_operations import IotHubOperations
from . import models


Expand Down Expand Up @@ -66,6 +67,8 @@ class IotHubClient(SDKClient):
:vartype resource_provider_common: azure.mgmt.iothub.operations.ResourceProviderCommonOperations
:ivar certificates: Certificates operations
:vartype certificates: azure.mgmt.iothub.operations.CertificatesOperations
:ivar iot_hub: IotHub operations
:vartype iot_hub: azure.mgmt.iothub.operations.IotHubOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand All @@ -82,7 +85,7 @@ def __init__(
super(IotHubClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2018-12-01-preview'
self.api_version = '2019-03-22-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand All @@ -94,3 +97,5 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.certificates = CertificatesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.iot_hub = IotHubOperations(
self._client, self.config, self._serialize, self._deserialize)
11 changes: 6 additions & 5 deletions azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
from .routing_endpoints_py3 import RoutingEndpoints
from .route_properties_py3 import RouteProperties
from .fallback_route_properties_py3 import FallbackRouteProperties
from .enrichment_properties_py3 import EnrichmentProperties
from .routing_properties_py3 import RoutingProperties
from .storage_endpoint_properties_py3 import StorageEndpointProperties
from .messaging_endpoint_properties_py3 import MessagingEndpointProperties
from .feedback_properties_py3 import FeedbackProperties
from .cloud_to_device_properties_py3 import CloudToDeviceProperties
from .operations_monitoring_properties_py3 import OperationsMonitoringProperties
from .iot_hub_properties_device_streams_py3 import IotHubPropertiesDeviceStreams
from .iot_hub_properties_py3 import IotHubProperties
from .iot_hub_sku_info_py3 import IotHubSkuInfo
Expand Down Expand Up @@ -68,6 +68,7 @@
from .test_route_result_py3 import TestRouteResult
from .export_devices_request_py3 import ExportDevicesRequest
from .import_devices_request_py3 import ImportDevicesRequest
from .failover_input_py3 import FailoverInput
except (SyntaxError, ImportError):
from .certificate_verification_description import CertificateVerificationDescription
from .certificate_properties import CertificateProperties
Expand All @@ -86,12 +87,12 @@
from .routing_endpoints import RoutingEndpoints
from .route_properties import RouteProperties
from .fallback_route_properties import FallbackRouteProperties
from .enrichment_properties import EnrichmentProperties
from .routing_properties import RoutingProperties
from .storage_endpoint_properties import StorageEndpointProperties
from .messaging_endpoint_properties import MessagingEndpointProperties
from .feedback_properties import FeedbackProperties
from .cloud_to_device_properties import CloudToDeviceProperties
from .operations_monitoring_properties import OperationsMonitoringProperties
from .iot_hub_properties_device_streams import IotHubPropertiesDeviceStreams
from .iot_hub_properties import IotHubProperties
from .iot_hub_sku_info import IotHubSkuInfo
Expand Down Expand Up @@ -127,6 +128,7 @@
from .test_route_result import TestRouteResult
from .export_devices_request import ExportDevicesRequest
from .import_devices_request import ImportDevicesRequest
from .failover_input import FailoverInput
from .operation_paged import OperationPaged
from .iot_hub_description_paged import IotHubDescriptionPaged
from .iot_hub_sku_description_paged import IotHubSkuDescriptionPaged
Expand All @@ -139,7 +141,6 @@
AccessRights,
IpFilterActionType,
RoutingSource,
OperationMonitoringLevel,
Capabilities,
IotHubSku,
IotHubSkuTier,
Expand Down Expand Up @@ -170,12 +171,12 @@
'RoutingEndpoints',
'RouteProperties',
'FallbackRouteProperties',
'EnrichmentProperties',
'RoutingProperties',
'StorageEndpointProperties',
'MessagingEndpointProperties',
'FeedbackProperties',
'CloudToDeviceProperties',
'OperationsMonitoringProperties',
'IotHubPropertiesDeviceStreams',
'IotHubProperties',
'IotHubSkuInfo',
Expand Down Expand Up @@ -211,6 +212,7 @@
'TestRouteResult',
'ExportDevicesRequest',
'ImportDevicesRequest',
'FailoverInput',
'OperationPaged',
'IotHubDescriptionPaged',
'IotHubSkuDescriptionPaged',
Expand All @@ -222,7 +224,6 @@
'AccessRights',
'IpFilterActionType',
'RoutingSource',
'OperationMonitoringLevel',
'Capabilities',
'IotHubSku',
'IotHubSkuTier',
Expand Down
14 changes: 12 additions & 2 deletions azure-mgmt-iothub/azure/mgmt/iothub/models/endpoint_health_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,18 @@ class EndpointHealthData(Model):

:param endpoint_id: Id of the endpoint
:type endpoint_id: str
:param health_status: Health status. Possible values include: 'unknown',
'healthy', 'unhealthy', 'dead'
:param health_status: Health statuses have following meanings. The
'healthy' status shows that the endpoint is accepting messages as
expected. The 'unhealthy' status shows that the endpoint is not accepting
messages as expected and IoT Hub is retrying to send data to this
endpoint. The status of an unhealthy endpoint will be updated to healthy
when IoT Hub has established an eventually consistent state of health. The
'dead' status shows that the endpoint is not accepting messages, after IoT
Hub retried sending messages for the retrial period. See IoT Hub metrics
to identify errors and monitor issues with endpoints. The 'unknown' status
shows that the IoT Hub has not established a connection with the endpoint.
No messages have been delivered to or rejected from this endpoint.
Possible values include: 'unknown', 'healthy', 'unhealthy', 'dead'
:type health_status: str or ~azure.mgmt.iothub.models.EndpointHealthStatus
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,18 @@ class EndpointHealthData(Model):

:param endpoint_id: Id of the endpoint
:type endpoint_id: str
:param health_status: Health status. Possible values include: 'unknown',
'healthy', 'unhealthy', 'dead'
:param health_status: Health statuses have following meanings. The
'healthy' status shows that the endpoint is accepting messages as
expected. The 'unhealthy' status shows that the endpoint is not accepting
messages as expected and IoT Hub is retrying to send data to this
endpoint. The status of an unhealthy endpoint will be updated to healthy
when IoT Hub has established an eventually consistent state of health. The
'dead' status shows that the endpoint is not accepting messages, after IoT
Hub retried sending messages for the retrial period. See IoT Hub metrics
to identify errors and monitor issues with endpoints. The 'unknown' status
shows that the IoT Hub has not established a connection with the endpoint.
No messages have been delivered to or rejected from this endpoint.
Possible values include: 'unknown', 'healthy', 'unhealthy', 'dead'
:type health_status: str or ~azure.mgmt.iothub.models.EndpointHealthStatus
"""

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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 msrest.serialization import Model


class EnrichmentProperties(Model):
"""The properties of an enrichment that your IoT hub applies to messages
delivered to endpoints.

All required parameters must be populated in order to send to Azure.

:param key: Required. The key or name for the enrichment property.
:type key: str
:param value: Required. The value for the enrichment property.
:type value: str
:param endpoint_names: Required. The list of endpoints for which the
enrichment is applied to the message.
:type endpoint_names: list[str]
"""

_validation = {
'key': {'required': True},
'value': {'required': True},
'endpoint_names': {'required': True, 'min_items': 1},
}

_attribute_map = {
'key': {'key': 'key', 'type': 'str'},
'value': {'key': 'value', 'type': 'str'},
'endpoint_names': {'key': 'endpointNames', 'type': '[str]'},
}

def __init__(self, **kwargs):
super(EnrichmentProperties, self).__init__(**kwargs)
self.key = kwargs.get('key', None)
self.value = kwargs.get('value', None)
self.endpoint_names = kwargs.get('endpoint_names', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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 msrest.serialization import Model


class EnrichmentProperties(Model):
"""The properties of an enrichment that your IoT hub applies to messages
delivered to endpoints.

All required parameters must be populated in order to send to Azure.

:param key: Required. The key or name for the enrichment property.
:type key: str
:param value: Required. The value for the enrichment property.
:type value: str
:param endpoint_names: Required. The list of endpoints for which the
enrichment is applied to the message.
:type endpoint_names: list[str]
"""

_validation = {
'key': {'required': True},
'value': {'required': True},
'endpoint_names': {'required': True, 'min_items': 1},
}

_attribute_map = {
'key': {'key': 'key', 'type': 'str'},
'value': {'key': 'value', 'type': 'str'},
'endpoint_names': {'key': 'endpointNames', 'type': '[str]'},
}

def __init__(self, *, key: str, value: str, endpoint_names, **kwargs) -> None:
super(EnrichmentProperties, self).__init__(**kwargs)
self.key = key
self.value = value
self.endpoint_names = endpoint_names
34 changes: 34 additions & 0 deletions azure-mgmt-iothub/azure/mgmt/iothub/models/failover_input.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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 msrest.serialization import Model


class FailoverInput(Model):
"""Use to provide failover region when requesting manual Failover for a hub.

All required parameters must be populated in order to send to Azure.

:param failover_region: Required. Region the hub will be failed over to
:type failover_region: str
"""

_validation = {
'failover_region': {'required': True},
}

_attribute_map = {
'failover_region': {'key': 'failoverRegion', 'type': 'str'},
}

def __init__(self, **kwargs):
super(FailoverInput, self).__init__(**kwargs)
self.failover_region = kwargs.get('failover_region', None)
34 changes: 34 additions & 0 deletions azure-mgmt-iothub/azure/mgmt/iothub/models/failover_input_py3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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 msrest.serialization import Model


class FailoverInput(Model):
"""Use to provide failover region when requesting manual Failover for a hub.

All required parameters must be populated in order to send to Azure.

:param failover_region: Required. Region the hub will be failed over to
:type failover_region: str
"""

_validation = {
'failover_region': {'required': True},
}

_attribute_map = {
'failover_region': {'key': 'failoverRegion', 'type': 'str'},
}

def __init__(self, *, failover_region: str, **kwargs) -> None:
super(FailoverInput, self).__init__(**kwargs)
self.failover_region = failover_region
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,6 @@ class RoutingSource(str, Enum):
device_job_lifecycle_events = "DeviceJobLifecycleEvents"


class OperationMonitoringLevel(str, Enum):

none = "None"
error = "Error"
information = "Information"
error_information = "Error, Information"


class Capabilities(str, Enum):

none = "None"
Expand Down
Loading