Schedules simulated system events for one or more Elastic Compute Service (ECS) instances. The simulated system events do not actually occur on or affect ECS instances.
Operation description
You can use the ECS console, call ECS API operations, or use CloudMonitor to view the scheduled simulated system events.
The following descriptions provide the lifecycle of a simulated system event:
- Scheduled: The state of the simulated system event is automatically changed to Scheduled after it is scheduled.
- Executed: The state of the simulated system event is automatically changed to Executed at the time specified by the NotBefore parameter if no manual intervention is involved.
- Canceled: The state of the simulated system event is changed to Canceled if you cancel the event by calling the CancelSimulatedSystemEvents operation.
- Avoided: The state of the simulated system event generated from maintenance-triggered instance restart can be changed to Avoided if you restart the instance before the scheduled time of the simulated system event. The maintenance-triggered instance restart is indicated by the SystemMaintenance.Reboot value. For more information, see RebootInstance .
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID. You can call the DescribeRegions operation 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 events that occur due to system errors or instance errors, the simulated events of such events enter the Executing state when the simulated events are created. The value of NotBefore is the time when the simulated events enter the Executed state.
| 2018-12-01T06:32:31Z |
InstanceId | array | Yes | The IDs of the instances. You can specify up to 100 instance IDs. | |
string | Yes | The ID of the instance. | i-bp1gtjxuuvwj17zr**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"EventIdSet": {
"EventId": [
"e-bp16helosl7v0ooj****"
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
403 | InvalidParameter | %s | The specified parameter is invalid. |
403 | InvalidNotBefore.Passed | %s | The specified value of NotBefore is earlier than the current time. |
403 | SimulatedEventLimitExceeded | %s | - |
403 | InstanceIdLimitExceeded | %s | More than 100 instance IDs are specified. |
404 | MissingParameter | %s | A parameter is not specified. |
404 | InvalidInstanceId.NotFound | %s | The specified instance does not exist. Check whether the InstanceId parameter is valid. |
For a list of error codes, visit the Service error codes.