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

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

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeSystemEventCount

The operation that you want to perform. Set the value to DescribeSystemEventCount.

Product String No ECS

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

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.

EventType String No StatusNotification

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.

Name String No Instance:StateChange

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.

Level String No Info

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.

Status String No Normal

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.

GroupId String No 17285****

The ID of the application group.

SearchKeywords String No ECS

The keywords that are used to search for the system event. You can use a logical operator to connect keywords. 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.
StartTime String No 1635993541000

The timestamp that specifies the start of the time range to query. Unit: milliseconds.

EndTime String No 1635993921000

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

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

Response parameters

Parameter Type Example Description
RequestId String C7A7B776-0ACE-5A93-9B07-DE8008D9CCDF

The ID of the request.

Code String 200

The HTTP status code.

Note The status code 200 indicates that the call was successful.
Success String true

Indicates whether the call was successful. Valid values:

  • true: The call was successful.
  • false: The call failed.
SystemEventCounts Array of SystemEventCount

The details of the system event.

SystemEventCount
Content String Notification of instance state change

The description of the system event.

GroupId String 17285****

The ID of the application group.

InstanceName String ECS-test

The name of the instance.

Level String Info

The level of the system event. Valid values:

  • Critical
  • Warn
  • Info
Name String Instance:StateChange

The name of the system event.

Num Long 3

The number of times that the system event occurred.

Product String ECS

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

RegionId String cn-hangzhou

The ID of the region.

ResourceId String i-rj99xc6cptkk64ml****

The ID of the resource.

Status String Normal

The status of the system event.

Time Long 1635993751000

The timestamp when the system event occurred. Unit: milliseconds.

Message String success

The returned message.

If the call was successful, the value success is returned. If the call failed, an error message is returned.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeSystemEventCount
&Product=ECS
&<Common request parameters>

Sample success responses

XML format

<DescribeSystemEventCountResponse>
	  <Message>success</Message>
	  <RequestId>C7A7B776-0ACE-5A93-9B07-DE8008D9CCDF</RequestId>
	  <SystemEventCounts>
		    <SystemEventCount>
			      <Num>3</Num>
			      <Product>ECS</Product>
			      <Time>1635993751000</Time>
			      <Name>Instance:StateChange</Name>
		    </SystemEventCount>
	  </SystemEventCounts>
	  <Code>200</Code>
	  <Success>true</Success>
</DescribeSystemEventCountResponse>

JSON format

{
    "Message": "success",
    "RequestId": "C7A7B776-0ACE-5A93-9B07-DE8008D9CCDF",
    "SystemEventCounts": {
        "SystemEventCount": [
            {
                "Num": "3",
                "Product": "ECS",
                "Time": 1635993751000,
                "Name": "Instance:StateChange"
            }
        ]
    },
    "Code": "200",
    "Success": true
}

Error codes

HttpCode Error code Error message Description
404 ResourceNotFound The specified resource is not found. The error message returned because the specified resource is not found.

For a list of error codes, visit the API Error Center.