你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

IotHubResource interface

表示 IotHubResource 的接口。

方法

beginCreateOrUpdate(string, string, IotHubDescription, IotHubResourceCreateOrUpdateOptionalParams)

创建或更新 Iot 中心的元数据。 修改属性的常见模式是检索 IoT 中心元数据和安全元数据,然后将其与新正文中的修改值合并,以更新 IoT 中心。 如果 JSON 中缺少某些属性,更新 IoT 中心可能会导致这些值回退到默认值,这可能会导致意外行为。

beginCreateOrUpdateAndWait(string, string, IotHubDescription, IotHubResourceCreateOrUpdateOptionalParams)

创建或更新 Iot 中心的元数据。 修改属性的常见模式是检索 IoT 中心元数据和安全元数据,然后将其与新正文中的修改值合并,以更新 IoT 中心。 如果 JSON 中缺少某些属性,更新 IoT 中心可能会导致这些值回退到默认值,这可能会导致意外行为。

beginDelete(string, string, IotHubResourceDeleteOptionalParams)

删除 IoT 中心。

beginDeleteAndWait(string, string, IotHubResourceDeleteOptionalParams)

删除 IoT 中心。

beginUpdate(string, string, TagsResource, IotHubResourceUpdateOptionalParams)

更新现有的 IoT 中心标记。 若要更新其他字段,请使用 CreateOrUpdate 方法

beginUpdateAndWait(string, string, TagsResource, IotHubResourceUpdateOptionalParams)

更新现有的 IoT 中心标记。 若要更新其他字段,请使用 CreateOrUpdate 方法

checkNameAvailability(OperationInputs, IotHubResourceCheckNameAvailabilityOptionalParams)

检查 IoT 中心名称是否可用。

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

将使用者组添加到 IoT 中心内与事件中心兼容的终结点。

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

从 IoT 中心内与事件中心兼容的终结点中删除使用者组。

exportDevices(string, string, ExportDevicesRequest, IotHubResourceExportDevicesOptionalParams)

将 IoT 中心标识注册表中的所有设备标识导出到 Azure 存储 Blob 容器。 有关详细信息,请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities

get(string, string, IotHubResourceGetOptionalParams)

获取 IoT 中心的非安全相关元数据。

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

从 IoT 中心的事件中心兼容的设备到云终结点获取使用者组。

getJob(string, string, string, IotHubResourceGetJobOptionalParams)

从 IoT 中心获取作业的详细信息。 有关详细信息,请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry

getKeysForKeyName(string, string, string, IotHubResourceGetKeysForKeyNameOptionalParams)

从 IoT 中心按名称获取共享访问策略。 有关详细信息,请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security

getStats(string, string, IotHubResourceGetStatsOptionalParams)

从 IoT 中心获取统计信息。

importDevices(string, string, ImportDevicesRequest, IotHubResourceImportDevicesOptionalParams)

从 Blob 导入、更新或删除 IoT 中心标识注册表中的设备标识。 有关详细信息,请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities

listByResourceGroup(string, IotHubResourceListByResourceGroupOptionalParams)

获取资源组中的所有 IoT 中心。

listBySubscription(IotHubResourceListBySubscriptionOptionalParams)

获取订阅中的所有 IoT 中心。

listEndpointHealth(string, string, IotHubResourceGetEndpointHealthOptionalParams)

获取路由终结点的运行状况。

listEventHubConsumerGroups(string, string, string, IotHubResourceListEventHubConsumerGroupsOptionalParams)

获取 IoT 中心与事件中心兼容的设备到云终结点中的使用者组列表。

listJobs(string, string, IotHubResourceListJobsOptionalParams)

获取 IoT 中心内所有作业的列表。 有关详细信息,请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry

listKeys(string, string, IotHubResourceListKeysOptionalParams)

获取 IoT 中心的安全元数据。 有关详细信息,请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security

listQuotaMetrics(string, string, IotHubResourceGetQuotaMetricsOptionalParams)

获取 IoT 中心的配额指标。

listValidSkus(string, string, IotHubResourceGetValidSkusOptionalParams)

获取 IoT 中心的有效 SKU 列表。

testAllRoutes(string, string, TestAllRoutesInput, IotHubResourceTestAllRoutesOptionalParams)

测试此 Iot 中心配置的所有路由

testRoute(string, string, TestRouteInput, IotHubResourceTestRouteOptionalParams)

测试此 IoT 中心的新路由

方法详细信息

beginCreateOrUpdate(string, string, IotHubDescription, IotHubResourceCreateOrUpdateOptionalParams)

创建或更新 Iot 中心的元数据。 修改属性的常见模式是检索 IoT 中心元数据和安全元数据,然后将其与新正文中的修改值合并,以更新 IoT 中心。 如果 JSON 中缺少某些属性,更新 IoT 中心可能会导致这些值回退到默认值,这可能会导致意外行为。

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

参数

resourceGroupName

string

包含 IoT 中心的资源组的名称。

resourceName

string

IoT 中心的名称。

iotHubDescription
IotHubDescription

IoT 中心元数据和安全元数据。

返回

Promise<@azure/core-lro.SimplePollerLike<OperationState<IotHubDescription>, IotHubDescription>>

beginCreateOrUpdateAndWait(string, string, IotHubDescription, IotHubResourceCreateOrUpdateOptionalParams)

创建或更新 Iot 中心的元数据。 修改属性的常见模式是检索 IoT 中心元数据和安全元数据,然后将其与新正文中的修改值合并,以更新 IoT 中心。 如果 JSON 中缺少某些属性,更新 IoT 中心可能会导致这些值回退到默认值,这可能会导致意外行为。

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

参数

resourceGroupName

string

包含 IoT 中心的资源组的名称。

resourceName

string

IoT 中心的名称。

iotHubDescription
IotHubDescription

IoT 中心元数据和安全元数据。

返回

beginDelete(string, string, IotHubResourceDeleteOptionalParams)

删除 IoT 中心。

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

参数

resourceGroupName

string

包含 IoT 中心的资源组的名称。

resourceName

string

IoT 中心的名称。

options
IotHubResourceDeleteOptionalParams

选项参数。

返回

Promise<@azure/core-lro.SimplePollerLike<OperationState<IotHubDescription>, IotHubDescription>>

beginDeleteAndWait(string, string, IotHubResourceDeleteOptionalParams)

删除 IoT 中心。

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

参数

resourceGroupName

string

包含 IoT 中心的资源组的名称。

resourceName

string

IoT 中心的名称。

options
IotHubResourceDeleteOptionalParams

选项参数。

返回

beginUpdate(string, string, TagsResource, IotHubResourceUpdateOptionalParams)

更新现有的 IoT 中心标记。 若要更新其他字段,请使用 CreateOrUpdate 方法

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

参数

resourceGroupName

string

资源组标识符。

resourceName

string

要更新的 iot 中心的名称。

iotHubTags
TagsResource

更新了要设置为 iot 中心实例的标记信息。

options
IotHubResourceUpdateOptionalParams

选项参数。

返回

Promise<@azure/core-lro.SimplePollerLike<OperationState<IotHubDescription>, IotHubDescription>>

beginUpdateAndWait(string, string, TagsResource, IotHubResourceUpdateOptionalParams)

更新现有的 IoT 中心标记。 若要更新其他字段,请使用 CreateOrUpdate 方法

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

参数

resourceGroupName

string

资源组标识符。

resourceName

string

要更新的 iot 中心的名称。

iotHubTags
TagsResource

更新了要设置为 iot 中心实例的标记信息。

options
IotHubResourceUpdateOptionalParams

选项参数。

返回

checkNameAvailability(OperationInputs, IotHubResourceCheckNameAvailabilityOptionalParams)

检查 IoT 中心名称是否可用。

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

参数

operationInputs
OperationInputs

将 OperationInputs 结构中的 name 参数设置为要检查的 IoT 中心的名称。

返回

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

将使用者组添加到 IoT 中心内与事件中心兼容的终结点。

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

参数

resourceGroupName

string

包含 IoT 中心的资源组的名称。

resourceName

string

IoT 中心的名称。

eventHubEndpointName

string

IoT 中心中与事件中心兼容的终结点的名称。

name

string

要添加的使用者组的名称。

consumerGroupBody
EventHubConsumerGroupBodyDescription

要添加的使用者组。

返回

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

从 IoT 中心内与事件中心兼容的终结点中删除使用者组。

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

参数

resourceGroupName

string

包含 IoT 中心的资源组的名称。

resourceName

string

IoT 中心的名称。

eventHubEndpointName

string

IoT 中心中与事件中心兼容的终结点的名称。

name

string

要删除的使用者组的名称。

返回

Promise<void>

exportDevices(string, string, ExportDevicesRequest, IotHubResourceExportDevicesOptionalParams)

将 IoT 中心标识注册表中的所有设备标识导出到 Azure 存储 Blob 容器。 有关详细信息,请参阅: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>

参数

resourceGroupName

string

包含 IoT 中心的资源组的名称。

resourceName

string

IoT 中心的名称。

exportDevicesParameters
ExportDevicesRequest

指定导出设备作的参数。

返回

Promise<JobResponse>

get(string, string, IotHubResourceGetOptionalParams)

获取 IoT 中心的非安全相关元数据。

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

参数

resourceGroupName

string

包含 IoT 中心的资源组的名称。

resourceName

string

IoT 中心的名称。

options
IotHubResourceGetOptionalParams

选项参数。

返回

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

从 IoT 中心的事件中心兼容的设备到云终结点获取使用者组。

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

参数

resourceGroupName

string

包含 IoT 中心的资源组的名称。

resourceName

string

IoT 中心的名称。

eventHubEndpointName

string

IoT 中心中与事件中心兼容的终结点的名称。

name

string

要检索的使用者组的名称。

返回

getJob(string, string, string, IotHubResourceGetJobOptionalParams)

从 IoT 中心获取作业的详细信息。 有关详细信息,请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry

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

参数

resourceGroupName

string

包含 IoT 中心的资源组的名称。

resourceName

string

IoT 中心的名称。

jobId

string

作业标识符。

options
IotHubResourceGetJobOptionalParams

选项参数。

返回

Promise<JobResponse>

getKeysForKeyName(string, string, string, IotHubResourceGetKeysForKeyNameOptionalParams)

从 IoT 中心按名称获取共享访问策略。 有关详细信息,请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security

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

参数

resourceGroupName

string

包含 IoT 中心的资源组的名称。

resourceName

string

IoT 中心的名称。

keyName

string

共享访问策略的名称。

返回

getStats(string, string, IotHubResourceGetStatsOptionalParams)

从 IoT 中心获取统计信息。

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

参数

resourceGroupName

string

包含 IoT 中心的资源组的名称。

resourceName

string

IoT 中心的名称。

options
IotHubResourceGetStatsOptionalParams

选项参数。

返回

importDevices(string, string, ImportDevicesRequest, IotHubResourceImportDevicesOptionalParams)

从 Blob 导入、更新或删除 IoT 中心标识注册表中的设备标识。 有关详细信息,请参阅: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>

参数

resourceGroupName

string

包含 IoT 中心的资源组的名称。

resourceName

string

IoT 中心的名称。

importDevicesParameters
ImportDevicesRequest

指定导入设备作的参数。

返回

Promise<JobResponse>

listByResourceGroup(string, IotHubResourceListByResourceGroupOptionalParams)

获取资源组中的所有 IoT 中心。

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

参数

resourceGroupName

string

包含 IoT 中心的资源组的名称。

返回

listBySubscription(IotHubResourceListBySubscriptionOptionalParams)

获取订阅中的所有 IoT 中心。

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

参数

返回

listEndpointHealth(string, string, IotHubResourceGetEndpointHealthOptionalParams)

获取路由终结点的运行状况。

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

参数

resourceGroupName

string

iotHubName

string

返回

listEventHubConsumerGroups(string, string, string, IotHubResourceListEventHubConsumerGroupsOptionalParams)

获取 IoT 中心与事件中心兼容的设备到云终结点中的使用者组列表。

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

参数

resourceGroupName

string

包含 IoT 中心的资源组的名称。

resourceName

string

IoT 中心的名称。

eventHubEndpointName

string

与事件中心兼容的终结点的名称。

返回

listJobs(string, string, IotHubResourceListJobsOptionalParams)

获取 IoT 中心内所有作业的列表。 有关详细信息,请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry

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

参数

resourceGroupName

string

包含 IoT 中心的资源组的名称。

resourceName

string

IoT 中心的名称。

options
IotHubResourceListJobsOptionalParams

选项参数。

返回

listKeys(string, string, IotHubResourceListKeysOptionalParams)

获取 IoT 中心的安全元数据。 有关详细信息,请参阅:https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security

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

参数

resourceGroupName

string

包含 IoT 中心的资源组的名称。

resourceName

string

IoT 中心的名称。

options
IotHubResourceListKeysOptionalParams

选项参数。

返回

listQuotaMetrics(string, string, IotHubResourceGetQuotaMetricsOptionalParams)

获取 IoT 中心的配额指标。

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

参数

resourceGroupName

string

包含 IoT 中心的资源组的名称。

resourceName

string

IoT 中心的名称。

返回

listValidSkus(string, string, IotHubResourceGetValidSkusOptionalParams)

获取 IoT 中心的有效 SKU 列表。

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

参数

resourceGroupName

string

包含 IoT 中心的资源组的名称。

resourceName

string

IoT 中心的名称。

返回

testAllRoutes(string, string, TestAllRoutesInput, IotHubResourceTestAllRoutesOptionalParams)

测试此 Iot 中心配置的所有路由

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

参数

iotHubName

string

要测试的 IotHub

resourceGroupName

string

IoT 中心所属的资源组

input
TestAllRoutesInput

用于测试所有路由的输入

返回

testRoute(string, string, TestRouteInput, IotHubResourceTestRouteOptionalParams)

测试此 IoT 中心的新路由

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

参数

iotHubName

string

要测试的 IotHub

resourceGroupName

string

IoT 中心所属的资源组

input
TestRouteInput

需要测试的路由

options
IotHubResourceTestRouteOptionalParams

选项参数。

返回

Promise<TestRouteResult>