IotHubResourceOperations Class

IotHubResourceOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Inheritance
builtins.object
IotHubResourceOperations

Constructor

IotHubResourceOperations(client, config, serializer, deserializer)

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

models

Alias to model classes used in this operation group.

Methods

begin_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. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to default, which may lead to unexpected behavior.

begin_delete

Delete an IoT hub.

Delete an IoT hub.

check_name_availability

Check if an IoT hub name is available.

Check if an IoT hub name is available.

create_event_hub_consumer_group

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

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

delete_event_hub_consumer_group

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

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

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.

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.

get

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

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

get_event_hub_consumer_group

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

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

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 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_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.

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.

get_quota_metrics

Get the quota metrics for an IoT hub.

Get the quota metrics for an IoT hub.

get_stats

Get the statistics from an IoT hub.

Get the statistics from an IoT hub.

get_valid_skus

Get the list of valid SKUs for an IoT hub.

Get the list of valid SKUs for an IoT hub.

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.

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.

list_by_resource_group

Get all the IoT hubs in a resource group.

Get all the IoT hubs in a resource group.

list_by_subscription

Get all the IoT hubs in a subscription.

Get all the IoT hubs in a subscription.

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 a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub.

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 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.

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.

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

begin_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. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to default, which may lead to unexpected behavior.

begin_create_or_update(resource_group_name, resource_name, iot_hub_description, **kwargs)

Parameters

resource_group_name
str
Required

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

resource_name
str
Required

The name of the IoT hub to create or update.

iot_hub_description
IotHubDescription
Required

The IoT hub metadata and security metadata.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or PollingMethod

Pass in True if you'd like the ARMPolling polling method, False for no polling, or your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of LROPoller that returns either IotHubDescription or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

begin_delete

Delete an IoT hub.

Delete an IoT hub.

begin_delete(resource_group_name, resource_name, **kwargs)

Parameters

resource_group_name
str
Required

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

resource_name
str
Required

The name of the IoT hub to delete.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or PollingMethod

Pass in True if you'd like the ARMPolling polling method, False for no polling, or your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of LROPoller that returns either IotHubDescription or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

check_name_availability

Check if an IoT hub name is available.

Check if an IoT hub name is available.

check_name_availability(operation_inputs, **kwargs)

Parameters

operation_inputs
OperationInputs
Required

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

cls
callable

A custom type or function that will be passed the direct response

Returns

IotHubNameAvailabilityInfo, or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

create_event_hub_consumer_group

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

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

create_event_hub_consumer_group(resource_group_name, resource_name, event_hub_endpoint_name, name, **kwargs)

Parameters

resource_group_name
str
Required

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

resource_name
str
Required

The name of the IoT hub.

event_hub_endpoint_name
str
Required

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

name
str
Required

The name of the consumer group to add.

cls
callable

A custom type or function that will be passed the direct response

Returns

EventHubConsumerGroupInfo, or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

delete_event_hub_consumer_group

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

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

delete_event_hub_consumer_group(resource_group_name, resource_name, event_hub_endpoint_name, name, **kwargs)

Parameters

resource_group_name
str
Required

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

resource_name
str
Required

The name of the IoT hub.

event_hub_endpoint_name
str
Required

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

name
str
Required

The name of the consumer group to delete.

cls
callable

A custom type or function that will be passed the direct response

Returns

None, or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

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.

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.

export_devices(resource_group_name, resource_name, export_devices_parameters, **kwargs)

Parameters

resource_group_name
str
Required

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

resource_name
str
Required

The name of the IoT hub.

export_devices_parameters
ExportDevicesRequest
Required

The parameters that specify the export devices operation.

cls
callable

A custom type or function that will be passed the direct response

Returns

JobResponse, or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

get

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

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

get(resource_group_name, resource_name, **kwargs)

Parameters

resource_group_name
str
Required

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

resource_name
str
Required

The name of the IoT hub.

cls
callable

A custom type or function that will be passed the direct response

Returns

IotHubDescription, or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

get_event_hub_consumer_group

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

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

get_event_hub_consumer_group(resource_group_name, resource_name, event_hub_endpoint_name, name, **kwargs)

Parameters

resource_group_name
str
Required

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

resource_name
str
Required

The name of the IoT hub.

event_hub_endpoint_name
str
Required

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

name
str
Required

The name of the consumer group to retrieve.

cls
callable

A custom type or function that will be passed the direct response

Returns

EventHubConsumerGroupInfo, or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

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 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_job(resource_group_name, resource_name, job_id, **kwargs)

Parameters

resource_group_name
str
Required

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

resource_name
str
Required

The name of the IoT hub.

job_id
str
Required

The job identifier.

cls
callable

A custom type or function that will be passed the direct response

Returns

JobResponse, or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

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.

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.

get_keys_for_key_name(resource_group_name, resource_name, key_name, **kwargs)

Parameters

resource_group_name
str
Required

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

resource_name
str
Required

The name of the IoT hub.

key_name
str
Required

The name of the shared access policy.

cls
callable

A custom type or function that will be passed the direct response

Returns

SharedAccessSignatureAuthorizationRule, or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

get_quota_metrics

Get the quota metrics for an IoT hub.

Get the quota metrics for an IoT hub.

get_quota_metrics(resource_group_name, resource_name, **kwargs)

Parameters

resource_group_name
str
Required

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

resource_name
str
Required

The name of the IoT hub.

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either IotHubQuotaMetricInfoListResult or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

get_stats

Get the statistics from an IoT hub.

Get the statistics from an IoT hub.

get_stats(resource_group_name, resource_name, **kwargs)

Parameters

resource_group_name
str
Required

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

resource_name
str
Required

The name of the IoT hub.

cls
callable

A custom type or function that will be passed the direct response

Returns

RegistryStatistics, or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

get_valid_skus

Get the list of valid SKUs for an IoT hub.

Get the list of valid SKUs for an IoT hub.

get_valid_skus(resource_group_name, resource_name, **kwargs)

Parameters

resource_group_name
str
Required

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

resource_name
str
Required

The name of the IoT hub.

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either IotHubSkuDescriptionListResult or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

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.

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.

import_devices(resource_group_name, resource_name, import_devices_parameters, **kwargs)

Parameters

resource_group_name
str
Required

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

resource_name
str
Required

The name of the IoT hub.

import_devices_parameters
ImportDevicesRequest
Required

The parameters that specify the import devices operation.

cls
callable

A custom type or function that will be passed the direct response

Returns

JobResponse, or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

list_by_resource_group

Get all the IoT hubs in a resource group.

Get all the IoT hubs in a resource group.

list_by_resource_group(resource_group_name, **kwargs)

Parameters

resource_group_name
str
Required

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

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either IotHubDescriptionListResult or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

list_by_subscription

Get all the IoT hubs in a subscription.

Get all the IoT hubs in a subscription.

list_by_subscription(**kwargs)

Parameters

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either IotHubDescriptionListResult or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

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 a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub.

list_event_hub_consumer_groups(resource_group_name, resource_name, event_hub_endpoint_name, **kwargs)

Parameters

resource_group_name
str
Required

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

resource_name
str
Required

The name of the IoT hub.

event_hub_endpoint_name
str
Required

The name of the Event Hub-compatible endpoint.

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either EventHubConsumerGroupsListResult or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

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 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.

list_jobs(resource_group_name, resource_name, **kwargs)

Parameters

resource_group_name
str
Required

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

resource_name
str
Required

The name of the IoT hub.

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either JobResponseListResult or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

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.

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

list_keys(resource_group_name, resource_name, **kwargs)

Parameters

resource_group_name
str
Required

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

resource_name
str
Required

The name of the IoT hub.

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either SharedAccessSignatureAuthorizationRuleListResult or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

Attributes

models

models = <module 'azure.mgmt.iothub.v2016_02_03.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.6.8\\x64\\lib\\site-packages\\azure\\mgmt\\iothub\\v2016_02_03\\models\\__init__.py'>