BatchJob

class aws_cdk.aws_events_targets.BatchJob(job_queue, job_definition, *, attempts=None, event=None, job_name=None, size=None)

Bases: object

Use an AWS Batch Job / Queue as an event rule target.

stability :stability: experimental

__init__(job_queue, job_definition, *, attempts=None, event=None, job_name=None, size=None)
Parameters
  • job_queue (IJobQueue) –

  • job_definition (IJobDefinition) –

  • attempts (Union[int, float, None]) – The number of times to attempt to retry, if the job fails. Valid values are 1–10. Default: no retryStrategy is set

  • event (Optional[RuleTargetInput]) – The event to send to the Lambda. This will be the payload sent to the Lambda Function. Default: the entire EventBridge event

  • job_name (Optional[str]) – The name of the submitted job. Default: - Automatically generated

  • size (Union[int, float, None]) – The size of the array, if this is an array batch job. Valid values are integers between 2 and 10,000. Default: no arrayProperties are set

stability :stability: experimental

Return type

None

Methods

bind(rule, _id=None)

Returns a RuleTarget that can be used to trigger queue this batch job as a result from an EventBridge event.

Parameters
  • rule (IRule) –

  • _id (Optional[str]) –

stability :stability: experimental

Return type

RuleTargetConfig