All Products
Search
Document Center

Elastic Compute Service:CreateSimulatedSystemEvents

Last Updated:Dec 03, 2024

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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
ecs:CreateSimulatedSystemEventscreate
*Instance
acs:ecs:{#regionId}:{#accountId}:instance/{#instanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
EventTypestringYes

The type of the system event. Valid values:

  • SystemMaintenance.Reboot: The instance is restarted due to system maintenance.
  • SystemFailure.Reboot: The instance is restarted due to a system error.
  • InstanceFailure.Reboot: The instance is restarted due to an instance error.
  • SystemMaintenance.Stop: The instance is stopped due to system maintenance.
  • SystemMaintenance.Redeploy: The instance is redeployed due to system maintenance.
  • SystemFailure.Redeploy: The instance is redeployed due to a system error.
  • SystemFailure.Stop: The instance is stopped due to a system error.
SystemMaintenance.Reboot
NotBeforestringYes

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
InstanceIdarrayYes

The IDs of the instances. You can specify up to 100 instance IDs.

stringYes

The ID of the instance.

i-bp1gtjxuuvwj17zr****

Response parameters

ParameterTypeDescriptionExample
object

The request ID.

RequestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
EventIdSetarray

The IDs of the simulated events.

EventIdstring

The ID of the simulated event.

e-bp16helosl7v0ooj****

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "EventIdSet": {
    "EventId": [
      "e-bp16helosl7v0ooj****"
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
403InvalidParameter%sThe specified parameter is invalid.
403InvalidNotBefore.Passed%sThe specified value of NotBefore is earlier than the current time.
403SimulatedEventLimitExceeded%s-
403InstanceIdLimitExceeded%sMore than 100 instance IDs are specified.
404MissingParameter%sA parameter is not specified.
404InvalidInstanceId.NotFound%sThe 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 timeSummary of changesOperation
No change history