@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.695Z") @Stability(value=Stable) public interface Ec2TaskDefinitionProps extends software.amazon.jsii.JsiiSerializable, CommonTaskDefinitionProps
Example:
Ec2TaskDefinition ec2TaskDefinition = Ec2TaskDefinition.Builder.create(this, "TaskDef")
.networkMode(NetworkMode.BRIDGE)
.build();
ContainerDefinition container = ec2TaskDefinition.addContainer("WebContainer", ContainerDefinitionOptions.builder()
// Use an image from DockerHub
.image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample"))
.memoryLimitMiB(1024)
.build());
| Modifier and Type | Interface and Description |
|---|---|
static class |
Ec2TaskDefinitionProps.Builder
A builder for
Ec2TaskDefinitionProps |
static class |
Ec2TaskDefinitionProps.Jsii$Proxy
An implementation for
Ec2TaskDefinitionProps |
| Modifier and Type | Method and Description |
|---|---|
static Ec2TaskDefinitionProps.Builder |
builder() |
default List<InferenceAccelerator> |
getInferenceAccelerators()
The inference accelerators to use for the containers in the task.
|
default IpcMode |
getIpcMode()
The IPC resource namespace to use for the containers in the task.
|
default NetworkMode |
getNetworkMode()
The Docker networking mode to use for the containers in the task.
|
default PidMode |
getPidMode()
The process namespace to use for the containers in the task.
|
default List<PlacementConstraint> |
getPlacementConstraints()
An array of placement constraint objects to use for the task.
|
getExecutionRole, getFamily, getProxyConfiguration, getTaskRole, getVolumes@Stability(value=Stable) @Nullable default List<InferenceAccelerator> getInferenceAccelerators()
Not supported in Fargate.
Default: - No inference accelerators.
@Stability(value=Stable) @Nullable default IpcMode getIpcMode()
Not supported in Fargate and Windows containers.
Default: - IpcMode used by the task is not specified
@Stability(value=Stable) @Nullable default NetworkMode getNetworkMode()
The valid values are NONE, BRIDGE, AWS_VPC, and HOST.
Default: - NetworkMode.BRIDGE for EC2 tasks, AWS_VPC for Fargate tasks.
@Stability(value=Stable) @Nullable default PidMode getPidMode()
Not supported in Fargate and Windows containers.
Default: - PidMode used by the task is not specified
@Stability(value=Stable) @Nullable default List<PlacementConstraint> getPlacementConstraints()
You can specify a maximum of 10 constraints per task (this limit includes constraints in the task definition and those specified at run time).
Default: - No placement constraints.
@Stability(value=Stable) static Ec2TaskDefinitionProps.Builder builder()
builder in interface CommonTaskDefinitionPropsEc2TaskDefinitionProps.Builder of Ec2TaskDefinitionPropsCopyright © 2022. All rights reserved.