create_trigger
async
¶
create_trigger(
name: NameString,
type: TriggerType,
actions: ActionList,
*,
config_overrides: Optional[AsyncGlueClientConfig] = 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/async_glue.py
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 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 | |