AWS Glue
Developer Guide

Triggers

Data Types

Trigger Structure

Information about a specific trigger.

Fields

  • Name – UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.

    Name of the trigger.

  • Id – UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.

    Reserved for future use.

  • Type – UTF-8 string (valid values: SCHEDULED | CONDITIONAL | ON_DEMAND).

    The type of trigger that this is.

  • State – UTF-8 string (valid values: CREATING | CREATED | ACTIVATING | ACTIVATED | DEACTIVATING | DEACTIVATED | DELETING | UPDATING).

    The current state of the trigger.

  • Description – Description string, not more than 2048 bytes long, matching the URI address multi-line string pattern.

    A description of this trigger.

  • Schedule – UTF-8 string.

    A cron expression used to specify the schedule (see Time-Based Schedules for Jobs and Crawlers. For example, to run something every day at 12:15 UTC, you would specify: cron(15 12 * * ? *).

  • Actions – An array of Action objects.

    The actions initiated by this trigger.

  • Predicate – A Predicate object.

    The predicate of this trigger, which defines when it will fire.

TriggerUpdate Structure

A structure used to provide information used to update a trigger. This object will update the the previous trigger definition by overwriting it completely.

Fields

  • Name – UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.

    Reserved for future use.

  • Description – Description string, not more than 2048 bytes long, matching the URI address multi-line string pattern.

    A description of this trigger.

  • Schedule – UTF-8 string.

    A cron expression used to specify the schedule (see Time-Based Schedules for Jobs and Crawlers. For example, to run something every day at 12:15 UTC, you would specify: cron(15 12 * * ? *).

  • Actions – An array of Action objects.

    The actions initiated by this trigger.

  • Predicate – A Predicate object.

    The predicate of this trigger, which defines when it will fire.

Predicate Structure

Defines the predicate of the trigger, which determines when it fires.

Fields

  • Logical – UTF-8 string (valid values: AND | ANY).

    Optional field if only one condition is listed. If multiple conditions are listed, then this field is required.

  • Conditions – An array of Condition objects.

    A list of the conditions that determine when the trigger will fire.

Condition Structure

Defines a condition under which a trigger fires.

Fields

  • LogicalOperator – UTF-8 string (valid values: EQUALS).

    A logical operator.

  • JobName – UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.

    The name of the Job to whose JobRuns this condition applies and on which this trigger waits.

  • State – UTF-8 string (valid values: STARTING | RUNNING | STOPPING | STOPPED | SUCCEEDED | FAILED | TIMEOUT).

    The condition state. Currently, the values supported are SUCCEEDED, STOPPED, TIMEOUT and FAILED.

Action Structure

Defines an action to be initiated by a trigger.

Fields

  • JobName – UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.

    The name of a job to be executed.

  • Arguments – A map array of key-value pairs.

    Each key is a UTF-8 string.

    Each value is a UTF-8 string.

    Arguments to be passed to the job run.

    You can specify arguments here that your own job-execution script consumes, as well as arguments that AWS Glue itself consumes.

    For information about how to specify and consume your own Job arguments, see the Calling AWS Glue APIs in Python topic in the developer guide.

    For information about the key-value pairs that AWS Glue consumes to set up your job, see the Special Parameters Used by AWS Glue topic in the developer guide.

  • Timeout – Number (integer), at least 1.

    The JobRun timeout in minutes. This is the maximum time that a job run can consume resources before it is terminated and enters TIMEOUT status. The default is 2,880 minutes (48 hours). This overrides the timeout value set in the parent job.

  • SecurityConfiguration – UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.

    The name of the SecurityConfiguration structure to be used with this action.

  • NotificationProperty – A NotificationProperty object.

    Specifies configuration properties of a job run notification.

Operations

CreateTrigger Action (Python: create_trigger)

Creates a new trigger.

Request

  • NameRequired: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.

    The name of the trigger.

  • TypeRequired: UTF-8 string (valid values: SCHEDULED | CONDITIONAL | ON_DEMAND).

    The type of the new trigger.

  • Schedule – UTF-8 string.

    A cron expression used to specify the schedule (see Time-Based Schedules for Jobs and Crawlers. For example, to run something every day at 12:15 UTC, you would specify: cron(15 12 * * ? *).

    This field is required when the trigger type is SCHEDULED.

  • Predicate – A Predicate object.

    A predicate to specify when the new trigger should fire.

    This field is required when the trigger type is CONDITIONAL.

  • ActionsRequired: An array of Action objects.

    The actions initiated by this trigger when it fires.

  • Description – Description string, not more than 2048 bytes long, matching the URI address multi-line string pattern.

    A description of the new trigger.

  • StartOnCreation – Boolean.

    Set to true to start SCHEDULED and CONDITIONAL triggers when created. True not supported for ON_DEMAND triggers.

Response

  • Name – UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.

    The name of the trigger.

Errors

  • AlreadyExistsException

  • InvalidInputException

  • IdempotentParameterMismatchException

  • InternalServiceException

  • OperationTimeoutException

  • ResourceNumberLimitExceededException

  • ConcurrentModificationException

StartTrigger Action (Python: start_trigger)

Starts an existing trigger. See Triggering Jobs for information about how different types of trigger are started.

Request

  • NameRequired: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.

    The name of the trigger to start.

Response

  • Name – UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.

    The name of the trigger that was started.

Errors

  • InvalidInputException

  • InternalServiceException

  • EntityNotFoundException

  • OperationTimeoutException

  • ResourceNumberLimitExceededException

  • ConcurrentRunsExceededException

GetTrigger Action (Python: get_trigger)

Retrieves the definition of a trigger.

Request

  • NameRequired: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.

    The name of the trigger to retrieve.

Response

  • Trigger – A Trigger object.

    The requested trigger definition.

Errors

  • EntityNotFoundException

  • InvalidInputException

  • InternalServiceException

  • OperationTimeoutException

GetTriggers Action (Python: get_triggers)

Gets all the triggers associated with a job.

Request

  • NextToken – UTF-8 string.

    A continuation token, if this is a continuation call.

  • DependentJobName – UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.

    The name of the job for which to retrieve triggers. The trigger that can start this job will be returned, and if there is no such trigger, all triggers will be returned.

  • MaxResults – Number (integer), not less than 1 or more than 1000.

    The maximum size of the response.

Response

  • Triggers – An array of Trigger objects.

    A list of triggers for the specified job.

  • NextToken – UTF-8 string.

    A continuation token, if not all the requested triggers have yet been returned.

Errors

  • EntityNotFoundException

  • InvalidInputException

  • InternalServiceException

  • OperationTimeoutException

UpdateTrigger Action (Python: update_trigger)

Updates a trigger definition.

Request

  • NameRequired: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.

    The name of the trigger to update.

  • TriggerUpdateRequired: A TriggerUpdate object.

    The new values with which to update the trigger.

Response

  • Trigger – A Trigger object.

    The resulting trigger definition.

Errors

  • InvalidInputException

  • InternalServiceException

  • EntityNotFoundException

  • OperationTimeoutException

  • ConcurrentModificationException

StopTrigger Action (Python: stop_trigger)

Stops a specified trigger.

Request

  • NameRequired: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.

    The name of the trigger to stop.

Response

  • Name – UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.

    The name of the trigger that was stopped.

Errors

  • InvalidInputException

  • InternalServiceException

  • EntityNotFoundException

  • OperationTimeoutException

  • ConcurrentModificationException

DeleteTrigger Action (Python: delete_trigger)

Deletes a specified trigger. If the trigger is not found, no exception is thrown.

Request

  • NameRequired: UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.

    The name of the trigger to delete.

Response

  • Name – UTF-8 string, not less than 1 or more than 255 bytes long, matching the Single-line string pattern.

    The name of the trigger that was deleted.

Errors

  • InvalidInputException

  • InternalServiceException

  • OperationTimeoutException

  • ConcurrentModificationException