All Products
Search
Document Center

CloudMonitor:DescribeSystemEventCount

Last Updated:Jul 26, 2024

Queries the number of times that a system event of a cloud service has occurred.

Operation description

Background information

You can call the DescribeSystemEventMetaList operation to query the cloud services supported by CloudMonitor and their system events.

Description

This topic provides an example on how to query the number of times that a system event of Elastic Compute Service (ECS) has occurred. The returned result shows that the specified system event has occurred three times.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
cms:DescribeSystemEventCountget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ProductstringNo

The name of the cloud service.

You can call the DescribeSystemEventMetaList operation to obtain the value of the response parameter Product. The value of the Product parameter indicates the names of all cloud services in which the system events of your Alibaba Cloud account occurred. For more information, see DescribeSystemEventMetaList .

ECS
EventTypestringNo

The type of the system event.

You can call the DescribeSystemEventMetaList operation to obtain the value of the response parameter EventType. The value of the EventType parameter indicates the types of system events that occurred for all cloud services in your Alibaba Cloud account. For more information, see DescribeSystemEventMetaList .

StatusNotification
NamestringNo

The name of the system event.

You can call the DescribeSystemEventMetaList operation to obtain the value of the response parameter Name. The value of the Name parameter indicates the names of system events that occurred for all cloud services in your Alibaba Cloud account. For more information, see DescribeSystemEventMetaList .

Instance:StateChange
LevelstringNo

The level of the system event. Valid values:

  • Critical
  • Warn
  • Info

You can call the DescribeSystemEventMetaList operation to obtain the value of the response parameter Level. The value of the Level parameter indicates the levels of system events that occurred for all cloud services in your Alibaba Cloud account. For more information, see DescribeSystemEventMetaList .

Info
StatusstringNo

The status of the system event.

You can call the DescribeSystemEventMetaList operation to obtain the value of the response parameter Status. The value of the Status parameter indicates the status of system events that occurred for all cloud services in your Alibaba Cloud account. For more information, see DescribeSystemEventMetaList .

Normal
GroupIdstringNo

The ID of the application group.

17285****
SearchKeywordsstringNo

The keywords that are used to search for the system event. Valid values:

  • If you want to search for the system event whose content contains a and b, set the value to a and b.
  • If you want to search for the system event whose content contains a or b, set the value to a or b.
ECS
StartTimestringNo

The beginning of the time range to query. Unit: milliseconds.

1635993541000
EndTimestringNo

The end of the time range to query. Unit: milliseconds.

1635993921000

For more information about common request parameters, see Common parameters.

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The HTTP status codes.

Note The status code 200 indicates that the request was successful.
200
Messagestring

The returned message.

If the request was successful, a success message is returned. If the request failed, an error message is returned.

success
RequestIdstring

The request ID.

C7A7B776-0ACE-5A93-9B07-DE8008D9CCDF
Successstring

Indicates whether the request was successful. Valid values:

  • true
  • false
true
SystemEventCountsarray<object>

The details of the system event.

object
Statusstring

The status of the system event.

Normal
Timelong

The time when the system event occurred. The value is a timestamp. Unit: milliseconds.

1635993751000
GroupIdstring

The ID of the application group.

17285****
Productstring

The name of the cloud service in which the system event occurred.

ECS
InstanceNamestring

The name of the instance.

ECS-test
Numlong

The number of times that the system event has occurred.

3
ResourceIdstring

The resource ID.

i-rj99xc6cptkk64ml****
Namestring

The name of the system event.

Instance:StateChange
Contentstring

The description of the system event.

Levelstring

The level of the system event. Valid values:

  • Critical
  • Warn
  • Info
Info
RegionIdstring

The region ID.

cn-hangzhou

Examples

Sample success responses

JSONformat

{
  "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"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400ParameterInvalidIllegal parameters.-
403AccessForbiddenUser not authorized to operate on the specified resource.-
404ResourceNotFoundThe specified resource is not found.The specified resource is not found.
500InternalErrorThe request processing has failed due to some unknown error.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history