azure.mgmt.iothub.models module

class azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule(key_name, rights, primary_key=None, secondary_key=None)[source]

Bases: msrest.serialization.Model

The properties of an IoT hub shared access policy.

Parameters:
  • key_name (str) – The name of the shared access policy.
  • primary_key (str) – The primary key.
  • secondary_key (str) – The secondary key.
  • rights (str or AccessRights) – The permissions assigned to the shared access policy. Possible values include: ‘RegistryRead’, ‘RegistryWrite’, ‘ServiceConnect’, ‘DeviceConnect’, ‘RegistryRead, RegistryWrite’, ‘RegistryRead, ServiceConnect’, ‘RegistryRead, DeviceConnect’, ‘RegistryWrite, ServiceConnect’, ‘RegistryWrite, DeviceConnect’, ‘ServiceConnect, DeviceConnect’, ‘RegistryRead, RegistryWrite, ServiceConnect’, ‘RegistryRead, RegistryWrite, DeviceConnect’, ‘RegistryRead, ServiceConnect, DeviceConnect’, ‘RegistryWrite, ServiceConnect, DeviceConnect’, ‘RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect’
class azure.mgmt.iothub.models.IpFilterRule(filter_name, action, ip_mask)[source]

Bases: msrest.serialization.Model

The IP filter rules for the IoT hub.

Parameters:
  • filter_name (str) – The name of the IP filter rule.
  • action (str or IpFilterActionType) – The desired action for requests captured by this rule. Possible values include: ‘Accept’, ‘Reject’
  • ip_mask (str) – A string that contains the IP address range in CIDR notation for the rule.
class azure.mgmt.iothub.models.EventHubProperties(retention_time_in_days=None, partition_count=None)[source]

Bases: msrest.serialization.Model

The properties of the provisioned Event Hub-compatible endpoint used by the IoT hub.

Variables are only populated by the server, and will be ignored when sending a request.

Parameters:
Variables:
  • partition_ids (list of str) – The partition ids in the Event Hub-compatible endpoint.
  • path (str) – The Event Hub-compatible name.
  • endpoint (str) – The Event Hub-compatible endpoint.
class azure.mgmt.iothub.models.RoutingServiceBusQueueEndpointProperties(connection_string, name, subscription_id=None, resource_group=None)[source]

Bases: msrest.serialization.Model

The properties related to service bus queue endpoint types.

Parameters:
  • connection_string (str) – The connection string of the service bus queue endpoint.
  • name (str) – The name of the service bus queue endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved; events, operationsMonitoringEvents, fileNotifications, $default. Endpoint names must be unique across endpoint types. The name need not be the same as the actual queue name.
  • subscription_id (str) – The subscription identifier of the service bus queue endpoint.
  • resource_group (str) – The name of the resource group of the service bus queue endpoint.
class azure.mgmt.iothub.models.RoutingServiceBusTopicEndpointProperties(connection_string, name, subscription_id=None, resource_group=None)[source]

Bases: msrest.serialization.Model

The properties related to service bus topic endpoint types.

Parameters:
  • connection_string (str) – The connection string of the service bus topic endpoint.
  • name (str) – The name of the service bus topic endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved; events, operationsMonitoringEvents, fileNotifications, $default. Endpoint names must be unique across endpoint types. The name need not be the same as the actual topic name.
  • subscription_id (str) – The subscription identifier of the service bus topic endpoint.
  • resource_group (str) – The name of the resource group of the service bus topic endpoint.
class azure.mgmt.iothub.models.RoutingEventHubProperties(connection_string, name, subscription_id=None, resource_group=None)[source]

Bases: msrest.serialization.Model

The properties related to an event hub endpoint.

Parameters:
  • connection_string (str) – The connection string of the event hub endpoint.
  • name (str) – The name of the event hub endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved; events, operationsMonitoringEvents, fileNotifications, $default. Endpoint names must be unique across endpoint types.
  • subscription_id (str) – The subscription identifier of the event hub endpoint.
  • resource_group (str) – The name of the resource group of the event hub endpoint.
class azure.mgmt.iothub.models.RoutingEndpoints(service_bus_queues=None, service_bus_topics=None, event_hubs=None)[source]

Bases: msrest.serialization.Model

The properties related to the custom endpoints to which your IoT hub routes messages based on the routing rules. A maximum of 10 custom endpoints are allowed across all endpoint types for paid hubs and only 1 custom endpoint is allowed across all endpoint types for free hubs.

Parameters:
  • service_bus_queues (list of RoutingServiceBusQueueEndpointProperties) – The list of Service Bus queue endpoints that IoT hub routes the messages to, based on the routing rules.
  • service_bus_topics (list of RoutingServiceBusTopicEndpointProperties) – The list of Service Bus topic endpoints that the IoT hub routes the messages to, based on the routing rules.
  • event_hubs (list of RoutingEventHubProperties) – The list of Event Hubs endpoints that IoT hub routes messages to, based on the routing rules. This list does not include the built-in Event Hubs endpoint.
class azure.mgmt.iothub.models.RouteProperties(name, source, endpoint_names, is_enabled, condition=None)[source]

Bases: msrest.serialization.Model

The properties of a routing rule that your IoT hub uses to route messages to endpoints.

Parameters:
  • name (str) – The name of the route. The name can only include alphanumeric characters, periods, underscores, hyphens, has a maximum length of 64 characters, and must be unique.
  • source (str or RoutingSource) – The source that the routing rule is to be applied to, such as DeviceMessages. Possible values include: ‘DeviceMessages’, ‘TwinChangeEvents’, ‘DeviceLifecycleEvents’, ‘DeviceJobLifecycleEvents’
  • condition (str) – The condition that is evaluated to apply the routing rule. If no condition is provided, it evaluates to true by default. For grammar, See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language
  • endpoint_names (list of str) – The list of endpoints to which messages that satisfy the condition are routed. Currently only one endpoint is allowed.
  • is_enabled (bool) – Used to specify whether a route is enabled.
class azure.mgmt.iothub.models.FallbackRouteProperties(endpoint_names, is_enabled, condition=None)[source]

Bases: msrest.serialization.Model

The properties related to the fallback route based on which the IoT hub routes messages to the fallback endpoint.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:

source (str) – The source to which the routing rule is to be applied to. e.g. DeviceMessages. Default value: “DeviceMessages” .

Parameters:
  • condition (str) – The condition which is evaluated in order to apply the fallback route. If the condition is not provided it will evaluate to true by default. For grammar, See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language
  • endpoint_names (list of str) – The list of endpoints to which the messages that satisfy the condition are routed to. Currently only 1 endpoint is allowed.
  • is_enabled (bool) – Used to specify whether the fallback route is enabled or not.
source = 'DeviceMessages'
class azure.mgmt.iothub.models.RoutingProperties(endpoints=None, routes=None, fallback_route=None)[source]

Bases: msrest.serialization.Model

The routing related properties of the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging.

Parameters:
  • endpoints (RoutingEndpoints) –
  • routes (list of RouteProperties) – The list of user-provided routing rules that the IoT hub uses to route messages to built-in and custom endpoints. A maximum of 100 routing rules are allowed for paid hubs and a maximum of 5 routing rules are allowed for free hubs.
  • fallback_route (FallbackRouteProperties) – The properties of the route that is used as a fall-back route when none of the conditions specified in the ‘routes’ section are met. This is an optional parameter. When this property is not set, the messages which do not meet any of the conditions specified in the ‘routes’ section get routed to the built-in eventhub endpoint.
class azure.mgmt.iothub.models.StorageEndpointProperties(connection_string, container_name, sas_ttl_as_iso8601=None)[source]

Bases: msrest.serialization.Model

The properties of the Azure Storage endpoint for file upload.

Parameters:
class azure.mgmt.iothub.models.MessagingEndpointProperties(lock_duration_as_iso8601=None, ttl_as_iso8601=None, max_delivery_count=None)[source]

Bases: msrest.serialization.Model

The properties of the messaging endpoints used by this IoT hub.

Parameters:
class azure.mgmt.iothub.models.FeedbackProperties(lock_duration_as_iso8601=None, ttl_as_iso8601=None, max_delivery_count=None)[source]

Bases: msrest.serialization.Model

The properties of the feedback queue for cloud-to-device messages.

Parameters:
class azure.mgmt.iothub.models.CloudToDeviceProperties(max_delivery_count=None, default_ttl_as_iso8601=None, feedback=None)[source]

Bases: msrest.serialization.Model

The IoT hub cloud-to-device messaging properties.

Parameters:
class azure.mgmt.iothub.models.OperationsMonitoringProperties(events=None)[source]

Bases: msrest.serialization.Model

The operations monitoring properties for the IoT hub. The possible keys to the dictionary are Connections, DeviceTelemetry, C2DCommands, DeviceIdentityOperations, FileUploadOperations, Routes, D2CTwinOperations, C2DTwinOperations, TwinQueries, JobsOperations, DirectMethods.

Parameters:events (dict) –
class azure.mgmt.iothub.models.IotHubProperties(authorization_policies=None, ip_filter_rules=None, event_hub_endpoints=None, routing=None, storage_endpoints=None, messaging_endpoints=None, enable_file_upload_notifications=None, cloud_to_device=None, comments=None, operations_monitoring_properties=None, features=None)[source]

Bases: msrest.serialization.Model

The properties of an IoT hub.

Variables are only populated by the server, and will be ignored when sending a request.

Parameters:
  • authorization_policies (list of SharedAccessSignatureAuthorizationRule) – The shared access policies you can use to secure a connection to the IoT hub.
  • ip_filter_rules (list of IpFilterRule) – The IP filter rules.
  • event_hub_endpoints (dict) – The Event Hub-compatible endpoint properties. The possible keys to this dictionary are events and operationsMonitoringEvents. Both of these keys have to be present in the dictionary while making create or update calls for the IoT hub.
  • routing (RoutingProperties) –
  • storage_endpoints (dict) – The list of Azure Storage endpoints where you can upload files. Currently you can configure only one Azure Storage account and that MUST have its key as $default. Specifying more than one storage account causes an error to be thrown. Not specifying a value for this property when the enableFileUploadNotifications property is set to True, causes an error to be thrown.
  • messaging_endpoints (dict) – The messaging endpoint properties for the file upload notification queue.
  • enable_file_upload_notifications (bool) – If True, file upload notifications are enabled.
  • cloud_to_device (CloudToDeviceProperties) –
  • comments (str) – Comments.
  • operations_monitoring_properties (OperationsMonitoringProperties) –
  • features (str or Capabilities) – The capabilities and features enabled for the IoT hub. Possible values include: ‘None’, ‘DeviceManagement’
Variables:
  • provisioning_state (str) – The provisioning state.
  • host_name (str) – The name of the host.
class azure.mgmt.iothub.models.IotHubSkuInfo(name, capacity)[source]

Bases: msrest.serialization.Model

Information about the SKU of the IoT hub.

Variables are only populated by the server, and will be ignored when sending a request.

Parameters:
Variables:

tier (str or IotHubSkuTier) – The billing tier for the IoT hub. Possible values include: ‘Free’, ‘Standard’

class azure.mgmt.iothub.models.IotHubDescription(location, subscriptionid, resourcegroup, sku, tags=None, etag=None, properties=None)[source]

Bases: azure.mgmt.iothub.models.resource.Resource

The description of the IoT hub.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • id (str) – The resource identifier.
  • name (str) – The resource name.
  • type (str) – The resource type.
Parameters:
  • location (str) – The resource location.
  • tags (dict) – The resource tags.
  • subscriptionid (str) – The subscription identifier.
  • resourcegroup (str) – The name of the resource group that contains the IoT hub. A resource group name uniquely identifies the resource group within the subscription.
  • etag (str) – The Etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal ETag convention.
  • properties (IotHubProperties) –
  • sku (IotHubSkuInfo) –
class azure.mgmt.iothub.models.Resource(location, tags=None)[source]

Bases: msrest.serialization.Model

The common properties of an Azure resource.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • id (str) – The resource identifier.
  • name (str) – The resource name.
  • type (str) – The resource type.
Parameters:
  • location (str) – The resource location.
  • tags (dict) – The resource tags.
class azure.mgmt.iothub.models.ErrorDetails[source]

Bases: msrest.serialization.Model

Error details.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • code (str) – The error code.
  • http_status_code (str) – The HTTP status code.
  • message (str) – The error message.
  • details (str) – The error details.
exception azure.mgmt.iothub.models.ErrorDetailsException(deserialize, response, *args)[source]

Bases: msrest.exceptions.HttpOperationError

Server responsed with exception of type: ‘ErrorDetails’.

Parameters:
  • deserialize – A deserializer
  • response – Server response to be deserialized.
class azure.mgmt.iothub.models.IotHubQuotaMetricInfo[source]

Bases: msrest.serialization.Model

Quota metrics properties.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • name (str) – The name of the quota metric.
  • current_value (long) – The current value for the quota metric.
  • max_value (long) – The maximum value of the quota metric.
class azure.mgmt.iothub.models.RegistryStatistics[source]

Bases: msrest.serialization.Model

Identity registry statistics.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • total_device_count (long) – The total count of devices in the identity registry.
  • enabled_device_count (long) – The count of enabled devices in the identity registry.
  • disabled_device_count (long) – The count of disabled devices in the identity registry.
class azure.mgmt.iothub.models.JobResponse[source]

Bases: msrest.serialization.Model

The properties of the Job Response object.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • job_id (str) – The job identifier.
  • start_time_utc (datetime) – The start time of the job.
  • end_time_utc (datetime) – The time the job stopped processing.
  • type (str or JobType) – The type of the job. Possible values include: ‘unknown’, ‘export’, ‘import’, ‘backup’, ‘readDeviceProperties’, ‘writeDeviceProperties’, ‘updateDeviceConfiguration’, ‘rebootDevice’, ‘factoryResetDevice’, ‘firmwareUpdate’
  • status (str or JobStatus) – The status of the job. Possible values include: ‘unknown’, ‘enqueued’, ‘running’, ‘completed’, ‘failed’, ‘cancelled’
  • failure_reason (str) – If status == failed, this string containing the reason for the failure.
  • status_message (str) – The status message for the job.
  • parent_job_id (str) – The job identifier of the parent job, if any.
class azure.mgmt.iothub.models.IotHubCapacity[source]

Bases: msrest.serialization.Model

IoT Hub capacity information.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • minimum (long) – The minimum number of units.
  • maximum (long) – The maximum number of units.
  • default (long) – The default number of units.
  • scale_type (str or IotHubScaleType) – The type of the scaling enabled. Possible values include: ‘Automatic’, ‘Manual’, ‘None’
class azure.mgmt.iothub.models.IotHubSkuDescription(sku, capacity)[source]

Bases: msrest.serialization.Model

SKU properties.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:

resource_type (str) – The type of the resource.

Parameters:
class azure.mgmt.iothub.models.EventHubConsumerGroupInfo(tags=None, id=None, name=None)[source]

Bases: msrest.serialization.Model

The properties of the EventHubConsumerGroupInfo object.

Parameters:
  • tags (dict) – The tags.
  • id (str) – The Event Hub-compatible consumer group identifier.
  • name (str) – The Event Hub-compatible consumer group name.
class azure.mgmt.iothub.models.OperationInputs(name)[source]

Bases: msrest.serialization.Model

Input values.

Parameters:name (str) – The name of the IoT hub to check.
class azure.mgmt.iothub.models.IotHubNameAvailabilityInfo(message=None)[source]

Bases: msrest.serialization.Model

The properties indicating whether a given IoT hub name is available.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • name_available (bool) – The value which indicates whether the provided name is available.
  • reason (str or IotHubNameUnavailabilityReason) – The reason for unavailability. Possible values include: ‘Invalid’, ‘AlreadyExists’
Parameters:

message (str) – The detailed reason message.

class azure.mgmt.iothub.models.ExportDevicesRequest(export_blob_container_uri, exclude_keys)[source]

Bases: msrest.serialization.Model

Use to provide parameters when requesting an export of all devices in the IoT hub.

Parameters:
  • export_blob_container_uri (str) – The export blob container URI.
  • exclude_keys (bool) – The value indicating whether keys should be excluded during export.
class azure.mgmt.iothub.models.ImportDevicesRequest(input_blob_container_uri, output_blob_container_uri)[source]

Bases: msrest.serialization.Model

Use to provide parameters when requesting an import of all devices in the hub.

Parameters:
  • input_blob_container_uri (str) – The input blob container URI.
  • output_blob_container_uri (str) – The output blob container URI.
class azure.mgmt.iothub.models.IotHubDescriptionPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of IotHubDescription object

class azure.mgmt.iothub.models.IotHubSkuDescriptionPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of IotHubSkuDescription object

class azure.mgmt.iothub.models.StrPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of str object

class azure.mgmt.iothub.models.JobResponsePaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of JobResponse object

class azure.mgmt.iothub.models.IotHubQuotaMetricInfoPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of IotHubQuotaMetricInfo object

class azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRulePaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of SharedAccessSignatureAuthorizationRule object

class azure.mgmt.iothub.models.AccessRights[source]

Bases: enum.Enum

device_connect = 'DeviceConnect'
registry_read = 'RegistryRead'
registry_read_device_connect = 'RegistryRead, DeviceConnect'
registry_read_registry_write = 'RegistryRead, RegistryWrite'
registry_read_registry_write_device_connect = 'RegistryRead, RegistryWrite, DeviceConnect'
registry_read_registry_write_service_connect = 'RegistryRead, RegistryWrite, ServiceConnect'
registry_read_registry_write_service_connect_device_connect = 'RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect'
registry_read_service_connect = 'RegistryRead, ServiceConnect'
registry_read_service_connect_device_connect = 'RegistryRead, ServiceConnect, DeviceConnect'
registry_write = 'RegistryWrite'
registry_write_device_connect = 'RegistryWrite, DeviceConnect'
registry_write_service_connect = 'RegistryWrite, ServiceConnect'
registry_write_service_connect_device_connect = 'RegistryWrite, ServiceConnect, DeviceConnect'
service_connect = 'ServiceConnect'
service_connect_device_connect = 'ServiceConnect, DeviceConnect'
class azure.mgmt.iothub.models.IpFilterActionType[source]

Bases: enum.Enum

accept = 'Accept'
reject = 'Reject'
class azure.mgmt.iothub.models.RoutingSource[source]

Bases: enum.Enum

device_job_lifecycle_events = 'DeviceJobLifecycleEvents'
device_lifecycle_events = 'DeviceLifecycleEvents'
device_messages = 'DeviceMessages'
twin_change_events = 'TwinChangeEvents'
class azure.mgmt.iothub.models.OperationMonitoringLevel[source]

Bases: enum.Enum

error = 'Error'
error_information = 'Error, Information'
information = 'Information'
none = 'None'
class azure.mgmt.iothub.models.Capabilities[source]

Bases: enum.Enum

device_management = 'DeviceManagement'
none = 'None'
class azure.mgmt.iothub.models.IotHubSku[source]

Bases: enum.Enum

f1 = 'F1'
s1 = 'S1'
s2 = 'S2'
s3 = 'S3'
class azure.mgmt.iothub.models.IotHubSkuTier[source]

Bases: enum.Enum

free = 'Free'
standard = 'Standard'
class azure.mgmt.iothub.models.JobType[source]

Bases: enum.Enum

backup = 'backup'
export = 'export'
factory_reset_device = 'factoryResetDevice'
firmware_update = 'firmwareUpdate'
import_enum = 'import'
read_device_properties = 'readDeviceProperties'
reboot_device = 'rebootDevice'
unknown = 'unknown'
update_device_configuration = 'updateDeviceConfiguration'
write_device_properties = 'writeDeviceProperties'
class azure.mgmt.iothub.models.JobStatus[source]

Bases: enum.Enum

cancelled = 'cancelled'
completed = 'completed'
enqueued = 'enqueued'
failed = 'failed'
running = 'running'
unknown = 'unknown'
class azure.mgmt.iothub.models.IotHubScaleType[source]

Bases: enum.Enum

automatic = 'Automatic'
manual = 'Manual'
none = 'None'
class azure.mgmt.iothub.models.IotHubNameUnavailabilityReason[source]

Bases: enum.Enum

already_exists = 'AlreadyExists'
invalid = 'Invalid'