Schedules simulated system events for one or more ECS instances. Simulated system events serve as event drills and do not actually execute events or affect ECS instances.
Operation description
Operation description
After you schedule a simulated event, you can view the scheduled simulated system event in the ECS console, by invoking ECS API operations, or by using CloudMonitor monitoring.
The following table describes the lifecycle of a simulated system event:
Scheduled: After you schedule a simulated system event, the event automatically switches to the Scheduled state via automatic switchover.
Executed: The simulated system event automatically enters the Executed state at the specified time (NotBefore) if no manual intervention is performed.
Canceled: The simulated system event enters the Canceled state after you call CancelSimulatedSystemEvents to cancel the event.
Avoided: For a simulated system event of the SystemMaintenance.Reboot type, the event enters the Avoided state if you restart the instance before the specified time.
Take note of the following items when you set TriggerRealOps to true in Settings:
- Warning The system actually stops or releases the instance, which may cause data loss. Exercise caution when you perform this operation, or use instances that do not run workloads for testing.
EventType supports only SystemMaintenance.Reboot, SystemMaintenance.Redeploy, SystemMaintenance.Stop, InstanceFailure.Reboot, SystemFailure.Reboot, and Instance:PreemptibleInstanceInterruption.
When EventType is set to SystemMaintenance.Redeploy, the NotBefore parameter is invalid. The system automatically generates the execution time of the event.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:CreateSimulatedSystemEvents |
create |
*Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. You can call DescribeRegions to query the most recent region list. |
cn-hangzhou |
| EventType |
string |
Yes |
The type of the system event. Valid values:
|
SystemMaintenance.Reboot |
| NotBefore |
string |
Yes |
The scheduled start time of the event. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. Note
For unexpected events caused by system errors or instance errors, the event is already in the Executing state after it is created. In this case, the NotBefore parameter specifies the time when the event enters the Executed state. |
2018-12-01T06:32:31Z |
| InstanceId |
array |
Yes |
The list of ECS instance IDs. You can specify up to 100 instance IDs. |
i-bp1gtjxuuvwj17zr**** |
|
string |
No |
The instance ID. |
i-bp1gtjxuuvwj17zr**** |
|
|
No |
Specifies whether to trigger real O&M operations. Valid values: |
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The request ID. |
||
| EventIdSet |
object |
||
| EventId |
array |
The list of simulated event IDs (EventId). |
|
|
string |
The simulated event ID (EventId). |
e-bp16helosl7v0ooj**** |
|
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
Examples
Success response
JSON format
{
"EventIdSet": {
"EventId": [
"e-bp16helosl7v0ooj****"
]
},
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | InvalidParameter | %s | |
| 403 | InvalidNotBefore.Passed | %s | The specified value of NotBefore is earlier than the current time. |
| 403 | SimulatedEventLimitExceeded | %s | The simulated event limit has been exceeded. |
| 403 | InstanceIdLimitExceeded | %s | More than 100 instance IDs are specified. |
| 404 | MissingParameter | %s | |
| 404 | InvalidInstanceId.NotFound | %s |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.