阿里云調(diào)用 API 服務(wù)后返回什么結(jié)果
來源:技術(shù)員聯(lián)盟┆發(fā)布時(shí)間:2017-12-08 00:12┆點(diǎn)擊:
調(diào)用 API 服務(wù)后返回?cái)?shù)據(jù)采用統(tǒng)一格式,返回的 HTTP 狀態(tài)碼為 2xx,代表調(diào)用成功;返回 4xx 或 5xx 的 HTTP 狀態(tài)碼代表調(diào)用失敗。調(diào)用成功返回的數(shù)據(jù)格式主要有 XML 和 JSON 兩種,外部系統(tǒng)可以在請(qǐng)求時(shí)傳入?yún)?shù)來制定返回的數(shù)據(jù)格式,默認(rèn)為 XML 格式。本文檔中的返回示例為了便于用戶查看,做了格式化處理,實(shí)際返回結(jié)果是沒有進(jìn)行換行、縮進(jìn)等處理的。
成功結(jié)果

錯(cuò)誤結(jié)果
調(diào)用接口出錯(cuò)后,將不會(huì)返回結(jié)果數(shù)據(jù)。調(diào)用方可根據(jù)每個(gè)接口對(duì)應(yīng)的錯(cuò)誤碼以及下述 2.3.3 的公共錯(cuò)誤碼來定位錯(cuò)誤原因。當(dāng)調(diào)用出錯(cuò)時(shí),HTTP 請(qǐng)求返回一個(gè) 4xx 或 5xx 的 HTTP 狀態(tài)碼。返回的消息體中是具體的錯(cuò)誤代碼及錯(cuò)誤信息。另外還包含一個(gè)全局唯一的請(qǐng)求 ID:RequestId 和一個(gè)您該次請(qǐng)求訪問的站點(diǎn) ID:HostId。在調(diào)用方找不到錯(cuò)誤原因時(shí),可以聯(lián)系阿里云客服,并提供該 HostId 和 RequestId,以便我們盡快幫您解決問題。

公共錯(cuò)誤碼
錯(cuò)誤代碼
描述
Http 狀態(tài)碼
語義
MissingParameter
The input parameter “Action” that is mandatory for processing this request is not supplied
400
缺少 Action 字段
MissingParameter
The input parameter “AccessKeyId” that is mandatory for processing this request is not supplied
400
缺少 AccessKeyId 字段
MissingParameter
An input parameter “Signature” that is mandatory for processing the request is not supplied.
400
缺少 Signature 字段
MissingParameter
The input parameter “TimeStamp” that is mandatory for processing this request is not supplied
400
缺少 Timestamp 字段
MissingParameter
The input parameter “Version” that is mandatory for processing this request is not supplied
400
缺少 Version 字段
InvalidParameter
The specified parameter “Action or Version” is not valid.
400
無效的 Action 值(該 API 不存在)
InvalidAccessKeyId.NotFound
The Access Key ID provided does not exist in our records.
400
無效的 AccessKeyId 值(該 key 不存在)
Forbidden.AccessKeyDisabled
The Access Key is disabled.
403
該 AccessKey 處于禁用狀態(tài)
IncompleteSignature
The request signature does not conform to Aliyun standards.
400
無效的 Signature 取值(簽名結(jié)果錯(cuò)誤)
InvalidParamater
The specified parameter “SignatureMethod” is not valid.
400
無效的 SignatureMethod 取值
InvalidParamater
The specified parameter “SignatureVersion” is not valid.
400
無效的 SignatureVersion 取值
IllegalTimestamp
The input parameter “Timestamp” that is mandatory for processing this request is not supplied.
400
無效的 Timestamp 取值(Timestamp 與服務(wù)器時(shí)間相差超過了 1 個(gè)小時(shí))
SignatureNonceUsed
The request signature nonce has been used.
400
無效的 SignatureNonce(該 SignatureNonce 值已被使用過)
InvalidParameter
The specified parameter “Action or Version” is not valid.
400
無效的 Version 取值
InvalidOwnerId
The specified OwnerId is not valid.
400
無效的 OwnerId 取值
InvalidOwnerAccount
The specified OwnerAccount is not valid.
400
無效的 OwnerAccount 取值
InvalidOwner
OwnerId and OwnerAccount can’t be used at one API access.
400
同時(shí)使用了 OwnerId 和 OwnerAccount
Throttling
Request was denied due to request throttling.
400
因系統(tǒng)流控拒絕訪問
Throttling
Request was denied due to request throttling.
400
該 key 的調(diào)用 quota 已用完
InvalidAction
Specified action is not valid.
403
該 key 無權(quán)調(diào)用該 API
UnsupportedHTTPMethod
This http method is not supported.
403
用戶使用了不支持的 Http Method(當(dāng)前 TOP 只支持 post 和 get)
ServiceUnavailable
The request has failed due to a temporary failure of the server.
500
服務(wù)不可用
UnsupportedParameter
The parameter ”” is not supported.
400
使用了無效的參數(shù)
InternalError
The request processing has failed due to some unknown error, exception or failure.
500
其他情況
MissingParameter
The input parameter OwnerId,OwnerAccount that is mandatory for processing this request is not supplied.
403
調(diào)用該接口沒有指定 OwnerId
Forbidden.SubUser
The specified action is not available for you。
403
無權(quán)調(diào)用訂單類接口
UnsupportedParameter
The parameter ”” is not supported.
400
該參數(shù)無權(quán)使用
Forbidden.InstanceNotFound
The specified Instance is not found, so we cann’t get enough information to check permission in RAM.
404
使用了 RAM 授權(quán)子賬號(hào)進(jìn)行資源訪問,但是本次訪問涉及到的 Instance 不存在
Forbidden.DiskNotFound
The specified Disk is not found, so we cann’t get enough information to check permission in RAM.
404
使用了 RAM 授權(quán)子賬號(hào)進(jìn)行資源訪問,但是本次訪問涉及到的 Disk 不存在
Forbidden.SecurityGroupNotFound
The specified SecurityGroup is not found, so we cann’t get enough information to check permission in RAM.
404
使用了 RAM 授權(quán)子賬號(hào)進(jìn)行資源訪問,但是本次訪問涉及到的 SecurityGroup 不存在
Forbidden.SnapshotNotFound
The specified Snapshot is not found, so we cann’t get enough information to check permission in RAM.
404
使用了 RAM 授權(quán)子賬號(hào)進(jìn)行資源訪問,但是本次訪問涉及到的 Snapshot 不存在
Forbidden.ImageNotFound
The specified Image is not found, so we cann’t get enough information to check permission in RAM.
404
使用了 RAM 授權(quán)子賬號(hào)進(jìn)行資源訪問,但是本次訪問涉及到的 Image 不存在
Forbidden.RAM
User not authorized to operate the specified resource, or this API doesn’t support RAM.
403
使用了 RAM 授權(quán)子賬號(hào)進(jìn)行資源訪問,但是本次操作沒有被正確的授權(quán)
Forbidden.NotSupportRAM
This action does not support accessed by RAM mode.
403
該接口不允許使用 RAM 方式進(jìn)行訪問
InsufficientBalance
Your account does not have enough balance.
400
余額不足
IdempotentParameterMismatch
Request uses a client token in a previous request but is not identical to that request.
400
使用了一個(gè)已經(jīng)使用過的 ClientToken,但此次請(qǐng)求內(nèi)容卻又與上一次使用該 Token 的 request 不一樣.
RealNameAuthenticationError
Your account has not passed the real-name authentication yet.
403
用戶未進(jìn)行實(shí)名認(rèn)證
InvalidIdempotenceParameter.Mismatch
The specified parameters are different from before
403
冪等參數(shù)不匹配
LastTokenProcessing
The last token request is processing
403
上一次請(qǐng)求還在處理中
InvalidParameter
The specified parameter is not valid
400
參數(shù)校驗(yàn)失敗