IotHubResource interface

Interface representing a IotHubResource.

Methods

beginCreateOrUpdate(string, string, IotHubDescription, IotHubResourceCreateOrUpdateOptionalParams)

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.

beginCreateOrUpdateAndWait(string, string, IotHubDescription, IotHubResourceCreateOrUpdateOptionalParams)

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.

beginDelete(string, string, IotHubResourceDeleteOptionalParams)

Delete an IoT hub.

beginDeleteAndWait(string, string, IotHubResourceDeleteOptionalParams)

Delete an IoT hub.

beginUpdate(string, string, TagsResource, IotHubResourceUpdateOptionalParams)

Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method

beginUpdateAndWait(string, string, TagsResource, IotHubResourceUpdateOptionalParams)

Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method

checkNameAvailability(OperationInputs, IotHubResourceCheckNameAvailabilityOptionalParams)

Check if an IoT hub name is available.

createEventHubConsumerGroup(string, string, string, string, IotHubResourceCreateEventHubConsumerGroupOptionalParams)

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

deleteEventHubConsumerGroup(string, string, string, string, IotHubResourceDeleteEventHubConsumerGroupOptionalParams)

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

exportDevices(string, string, ExportDevicesRequest, IotHubResourceExportDevicesOptionalParams)

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(string, string, IotHubResourceGetOptionalParams)

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

getEventHubConsumerGroup(string, string, string, string, IotHubResourceGetEventHubConsumerGroupOptionalParams)

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

getJob(string, string, string, IotHubResourceGetJobOptionalParams)

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.

getKeysForKeyName(string, string, string, IotHubResourceGetKeysForKeyNameOptionalParams)

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.

getStats(string, string, IotHubResourceGetStatsOptionalParams)

Get the statistics from an IoT hub.

importDevices(string, string, ImportDevicesRequest, IotHubResourceImportDevicesOptionalParams)

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.

listByResourceGroup(string, IotHubResourceListByResourceGroupOptionalParams)

Get all the IoT hubs in a resource group.

listBySubscription(IotHubResourceListBySubscriptionOptionalParams)

Get all the IoT hubs in a subscription.

listEndpointHealth(string, string, IotHubResourceGetEndpointHealthOptionalParams)

Get the health for routing endpoints.

listEventHubConsumerGroups(string, string, string, IotHubResourceListEventHubConsumerGroupsOptionalParams)

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

listJobs(string, string, IotHubResourceListJobsOptionalParams)

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.

listKeys(string, string, IotHubResourceListKeysOptionalParams)

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

listQuotaMetrics(string, string, IotHubResourceGetQuotaMetricsOptionalParams)

Get the quota metrics for an IoT hub.

listValidSkus(string, string, IotHubResourceGetValidSkusOptionalParams)

Get the list of valid SKUs for an IoT hub.

testAllRoutes(string, string, TestAllRoutesInput, IotHubResourceTestAllRoutesOptionalParams)

Test all routes configured in this Iot Hub

testRoute(string, string, TestRouteInput, IotHubResourceTestRouteOptionalParams)

Test the new route for this Iot Hub

Method Details

beginCreateOrUpdate(string, string, IotHubDescription, IotHubResourceCreateOrUpdateOptionalParams)

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.

function beginCreateOrUpdate(resourceGroupName: string, resourceName: string, iotHubDescription: IotHubDescription, options?: IotHubResourceCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<IotHubDescription>, IotHubDescription>>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

iotHubDescription
IotHubDescription

The IoT hub metadata and security metadata.

options
IotHubResourceCreateOrUpdateOptionalParams

The options parameters.

Returns

Promise<PollerLike<@azure/core-lro.PollOperationState<IotHubDescription>, IotHubDescription>>

beginCreateOrUpdateAndWait(string, string, IotHubDescription, IotHubResourceCreateOrUpdateOptionalParams)

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.

function beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, iotHubDescription: IotHubDescription, options?: IotHubResourceCreateOrUpdateOptionalParams): Promise<IotHubDescription>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

iotHubDescription
IotHubDescription

The IoT hub metadata and security metadata.

options
IotHubResourceCreateOrUpdateOptionalParams

The options parameters.

Returns

beginDelete(string, string, IotHubResourceDeleteOptionalParams)

Delete an IoT hub.

function beginDelete(resourceGroupName: string, resourceName: string, options?: IotHubResourceDeleteOptionalParams): Promise<PollerLike<PollOperationState<IotHubDescription>, IotHubDescription>>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

options
IotHubResourceDeleteOptionalParams

The options parameters.

Returns

Promise<PollerLike<@azure/core-lro.PollOperationState<IotHubDescription>, IotHubDescription>>

beginDeleteAndWait(string, string, IotHubResourceDeleteOptionalParams)

Delete an IoT hub.

function beginDeleteAndWait(resourceGroupName: string, resourceName: string, options?: IotHubResourceDeleteOptionalParams): Promise<IotHubDescription>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

options
IotHubResourceDeleteOptionalParams

The options parameters.

Returns

beginUpdate(string, string, TagsResource, IotHubResourceUpdateOptionalParams)

Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method

function beginUpdate(resourceGroupName: string, resourceName: string, iotHubTags: TagsResource, options?: IotHubResourceUpdateOptionalParams): Promise<PollerLike<PollOperationState<IotHubDescription>, IotHubDescription>>

Parameters

resourceGroupName

string

Resource group identifier.

resourceName

string

Name of iot hub to update.

iotHubTags
TagsResource

Updated tag information to set into the iot hub instance.

options
IotHubResourceUpdateOptionalParams

The options parameters.

Returns

Promise<PollerLike<@azure/core-lro.PollOperationState<IotHubDescription>, IotHubDescription>>

beginUpdateAndWait(string, string, TagsResource, IotHubResourceUpdateOptionalParams)

Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method

function beginUpdateAndWait(resourceGroupName: string, resourceName: string, iotHubTags: TagsResource, options?: IotHubResourceUpdateOptionalParams): Promise<IotHubDescription>

Parameters

resourceGroupName

string

Resource group identifier.

resourceName

string

Name of iot hub to update.

iotHubTags
TagsResource

Updated tag information to set into the iot hub instance.

options
IotHubResourceUpdateOptionalParams

The options parameters.

Returns

checkNameAvailability(OperationInputs, IotHubResourceCheckNameAvailabilityOptionalParams)

Check if an IoT hub name is available.

function checkNameAvailability(operationInputs: OperationInputs, options?: IotHubResourceCheckNameAvailabilityOptionalParams): Promise<IotHubNameAvailabilityInfo>

Parameters

operationInputs
OperationInputs

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

options
IotHubResourceCheckNameAvailabilityOptionalParams

The options parameters.

Returns

createEventHubConsumerGroup(string, string, string, string, IotHubResourceCreateEventHubConsumerGroupOptionalParams)

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

function createEventHubConsumerGroup(resourceGroupName: string, resourceName: string, eventHubEndpointName: string, name: string, options?: IotHubResourceCreateEventHubConsumerGroupOptionalParams): Promise<EventHubConsumerGroupInfo>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

eventHubEndpointName

string

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

name

string

The name of the consumer group to add.

Returns

deleteEventHubConsumerGroup(string, string, string, string, IotHubResourceDeleteEventHubConsumerGroupOptionalParams)

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

function deleteEventHubConsumerGroup(resourceGroupName: string, resourceName: string, eventHubEndpointName: string, name: string, options?: IotHubResourceDeleteEventHubConsumerGroupOptionalParams): Promise<void>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

eventHubEndpointName

string

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

name

string

The name of the consumer group to delete.

Returns

Promise<void>

exportDevices(string, string, ExportDevicesRequest, IotHubResourceExportDevicesOptionalParams)

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.

function exportDevices(resourceGroupName: string, resourceName: string, exportDevicesParameters: ExportDevicesRequest, options?: IotHubResourceExportDevicesOptionalParams): Promise<JobResponse>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

exportDevicesParameters
ExportDevicesRequest

The parameters that specify the export devices operation.

options
IotHubResourceExportDevicesOptionalParams

The options parameters.

Returns

Promise<JobResponse>

get(string, string, IotHubResourceGetOptionalParams)

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

function get(resourceGroupName: string, resourceName: string, options?: IotHubResourceGetOptionalParams): Promise<IotHubDescription>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

options
IotHubResourceGetOptionalParams

The options parameters.

Returns

getEventHubConsumerGroup(string, string, string, string, IotHubResourceGetEventHubConsumerGroupOptionalParams)

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

function getEventHubConsumerGroup(resourceGroupName: string, resourceName: string, eventHubEndpointName: string, name: string, options?: IotHubResourceGetEventHubConsumerGroupOptionalParams): Promise<EventHubConsumerGroupInfo>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

eventHubEndpointName

string

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

name

string

The name of the consumer group to retrieve.

Returns

getJob(string, string, string, IotHubResourceGetJobOptionalParams)

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.

function getJob(resourceGroupName: string, resourceName: string, jobId: string, options?: IotHubResourceGetJobOptionalParams): Promise<JobResponse>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

jobId

string

The job identifier.

options
IotHubResourceGetJobOptionalParams

The options parameters.

Returns

Promise<JobResponse>

getKeysForKeyName(string, string, string, IotHubResourceGetKeysForKeyNameOptionalParams)

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.

function getKeysForKeyName(resourceGroupName: string, resourceName: string, keyName: string, options?: IotHubResourceGetKeysForKeyNameOptionalParams): Promise<SharedAccessSignatureAuthorizationRule>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

keyName

string

The name of the shared access policy.

options
IotHubResourceGetKeysForKeyNameOptionalParams

The options parameters.

Returns

getStats(string, string, IotHubResourceGetStatsOptionalParams)

Get the statistics from an IoT hub.

function getStats(resourceGroupName: string, resourceName: string, options?: IotHubResourceGetStatsOptionalParams): Promise<RegistryStatistics>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

options
IotHubResourceGetStatsOptionalParams

The options parameters.

Returns

importDevices(string, string, ImportDevicesRequest, IotHubResourceImportDevicesOptionalParams)

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.

function importDevices(resourceGroupName: string, resourceName: string, importDevicesParameters: ImportDevicesRequest, options?: IotHubResourceImportDevicesOptionalParams): Promise<JobResponse>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

importDevicesParameters
ImportDevicesRequest

The parameters that specify the import devices operation.

options
IotHubResourceImportDevicesOptionalParams

The options parameters.

Returns

Promise<JobResponse>

listByResourceGroup(string, IotHubResourceListByResourceGroupOptionalParams)

Get all the IoT hubs in a resource group.

function listByResourceGroup(resourceGroupName: string, options?: IotHubResourceListByResourceGroupOptionalParams): PagedAsyncIterableIterator<IotHubDescription, IotHubDescription[], PageSettings>

Parameters

resourceGroupName

string

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

options
IotHubResourceListByResourceGroupOptionalParams

The options parameters.

Returns

listBySubscription(IotHubResourceListBySubscriptionOptionalParams)

Get all the IoT hubs in a subscription.

function listBySubscription(options?: IotHubResourceListBySubscriptionOptionalParams): PagedAsyncIterableIterator<IotHubDescription, IotHubDescription[], PageSettings>

Parameters

options
IotHubResourceListBySubscriptionOptionalParams

The options parameters.

Returns

listEndpointHealth(string, string, IotHubResourceGetEndpointHealthOptionalParams)

Get the health for routing endpoints.

function listEndpointHealth(resourceGroupName: string, iotHubName: string, options?: IotHubResourceGetEndpointHealthOptionalParams): PagedAsyncIterableIterator<EndpointHealthData, EndpointHealthData[], PageSettings>

Parameters

resourceGroupName

string

iotHubName

string

options
IotHubResourceGetEndpointHealthOptionalParams

The options parameters.

Returns

listEventHubConsumerGroups(string, string, string, IotHubResourceListEventHubConsumerGroupsOptionalParams)

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

function listEventHubConsumerGroups(resourceGroupName: string, resourceName: string, eventHubEndpointName: string, options?: IotHubResourceListEventHubConsumerGroupsOptionalParams): PagedAsyncIterableIterator<EventHubConsumerGroupInfo, EventHubConsumerGroupInfo[], PageSettings>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

eventHubEndpointName

string

The name of the Event Hub-compatible endpoint.

Returns

listJobs(string, string, IotHubResourceListJobsOptionalParams)

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.

function listJobs(resourceGroupName: string, resourceName: string, options?: IotHubResourceListJobsOptionalParams): PagedAsyncIterableIterator<JobResponse, JobResponse[], PageSettings>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

options
IotHubResourceListJobsOptionalParams

The options parameters.

Returns

listKeys(string, string, IotHubResourceListKeysOptionalParams)

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

function listKeys(resourceGroupName: string, resourceName: string, options?: IotHubResourceListKeysOptionalParams): PagedAsyncIterableIterator<SharedAccessSignatureAuthorizationRule, SharedAccessSignatureAuthorizationRule[], PageSettings>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

options
IotHubResourceListKeysOptionalParams

The options parameters.

Returns

listQuotaMetrics(string, string, IotHubResourceGetQuotaMetricsOptionalParams)

Get the quota metrics for an IoT hub.

function listQuotaMetrics(resourceGroupName: string, resourceName: string, options?: IotHubResourceGetQuotaMetricsOptionalParams): PagedAsyncIterableIterator<IotHubQuotaMetricInfo, IotHubQuotaMetricInfo[], PageSettings>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

options
IotHubResourceGetQuotaMetricsOptionalParams

The options parameters.

Returns

listValidSkus(string, string, IotHubResourceGetValidSkusOptionalParams)

Get the list of valid SKUs for an IoT hub.

function listValidSkus(resourceGroupName: string, resourceName: string, options?: IotHubResourceGetValidSkusOptionalParams): PagedAsyncIterableIterator<IotHubSkuDescription, IotHubSkuDescription[], PageSettings>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

options
IotHubResourceGetValidSkusOptionalParams

The options parameters.

Returns

testAllRoutes(string, string, TestAllRoutesInput, IotHubResourceTestAllRoutesOptionalParams)

Test all routes configured in this Iot Hub

function testAllRoutes(iotHubName: string, resourceGroupName: string, input: TestAllRoutesInput, options?: IotHubResourceTestAllRoutesOptionalParams): Promise<TestAllRoutesResult>

Parameters

iotHubName

string

IotHub to be tested

resourceGroupName

string

resource group which Iot Hub belongs to

input
TestAllRoutesInput

Input for testing all routes

options
IotHubResourceTestAllRoutesOptionalParams

The options parameters.

Returns

testRoute(string, string, TestRouteInput, IotHubResourceTestRouteOptionalParams)

Test the new route for this Iot Hub

function testRoute(iotHubName: string, resourceGroupName: string, input: TestRouteInput, options?: IotHubResourceTestRouteOptionalParams): Promise<TestRouteResult>

Parameters

iotHubName

string

IotHub to be tested

resourceGroupName

string

resource group which Iot Hub belongs to

input
TestRouteInput

Route that needs to be tested

options
IotHubResourceTestRouteOptionalParams

The options parameters.

Returns

Promise<TestRouteResult>