全部产品
Search
文档中心

密钥管理服务:返回结果

更新时间:May 31, 2023

调用API服务后,系统会返回HTTP状态码。如果返回的状态码为2xx,表示调用成功。如果返回的状态码为4xx或5xx,表示调用失败。本文档中的返回示例为了便于您查看,做了格式化处理,实际返回结果没有进行换行、缩进等处理。

正常返回示例

XML示例

<?xml version="1.0" encoding="UTF-8"?> 
<!--结果的根结点-->
<接口名称+Response>
    <!--返回请求标签-->
    <RequestId>4C467B38-3910-447D-87BC-AC049166F216</RequestId>
    <!--返回结果数据-->
</接口名称+Response>

JSON示例

{
    "RequestId": "4C467B38-3910-447D-87BC-AC049166F216"
}

异常返回示例

调用接口出错后,将不会返回结果数据。调用方可根据每个接口对应的错误码以及公共错误码来定位错误原因。

当调用API报错后,将在response中返回HTTP状态码、错误码和错误信息,还会包括该次请求在全局的唯一标识RequestId。若您根据错误码和错误信息无法明确问题,可将RequestId提供给技术支持人员,帮忙快速定位到该条请求日志。

XML示例(请求过期)

<KMS>
     <HttpStatus>400</HttpStatus>
     <Code>IllegalTimestamp</Code>
     <Message>The input parameter "Timestamp" that is mandatory for processing this request is not supplied.</Message>
     <RequestId>3b237773-bc2c-4bea-95fc-319a1a5baa68</RequestId>
</KMS>

JSON示例(请求过期)

{
     "HttpStatus": 400,
     "Code": "IllegalTimestamp",
     "Message": "The input parameter \"Timestamp\" that is mandatory for processing this request is not supplied.",
     "RequestId": "e85db688-a2d3-44ca-9790-4259f59e90d8"
}

公共错误码

错误代码

描述

HTTP状态码

InternalFailure

Internal Failure.

500

ServiceUnavailableTemporary

Service Unavailable Temporary.

503

InvalidAccessKeyId.NotFound

The AccessKey ID provided does not exist in our records.

404

Forbidden.KeyNotFound

The specified Key is not found.

404

Forbidden.KeyVersionNotFound

The specified Key version is not found.

404

Forbidden.AliasNotFound

The specified Alias is not found.

404

Forbidden.NoPermission

This operation is forbidden by permission system.

403

Forbidden.AccessKey

This AccessKey is not enabled.

403

UnsupportedHTTPMethod

This http method is not supported.

403

Forbidden.UbsmsInvalidUserid

Userid Invalid For Ubsms.

403

Forbidden.UbsmsInvalidBid

Your account partner does not have KMS Service.

403

Forbidden.KmsServiceNotEnabled

Kms service is not Enabled for current user. Please get access permission first.

403

Forbidden.ProhibitedByRiskControl

Current user is Prohibited By Risk Control.

403

Forbidden.InDebtOverdue

Current user is indebted Overdue.

403

Forbidden.InDebt

Current user is indebted.

403

ParseRequestParameterException

Server parse parameters exception. Please check your input params.

400

MissingParameter

The parameter "< parameter name >" is needed but not provided.

400

InvalidParameter

The specified parameter "< parameter name >" is not valid.

400

IncompleteSignature

The request signature does not conform to Alibaba Cloud standards.

400

IllegalTimestamp

The input parameter "Timestamp" that is required for processing this request is not supplied.

400

Rejected.LimitExceeded

The request was rejected because user create resource limit was exceeded.

400

AliasAlreadyExists

AliasName Already Exists.

400

InvalidKeyMaterial

key material is invalid.

400

InvalidImportToken

import token is invalid.

400

ExpiredImportToken

import token is expired.

400

Unsupported.Origin

This key origin is not valid for this api.

400

Unsupported.Alias

Alias is not valid for this api.

400

Unsupported.ProtectionLevel

This protection level is not valid for this region

400

Rejected.StateModifiedFailed

Keystate modified failed.

409

Rejected.Disabled

The request was rejected because the key state is Disabled.

409

Rejected.PendingDeletion

The request was rejected because the key state is PendingDeletion.

409

Rejected.PendingImport

The request was rejected because the key state is PendingImport.

409