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

Iot Hub Resource - Export Devices

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

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/exportDevices?api-version=2023-06-30

URI 参数

名称 必需 类型 说明
resourceGroupName
path True

string

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

resourceName
path True

string

IoT 中心的名称。

subscriptionId
path True

string

订阅标识符。

api-version
query True

string

API 的版本。

请求正文

名称 必需 类型 说明
excludeKeys True

boolean

指示在导出期间是否应排除键的值。

exportBlobContainerUri True

string

导出 Blob 容器 URI。

authenticationType

AuthenticationType

指定用于连接到存储帐户的身份验证类型。

configurationsBlobName

string

将在提供的输出 Blob 容器中创建的 Blob 的名称。 此 Blob 将包含 IoT 中心的导出配置。

exportBlobName

string

将在提供的输出 Blob 容器中创建的 Blob 的名称。 此 Blob 将包含IoT 中心的导出设备注册表信息。

identity

ManagedIdentity

导出设备的存储终结点的托管标识属性。

includeConfigurations

boolean

指示是否应导出配置的值。

响应

名称 类型 说明
200 OK

JobResponse

确定

Other Status Codes

ErrorDetails

DefaultErrorResponse

安全性

azure_auth

Azure Active Directory OAuth2 流

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

IotHubResource_ExportDevices

Sample Request

POST https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub/exportDevices?api-version=2023-06-30

{
  "exportBlobContainerUri": "testBlob",
  "excludeKeys": true
}

Sample Response

{
  "jobId": "test",
  "startTimeUtc": "Thu, 15 Jun 2017 19:20:58 GMT",
  "endTimeUtc": "Thu, 15 Jun 2017 19:20:58 GMT",
  "type": "unknown",
  "status": "unknown"
}

定义

名称 说明
AuthenticationType

指定用于连接到存储帐户的身份验证类型。

ErrorDetails

错误详细信息。

ExportDevicesRequest

在请求导出 IoT 中心中的所有设备时,使用 提供参数。

JobResponse

作业响应对象的属性。

JobStatus

作业的状态。

JobType

作业的类型。

ManagedIdentity

托管标识的属性。

AuthenticationType

指定用于连接到存储帐户的身份验证类型。

名称 类型 说明
identityBased

string

keyBased

string

ErrorDetails

错误详细信息。

名称 类型 说明
code

string

错误代码。

details

string

错误详细信息。

httpStatusCode

string

HTTP 状态代码。

message

string

错误消息。

ExportDevicesRequest

在请求导出 IoT 中心中的所有设备时,使用 提供参数。

名称 类型 说明
authenticationType

AuthenticationType

指定用于连接到存储帐户的身份验证类型。

configurationsBlobName

string

将在提供的输出 Blob 容器中创建的 Blob 的名称。 此 Blob 将包含 IoT 中心的导出配置。

excludeKeys

boolean

指示在导出期间是否应排除键的值。

exportBlobContainerUri

string

导出 Blob 容器 URI。

exportBlobName

string

将在提供的输出 Blob 容器中创建的 Blob 的名称。 此 Blob 将包含IoT 中心的导出设备注册表信息。

identity

ManagedIdentity

导出设备的存储终结点的托管标识属性。

includeConfigurations

boolean

指示是否应导出配置的值。

JobResponse

作业响应对象的属性。

名称 类型 说明
endTimeUtc

string

作业停止处理的时间。

failureReason

string

如果 status == failed,则为包含失败原因的字符串。

jobId

string

作业标识符。

parentJobId

string

父作业的作业标识符(如果有)。

startTimeUtc

string

作业的开始时间。

status

JobStatus

作业的状态。

statusMessage

string

作业的状态消息。

type

JobType

作业的类型。

JobStatus

作业的状态。

名称 类型 说明
cancelled

string

completed

string

enqueued

string

failed

string

running

string

unknown

string

JobType

作业的类型。

名称 类型 说明
backup

string

export

string

factoryResetDevice

string

firmwareUpdate

string

import

string

readDeviceProperties

string

rebootDevice

string

unknown

string

updateDeviceConfiguration

string

writeDeviceProperties

string

ManagedIdentity

托管标识的属性。

名称 类型 说明
userAssignedIdentity

string

用户分配的标识。