返回结果主要有XML和JSON两种格式,默认为XML,您可以指定公共请求参数 Format 变更返回结果的格式。更多信息,请参见公共参数。为了便于查看和美观,API 文档返回示例均有换行和缩进等处理,实际返回结果无换行和缩进处理。

正常返回示例

接口调用成功后会返回接口返回参数和请求ID,我们称这样的返回为正常返回。HTTP状态码为2xx。

  • XML示例
    <?xml version="1.0" encoding="UTF-8"?> <!--结果的根结点-->
    <ActionResponse> <!--返回请求标签-->
        <RequestId>4C467B38-3910-447D-87BC-AC049166F216</RequestId> <!--返回结果数据-->
    </ActionResponse>
  • JSON示例
    {
        "RequestId": "4C467B38-3910-447D-87BC-AC049166F216" /* 返回结果数据 */
    }

异常返回示例

接口调用出错后,会返回错误码、错误信息和请求ID,我们称这样的返回为异常返回。HTTP状态码为4xx 或者5xx。

您可以根据接口错误码,参考公共错误码以及 API 错误中心排查错误。

  • XML示例
    <?xml version="1.0" encoding="UTF-8"?><!--结果的根结点-->
    <Error>
        <RequestId>540CFF28-407A-40B5-B6A5-74Bxxxxxxxxx</RequestId> <!--请求ID-->
        <HostId>ecs.aliyuncs.com</HostId> <!--服务节点-->
        <Code>MissingParameter.CommandId</Code> <!--错误码-->
        <Message>The input parameter “CommandId” that is mandatory for processing this request is not supplied.</Message> <!--错误信息-->
    </Error>
  • JSON示例
    {
        "RequestId": "540CFF28-407A-40B5-B6A5-74Bxxxxxxxxx", /* 请求ID */
        "HostId": "ecs.aliyuncs.com", /* 服务节点 */
        "Code": "MissingParameter.CommandId", /* 错误码 */
        "Message": "The input parameter “CommandId” that is mandatory for processing this request is not supplied." /* 错误信息 */
    }

公共错误码

错误代码HTTP 状态码错误信息
IdempotentParameterMismatch400The request is retried with updated parameters.
IllegalTimestamp400The input parameter “Timestamp” that is mandatory for processing this request is not supplied.
IncompleteSignature400The request signature does not conform to Aliyun standards.
InsufficientBalance400Your account does not have enough balance.
InvalidAccessKeyId.NotFound400The specified Access Key ID does not exist.
InvalidOwner400OwnerId and OwnerAccount can’t be used at one API access.
InvalidOwnerAccount400The specified OwnerAccount is not valid.
InvalidOwnerId400The specified OwnerId is not valid.
InvalidParamater400The specified parameter “SignatureMethod” is not valid.
InvalidParamater400The specified parameter “SignatureVersion” is not valid.
InvalidParameter400The specified parameter is not valid
InvalidParameter400The specified parameter “Action or Version” is not valid.
InvalidParameter.IsNull400The required parameter must be not null.
MissingParameter400The input parameter “Action” that is mandatory for processing this request is not supplied
MissingParameter400The input parameter “AccessKeyId” that is mandatory for processing this request is not supplied
MissingParameter400The input parameter “Signature” that is mandatory for processing the request is not supplied.
MissingParameter400The input parameter “TimeStamp” that is mandatory for processing this request is not supplied
MissingParameter400The input parameter “Version” that is mandatory for processing this request is not supplied
SignatureNonceUsed400The request signature nonce has been used.
Throttling400You have made too many requests within a short time; your request is denied due to request throttling.
UnsupportedParameter400The parameters is unsupported.
UnknownError400The request processing has failed due to some unknown error.
ChargeTypeViolation403The operation is not permitted due to charge type of the instance.
Forbidden.AccessKeyDisabled403The Access Key is disabled.
Forbidden.NotSupportRAM403This action does not support accessed by RAM mode.
Forbidden.RAM403User not authorized to operate on the specified resource, or this API doesn’t support RAM.
Forbidden.RiskControl403This operation is forbidden by Aliyun RiskControl system.
Forbidden.SubUser403The specified action is not available for you.
Forbidden.Unauthorized403User not authorized to operate on the specified resource.
InvalidAccount.NotFound403The specified Account does not exist.
InvalidAction403Specified action is not valid.
InvalidIdempotenceParameter.Mismatch403The specified parameters are different from before.
InvalidParameter.OwnerAccount403OwnerAccount is Invalid.
InvalidParameter.ResourceOwnerAccount403ResourceOwnerAccount is Invalid.
LastTokenProcessing403The last token request is processing.
MissingParameter403The input parameter OwnerId,OwnerAccount that is mandatory for processing this request is not supplied.
RealNameAuthenticationError403Your account has not passed the real-name authentication yet.
UnsupportedHTTPMethod403This http method is not supported.
InvalidDiskId.NotFound404The specified DiskId does not exist.
InvalidImageId.NotFound404The specified ImageId does not exist.
InvalidInstanceId.NotFound404The specified InstanceId does not exist.
InvalidRegionId.NotFound404The specified RegionId does not exist.
InvalidSecurityGroupId.NotFound404The specified SecurityGroupId does not exist.
InvalidSnapshotId.NotFound404The specified SnapshotId does not exist.
OperationConflict409Request was denied due to conflict with a previous request.
InternalError500The request processing has failed due to some unknown error, exception or failure.
ServiceUnavailable503The request has failed due to a temporary failure of the server.
ServiceUnavailable.RegionMaintaining503System maintenance is in progress on the selected region, please wait a few minutes before trying again.