All Products
Search
Document Center

Elastic Compute Service:CreateSimulatedSystemEvents

Last Updated:Mar 19, 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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

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.

string

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.