create_trigger
¶
create_trigger(
name: NameString,
type: TriggerType,
actions: ActionList,
*,
config_overrides: Optional[GlueClientConfig] = None,
workflow_name: Optional[NameString] = None,
schedule: Optional[GenericString] = None,
predicate: Optional[Predicate] = None,
description: Optional[DescriptionString] = None,
start_on_creation: Optional[BooleanValue] = None,
tags: Optional[TagsMap] = None,
event_batching_condition: Optional[EventBatchingCondition] = None,
) -> CreateTriggerResponse
Creates a new trigger.
Job arguments may be logged. Do not pass plaintext secrets as arguments. Retrieve secrets from a Glue Connection, Amazon Web Services Secrets Manager or other secret management mechanism if you intend to keep them within the Job.
Parameters:
-
name(NameString) –The name of the trigger.
-
workflow_name(Optional[NameString], default:None) –The name of the workflow associated with the trigger.
-
type(TriggerType) –The type of the new trigger.
-
schedule(Optional[GenericString], default:None) –A
cronexpression 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(Optional[Predicate], default:None) –A predicate to specify when the new trigger should fire.
This field is required when the trigger type is
CONDITIONAL. -
actions(ActionList) –The actions initiated by this trigger when it fires.
-
description(Optional[DescriptionString], default:None) –A description of the new trigger.
-
start_on_creation(Optional[BooleanValue], default:None) –Set to
trueto startSCHEDULEDandCONDITIONALtriggers when created. True is not supported forON_DEMANDtriggers. -
tags(Optional[TagsMap], default:None) –The tags to use with this trigger. You may use tags to limit access to the trigger. For more information about tags in Glue, see Amazon Web Services Tags in Glue in the developer guide.
-
event_batching_condition(Optional[EventBatchingCondition], default:None) –Batch condition that must be met (specified number of events received or batch time window expired) before EventBridge event trigger fires.
Raises:
-
AlreadyExistsException–A resource to be created or added already exists.
-
ConcurrentModificationException–Two processes are trying to modify a resource simultaneously.
-
EntityNotFoundException–A specified entity does not exist
-
IdempotentParameterMismatchException–The same unique identifier was associated with two different records.
-
InternalServiceException–An internal service error occurred.
-
InvalidInputException–The input provided was not valid.
-
OperationTimeoutException–The operation timed out.
-
ResourceNumberLimitExceededException–A resource numerical limit was exceeded.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_glue/_services/glue.py
4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 | |