Interface EcsJobDefinitionProps
- All Superinterfaces:
JobDefinitionProps,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
EcsJobDefinitionProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-06T23:25:04.938Z")
@Stability(Stable)
public interface EcsJobDefinitionProps
extends software.amazon.jsii.JsiiSerializable, JobDefinitionProps
Props for EcsJobDefinition.
Example:
IVpc vpc;
EcsJobDefinition ecsJob = EcsJobDefinition.Builder.create(this, "JobDefn")
.container(EcsEc2ContainerDefinition.Builder.create(this, "containerDefn")
.image(ContainerImage.fromRegistry("public.ecr.aws/amazonlinux/amazonlinux:latest"))
.memory(Size.mebibytes(2048))
.cpu(256)
.build())
.build();
JobQueue queue = JobQueue.Builder.create(this, "JobQueue")
.computeEnvironments(List.of(OrderedComputeEnvironment.builder()
.computeEnvironment(ManagedEc2EcsComputeEnvironment.Builder.create(this, "managedEc2CE")
.vpc(vpc)
.build())
.order(1)
.build()))
.priority(10)
.build();
User user = new User(this, "MyUser");
ecsJob.grantSubmitJob(user, queue);
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forEcsJobDefinitionPropsstatic final classAn implementation forEcsJobDefinitionProps -
Method Summary
Methods inherited from interface software.amazon.awscdk.services.batch.JobDefinitionProps
getJobDefinitionName, getParameters, getRetryAttempts, getRetryStrategies, getSchedulingPriority, getTimeoutMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getContainer
The container that this job will run. -
getPropagateTags
Whether to propogate tags from the JobDefinition to the ECS task that Batch spawns.Default: false
-
builder
- Returns:
- a
EcsJobDefinitionProps.BuilderofEcsJobDefinitionProps
-