Queries the events that occurred in a region over a specific time range.

The event history feature enables you to view the events that occurred in a region over a specific time range. Such historical events include instance creation and parameter reconfiguration. For more information, see Event history.

Before you call this operation, make sure that the event history feature is enabled. Otherwise, this operation fails.

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 DescribeEvents

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

RegionId String Yes cn-hangzhou

The ID of the region for which you want to query events. You can call the DescribeRegions operation to query the most recent region list.

AccessKeyId String No LTAIfCxxxxxxx

The AccessKey ID provided to you by Alibaba Cloud.

StartTime String No 2019-06-11T15:00:00Z

The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

EndTime String No 2019-06-12T15:00:00Z

The end time of the time range to query. The end time must be later than the start time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

PageSize Integer No 30

The number of entries to return on each page. Valid values:

  • 30
  • 50
  • 100

Default value: 30

PageNumber Integer No 1

The number of the page to return. Pages start from page 1.

Default value: 1

Response parameters

Parameter Type Example Description
EventItems Array

The events returned.

EventItems

An event returned.

EventId Integer 11000053

The ID of a returned event.

EventName String ModifySecurityIPList

The name of a returned event. For more information, see Event history.

EventPayload String {\"Domain\": \"rds-inc-share.aliyuncs.com\", \"Api\": \"ReleaseInstancePublicConnection\"}

The request or context parameters of a returned event.

EventReason String FROM_USER

The source of a returned event. For more information, see Event history.

EventRecordTime String 2019-08-20T01:12:49Z

The time when a returned event was recorded. The time is slightly later than the time the event occurred.

EventTime String 2019-08-20T01:08:22Z

The time when a returned event occurred.

EventType String NetworkManagement

The type of a returned event. For more information, see Event history.

EventUserType String SYSTEM

The type of the user who executed a returned event.

RegionId String cn-hangzhou

The ID of the region.

ResourceName String rm-bp1z3065m9976ix8a

The name of the resource associated with a returned event. Only instance IDs are supported for this parameter.

ResourceType String instance

The type of the resource associated with a returned event. Only instances are supported for this parameter.

PageNumber Integer 1

The page number of the page returned.

PageSize Integer 30

The number of entries returned per page.

RequestId String A103039D-B1B2-4C57-B989-7D7C0DA95426

The ID of the request.

TotalRecordCount Integer 40

The total number of entries returned.

Examples

Sample requests


http(s)://rds.aliyuncs.com/? Action=DescribeEvents
&Region=cn-hangzhou
&StartTime=2019-08-20T01:30:00Z
&EndTime=2019-08-20T01:35:00Z
&<Common request parameters>

Sample success responses

XML format

<DescribeEventsResponse>
  <EventItems>
		    <EventItems>
			      <EventName>ModifySecurityIPList</EventName>
			      <EventUserType>SYSTEM</EventUserType>
			      <ResourceType>instance</ResourceType>
			      <EventPayload></EventPayload>
			      <EventTime>2019-08-20T01:33:43Z</EventTime>
			      <RegionId>cn-hangzhou</RegionId>
			      <EventRecordTime>2019-08-20T01:33:57Z</EventRecordTime>
			      <EventReason>FROM_SYSTEM</EventReason>
			      <EventId>11000048</EventId>
			      <ResourceName>rm-bpxxxxxxx</ResourceName>
			      <EventType>SecurityManagement</EventType>
		    </EventItems>
		    <EventItems>
			      <EventName>ModifySecurityIPList</EventName>
			      <EventUserType>SYSTEM</EventUserType>
			      <ResourceType>instance</ResourceType>
			      <EventPayload></EventPayload>
			      <EventTime>2019-08-20T01:33:43Z</EventTime>
			      <RegionId>cn-hangzhou</RegionId>
			      <EventRecordTime>2019-08-20T01:33:57Z</EventRecordTime>
			      <EventReason>FROM_SYSTEM</EventReason>
			      <EventId>11000047</EventId>
			      <ResourceName>rm-bpxxxxxxx</ResourceName>
			      <EventType>SecurityManagement</EventType>
		    </EventItems>
	  </EventItems>
	  <TotalRecordCount>2</TotalRecordCount>
	  <PageNumber>1</PageNumber>
	  <PageSize>2</PageSize>
	  <RequestId>B5FF9EE6-830E-4DBE-8498-9890A62D2875</RequestId>
</DescribeEventsResponse>

JSON format

{
	"EventItems":{
		"EventItems":[
			{
				"EventName":"ModifySecurityIPList",
				"EventUserType":"SYSTEM",
				"ResourceType":"instance",
				"EventPayload":"",
				"EventTime":"2019-08-20T01:33:43Z",
				"RegionId":"cn-hangzhou",
				"EventRecordTime":"2019-08-20T01:33:57Z",
				"EventId":11000048,
				"EventReason":"FROM_SYSTEM",
				"ResourceName":"rm-bpxxxxxxx",
				"EventType":"SecurityManagement"
			},
			{
				"EventName":"ModifySecurityIPList",
				"EventUserType":"SYSTEM",
				"ResourceType":"instance",
				"EventPayload":"",
				"EventTime":"2019-08-20T01:33:43Z",
				"RegionId":"cn-hangzhou",
				"EventRecordTime":"2019-08-20T01:33:57Z",
				"EventId":11000047,
				"EventReason":"FROM_SYSTEM",
				"ResourceName":"rm-bpxxxxxxx",
				"EventType":"SecurityManagement"
			}
		]
	},
	"PageNumber":1,
	"TotalRecordCount":2,
	"PageSize":2,
	"RequestId":"B5FF9EE6-830E-4DBE-8498-9890A62D2875"
}

Error codes

HTTP status code Error code Error message Description
400 InvalidStartTime.Format Specified start time is not valid. The error message returned because the specified start time is invalid.

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