Implement set-trigger and remove-trigger API to add, update and remove triggers for autoscaling.
The following events are supported:
Each trigger has the following properties:
- ‘name’ - a unique string to identify the trigger so that it can be read, updated or removed later
- ‘state’ - the state of the event (ENABLED or DISABLED), default is ENABLED. This allows one to add a trigger which is disabled until a RESUME_TRIGGER API is called.
- ‘actions’ - a list of actions to be performed in the order specified. The default list of actions for every trigger are to compute the plan, execute the plan and save the plan. If an empty list of actions is explicitly specified or null is specified when creating/updating the trigger then no actions are performed at all.
Here's an example of an API invocation:
Note this issue is only about implementation of the user-facing APIs and not the actual trigger mechanism itself.