このトピックでは、API操作が呼び出された後に返される応答について説明します。
レスポンスデータは JSON 形式または XML 形式のいずれかで返されます。 デフォルトの応答形式はJSONです。 リクエストでFormat共通パラメーターを指定して、レスポンスの形式を変更できます。 詳細については、「共通パラメーター」をご参照ください。
APIリファレンスで提供されるサンプル応答は、読みやすさとわかりやすくするために改行とインデントでフォーマットされています。 ただし、実際の応答は改行またはインデントでフォーマットされていません。
正常に処理された場合のレスポンス例
すべての応答は、呼び出しが成功したかどうかに関係なく、一意のRequestIDを返します。 APIレスポンスは、2xxステータスコードが呼び出しの成功を示すHTTPレスポンス形式を使用します。
XML 形式
<?xml version="1.0" encoding="UTF-8"? > <!--The root node of the response-->
<ActionResponse> <!--Returned request ID-->
<RequestId>4C467B38-3910-447D-87BC-AC049166F223</RequestId> <!--Response data-->
</ActionResponse>JSON 形式
{
"RequestId": "4C467B38-3910-447D-87BC-AC049166F223" /* Response data */
}エラーレスポンスの例
操作の呼び出し時にエラーが発生した場合、エラーコード、エラーメッセージ、およびリクエストIDからなるエラー応答が返されます。 APIレスポンスは、4xxまたは5xxステータスコードが呼び出しの失敗を示すHTTPレスポンス形式を使用します。
返されたエラーコードと一般的なエラーコードに基づいてエラーをトラブルシューティングできます。 エラーが解決しない場合は、チケットを起票し、HostIdとRequestIdの値を入力して、Alibaba Cloudからテクニカルサポートを取得します。
XML 形式
<?xml version="1.0" encoding="UTF-8"? ><!--The root node of the response-->
<Error>
<RequestId>540CFF28-407A-40B5-B6A5-74Bxxxxxxxxx</RequestId> <!--Request ID-->
<HostId>ess.aliyuncs.com</HostId> <!--Service endpoint-->
<Code>InternalError</Code> <!--Error code-->
<Message>The request processing has failed due to some unknown error, exception or failure. </Message> <!--Error message-->
</Error>JSON 形式
{
"RequestId": "540CFF28-407A-40B5-B6A5-74Bxxxxxxxxx", /* Request ID */
"HostId": "ess.aliyuncs.com", /* Service endpoint */
"Code": "InternalError", /* Error code */
"Message": "The request processing has failed due to some unknown error, exception or failure." /* Error message */
}一般的なエラーコード
HTTP ステータスコード | エラーコード | エラーメッセージ | 説明 |
400 | InvalidAccessKeyId.NotFound | The Access Key ID provided does not exist in our records. | 指定されたAccessKeyIdパラメーターが存在しない場合に返されるエラーメッセージ。 |
400 | InvalidParameter | The specified value of parameter <parameter name> is not valid. | 指定されたパラメーター値が無効な場合に返されるエラーメッセージ。 |
400 | MissingParameter | The input parameter <parameter name> that is mandatory for processing this request is not supplied. | 必要なパラメーターが指定されていない場合に返されるエラーメッセージ。 |
400 | NoSuchVersion | The specified version does not exist. | 指定されたバージョンが存在しない場合に返されるエラーメッセージ。 |
400 | ResourceNotAvailable | Resource you requested is not available in this region or zone. | 指定されたリージョンでESSサービスが使用できない場合に返されるエラーメッセージ。 |
400 | Throttling | Request was denied due to request throttling. | The error message returned because the system is under throttling condition. しばらくしてから再試行します。 |
400 | UnsupportedOperation | The specified action is not supported. | 指定された操作がサポートされていない場合に返されるエラーメッセージ。 |
403 | Forbidden | Users are not authorized to operate on the specified resource. | 指定された操作を実行する権限がない場合に返されるエラーメッセージ。 |
403 | Forbidden.RiskControl | This operation is forbidden by Aliyun Risk Control system. | 指定された操作が許可されていない場合に返されるエラーメッセージ。 |
403 | Forbidden.Unsubscribed | Do not have permission to access this API.。 | 指定されたAPI操作を呼び出すためにESSサービスを有効にしていない場合に返されるエラーメッセージ。 |
403 | Forbidden.UserVerification | Your user account is not verified by Aliyun. | 実名登録が完了していない場合に返されるエラーメッセージ。 |
403 | SignatureDoesNotMatch | The signature we calculated does not match the one you provided. | 計算された署名があなたが提供したものと異なる場合に返されるエラーメッセージ。 |
500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | システムエラーが発生した場合に返されるエラーメッセージ。 |
503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | サーバーがリクエストに応答できない場合に返されるエラーメッセージ。 しばらくしてから再試行します。 |