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
4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 | |