Iot Hub Resource

Check Name Availability

Check if an IoT hub name is available.

POST /subscriptions/{subscriptionId}/providers/Microsoft.Devices/checkNameAvailability?api-version=2016-02-03

Properties

api-version

The version of the API.

inquery
requiredTrue
typestring
operationInputs

Set the name parameter in the OperationInputs structure to the name of the IoT hub to check.

inbody
requiredTrue
typeOperationInputs
Name

The name of the IoT hub to check.

requiredTrue
typestring
subscriptionId

The subscription identifier.

inpath
requiredTrue
typestring

Returns (HTTP Response Codes)

200 response

This is a synchronous operation. The body contains a JSON-serialized response that specifies whether the IoT hub name is available. If the name is not available, the body contains the reason.

typeIotHubNameAvailabilityInfo
nameAvailable

The value which indicates whether the provided name is available.

read onlyTrue
typeboolean
reason

The reason for unavailability.

read onlyTrue
typeIotHubNameUnavailabilityReason { Invalid, AlreadyExists }
message

The detailed reason message.

typestring
default response

DefaultErrorResponse

typeErrorDetails
Code

The error code.

read onlyTrue
typestring
HttpStatusCode

The HTTP status code.

read onlyTrue
typestring
Message

The error message.

read onlyTrue
typestring
Details

The error details.

read onlyTrue
typestring

Create Event Hub Consumer Group

Add a consumer group to an Event Hub-compatible endpoint in an IoT hub.

PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}?api-version=2016-02-03

Properties

api-version

The version of the API.

inquery
requiredTrue
typestring
eventHubEndpointName

The name of the Event Hub-compatible endpoint in the IoT hub.

inpath
requiredTrue
typestring
name

The name of the consumer group to add.

inpath
requiredTrue
typestring
resourceGroupName

The name of the resource group that contains the IoT hub.

inpath
requiredTrue
typestring
resourceName

The name of the IoT hub.

inpath
requiredTrue
typestring
subscriptionId

The subscription identifier.

inpath
requiredTrue
typestring

Returns (HTTP Response Codes)

200 response

This is a synchronous operation.

typeEventHubConsumerGroupInfo
tags

The tags.

typeobject
id

The Event Hub-compatible consumer group identifier.

typestring
name

The Event Hub-compatible consumer group name.

typestring
default response

DefaultErrorResponse

typeErrorDetails
Code

The error code.

read onlyTrue
typestring
HttpStatusCode

The HTTP status code.

read onlyTrue
typestring
Message

The error message.

read onlyTrue
typestring
Details

The error details.

read onlyTrue
typestring

Create Or Update

Create or update the metadata of an IoT hub.

Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub metadata and security metadata, and then combine them with the modified values in a new body to update the IoT hub.

PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}?api-version=2016-02-03

Properties

api-version

The version of the API.

inquery
requiredTrue
typestring
iotHubDescription

The IoT hub metadata and security metadata.

inbody
requiredTrue
typeIotHubDescription
subscriptionid

The subscription identifier.

requiredTrue
typestring
resourcegroup

The name of the resource group that contains the IoT hub. A resource group name uniquely identifies the resource group within the subscription.

requiredTrue
typestring
etag

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.

typestring
properties

The properties of an IoT hub.

typeobject
typeIotHubProperties
authorizationPolicies

The shared access policies you can use to secure a connection to the IoT hub.

typeSharedAccessSignatureAuthorizationRule[]
keyName

The name of the shared access policy.

requiredTrue
typestring
primaryKey

The primary key.

typestring
secondaryKey

The secondary key.

typestring
rights

The permissions assigned to the shared access policy.

requiredTrue
typeAccessRights { 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 }
ipFilterRules

The IP filter rules.

typeIpFilterRule[]
filterName

The name of the IP filter rule.

requiredTrue
typestring
action

The desired action for requests captured by this rule.

requiredTrue
typeIpFilterActionType { Accept, Reject }
ipMask

A string that contains the IP address range in CIDR notation for the rule.

requiredTrue
typestring
provisioningState

The provisioning state.

read onlyTrue
typestring
hostName

The name of the host.

read onlyTrue
typestring
eventHubEndpoints

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.

typeobject
storageEndpoints

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.

typeobject
messagingEndpoints

The messaging endpoint properties for the file upload notification queue.

typeobject
enableFileUploadNotifications

If True, file upload notifications are enabled.

typeboolean
cloudToDevice

The IoT hub cloud-to-device messaging properties.

typeobject
typeCloudToDeviceProperties
maxDeliveryCount

The max delivery count for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeint32
defaultTtlAsIso8601

The default time to live for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
feedback

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

typeobject
typeFeedbackProperties
lockDurationAsIso8601

The lock duration for the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
ttlAsIso8601

The period of time for which a message is available to consume before it is expired by the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
maxDeliveryCount

The number of times the IoT hub attempts to deliver a message on the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeint32
comments

Comments.

typestring
operationsMonitoringProperties

The operations monitoring properties for the IoT hub. The possible keys to the dictionary are Connections, DeviceTelemetry, C2DCommands, DeviceIdentityOperations, FileUploadOperations.

typeobject
typeOperationsMonitoringProperties
events
typeobject
features

The capabilities and features enabled for the IoT hub.

typeCapabilities { None, DeviceManagement }
sku

Information about the SKU of the IoT hub.

typeobject
typeIotHubSkuInfo
name

The name of the SKU.

typeIotHubSku { F1, S1, S2, S3 }
tier

The billing tier for the IoT hub.

read onlyTrue
typeIotHubSkuTier { Free, Standard }
capacity

The number of provisioned IoT Hub units. See: https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits.

typeint64
id

The resource identifier.

read onlyTrue
typestring
name

The resource name.

read onlyTrue
typestring
type

The resource type.

read onlyTrue
typestring
location

The resource location.

typestring
tags

The resource tags.

typeobject
resourceGroupName

The name of the resource group that contains the IoT hub.

inpath
requiredTrue
typestring
resourceName

The name of the IoT hub to create or update.

inpath
requiredTrue
typestring
subscriptionId

The subscription identifier.

inpath
requiredTrue
typestring

Returns (HTTP Response Codes)

201 response

This is a long running operation. The operation returns a 201 if the validation is complete. The response includes an Azure-AsyncOperation header that contains a status URL. Clients are expected to poll the status URL for the status of the operation. If successful, the operation returns HTTP status code of 201 (OK).

typeIotHubDescription
subscriptionid

The subscription identifier.

requiredTrue
typestring
resourcegroup

The name of the resource group that contains the IoT hub. A resource group name uniquely identifies the resource group within the subscription.

requiredTrue
typestring
etag

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.

typestring
properties

The properties of an IoT hub.

typeobject
typeIotHubProperties
authorizationPolicies

The shared access policies you can use to secure a connection to the IoT hub.

typeSharedAccessSignatureAuthorizationRule[]
keyName

The name of the shared access policy.

requiredTrue
typestring
primaryKey

The primary key.

typestring
secondaryKey

The secondary key.

typestring
rights

The permissions assigned to the shared access policy.

requiredTrue
typeAccessRights { 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 }
ipFilterRules

The IP filter rules.

typeIpFilterRule[]
filterName

The name of the IP filter rule.

requiredTrue
typestring
action

The desired action for requests captured by this rule.

requiredTrue
typeIpFilterActionType { Accept, Reject }
ipMask

A string that contains the IP address range in CIDR notation for the rule.

requiredTrue
typestring
provisioningState

The provisioning state.

read onlyTrue
typestring
hostName

The name of the host.

read onlyTrue
typestring
eventHubEndpoints

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.

typeobject
storageEndpoints

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.

typeobject
messagingEndpoints

The messaging endpoint properties for the file upload notification queue.

typeobject
enableFileUploadNotifications

If True, file upload notifications are enabled.

typeboolean
cloudToDevice

The IoT hub cloud-to-device messaging properties.

typeobject
typeCloudToDeviceProperties
maxDeliveryCount

The max delivery count for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeint32
defaultTtlAsIso8601

The default time to live for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
feedback

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

typeobject
typeFeedbackProperties
lockDurationAsIso8601

The lock duration for the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
ttlAsIso8601

The period of time for which a message is available to consume before it is expired by the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
maxDeliveryCount

The number of times the IoT hub attempts to deliver a message on the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeint32
comments

Comments.

typestring
operationsMonitoringProperties

The operations monitoring properties for the IoT hub. The possible keys to the dictionary are Connections, DeviceTelemetry, C2DCommands, DeviceIdentityOperations, FileUploadOperations.

typeobject
typeOperationsMonitoringProperties
events
typeobject
features

The capabilities and features enabled for the IoT hub.

typeCapabilities { None, DeviceManagement }
sku

Information about the SKU of the IoT hub.

typeobject
typeIotHubSkuInfo
name

The name of the SKU.

typeIotHubSku { F1, S1, S2, S3 }
tier

The billing tier for the IoT hub.

read onlyTrue
typeIotHubSkuTier { Free, Standard }
capacity

The number of provisioned IoT Hub units. See: https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits.

typeint64
id

The resource identifier.

read onlyTrue
typestring
name

The resource name.

read onlyTrue
typestring
type

The resource type.

read onlyTrue
typestring
location

The resource location.

typestring
tags

The resource tags.

typeobject
200 response

This is returned as a response to the status polling request for the create or update operation. The body contains the resource representation that indicates a transitional provisioning state.

typeIotHubDescription
subscriptionid

The subscription identifier.

requiredTrue
typestring
resourcegroup

The name of the resource group that contains the IoT hub. A resource group name uniquely identifies the resource group within the subscription.

requiredTrue
typestring
etag

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.

typestring
properties

The properties of an IoT hub.

typeobject
typeIotHubProperties
authorizationPolicies

The shared access policies you can use to secure a connection to the IoT hub.

typeSharedAccessSignatureAuthorizationRule[]
keyName

The name of the shared access policy.

requiredTrue
typestring
primaryKey

The primary key.

typestring
secondaryKey

The secondary key.

typestring
rights

The permissions assigned to the shared access policy.

requiredTrue
typeAccessRights { 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 }
ipFilterRules

The IP filter rules.

typeIpFilterRule[]
filterName

The name of the IP filter rule.

requiredTrue
typestring
action

The desired action for requests captured by this rule.

requiredTrue
typeIpFilterActionType { Accept, Reject }
ipMask

A string that contains the IP address range in CIDR notation for the rule.

requiredTrue
typestring
provisioningState

The provisioning state.

read onlyTrue
typestring
hostName

The name of the host.

read onlyTrue
typestring
eventHubEndpoints

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.

typeobject
storageEndpoints

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.

typeobject
messagingEndpoints

The messaging endpoint properties for the file upload notification queue.

typeobject
enableFileUploadNotifications

If True, file upload notifications are enabled.

typeboolean
cloudToDevice

The IoT hub cloud-to-device messaging properties.

typeobject
typeCloudToDeviceProperties
maxDeliveryCount

The max delivery count for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeint32
defaultTtlAsIso8601

The default time to live for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
feedback

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

typeobject
typeFeedbackProperties
lockDurationAsIso8601

The lock duration for the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
ttlAsIso8601

The period of time for which a message is available to consume before it is expired by the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
maxDeliveryCount

The number of times the IoT hub attempts to deliver a message on the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeint32
comments

Comments.

typestring
operationsMonitoringProperties

The operations monitoring properties for the IoT hub. The possible keys to the dictionary are Connections, DeviceTelemetry, C2DCommands, DeviceIdentityOperations, FileUploadOperations.

typeobject
typeOperationsMonitoringProperties
events
typeobject
features

The capabilities and features enabled for the IoT hub.

typeCapabilities { None, DeviceManagement }
sku

Information about the SKU of the IoT hub.

typeobject
typeIotHubSkuInfo
name

The name of the SKU.

typeIotHubSku { F1, S1, S2, S3 }
tier

The billing tier for the IoT hub.

read onlyTrue
typeIotHubSkuTier { Free, Standard }
capacity

The number of provisioned IoT Hub units. See: https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits.

typeint64
id

The resource identifier.

read onlyTrue
typestring
name

The resource name.

read onlyTrue
typestring
type

The resource type.

read onlyTrue
typestring
location

The resource location.

typestring
tags

The resource tags.

typeobject
default response

DefaultErrorResponse

typeErrorDetails
Code

The error code.

read onlyTrue
typestring
HttpStatusCode

The HTTP status code.

read onlyTrue
typestring
Message

The error message.

read onlyTrue
typestring
Details

The error details.

read onlyTrue
typestring

Delete

Delete an IoT hub.

DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}?api-version=2016-02-03

Properties

api-version

The version of the API.

inquery
requiredTrue
typestring
resourceGroupName

The name of the resource group that contains the IoT hub.

inpath
requiredTrue
typestring
resourceName

The name of the IoT hub to delete.

inpath
requiredTrue
typestring
subscriptionId

The subscription identifier.

inpath
requiredTrue
typestring

Returns (HTTP Response Codes)

202 response

The Iot Hub resource provider always returns a 202 Accepted status code with valid Location and Retry-After headers. The resource provider also sets the Azure-AsyncOperation header with a URL that points to the operation resource for this operation. Subsequent GET attempts on the resource after a DELETE operation return a resource representation that indicates a transitional provisioning state (such as Terminating). To retrieve the status of the operation, a client can either poll the URL returned in the Location header after the Retry-After interval, get the IoT Hub service status directly, or query the operation resource.

typeIotHubDescription
subscriptionid

The subscription identifier.

requiredTrue
typestring
resourcegroup

The name of the resource group that contains the IoT hub. A resource group name uniquely identifies the resource group within the subscription.

requiredTrue
typestring
etag

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.

typestring
properties

The properties of an IoT hub.

typeobject
typeIotHubProperties
authorizationPolicies

The shared access policies you can use to secure a connection to the IoT hub.

typeSharedAccessSignatureAuthorizationRule[]
keyName

The name of the shared access policy.

requiredTrue
typestring
primaryKey

The primary key.

typestring
secondaryKey

The secondary key.

typestring
rights

The permissions assigned to the shared access policy.

requiredTrue
typeAccessRights { 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 }
ipFilterRules

The IP filter rules.

typeIpFilterRule[]
filterName

The name of the IP filter rule.

requiredTrue
typestring
action

The desired action for requests captured by this rule.

requiredTrue
typeIpFilterActionType { Accept, Reject }
ipMask

A string that contains the IP address range in CIDR notation for the rule.

requiredTrue
typestring
provisioningState

The provisioning state.

read onlyTrue
typestring
hostName

The name of the host.

read onlyTrue
typestring
eventHubEndpoints

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.

typeobject
storageEndpoints

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.

typeobject
messagingEndpoints

The messaging endpoint properties for the file upload notification queue.

typeobject
enableFileUploadNotifications

If True, file upload notifications are enabled.

typeboolean
cloudToDevice

The IoT hub cloud-to-device messaging properties.

typeobject
typeCloudToDeviceProperties
maxDeliveryCount

The max delivery count for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeint32
defaultTtlAsIso8601

The default time to live for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
feedback

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

typeobject
typeFeedbackProperties
lockDurationAsIso8601

The lock duration for the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
ttlAsIso8601

The period of time for which a message is available to consume before it is expired by the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
maxDeliveryCount

The number of times the IoT hub attempts to deliver a message on the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeint32
comments

Comments.

typestring
operationsMonitoringProperties

The operations monitoring properties for the IoT hub. The possible keys to the dictionary are Connections, DeviceTelemetry, C2DCommands, DeviceIdentityOperations, FileUploadOperations.

typeobject
typeOperationsMonitoringProperties
events
typeobject
features

The capabilities and features enabled for the IoT hub.

typeCapabilities { None, DeviceManagement }
sku

Information about the SKU of the IoT hub.

typeobject
typeIotHubSkuInfo
name

The name of the SKU.

typeIotHubSku { F1, S1, S2, S3 }
tier

The billing tier for the IoT hub.

read onlyTrue
typeIotHubSkuTier { Free, Standard }
capacity

The number of provisioned IoT Hub units. See: https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits.

typeint64
id

The resource identifier.

read onlyTrue
typestring
name

The resource name.

read onlyTrue
typestring
type

The resource type.

read onlyTrue
typestring
location

The resource location.

typestring
tags

The resource tags.

typeobject
200 response

This is returned as a response to the status polling request for the delete operation. The body contains the resource representation that indicates a transitional provisioning state.

typeIotHubDescription
subscriptionid

The subscription identifier.

requiredTrue
typestring
resourcegroup

The name of the resource group that contains the IoT hub. A resource group name uniquely identifies the resource group within the subscription.

requiredTrue
typestring
etag

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.

typestring
properties

The properties of an IoT hub.

typeobject
typeIotHubProperties
authorizationPolicies

The shared access policies you can use to secure a connection to the IoT hub.

typeSharedAccessSignatureAuthorizationRule[]
keyName

The name of the shared access policy.

requiredTrue
typestring
primaryKey

The primary key.

typestring
secondaryKey

The secondary key.

typestring
rights

The permissions assigned to the shared access policy.

requiredTrue
typeAccessRights { 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 }
ipFilterRules

The IP filter rules.

typeIpFilterRule[]
filterName

The name of the IP filter rule.

requiredTrue
typestring
action

The desired action for requests captured by this rule.

requiredTrue
typeIpFilterActionType { Accept, Reject }
ipMask

A string that contains the IP address range in CIDR notation for the rule.

requiredTrue
typestring
provisioningState

The provisioning state.

read onlyTrue
typestring
hostName

The name of the host.

read onlyTrue
typestring
eventHubEndpoints

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.

typeobject
storageEndpoints

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.

typeobject
messagingEndpoints

The messaging endpoint properties for the file upload notification queue.

typeobject
enableFileUploadNotifications

If True, file upload notifications are enabled.

typeboolean
cloudToDevice

The IoT hub cloud-to-device messaging properties.

typeobject
typeCloudToDeviceProperties
maxDeliveryCount

The max delivery count for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeint32
defaultTtlAsIso8601

The default time to live for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
feedback

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

typeobject
typeFeedbackProperties
lockDurationAsIso8601

The lock duration for the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
ttlAsIso8601

The period of time for which a message is available to consume before it is expired by the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
maxDeliveryCount

The number of times the IoT hub attempts to deliver a message on the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeint32
comments

Comments.

typestring
operationsMonitoringProperties

The operations monitoring properties for the IoT hub. The possible keys to the dictionary are Connections, DeviceTelemetry, C2DCommands, DeviceIdentityOperations, FileUploadOperations.

typeobject
typeOperationsMonitoringProperties
events
typeobject
features

The capabilities and features enabled for the IoT hub.

typeCapabilities { None, DeviceManagement }
sku

Information about the SKU of the IoT hub.

typeobject
typeIotHubSkuInfo
name

The name of the SKU.

typeIotHubSku { F1, S1, S2, S3 }
tier

The billing tier for the IoT hub.

read onlyTrue
typeIotHubSkuTier { Free, Standard }
capacity

The number of provisioned IoT Hub units. See: https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits.

typeint64
id

The resource identifier.

read onlyTrue
typestring
name

The resource name.

read onlyTrue
typestring
type

The resource type.

read onlyTrue
typestring
location

The resource location.

typestring
tags

The resource tags.

typeobject
204 response

Once the long running delete operation completes successfully, a 204 No Content status code is returned when the status polling request finds the Iot hub metadata in the service and the status of the delete operation is set to a completed state.

404 response

After the long running delete operation completes successfully, a 404 Not Found is returned when the status polling request no longer finds the Iot hub metadata in the service.

typeErrorDetails
Code

The error code.

read onlyTrue
typestring
HttpStatusCode

The HTTP status code.

read onlyTrue
typestring
Message

The error message.

read onlyTrue
typestring
Details

The error details.

read onlyTrue
typestring
default response

DefaultErrorResponse

typeErrorDetails
Code

The error code.

read onlyTrue
typestring
HttpStatusCode

The HTTP status code.

read onlyTrue
typestring
Message

The error message.

read onlyTrue
typestring
Details

The error details.

read onlyTrue
typestring

Delete Event Hub Consumer Group

Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub.

DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}?api-version=2016-02-03

Properties

api-version

The version of the API.

inquery
requiredTrue
typestring
eventHubEndpointName

The name of the Event Hub-compatible endpoint in the IoT hub.

inpath
requiredTrue
typestring
name

The name of the consumer group to delete.

inpath
requiredTrue
typestring
resourceGroupName

The name of the resource group that contains the IoT hub.

inpath
requiredTrue
typestring
resourceName

The name of the IoT hub.

inpath
requiredTrue
typestring
subscriptionId

The subscription identifier.

inpath
requiredTrue
typestring

Returns (HTTP Response Codes)

200 response

This is a synchronous operation.

default response

DefaultErrorResponse

typeErrorDetails
Code

The error code.

read onlyTrue
typestring
HttpStatusCode

The HTTP status code.

read onlyTrue
typestring
Message

The error message.

read onlyTrue
typestring
Details

The error details.

read onlyTrue
typestring

Export Devices

Exports all the device identities in the IoT hub identity registry to an Azure Storage blob container. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities.

POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/exportDevices?api-version=2016-02-03

Properties

api-version

The version of the API.

inquery
requiredTrue
typestring
exportDevicesParameters

The parameters that specify the export devices operation.

inbody
requiredTrue
typeExportDevicesRequest
ExportBlobContainerUri

The export blob container URI.

requiredTrue
typestring
ExcludeKeys

The value indicating whether keys should be excluded during export.

requiredTrue
typeboolean
resourceGroupName

The name of the resource group that contains the IoT hub.

inpath
requiredTrue
typestring
resourceName

The name of the IoT hub.

inpath
requiredTrue
typestring
subscriptionId

The subscription identifier.

inpath
requiredTrue
typestring

Returns (HTTP Response Codes)

200 response

OK

typeJobResponse
jobId

The job identifier.

read onlyTrue
typestring
startTimeUtc

The start time of the Job.

read onlyTrue
typedate-time-rfc1123
endTimeUtc

The time the job stopped processing.

read onlyTrue
typedate-time-rfc1123
type

The type of the job.

read onlyTrue
typeJobType { unknown, export, import, backup, readDeviceProperties, writeDeviceProperties, updateDeviceConfiguration, rebootDevice, factoryResetDevice, firmwareUpdate }
status

The status of the job.

read onlyTrue
typeJobStatus { unknown, enqueued, running, completed, failed, cancelled }
failureReason

If status == failed, this string containing the reason for the failure.

read onlyTrue
typestring
statusMessage

The status message for the job.

read onlyTrue
typestring
parentJobId

The job identifier of the parent job, if any.

read onlyTrue
typestring
default response

DefaultErrorResponse

typeErrorDetails
Code

The error code.

read onlyTrue
typestring
HttpStatusCode

The HTTP status code.

read onlyTrue
typestring
Message

The error message.

read onlyTrue
typestring
Details

The error details.

read onlyTrue
typestring

Get

Get the non-security related metadata of an IoT hub.

GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}?api-version=2016-02-03

Properties

api-version

The version of the API.

inquery
requiredTrue
typestring
resourceGroupName

The name of the resource group that contains the IoT hub.

inpath
requiredTrue
typestring
resourceName

The name of the IoT hub.

inpath
requiredTrue
typestring
subscriptionId

The subscription identifier.

inpath
requiredTrue
typestring

Returns (HTTP Response Codes)

200 response

The body contains all the non-security properties of the IoT hub. Security-related properties are set to null.

typeIotHubDescription
subscriptionid

The subscription identifier.

requiredTrue
typestring
resourcegroup

The name of the resource group that contains the IoT hub. A resource group name uniquely identifies the resource group within the subscription.

requiredTrue
typestring
etag

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.

typestring
properties

The properties of an IoT hub.

typeobject
typeIotHubProperties
authorizationPolicies

The shared access policies you can use to secure a connection to the IoT hub.

typeSharedAccessSignatureAuthorizationRule[]
keyName

The name of the shared access policy.

requiredTrue
typestring
primaryKey

The primary key.

typestring
secondaryKey

The secondary key.

typestring
rights

The permissions assigned to the shared access policy.

requiredTrue
typeAccessRights { 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 }
ipFilterRules

The IP filter rules.

typeIpFilterRule[]
filterName

The name of the IP filter rule.

requiredTrue
typestring
action

The desired action for requests captured by this rule.

requiredTrue
typeIpFilterActionType { Accept, Reject }
ipMask

A string that contains the IP address range in CIDR notation for the rule.

requiredTrue
typestring
provisioningState

The provisioning state.

read onlyTrue
typestring
hostName

The name of the host.

read onlyTrue
typestring
eventHubEndpoints

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.

typeobject
storageEndpoints

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.

typeobject
messagingEndpoints

The messaging endpoint properties for the file upload notification queue.

typeobject
enableFileUploadNotifications

If True, file upload notifications are enabled.

typeboolean
cloudToDevice

The IoT hub cloud-to-device messaging properties.

typeobject
typeCloudToDeviceProperties
maxDeliveryCount

The max delivery count for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeint32
defaultTtlAsIso8601

The default time to live for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
feedback

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

typeobject
typeFeedbackProperties
lockDurationAsIso8601

The lock duration for the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
ttlAsIso8601

The period of time for which a message is available to consume before it is expired by the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
maxDeliveryCount

The number of times the IoT hub attempts to deliver a message on the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeint32
comments

Comments.

typestring
operationsMonitoringProperties

The operations monitoring properties for the IoT hub. The possible keys to the dictionary are Connections, DeviceTelemetry, C2DCommands, DeviceIdentityOperations, FileUploadOperations.

typeobject
typeOperationsMonitoringProperties
events
typeobject
features

The capabilities and features enabled for the IoT hub.

typeCapabilities { None, DeviceManagement }
sku

Information about the SKU of the IoT hub.

typeobject
typeIotHubSkuInfo
name

The name of the SKU.

typeIotHubSku { F1, S1, S2, S3 }
tier

The billing tier for the IoT hub.

read onlyTrue
typeIotHubSkuTier { Free, Standard }
capacity

The number of provisioned IoT Hub units. See: https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits.

typeint64
id

The resource identifier.

read onlyTrue
typestring
name

The resource name.

read onlyTrue
typestring
type

The resource type.

read onlyTrue
typestring
location

The resource location.

typestring
tags

The resource tags.

typeobject
default response

DefaultErrorResponse

typeErrorDetails
Code

The error code.

read onlyTrue
typestring
HttpStatusCode

The HTTP status code.

read onlyTrue
typestring
Message

The error message.

read onlyTrue
typestring
Details

The error details.

read onlyTrue
typestring

Get Event Hub Consumer Group

Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub.

GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}?api-version=2016-02-03

Properties

api-version

The version of the API.

inquery
requiredTrue
typestring
eventHubEndpointName

The name of the Event Hub-compatible endpoint in the IoT hub.

inpath
requiredTrue
typestring
name

The name of the consumer group to retrieve.

inpath
requiredTrue
typestring
resourceGroupName

The name of the resource group that contains the IoT hub.

inpath
requiredTrue
typestring
resourceName

The name of the IoT hub.

inpath
requiredTrue
typestring
subscriptionId

The subscription identifier.

inpath
requiredTrue
typestring

Returns (HTTP Response Codes)

200 response

This is a synchronous operation. The body contains a JSON-serialized consumer group.

typeEventHubConsumerGroupInfo
tags

The tags.

typeobject
id

The Event Hub-compatible consumer group identifier.

typestring
name

The Event Hub-compatible consumer group name.

typestring
default response

DefaultErrorResponse

typeErrorDetails
Code

The error code.

read onlyTrue
typestring
HttpStatusCode

The HTTP status code.

read onlyTrue
typestring
Message

The error message.

read onlyTrue
typestring
Details

The error details.

read onlyTrue
typestring

Get Job

Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.

GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/jobs/{jobId}?api-version=2016-02-03

Properties

api-version

The version of the API.

inquery
requiredTrue
typestring
jobId

The job identifier.

inpath
requiredTrue
typestring
resourceGroupName

The name of the resource group that contains the IoT hub.

inpath
requiredTrue
typestring
resourceName

The name of the IoT hub.

inpath
requiredTrue
typestring
subscriptionId

The subscription identifier.

inpath
requiredTrue
typestring

Returns (HTTP Response Codes)

200 response

This is a synchronous operation. The response contains a JSON-serialized description of the job in the IoT hub.

typeJobResponse
jobId

The job identifier.

read onlyTrue
typestring
startTimeUtc

The start time of the Job.

read onlyTrue
typedate-time-rfc1123
endTimeUtc

The time the job stopped processing.

read onlyTrue
typedate-time-rfc1123
type

The type of the job.

read onlyTrue
typeJobType { unknown, export, import, backup, readDeviceProperties, writeDeviceProperties, updateDeviceConfiguration, rebootDevice, factoryResetDevice, firmwareUpdate }
status

The status of the job.

read onlyTrue
typeJobStatus { unknown, enqueued, running, completed, failed, cancelled }
failureReason

If status == failed, this string containing the reason for the failure.

read onlyTrue
typestring
statusMessage

The status message for the job.

read onlyTrue
typestring
parentJobId

The job identifier of the parent job, if any.

read onlyTrue
typestring
default response

DefaultErrorResponse

typeErrorDetails
Code

The error code.

read onlyTrue
typestring
HttpStatusCode

The HTTP status code.

read onlyTrue
typestring
Message

The error message.

read onlyTrue
typestring
Details

The error details.

read onlyTrue
typestring

Get Keys For Key Name

Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.

POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubKeys/{keyName}/listkeys?api-version=2016-02-03

Properties

api-version

The version of the API.

inquery
requiredTrue
typestring
keyName

The name of the shared access policy.

inpath
requiredTrue
typestring
resourceGroupName

The name of the resource group that contains the IoT hub.

inpath
requiredTrue
typestring
resourceName

The name of the IoT hub.

inpath
requiredTrue
typestring
subscriptionId

The subscription identifier.

inpath
requiredTrue
typestring

Returns (HTTP Response Codes)

200 response

This is a synchronous operation. The body contains a JSON-serialized shared access policy, including keys, that you can use to access one or more IoT hub endpoints.

typeSharedAccessSignatureAuthorizationRule
keyName

The name of the shared access policy.

requiredTrue
typestring
primaryKey

The primary key.

typestring
secondaryKey

The secondary key.

typestring
rights

The permissions assigned to the shared access policy.

requiredTrue
typeAccessRights { 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 }
default response

DefaultErrorResponse

typeErrorDetails
Code

The error code.

read onlyTrue
typestring
HttpStatusCode

The HTTP status code.

read onlyTrue
typestring
Message

The error message.

read onlyTrue
typestring
Details

The error details.

read onlyTrue
typestring

Get Quota Metrics

Get the quota metrics for an IoT hub.

GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/quotaMetrics?api-version=2016-02-03

Properties

api-version

The version of the API.

inquery
requiredTrue
typestring
resourceGroupName

The name of the resource group that contains the IoT hub.

inpath
requiredTrue
typestring
resourceName

The name of the IoT hub.

inpath
requiredTrue
typestring
subscriptionId

The subscription identifier.

inpath
requiredTrue
typestring

Returns (HTTP Response Codes)

200 response

This is a synchronous operation. The response contains a JSON-serialized array of the quota metrics for the IoT hub.

typeIotHubQuotaMetricInfoListResult
value

The array of quota metrics objects.

typeIotHubQuotaMetricInfo[]
Name

The name of the quota metric.

read onlyTrue
typestring
CurrentValue

The current value for the quota metric.

read onlyTrue
typeint64
MaxValue

The maximum value of the quota metric.

read onlyTrue
typeint64
nextLink

The next link.

read onlyTrue
typestring
default response

DefaultErrorResponse

typeErrorDetails
Code

The error code.

read onlyTrue
typestring
HttpStatusCode

The HTTP status code.

read onlyTrue
typestring
Message

The error message.

read onlyTrue
typestring
Details

The error details.

read onlyTrue
typestring

Get Stats

Get the statistics from an IoT hub.

GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubStats?api-version=2016-02-03

Properties

api-version

The version of the API.

inquery
requiredTrue
typestring
resourceGroupName

The name of the resource group that contains the IoT hub.

inpath
requiredTrue
typestring
resourceName

The name of the IoT hub.

inpath
requiredTrue
typestring
subscriptionId

The subscription identifier.

inpath
requiredTrue
typestring

Returns (HTTP Response Codes)

200 response

This is a synchronous operation. The body contains JSON-serialized statistics from the identity registry in the IoT hub.

typeRegistryStatistics
totalDeviceCount

The total count of devices in the identity registry.

read onlyTrue
typeint64
enabledDeviceCount

The count of enabled devices in the identity registry.

read onlyTrue
typeint64
disabledDeviceCount

The count of disabled devices in the identity registry.

read onlyTrue
typeint64
default response

DefaultErrorResponse

typeErrorDetails
Code

The error code.

read onlyTrue
typestring
HttpStatusCode

The HTTP status code.

read onlyTrue
typestring
Message

The error message.

read onlyTrue
typestring
Details

The error details.

read onlyTrue
typestring

Get Valid Skus

Get the list of valid SKUs for an IoT hub.

GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/skus?api-version=2016-02-03

Properties

api-version

The version of the API.

inquery
requiredTrue
typestring
resourceGroupName

The name of the resource group that contains the IoT hub.

inpath
requiredTrue
typestring
resourceName

The name of the IoT hub.

inpath
requiredTrue
typestring
subscriptionId

The subscription identifier.

inpath
requiredTrue
typestring

Returns (HTTP Response Codes)

200 response

This is a synchronous operation. The body contains a JSON-serialized array of the valid SKUs for this IoT hub.

typeIotHubSkuDescriptionListResult
value

The array of IotHubSkuDescription.

typeIotHubSkuDescription[]
resourceType

The type of the resource.

read onlyTrue
typestring
sku

Information about the SKU of the IoT hub.

typeobject
typeIotHubSkuInfo
name

The name of the SKU.

typeIotHubSku { F1, S1, S2, S3 }
tier

The billing tier for the IoT hub.

read onlyTrue
typeIotHubSkuTier { Free, Standard }
capacity

The number of provisioned IoT Hub units. See: https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits.

typeint64
capacity

IoT Hub capacity information.

typeobject
typeIotHubCapacity
minimum

The minimum number of units.

read onlyTrue
typeint64
maximum

The maximum number of units.

read onlyTrue
typeint64
default

The default number of units.

read onlyTrue
typeint64
scaleType

The type of the scaling enabled.

read onlyTrue
typeIotHubScaleType { Automatic, Manual, None }
nextLink

The next link.

read onlyTrue
typestring
default response

DefaultErrorResponse

typeErrorDetails
Code

The error code.

read onlyTrue
typestring
HttpStatusCode

The HTTP status code.

read onlyTrue
typestring
Message

The error message.

read onlyTrue
typestring
Details

The error details.

read onlyTrue
typestring

Import Devices

Import, update, or delete device identities in the IoT hub identity registry from a blob. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities.

POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/importDevices?api-version=2016-02-03

Properties

api-version

The version of the API.

inquery
requiredTrue
typestring
importDevicesParameters

The parameters that specify the import devices operation.

inbody
requiredTrue
typeImportDevicesRequest
InputBlobContainerUri

The input blob container URI.

requiredTrue
typestring
OutputBlobContainerUri

The output blob container URI.

requiredTrue
typestring
resourceGroupName

The name of the resource group that contains the IoT hub.

inpath
requiredTrue
typestring
resourceName

The name of the IoT hub.

inpath
requiredTrue
typestring
subscriptionId

The subscription identifier.

inpath
requiredTrue
typestring

Returns (HTTP Response Codes)

200 response

OK

typeJobResponse
jobId

The job identifier.

read onlyTrue
typestring
startTimeUtc

The start time of the Job.

read onlyTrue
typedate-time-rfc1123
endTimeUtc

The time the job stopped processing.

read onlyTrue
typedate-time-rfc1123
type

The type of the job.

read onlyTrue
typeJobType { unknown, export, import, backup, readDeviceProperties, writeDeviceProperties, updateDeviceConfiguration, rebootDevice, factoryResetDevice, firmwareUpdate }
status

The status of the job.

read onlyTrue
typeJobStatus { unknown, enqueued, running, completed, failed, cancelled }
failureReason

If status == failed, this string containing the reason for the failure.

read onlyTrue
typestring
statusMessage

The status message for the job.

read onlyTrue
typestring
parentJobId

The job identifier of the parent job, if any.

read onlyTrue
typestring
default response

DefaultErrorResponse

typeErrorDetails
Code

The error code.

read onlyTrue
typestring
HttpStatusCode

The HTTP status code.

read onlyTrue
typestring
Message

The error message.

read onlyTrue
typestring
Details

The error details.

read onlyTrue
typestring

List By Resource Group

Get all the IoT hubs in a resource group.

GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs?api-version=2016-02-03

Properties

api-version

The version of the API.

inquery
requiredTrue
typestring
resourceGroupName

The name of the resource group that contains the IoT hubs.

inpath
requiredTrue
typestring
subscriptionId

The subscription identifier.

inpath
requiredTrue
typestring

Returns (HTTP Response Codes)

200 response

This is a synchronous operation. The body contains a JSON-serialized array of the metadata from all the IoT hubs in the resource group.

typeIotHubDescriptionListResult
value

The array of IotHubDescription objects.

typeIotHubDescription[]
subscriptionid

The subscription identifier.

requiredTrue
typestring
resourcegroup

The name of the resource group that contains the IoT hub. A resource group name uniquely identifies the resource group within the subscription.

requiredTrue
typestring
etag

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.

typestring
properties

The properties of an IoT hub.

typeobject
typeIotHubProperties
authorizationPolicies

The shared access policies you can use to secure a connection to the IoT hub.

typeSharedAccessSignatureAuthorizationRule[]
keyName

The name of the shared access policy.

requiredTrue
typestring
primaryKey

The primary key.

typestring
secondaryKey

The secondary key.

typestring
rights

The permissions assigned to the shared access policy.

requiredTrue
typeAccessRights { 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 }
ipFilterRules

The IP filter rules.

typeIpFilterRule[]
filterName

The name of the IP filter rule.

requiredTrue
typestring
action

The desired action for requests captured by this rule.

requiredTrue
typeIpFilterActionType { Accept, Reject }
ipMask

A string that contains the IP address range in CIDR notation for the rule.

requiredTrue
typestring
provisioningState

The provisioning state.

read onlyTrue
typestring
hostName

The name of the host.

read onlyTrue
typestring
eventHubEndpoints

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.

typeobject
storageEndpoints

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.

typeobject
messagingEndpoints

The messaging endpoint properties for the file upload notification queue.

typeobject
enableFileUploadNotifications

If True, file upload notifications are enabled.

typeboolean
cloudToDevice

The IoT hub cloud-to-device messaging properties.

typeobject
typeCloudToDeviceProperties
maxDeliveryCount

The max delivery count for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeint32
defaultTtlAsIso8601

The default time to live for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
feedback

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

typeobject
typeFeedbackProperties
lockDurationAsIso8601

The lock duration for the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
ttlAsIso8601

The period of time for which a message is available to consume before it is expired by the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
maxDeliveryCount

The number of times the IoT hub attempts to deliver a message on the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeint32
comments

Comments.

typestring
operationsMonitoringProperties

The operations monitoring properties for the IoT hub. The possible keys to the dictionary are Connections, DeviceTelemetry, C2DCommands, DeviceIdentityOperations, FileUploadOperations.

typeobject
typeOperationsMonitoringProperties
events
typeobject
features

The capabilities and features enabled for the IoT hub.

typeCapabilities { None, DeviceManagement }
sku

Information about the SKU of the IoT hub.

typeobject
typeIotHubSkuInfo
name

The name of the SKU.

typeIotHubSku { F1, S1, S2, S3 }
tier

The billing tier for the IoT hub.

read onlyTrue
typeIotHubSkuTier { Free, Standard }
capacity

The number of provisioned IoT Hub units. See: https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits.

typeint64
id

The resource identifier.

read onlyTrue
typestring
name

The resource name.

read onlyTrue
typestring
type

The resource type.

read onlyTrue
typestring
location

The resource location.

typestring
tags

The resource tags.

typeobject
nextLink

The next link.

read onlyTrue
typestring
default response

DefaultErrorResponse

typeErrorDetails
Code

The error code.

read onlyTrue
typestring
HttpStatusCode

The HTTP status code.

read onlyTrue
typestring
Message

The error message.

read onlyTrue
typestring
Details

The error details.

read onlyTrue
typestring

List By Subscription

Get all the IoT hubs in a subscription.

GET /subscriptions/{subscriptionId}/providers/Microsoft.Devices/IotHubs?api-version=2016-02-03

Properties

api-version

The version of the API.

inquery
requiredTrue
typestring
subscriptionId

The subscription identifier.

inpath
requiredTrue
typestring

Returns (HTTP Response Codes)

200 response

This is a synchronous operation. The body contains a JSON-serialized array of the metadata from all the IoT hubs in the subscription.

typeIotHubDescriptionListResult
value

The array of IotHubDescription objects.

typeIotHubDescription[]
subscriptionid

The subscription identifier.

requiredTrue
typestring
resourcegroup

The name of the resource group that contains the IoT hub. A resource group name uniquely identifies the resource group within the subscription.

requiredTrue
typestring
etag

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.

typestring
properties

The properties of an IoT hub.

typeobject
typeIotHubProperties
authorizationPolicies

The shared access policies you can use to secure a connection to the IoT hub.

typeSharedAccessSignatureAuthorizationRule[]
keyName

The name of the shared access policy.

requiredTrue
typestring
primaryKey

The primary key.

typestring
secondaryKey

The secondary key.

typestring
rights

The permissions assigned to the shared access policy.

requiredTrue
typeAccessRights { 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 }
ipFilterRules

The IP filter rules.

typeIpFilterRule[]
filterName

The name of the IP filter rule.

requiredTrue
typestring
action

The desired action for requests captured by this rule.

requiredTrue
typeIpFilterActionType { Accept, Reject }
ipMask

A string that contains the IP address range in CIDR notation for the rule.

requiredTrue
typestring
provisioningState

The provisioning state.

read onlyTrue
typestring
hostName

The name of the host.

read onlyTrue
typestring
eventHubEndpoints

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.

typeobject
storageEndpoints

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.

typeobject
messagingEndpoints

The messaging endpoint properties for the file upload notification queue.

typeobject
enableFileUploadNotifications

If True, file upload notifications are enabled.

typeboolean
cloudToDevice

The IoT hub cloud-to-device messaging properties.

typeobject
typeCloudToDeviceProperties
maxDeliveryCount

The max delivery count for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeint32
defaultTtlAsIso8601

The default time to live for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
feedback

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

typeobject
typeFeedbackProperties
lockDurationAsIso8601

The lock duration for the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
ttlAsIso8601

The period of time for which a message is available to consume before it is expired by the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeduration
maxDeliveryCount

The number of times the IoT hub attempts to deliver a message on the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.

typeint32
comments

Comments.

typestring
operationsMonitoringProperties

The operations monitoring properties for the IoT hub. The possible keys to the dictionary are Connections, DeviceTelemetry, C2DCommands, DeviceIdentityOperations, FileUploadOperations.

typeobject
typeOperationsMonitoringProperties
events
typeobject
features

The capabilities and features enabled for the IoT hub.

typeCapabilities { None, DeviceManagement }
sku

Information about the SKU of the IoT hub.

typeobject
typeIotHubSkuInfo
name

The name of the SKU.

typeIotHubSku { F1, S1, S2, S3 }
tier

The billing tier for the IoT hub.

read onlyTrue
typeIotHubSkuTier { Free, Standard }
capacity

The number of provisioned IoT Hub units. See: https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits.

typeint64
id

The resource identifier.

read onlyTrue
typestring
name

The resource name.

read onlyTrue
typestring
type

The resource type.

read onlyTrue
typestring
location

The resource location.

typestring
tags

The resource tags.

typeobject
nextLink

The next link.

read onlyTrue
typestring
default response

DefaultErrorResponse

typeErrorDetails
Code

The error code.

read onlyTrue
typestring
HttpStatusCode

The HTTP status code.

read onlyTrue
typestring
Message

The error message.

read onlyTrue
typestring
Details

The error details.

read onlyTrue
typestring

List Event Hub Consumer Groups

Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub.

GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups?api-version=2016-02-03

Properties

api-version

The version of the API.

inquery
requiredTrue
typestring
eventHubEndpointName

The name of the Event Hub-compatible endpoint.

inpath
requiredTrue
typestring
resourceGroupName

The name of the resource group that contains the IoT hub.

inpath
requiredTrue
typestring
resourceName

The name of the IoT hub.

inpath
requiredTrue
typestring
subscriptionId

The subscription identifier.

inpath
requiredTrue
typestring

Returns (HTTP Response Codes)

200 response

This is a synchronous operation. The body contains a JSON-serialized list of the consumer groups in the the Event Hub-compatible endpoint in this IoT hub

typeEventHubConsumerGroupsListResult
value

The array of Event Hub-compatible consumer group names.

typestring[]
nextLink

The next link.

read onlyTrue
typestring
default response

DefaultErrorResponse

typeErrorDetails
Code

The error code.

read onlyTrue
typestring
HttpStatusCode

The HTTP status code.

read onlyTrue
typestring
Message

The error message.

read onlyTrue
typestring
Details

The error details.

read onlyTrue
typestring

List Jobs

Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.

GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/jobs?api-version=2016-02-03

Properties

api-version

The version of the API.

inquery
requiredTrue
typestring
resourceGroupName

The name of the resource group that contains the IoT hub.

inpath
requiredTrue
typestring
resourceName

The name of the IoT hub.

inpath
requiredTrue
typestring
subscriptionId

The subscription identifier.

inpath
requiredTrue
typestring

Returns (HTTP Response Codes)

200 response

This is a synchronous operation. The response contains a JSON-serialized array of all the jobs in the IoT hub.

typeJobResponseListResult
value

The array of JobResponse objects.

typeJobResponse[]
jobId

The job identifier.

read onlyTrue
typestring
startTimeUtc

The start time of the Job.

read onlyTrue
typedate-time-rfc1123
endTimeUtc

The time the job stopped processing.

read onlyTrue
typedate-time-rfc1123
type

The type of the job.

read onlyTrue
typeJobType { unknown, export, import, backup, readDeviceProperties, writeDeviceProperties, updateDeviceConfiguration, rebootDevice, factoryResetDevice, firmwareUpdate }
status

The status of the job.

read onlyTrue
typeJobStatus { unknown, enqueued, running, completed, failed, cancelled }
failureReason

If status == failed, this string containing the reason for the failure.

read onlyTrue
typestring
statusMessage

The status message for the job.

read onlyTrue
typestring
parentJobId

The job identifier of the parent job, if any.

read onlyTrue
typestring
nextLink

The next link.

read onlyTrue
typestring
default response

DefaultErrorResponse

typeErrorDetails
Code

The error code.

read onlyTrue
typestring
HttpStatusCode

The HTTP status code.

read onlyTrue
typestring
Message

The error message.

read onlyTrue
typestring
Details

The error details.

read onlyTrue
typestring

List Keys

Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.

POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/listkeys?api-version=2016-02-03

Properties

api-version

The version of the API.

inquery
requiredTrue
typestring
resourceGroupName

The name of the resource group that contains the IoT hub.

inpath
requiredTrue
typestring
resourceName

The name of the IoT hub.

inpath
requiredTrue
typestring
subscriptionId

The subscription identifier.

inpath
requiredTrue
typestring

Returns (HTTP Response Codes)

200 response

This is a synchronous operation. The body contains a JSON-serialized array of shared access policies, including keys, that you can use to access the IoT hub endpoints.

typeSharedAccessSignatureAuthorizationRuleListResult
value

The list of shared access policies.

typeSharedAccessSignatureAuthorizationRule[]
keyName

The name of the shared access policy.

requiredTrue
typestring
primaryKey

The primary key.

typestring
secondaryKey

The secondary key.

typestring
rights

The permissions assigned to the shared access policy.

requiredTrue
typeAccessRights { 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 }
nextLink

The next link.

read onlyTrue
typestring
default response

DefaultErrorResponse

typeErrorDetails
Code

The error code.

read onlyTrue
typestring
HttpStatusCode

The HTTP status code.

read onlyTrue
typestring
Message

The error message.

read onlyTrue
typestring
Details

The error details.

read onlyTrue
typestring