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
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 |
EventType | String | No | StatusNotification |
The type of the system event. You can call the DescribeSystemEventMetaList operation to obtain the value of the
response parameter |
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 |
Level | String | No | Info |
The level of the system event. Valid values:
You can call the DescribeSystemEventMetaList operation to obtain the value of the
response parameter |
Status | String | No | Normal |
The status of the system event. You can call the DescribeSystemEventMetaList operation to obtain the value of the
response parameter |
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:
|
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:
|
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:
|
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.