日本熟妇hd丰满老熟妇,中文字幕一区二区三区在线不卡 ,亚洲成片在线观看,免费女同在线一区二区

RegisterDeviceCredential - 為某個設備注冊訪問憑證

更新時間:

一機一密認證方法,即預先為每個設備申請唯一的訪問憑證(ClientId、DeviceAccessKeyId和DeviceAccessKeySecret)。當設備與云消息隊列 MQTT 版建立連接時,需要將設備訪問憑證中的信息按照約定的形式設置到Username和Password中,向云消息隊列 MQTT 版發(fā)起認證請求,云消息隊列 MQTT 版認證通過后激活設備,設備與云消息隊列 MQTT 版間才可傳輸數(shù)據(jù)。 本接口用于為指定設備申請訪問憑證。

接口說明

  • 一個設備只能申請一個訪問憑證,若調(diào)用本接口申請多次,以最近一次返回的訪問憑證為準。
  • 本接口的單用戶 QPS 限制為 500 次/秒。超過限制,API 調(diào)用會被限流,這可能會影響您的業(yè)務,請合理調(diào)用。更多信息,請參見 QPS 限制
  • 每成功調(diào)用一次 RegisterDeviceCredential 接口,都會計算為一次消息 TPS,從而影響您的計費。詳細信息,請參見計費說明

調(diào)試

您可以在OpenAPI Explorer中直接運行該接口,免去您計算簽名的困擾。運行成功后,OpenAPI Explorer可以自動生成SDK代碼示例。

授權信息

當前API暫無授權信息透出。

請求參數(shù)

名稱類型必填描述示例值
ClientIdstring

需要注冊訪問憑證的設備的 Client ID。

GID_test@@@test
InstanceIdstring

云消息隊列 MQTT 版實例的 ID,一定要和客戶端實際使用的實例 ID 匹配。您可以在控制臺實例詳情頁面獲取該 ID。

post-cn-0pp12gl****
說明 更多參數(shù)說明請參見公共參數(shù)服務接入點

返回參數(shù)

名稱類型描述示例值
object
RequestIdstring

公共參數(shù),每個請求的 ID 都是唯一的。

E4581CCF-62AF-44D9-B5B4-D1DBDC0E****
DeviceCredentialobject

設備的訪問憑證信息。

UpdateTimelong

設備訪問憑證上一次更新的毫秒時間戳。

1605541382000
DeviceAccessKeyIdstring

設備的 AccessKey ID。

DC.Z5fXh9sRRVufyLi6wo****
CreateTimelong

設備訪問憑證創(chuàng)建的毫秒時間戳。

1605541382000
InstanceIdstring

云消息隊列 MQTT 版實例的 ID。

post-cn-0pp12gl****
DeviceAccessKeySecretstring

設備的 AccessKey Secret。

DC.BJMkn4eMQJK2vaApTS****
ClientIdstring

設備的 Client ID。

GID_test@@@test

示例

正常返回示例

JSON格式

{
  "RequestId": "E4581CCF-62AF-44D9-B5B4-D1DBDC0E****",
  "DeviceCredential": {
    "UpdateTime": 1605541382000,
    "DeviceAccessKeyId": "DC.Z5fXh9sRRVufyLi6wo****",
    "CreateTime": 1605541382000,
    "InstanceId": "post-cn-0pp12gl****",
    "DeviceAccessKeySecret": "DC.BJMkn4eMQJK2vaApTS****",
    "ClientId": "GID_test@@@test"
  }
}

錯誤碼

HTTP status code錯誤碼錯誤信息描述
400ApplyTokenOverFlowYou have applied for tokens too many times. Please try again later.申請Token頻率過高,系統(tǒng)限流,請重試。
400CheckAccountInfoFailedAn error occurred while checking the account information by the STS token.解析STS Token賬號信息失敗。
400InstancePermissionCheckFailedAn error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.實例權限校驗失敗,請確認MQTT實例的所屬關系以及授權策略。
400ParameterCheckFailedAn error occurred while validating the parameters. The parameters may be missing or invalid.參數(shù)校驗失敗,可能缺失或者傳入值非法。
400PermissionCheckFailedAn error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.資源權限校驗失敗,請檢查實例、Topic和Group ID的所屬權限和授權策略。
400InvalidParameter.%sAn error occurred while validating the parameter. The parameter may be missing or invalid.參數(shù)校驗失敗,可能缺失或者傳入值非法。
400DeviceCredentialNumExceedThe number of device credentia exceeds the limit. Please revoke unused device certificates-
400DeviceCredentialExsitDevice Credential Exsit-
400DeviceCredentialNotFoundDevice Credential Not Found. Check if the device certificate is registered-
404ApiNotSupportThe specified API is not supported.當前接口不支持,請檢查。
500InternalErrorAn error occurred while processing your request. Try again later.MQTT后端服務異常,請重試。
500SystemOverFlowAn error occurred while processing your request. Please try again.系統(tǒng)限流,請重試。

訪問錯誤中心查看更多錯誤碼。

變更歷史

變更時間變更內(nèi)容概要操作
2023-04-06OpenAPI 錯誤碼發(fā)生變更查看變更詳情