调用DescribeSystemEventCount接口查询当前账号下各云服务发生事件的数量。
接口说明
背景信息
您可以调用 DescribeSystemEventMetaList ,获取云监控支持的各云服务及其系统事件。
使用说明
本文将提供一个示例,查询当前账号云服务器ECS发生事件的数量,返回结果显示,发生事件的数量共 3 条。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:- 对于必选的资源类型,用前面加 * 表示。
- 对于不支持资源级授权的操作,用全部资源表示。
 
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
| 操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 | 
|---|---|---|---|---|
| cms:DescribeSystemEventCount | get | *全部资源 * | 
 | 无 | 
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 | 
|---|---|---|---|---|
| Product | string | 否 | 云服务名称。 调用 DescribeSystemEventMetaList 接口,获取返回参数 | ECS | 
| EventType | string | 否 | 事件类型。 调用 DescribeSystemEventMetaList 接口,获取返回参数 | StatusNotification | 
| Name | string | 否 | 事件名称。 调用 DescribeSystemEventMetaList 接口,获取返回参数 | Instance:StateChange | 
| Level | string | 否 | 事件级别。取值: 
 调用 DescribeSystemEventMetaList 接口,获取返回参数 | Info | 
| Status | string | 否 | 事件状态。 调用 DescribeSystemEventMetaList 接口,获取返回参数 | Normal | 
| GroupId | string | 否 | 应用分组 ID。 | 17285**** | 
| SearchKeywords | string | 否 | 搜索事件内容包含的关键字。取值: 
 | ECS | 
| StartTime | string | 否 | 查询事件开始的时间戳。单位:毫秒。 | 1635993541000 | 
| EndTime | string | 否 | 查询事件结束的时间戳。单位:毫秒。 | 1635993921000 | 
关于公共请求参数的详情,请参见公共参数。
返回参数
示例
正常返回示例
JSON格式
{
  "Code": 200,
  "Message": "success",
  "RequestId": "C7A7B776-0ACE-5A93-9B07-DE8008D9CCDF",
  "Success": true,
  "SystemEventCounts": {
    "SystemEventCount": [
      {
        "Status": "Normal",
        "Time": 1635993751000,
        "GroupId": "17285****",
        "Product": "ECS",
        "InstanceName": "ECS-test",
        "Num": 3,
        "ResourceId": "i-rj99xc6cptkk64ml****",
        "Name": "Instance:StateChange",
        "Content": "实例状态改变通知",
        "Level": "Info",
        "RegionId": "cn-hangzhou"
      }
    ]
  }
}错误码
| HTTP status code | 错误码 | 错误信息 | 描述 | 
|---|---|---|---|
| 400 | ParameterInvalid | Illegal parameters. | - | 
| 403 | AccessForbidden | User not authorized to operate on the specified resource. | - | 
| 404 | ResourceNotFound | The specified resource is not found. | 未找到指定资源。 | 
| 500 | InternalError | The request processing has failed due to some unknown error. | - | 
访问错误中心查看更多错误码。
变更历史
| 变更时间 | 变更内容概要 | 操作 | 
|---|
