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
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ecs:CreateSimulatedSystemEvents | create |
|
| none |
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.
Change history
Change time | Summary of changes | Operation |
---|