IotHubResource interface
Interface representing a IotHubResource.
Methods
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.
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.
The options parameters.
Returns
Promise<IotHubDescription>
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.
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.
The options parameters.
Returns
Promise<IotHubDescription>
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.
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.
The options parameters.
Returns
Promise<IotHubDescription>
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.
The options parameters.
Returns
Promise<IotHubNameAvailabilityInfo>
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.
The options parameters.
Returns
Promise<EventHubConsumerGroupInfo>
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.
The options parameters.
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.
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
Promise<IotHubDescription>
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.
The options parameters.
Returns
Promise<EventHubConsumerGroupInfo>
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.
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.
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.
The options parameters.
Returns
Promise<RegistryStatistics>
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.
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.
The options parameters.
Returns
listBySubscription(IotHubResourceListBySubscriptionOptionalParams)
Get all the IoT hubs in a subscription.
function listBySubscription(options?: IotHubResourceListBySubscriptionOptionalParams): PagedAsyncIterableIterator<IotHubDescription, IotHubDescription[], PageSettings>
Parameters
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
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.
The options parameters.
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.
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.
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.
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.
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
The options parameters.
Returns
Promise<TestAllRoutesResult>
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
The options parameters.
Returns
Promise<TestRouteResult>