There are various trigger types that will be invoked based on various events within Flexiant Cloud Orchestrator, such as the user being authenticated or a resource being modified. The trigger type is used to inform the trigger system which of these events the function should be invoked for. In addition to this, most of the trigger types contain an additional filter called a trigger option, which can be used to reduce the amount of times the function is invoked; it is possible to define one or more trigger options in the trigger entry point as a table of string values. An additional trigger option of ANY
is available for all trigger types which will allow the function to be invoked by all the possible options.
The following trigger types do not have additional options, and always invoke with the option as ANY
.
PRE_PAYMENT
- Triggered before a payment or refund is attempted.PRE_PURCHASE
- Triggered before a purchase is attempted.POST_PURCHASE
- Triggered after a purchase has been successful.PRE_AUTH
- Triggered before a authentication request (password check so incorrect username credentials will not trigger PRE_AUTH)POST_UNIT_TRANSACTION
- Triggered after a unit transaction.POST_BILLING
- Triggered after the billing cycle.POST_COLLECTION
- Triggered after the collection cycle.SCHEDULED
- Triggered based on the supplied schedule.PRE_SERVER_METADATA_UPDATE
- Triggered before the server metadata has been passed to the booting server.
The following trigger types use a list of resource type values based on the ResourceType
enum, which represents the type of resource that is being modified.
POST_MODIFY
- Triggered after a resource has been modified.PRE_CREATE
- Triggered before a resource is created.POST_CREATE
- Triggered after a resource has been created.PRE_DELETE
- Triggered before a resource is deleted.POST_DELETE
- Triggered after a resource is deleted.
The following trigger types use a list of server state values based on the ServerStatus
enum. The server state option represents the new state that the server is to be/has been changed to.
PRE_SERVER_STATE_CHANGE
- Triggered before a server state change.POST_SERVER_STATE_CHANGE
- Triggered after a server state change.
The following trigger types use a list of user api method names, based on the names of the available methods in the UserAPI
global object, which represent the method that has been invoked.
PRE_USER_API_CALL
- Triggered before a user api call attempt.POST_USER_API_CALL
- Triggered after a successful user api call.
The following trigger types use a list of admin api method names, based on the names of the available methods in the AdminAPI
global object, which represent the method that has been invoked.
PRE_ADMIN_API_CALL
- Triggered before an admin api call attempt.POST_ADMIN_API_CALL
- Triggered after a successful user api call.
The following trigger type uses a list of the job state values based on the JobStatus
enum. The job state option represents the new state that the job is to be/has been changed to.
PRE_JOB_STATE_CHANGE
- Triggered before a job state change.POST_JOB_STATE_CHANGE
- Triggered after a job state change.
The following trigger types uses a list of available error type values based on the values from four enum types, ErrorInternal
, ErrorInvalidInput
, ErrorOperationNotPermitted
, and ErrorResourceNotFound
which represent the type of error thrown.
POST_EXCEPTION
- Triggered after an exception has been thrown.
POST_AUTH
- Triggered after a successful authentication.
POST_PAYMENT
- Triggered after a payment or refund has been concluded.
Any action directly caused by a trigger function will not invoke another trigger, this includes calling an api method, throwing an exception or making a payment or transaction.
Complete lists of the enum types the trigger options are based on are available in the FDL documentation. For more information, see Flexiant Cloud Orchestrator Developer Guide.