
# 查询事件告警信息 - ListEvents
#### 功能介绍
该接口用于查询对应用户的事件、告警。
#### 调用方法
请参见[如何调用API](https://support.huaweicloud.com/api-aom/aom_04_0057.html)。
#### 授权信息
账号具备所有API的调用权限，如果使用账号下的IAM用户调用当前API，该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权，具体权限要求请参见[权限和授权项](https://support.huaweicloud.com/api-aom/aom_04_0031.html)。
- 如果使用身份策略授权，需具备如下身份策略权限。
  
  | 授权项            | 访问级别 | 资源类型（\*为必须） | 条件键 | 别名 | 依赖的授权项 |
  |:---|:---|:---|:---|:---|:---|
  | aom:alarm:list | List | -           | -   | -  | -      |
     
  
 
#### URI
POST /v2/{project_id}/events
表1路径参数 
| 参数         | 是否必选 | 参数类型   | 描述                                                                                                     |
|:---|:---|:---|:---|
| project_id | 是    | String | 项目ID，可以从控制台获取，也可以从调用API处获取。获取方式请参见：[获取项目ID](https://support.huaweicloud.com/api-aom/aom_04_0024.html)。 |
   
表2Query参数 
| 参数     | 是否必选 | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                         |
|:---|:---|:---|:---|
| type   | 否    | String  | 查询类型： - active_alert：代表查询活动告警。   - history_alert：代表查询历史告警。    不传或者传其他值，则返回指定查询条件的所有信息。 |
| limit  | 否    | Integer | 查询数量限制值。不填默认值为1000。                                                                                                                                                                                                                                                                                                                                                        |
| marker | 否    | String  | 分页标记，初始为0，后续值为返回体中的next_marker参数。                                                                                                                                                                                                                                                                                                                                          |
   
#### 请求参数
表3请求Header参数 
| 参数                    | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                          |
|:---|:---|:---|:---|
| X-Auth-Token          | 是    | String | 从IAM服务获取的用户Token。获取方式请参见：[获取Token](https://support.huaweicloud.com/api-aom/aom_04_0059.html)。                                                                                                                                                                                                                                                               |
| Content-Type          | 是    | String | 消息体的类型（格式）。指定类型为"application/json"。                                                                                                                                                                                                                                                                                                                         |
| Enterprise-Project-Id | 否    | String | 企业项目id。 - 查询单个企业项目下实例，填写企业项目id。   - 查询所有企业项目下实例，填写"all_granted_eps"。    |
   
表4请求Body参数 
| 参数                | 是否必选 | 参数类型                                                                 | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
|:---|:---|:---|:---|
| time_range        | 是    | String                                                               | 查询时间范围，主要用于解决客户端时间和服务端时间不一致情况下，查询最近N分钟的数据。另可用于精确查询某一段时间的数据。 例如： - -1.-1.60(表示最近60分钟)，不管当前客户端是什么时间，都以服务端时间为准查询最近60分钟。   - 1650852000000.1650852300000.5(表示GMT+8 2022-04-25 10:00:00至2022-04-25    10:05:00指定的5分钟) 格式如下： startTimeInMillis.endTimeInMillis.durationInMinutes 参数解释： - startTimeInMillis: 查询的开始时间，格式为UTC毫秒，如果指定为-1，服务端将按(endTimeInMillis - durationInMinutes \* 60 \* 1000)计算开始时间。例如-1.1650852300000.5，则相当于1650852000000.1650852300000.5。   - endTimeInMillis: 查询的结束时间，格式为UTC毫秒，如果指定为-1，服务端将按(startTimeInMillis + durationInMinutes \* 60 \* 1000)计算结束时间。如果计算出的结束时间大于当前系统时间,则使用当前系统时间。例如1650852000000.-1.5，则相当于1650852000000.1650852300000.5。   - durationInMinutes：查询时间的跨度分钟数。 取值范围大于0并且大于等于(endTimeInMillis - startTimeInMillis) / (60 \* 1000) - 1。当开始时间与结束时间都设置为-1时，系统会将结束时间设置为当前时间UTC毫秒值，并按(endTimeInMillis - durationInMinutes \* 60 \* 1000)计算开始时间。如：-1.-1.60(表示最近60分钟)。    约束与限制： 单次请求中，查询时长与周期需要满足以下条件: durationInMinutes \* 60 / period \<= 1440。 |
| step              | 否    | Long                                                                 | 统计步长。毫秒数，例如一分钟则填写为60000。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| search            | 否    | String                                                               | 模糊查询匹配字段，可以为空。如果值不为空，可以模糊匹配。metadata字段为必选字段。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| sort              | 否    | [sort] object                             | 返回列表的排序方式，可以为空。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| metadata_relation | 否    | Array of [RelationModel] objects | 查询条件组合，可以为空。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
   
 表5sort 
| 参数       | 是否必选 | 参数类型             | 描述                                                  |
|:---|:---|:---|:---|
| order_by | 是    | Array of strings | 排序字段列表。会根据列表中定义顺序对返回列表最排序。当sort参数不为空时，order_by参数必填。 |
| order    | 否    | String           | 排序方式枚举值。asc代表正序，desc代表倒序。                           |
   
 表6RelationModel 
| 参数       | 是否必选 | 参数类型             | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|:---|:---|:---|:---|
| key      | 是    | String           | 指定查询字段的key，对应metadata里面的key 。当metadata_relation参数不为空时 key参数必填。                                                                                                                                                                                                                                                                                                                                                                                                          |
| value    | 否    | Array of strings | 查询条件中指定key的值。                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| relation | 否    | String           | 该条件与其他条件的组合方式。 - AND：必须满足所有条件。   - OR：可以满足其中一个条件。   - NOT：必须不满足所有条件。    |
   
#### 响应参数
**状态码：200**
表7响应Body参数 
| 参数        | 参数类型                                                                    | 描述        |
|:---|:---|:---|
| events    | Array of [ListEventModel] objects | 事件或者告警详情。 |
| page_info | [PageInfo] object                       | 分页信息      |
   
 表8ListEventModel 
| 参数                    | 参数类型                 | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
|:---|:---|:---|
| starts_at             | Long                 | 事件或者告警产生的时间，UTC毫秒级时间戳。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ends_at               | Long                 | 事件或者告警清除的时间，UTC毫秒级时间戳，为0时表示未删除。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| timeout               | Long                 | 指定AOM自动清除超期告警的时间，最长清除时间不超过15天。单位：毫秒数，一分钟则填写为60000。例如该时间设置为5天的告警，对应毫秒数：7200 \* 60000（即：5天 \* 24小时 \* 60分钟 \* 60000毫秒）。如果上报告警时没指定该时间，则默认清除时间为15天。 当action值为clear时，即清除告警时不需要指定该参数。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| metadata              | Map\<String,String\> | 事件或者告警的详细信息，为键值对形式。必须字段为： - event_name：事件或者告警名称,类型为String；   - event_severity：事件级别枚举值。类型为String，四种类型 "Critical", "Major", "Minor",   - event_type：事件类别枚举值。类型为String，event为告警事件，alarm为普通告警；   - resource_provider：事件对应云服务名称。类型为String；   - resource_type：事件对应资源类型。类型为String；   - resource_id：事件对应资源信息。类型为String。    "Info"； |
| annotations           | Map\<String,Object\> | 事件或者告警附加字段，可以为空。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| id                    | String               | 事件或者告警id，系统会自动生成，上报无需填写该字段。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| event_sn              | String               | 告警流水号。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| arrives_at            | Long                 | 事件到达系统时间，UTC毫秒级时间戳。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| enterprise_project_id | String               | 事件或告警所属企业项目id。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| policy                | Map\<String,Object\> | 开放告警策略。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
   
 表9PageInfo 
| 参数              | 参数类型    | 描述          |
|:---|:---|:---|
| current_count   | Integer | 当前页事件、告警总数。 |
| previous_marker | String  | 前一个marker。  |
| next_marker     | String  | 下一个marker。  |
   
**状态码：400**
表10响应Body参数 
| 参数         | 参数类型   | 描述          |
|:---|:---|:---|
| error_code | String | 调用失败响应码。    |
| error_msg  | String | 调用失败响应信息描述。 |
| error_type | String | 调用失败类型。     |
| trace_id   | String | 请求id。       |
   
**状态码：401**
表11响应Body参数 
| 参数         | 参数类型   | 描述          |
|:---|:---|:---|
| error_code | String | 调用失败响应码。    |
| error_msg  | String | 调用失败响应信息描述。 |
| error_type | String | 调用失败类型。     |
| trace_id   | String | 请求id。       |
   
**状态码：403**
表12响应Body参数 
| 参数         | 参数类型   | 描述          |
|:---|:---|:---|
| error_code | String | 调用失败响应码。    |
| error_msg  | String | 调用失败响应信息描述。 |
| error_type | String | 调用失败类型。     |
| trace_id   | String | 请求id。       |
   
**状态码：500**
表13响应Body参数 
| 参数         | 参数类型   | 描述          |
|:---|:---|:---|
| error_code | String | 调用失败响应码。    |
| error_msg  | String | 调用失败响应信息描述。 |
| error_type | String | 调用失败类型。     |
| trace_id   | String | 请求id。       |
   
**状态码：503**
表14响应Body参数 
| 参数         | 参数类型   | 描述          |
|:---|:---|:---|
| error_code | String | 调用失败响应码。    |
| error_msg  | String | 调用失败响应信息描述。 |
| error_type | String | 调用失败类型。     |
| trace_id   | String | 请求id。       |
   
#### 请求示例
查询对应用户{project_id}的事件、告警列表。
```
https://{endpoint}/v2/{project_id}/events
{
  "time_range" : "-1.-1.30",
  "metadata_relation" : [ {
    "key" : "event_type",
    "relation" : "AND",
    "value" : [ "alarm" ]
  }, {
    "key" : "event_severity",
    "relation" : "AND",
    "value" : [ "Critical", "Major", "Minor", "Info" ]
  } ],
  "search" : "",
  "sort" : {
    "order_by" : [ "starts_at" ],
    "order" : "desc"
  }
}
```
#### 响应示例
**状态码：200**
OK 请求响应成功。
```
{
  "events" : [ {
    "annotations" : {
      "alarm_fix_suggestion_zh_cn" : "修复建议",
      "alarm_probableCause_zh_cn" : "可能原因",
      "message" : "告警详情"
    },
    "arrives_at" : 1637736290800,
    "ends_at" : 0,
    "enterprise_project_id" : "0",
    "event_sn" : "1283514476372426755",
    "id" : "6775161208461480000",
    "metadata" : {
      "event_name" : "test",
      "event_severity" : "Major",
      "event_type" : "alarm",
      "resource_id" : "ecs123",
      "resource_provider" : "ecs",
      "resource_type" : "vm"
    },
    "policy" : { },
    "starts_at" : 1637736290800,
    "timeout" : 60000
  } ],
  "page_info" : {
    "current_count" : 1,
    "next_marker" : "",
    "previous_marker" : "0"
  }
}
```
**状态码：400**
BadRequest 非法请求。建议直接修改该请求，不要重试该请求。
```
{
  "error_code" : "AOM.08032002",
  "error_msg" : "The request body is illegal",
  "error_type" : "SC_BAD_REQUEST",
  "trace_id" : ""
}
```
**状态码：401**
Unauthorized 在客户端提供认证信息后，返回该状态码，表明服务端指出客户端所提供的认证信息不正确或非法。
```
{
  "error_code" : "AOM.0403",
  "error_msg" : "auth failed.",
  "error_type" : "AUTH_FAILED",
  "trace_id" : ""
}
```
**状态码：403**
Forbidden 请求被拒绝访问。返回该状态码，表明请求能够到达服务端，且服务端能够理解用户请求，但是拒绝做更多的事情，因为该请求被设置为拒绝访问，建议直接修改该请求，不要重试该请求。
```
{
  "error_code" : "AOM.0403",
  "error_msg" : "auth failed.",
  "error_type" : "AUTH_FAILED",
  "trace_id" : ""
}
```
**状态码：500**
InternalServerError 表明服务端能被请求访问到，但是不能理解用户的请求。
```
{
  "error_code" : "APM.00000500",
  "error_msg" : "Internal Server Error",
  "error_type" : "INTERNAL_SERVER_ERROR",
  "trace_id" : ""
}
```
**状态码：503**
ServiceUnavailable 被请求的服务无效。建议直接修改该请求，不要重试该请求。
```
{
  "error_code" : "AOM.0503",
  "error_msg" : "SC_NOT_IMPLEMENTED",
  "error_type" : "SC_NOT_IMPLEMENTED",
  "trace_id" : ""
}
```
#### SDK代码示例
SDK代码示例如下。
- [Java]
  查询对应用户{project_id}的事件、告警列表。
  ```
  package com.huaweicloud.sdk.test;
  import com.huaweicloud.sdk.core.auth.ICredential;
  import com.huaweicloud.sdk.core.auth.BasicCredentials;
  import com.huaweicloud.sdk.core.exception.ConnectionException;
  import com.huaweicloud.sdk.core.exception.RequestTimeoutException;
  import com.huaweicloud.sdk.core.exception.ServiceResponseException;
  import com.huaweicloud.sdk.aom.v2.region.AomRegion;
  import com.huaweicloud.sdk.aom.v2.*;
  import com.huaweicloud.sdk.aom.v2.model.*;
  import java.util.List;
  import java.util.ArrayList;
  public class ListEventsSolution {
      public static void main(String[] args) {
          // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
          // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
          String ak = System.getenv("CLOUD_SDK_AK");
          String sk = System.getenv("CLOUD_SDK_SK");
          String projectId = "{project_id}";
          ICredential auth = new BasicCredentials()
                  .withProjectId(projectId)
                  .withAk(ak)
                  .withSk(sk);
          AomClient client = AomClient.newBuilder()
                  .withCredential(auth)
                  .withRegion(AomRegion.valueOf("<YOUR REGION>"))
                  .build();
          ListEventsRequest request = new ListEventsRequest();
          EventQueryParam2 body = new EventQueryParam2();
          List<String> listMetadataRelationValue = new ArrayList<>();
          listMetadataRelationValue.add("Critical");
          listMetadataRelationValue.add("Major");
          listMetadataRelationValue.add("Minor");
          listMetadataRelationValue.add("Info");
          List<String> listMetadataRelationValue1 = new ArrayList<>();
          listMetadataRelationValue1.add("alarm");
          List<RelationModel> listbodyMetadataRelation = new ArrayList<>();
          listbodyMetadataRelation.add(
              new RelationModel()
                  .withKey("event_type")
                  .withValue(listMetadataRelationValue1)
                  .withRelation(RelationModel.RelationEnum.fromValue("AND"))
          );
          listbodyMetadataRelation.add(
              new RelationModel()
                  .withKey("event_severity")
                  .withValue(listMetadataRelationValue)
                  .withRelation(RelationModel.RelationEnum.fromValue("AND"))
          );
          List<String> listSortOrderBy = new ArrayList<>();
          listSortOrderBy.add("starts_at");
          EventQueryParam2Sort sortbody = new EventQueryParam2Sort();
          sortbody.withOrderBy(listSortOrderBy)
              .withOrder(EventQueryParam2Sort.OrderEnum.fromValue("desc"));
          body.withMetadataRelation(listbodyMetadataRelation);
          body.withSort(sortbody);
          body.withSearch("");
          body.withTimeRange("-1.-1.30");
          request.withBody(body);
          try {
              ListEventsResponse response = client.listEvents(request);
              System.out.println(response.toString());
          } catch (ConnectionException e) {
              e.printStackTrace();
          } catch (RequestTimeoutException e) {
              e.printStackTrace();
          } catch (ServiceResponseException e) {
              e.printStackTrace();
              System.out.println(e.getHttpStatusCode());
              System.out.println(e.getRequestId());
              System.out.println(e.getErrorCode());
              System.out.println(e.getErrorMsg());
          }
      }
  }
  ```
- [Python]
  查询对应用户{project_id}的事件、告警列表。
  ```
  # coding: utf-8
  import os
  from huaweicloudsdkcore.auth.credentials import BasicCredentials
  from huaweicloudsdkaom.v2.region.aom_region import AomRegion
  from huaweicloudsdkcore.exceptions import exceptions
  from huaweicloudsdkaom.v2 import *
  if __name__ == "__main__":
      # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
      # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
      ak = os.environ["CLOUD_SDK_AK"]
      sk = os.environ["CLOUD_SDK_SK"]
      projectId = "{project_id}"
      credentials = BasicCredentials(ak, sk, projectId)
      client = AomClient.new_builder() \
          .with_credentials(credentials) \
          .with_region(AomRegion.value_of("<YOUR REGION>")) \
          .build()
      try:
          request = ListEventsRequest()
          listValueMetadataRelation = [
              "Critical",
              "Major",
              "Minor",
              "Info"
          ]
          listValueMetadataRelation1 = [
              "alarm"
          ]
          listMetadataRelationbody = [
              RelationModel(
                  key="event_type",
                  value=listValueMetadataRelation1,
                  relation="AND"
              ),
              RelationModel(
                  key="event_severity",
                  value=listValueMetadataRelation,
                  relation="AND"
              )
          ]
          listOrderBySort = [
              "starts_at"
          ]
          sortbody = EventQueryParam2Sort(
              order_by=listOrderBySort,
              order="desc"
          )
          request.body = EventQueryParam2(
              metadata_relation=listMetadataRelationbody,
              sort=sortbody,
              search="",
              time_range="-1.-1.30"
          )
          response = client.list_events(request)
          print(response)
      except exceptions.ClientRequestException as e:
          print(e.status_code)
          print(e.request_id)
          print(e.error_code)
          print(e.error_msg)
  ```
- [Go]
  查询对应用户{project_id}的事件、告警列表。
  ```
  package main
  import (
  "fmt"
  "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic"
      aom "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/aom/v2"
  "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/aom/v2/model"
      region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/aom/v2/region"
  )
  func main() {
      // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
      // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
      ak := os.Getenv("CLOUD_SDK_AK")
      sk := os.Getenv("CLOUD_SDK_SK")
      projectId := "{project_id}"
      auth, err := basic.NewCredentialsBuilder().
          WithAk(ak).
          WithSk(sk).
          WithProjectId(projectId).
          SafeBuild()
      if err != nil {
          fmt.Println(err)
          return
      }
      hcClient, err := aom.AomClientBuilder().
           WithRegion(region.ValueOf("<YOUR REGION>")).
           WithCredential(auth).
           SafeBuild()
      if err != nil {
          fmt.Println(err)
          return
      }
      client := aom.NewAomClient(hcClient)
      request := &model.ListEventsRequest{}
  var listValueMetadataRelation = []string{
          "Critical",
      "Major",
      "Minor",
      "Info",
      }
  var listValueMetadataRelation1 = []string{
          "alarm",
      }
  relationMetadataRelation:= model.GetRelationModelRelationEnum().AND
  relationMetadataRelation1:= model.GetRelationModelRelationEnum().AND
  var listMetadataRelationbody = []model.RelationModel{
          {
              Key: "event_type",
              Value: &listValueMetadataRelation1,
              Relation: &relationMetadataRelation,
          },
          {
              Key: "event_severity",
              Value: &listValueMetadataRelation,
              Relation: &relationMetadataRelation1,
          },
      }
  var listOrderBySort = []string{
          "starts_at",
      }
  orderSort:= model.GetEventQueryParam2SortOrderEnum().DESC
  sortbody := &model.EventQueryParam2Sort{
  OrderBy: listOrderBySort,
  Order: &orderSort,
  }
  searchEventQueryParam2:= ""
  request.Body = &model.EventQueryParam2{
  MetadataRelation: &listMetadataRelationbody,
  Sort: sortbody,
  Search: &searchEventQueryParam2,
  TimeRange: "-1.-1.30",
  }
  response, err := client.ListEvents(request)
  if err == nil {
          fmt.Printf("%+v\n", response)
      } else {
          fmt.Println(err)
      }
  }
  ```
- [更多]
  更多编程语言的SDK代码示例，请参见[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/AOM/sdk?api=ListEvents)的代码示例页签，可生成自动对应的SDK代码示例。
#### 状态码
| 状态码 | 描述                                                                                            |
|:---|:---|
| 200 | OK 请求响应成功。                                                                                    |
| 400 | BadRequest 非法请求。建议直接修改该请求，不要重试该请求。                                                            |
| 401 | Unauthorized 在客户端提供认证信息后，返回该状态码，表明服务端指出客户端所提供的认证信息不正确或非法。                                     |
| 403 | Forbidden 请求被拒绝访问。返回该状态码，表明请求能够到达服务端，且服务端能够理解用户请求，但是拒绝做更多的事情，因为该请求被设置为拒绝访问，建议直接修改该请求，不要重试该请求。 |
| 500 | InternalServerError 表明服务端能被请求访问到，但是不能理解用户的请求。                                                 |
| 503 | ServiceUnavailable 被请求的服务无效。建议直接修改该请求，不要重试该请求。                                                |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-aom/ErrorCode.html)。
