Queries the distribution result of a device.
QPS limits
You can call this API operation up to 50 times per second per account.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | QueryDeviceProvisioning | The operation that you want to perform. Set the value to QueryDeviceProvisioning. |
ProductKey | String | Yes | a1ji***** | The ProductKey of the product to which the device belongs. |
DeviceName | String | Yes | testDevcieBwT3Un | The DeviceName of the device. |
In addition to the preceding operation-specific request parameters, you must configure common request parameters when you call this operation. For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | iot.system.SystemException |
|
Data | Struct | The distribution result of the device returned if the call is successful. |
|
AliyunUid | String | io****@example.com | The ID of the Alibaba Cloud account to which the device belongs. |
DeviceName | String | testDevcieBwT3Un | The DeviceName of the device. |
GmtCreate | Long | 1676297683000 | The timestamp when the distribution of the device was created. Unit: milliseconds. If the device is not distributed, the current timestamp of the server is returned. |
GmtModified | Long | 1676297683000 | The timestamp when the distribution of the device was last modified. Unit: milliseconds. If the device is not distributed, the current timestamp of the server is returned. |
ProductKey | String | a1ji***** | The ProductKey of the product to which the device belongs. |
SourceIotInstanceId | String | iot-6ja**** | The ID of the source instance from which the device is distributed. |
SourceRegion | String | cn-shanghai | The ID of the region where the source instance resides. |
TargetIotInstanceId | String | iot-09k**** | The ID of the destination instance to which the device is distributed. |
TargetRegion | String | ap-southeast-1 | The ID of the region where the destination instance resides. |
ErrorMessage | String | A system exception occurred. | The error message returned if the call fails. |
RequestId | String | E55E50B7-40EE-4B6B-8BBE-D3ED55CCF565 | The ID of the request. |
Success | Boolean | true | Indicates whether the call was successful. Valid values:
|
Examples
Sample requests
http(s)://iot.cn-shanghai.aliyuncs.com/?Action=QueryDeviceProvisioning
&ProductKey=a1ji*****
&DeviceName=testDevcieBwT3Un
&<Common request parameters>
Sample success responses
XML
format
<QueryDeviceProvisioningResponse>
<RequestId>E55E50B7-40EE-4B6B-8BBE-D3ED55CCF565</RequestId>
<Data>
<TargetRegion>ap-southeast-1</TargetRegion>
<GmtCreate>1676297683000</GmtCreate>
<TargetIotInstanceId>iot-09k****</TargetIotInstanceId>
<AliyunUid>io****@example.com</AliyunUid>
<GmtModified>1676297683000</GmtModified>
<SourceIotInstanceId>iot-6ja****</SourceIotInstanceId>
<SourceRegion>cn-shanghai</SourceRegion>
<ProductKey>a1ji*****</ProductKey>
<DeviceName>testDevcieBwT3Un</DeviceName>
</Data>
<Code>success</Code>
<Success>true</Success>
</QueryDeviceProvisioningResponse>
JSON
format
{
"RequestId": "E55E50B7-40EE-4B6B-8BBE-D3ED55CCF565",
"Data": {
"TargetRegion": "ap-southeast-1",
"GmtCreate": 1676297683000,
"TargetIotInstanceId": "iot-09k****",
"AliyunUid": "io****@example.com",
"GmtModified": 1676297683000,
"SourceIotInstanceId": "iot-6ja****",
"SourceRegion": "cn-shanghai",
"ProductKey": "a1ji*****",
"DeviceName": "testDevcieBwT3Un"
},
"Code": "success",
"Success": true
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | iot.common.APINotSupportedInInstance | This API operation is not supported in this instance. | The error message returned because the API operation is not available for the instance. |
400 | iot.common.RamActionPermissionDeny | You do not have the RAM permission. | The error message returned because the specified RAM user does not have the required permissions. |
400 | iot.common.InvalidTenant | The Invalid tenant. | The error message returned because the specified tenant is invalid or failed to be created. |
400 | iot.common.InvalidFormattedParameter | The parameter format is invalid. | The error message returned because the format of the value of the parameter is invalid. |
For a list of error codes, see Service error codes.