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
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 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 | |