@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-11T19:24:30.910Z") @Stability(value=Experimental) public interface BatchJobProps extends software.amazon.jsii.JsiiSerializable, TargetBaseProps
Example:
import software.amazon.awscdk.core.*;
import software.amazon.awscdk.services.ecs.ContainerImage;
JobQueue jobQueue = JobQueue.Builder.create(this, "MyQueue")
.computeEnvironments(List.of(JobQueueComputeEnvironment.builder()
.computeEnvironment(ComputeEnvironment.Builder.create(this, "ComputeEnvironment")
.managed(false)
.build())
.order(1)
.build()))
.build();
JobDefinition jobDefinition = JobDefinition.Builder.create(this, "MyJob")
.container(JobDefinitionContainer.builder()
.image(ContainerImage.fromRegistry("test-repo"))
.build())
.build();
Queue queue = new Queue(this, "Queue");
Rule rule = Rule.Builder.create(this, "Rule")
.schedule(Schedule.rate(Duration.hours(1)))
.build();
rule.addTarget(BatchJob.Builder.create(jobQueue.getJobQueueArn(), jobQueue, jobDefinition.getJobDefinitionArn(), jobDefinition)
.deadLetterQueue(queue)
.event(RuleTargetInput.fromObject(Map.of("SomeParam", "SomeValue")))
.retryAttempts(2)
.maxEventAge(Duration.hours(2))
.build());
| Modifier and Type | Interface and Description |
|---|---|
static class |
BatchJobProps.Builder
A builder for
BatchJobProps |
static class |
BatchJobProps.Jsii$Proxy
An implementation for
BatchJobProps |
| Modifier and Type | Method and Description |
|---|---|
static BatchJobProps.Builder |
builder() |
default Number |
getAttempts()
(experimental) The number of times to attempt to retry, if the job fails.
|
default RuleTargetInput |
getEvent()
(experimental) The event to send to the Lambda.
|
default String |
getJobName()
(experimental) The name of the submitted job.
|
default Number |
getSize()
(experimental) The size of the array, if this is an array batch job.
|
getDeadLetterQueue, getMaxEventAge, getRetryAttempts@Stability(value=Experimental) @Nullable default Number getAttempts()
Valid values are 1–10.
Default: no retryStrategy is set
@Stability(value=Experimental) @Nullable default RuleTargetInput getEvent()
This will be the payload sent to the Lambda Function.
Default: the entire EventBridge event
@Stability(value=Experimental) @Nullable default String getJobName()
Default: - Automatically generated
@Stability(value=Experimental) @Nullable default Number getSize()
Valid values are integers between 2 and 10,000.
Default: no arrayProperties are set
@Stability(value=Experimental) static BatchJobProps.Builder builder()
builder in interface TargetBasePropsBatchJobProps.Builder of BatchJobPropsCopyright © 2022. All rights reserved.