@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.320Z") @Stability(value=Stable) public class BatchJob extends software.amazon.jsii.JsiiObject implements IRuleTarget
Most likely the code will look something like this:
new BatchJob(jobQueue.jobQueueArn, jobQueue, jobDefinition.jobDefinitionArn, jobDefinition)
In the future this API will be improved to be fully typed
Example:
// Example automatically generated from non-compiling source. May contain errors.
import software.amazon.awscdk.services.batch.*;
import software.amazon.awscdk.services.ecs.ContainerImage;
Object jobQueue = JobQueue.Builder.create(this, "MyQueue")
.computeEnvironments(List.of(Map.of(
"computeEnvironment", ComputeEnvironment.Builder.create(this, "ComputeEnvironment")
.managed(false)
.build(),
"order", 1)))
.build();
Object jobDefinition = JobDefinition.Builder.create(this, "MyJob")
.container(Map.of(
"image", ContainerImage.fromRegistry("test-repo")))
.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 | Class and Description |
|---|---|
static class |
BatchJob.Builder
A fluent builder for
BatchJob. |
software.amazon.jsii.JsiiObject.InitializationModeIRuleTarget.Jsii$Default, IRuleTarget.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
protected |
BatchJob(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
BatchJob(software.amazon.jsii.JsiiObjectRef objRef) |
|
BatchJob(String jobQueueArn,
software.constructs.IConstruct jobQueueScope,
String jobDefinitionArn,
software.constructs.IConstruct jobDefinitionScope) |
|
BatchJob(String jobQueueArn,
software.constructs.IConstruct jobQueueScope,
String jobDefinitionArn,
software.constructs.IConstruct jobDefinitionScope,
BatchJobProps props) |
| Modifier and Type | Method and Description |
|---|---|
RuleTargetConfig |
bind(IRule rule)
Returns a RuleTarget that can be used to trigger queue this batch job as a result from an EventBridge event.
|
RuleTargetConfig |
bind(IRule rule,
String _id)
Returns a RuleTarget that can be used to trigger queue this batch job as a result from an EventBridge event.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected BatchJob(software.amazon.jsii.JsiiObjectRef objRef)
protected BatchJob(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public BatchJob(@NotNull
String jobQueueArn,
@NotNull
software.constructs.IConstruct jobQueueScope,
@NotNull
String jobDefinitionArn,
@NotNull
software.constructs.IConstruct jobDefinitionScope,
@Nullable
BatchJobProps props)
jobQueueArn - The JobQueue arn. This parameter is required.jobQueueScope - The JobQueue Resource. This parameter is required.jobDefinitionArn - The jobDefinition arn. This parameter is required.jobDefinitionScope - The JobQueue Resource. This parameter is required.props - @Stability(value=Stable)
public BatchJob(@NotNull
String jobQueueArn,
@NotNull
software.constructs.IConstruct jobQueueScope,
@NotNull
String jobDefinitionArn,
@NotNull
software.constructs.IConstruct jobDefinitionScope)
jobQueueArn - The JobQueue arn. This parameter is required.jobQueueScope - The JobQueue Resource. This parameter is required.jobDefinitionArn - The jobDefinition arn. This parameter is required.jobDefinitionScope - The JobQueue Resource. This parameter is required.@Stability(value=Stable) @NotNull public RuleTargetConfig bind(@NotNull IRule rule, @Nullable String _id)
bind in interface IRuleTargetrule - This parameter is required._id - @Stability(value=Stable) @NotNull public RuleTargetConfig bind(@NotNull IRule rule)
bind in interface IRuleTargetrule - This parameter is required.Copyright © 2022. All rights reserved.