@Generated(value="jsii-pacmak/1.30.0 (build adae23f)", date="2021-06-30T10:01:06.763Z") @Stability(value=Experimental) public class ContainerDefinition extends software.constructs.Construct
| Modifier and Type | Class and Description |
|---|---|
static class |
ContainerDefinition.Builder
(experimental) A fluent builder for
ContainerDefinition. |
| Modifier | Constructor and Description |
|---|---|
|
ContainerDefinition(software.constructs.Construct scope,
String id,
ContainerDefinitionProps props)
(experimental) Constructs a new instance of the ContainerDefinition class.
|
protected |
ContainerDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
ContainerDefinition(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
void |
addContainerDependencies(ContainerDependency... containerDependencies)
(experimental) This method adds one or more container dependencies to the container.
|
void |
addInferenceAcceleratorResource(String... inferenceAcceleratorResources)
(experimental) This method adds one or more resources to the container.
|
void |
addLink(ContainerDefinition container)
(experimental) This method adds a link which allows containers to communicate with each other without the need for port mappings.
|
void |
addLink(ContainerDefinition container,
String alias)
(experimental) This method adds a link which allows containers to communicate with each other without the need for port mappings.
|
void |
addMountPoints(MountPoint... mountPoints)
(experimental) This method adds one or more mount points for data volumes to the container.
|
void |
addPortMappings(PortMapping... portMappings)
(experimental) This method adds one or more port mappings to the container.
|
void |
addScratch(ScratchSpace scratch)
(experimental) This method mounts temporary disk space to the container.
|
void |
addToExecutionPolicy(PolicyStatement statement)
(experimental) This method adds the specified statement to the IAM task execution policy in the task definition.
|
void |
addUlimits(Ulimit... ulimits)
(experimental) This method adds one or more ulimits to the container.
|
void |
addVolumesFrom(VolumeFrom... volumesFrom)
(experimental) This method adds one or more volumes to the container.
|
PortMapping |
findPortMapping(Number containerPort,
Protocol protocol)
(experimental) Returns the host port for the requested container port if it exists.
|
List<ContainerDependency> |
getContainerDependencies()
(experimental) An array dependencies defined for container startup and shutdown.
|
String |
getContainerName()
(experimental) The name of this container.
|
Number |
getContainerPort()
(experimental) The port the container will listen on.
|
List<EnvironmentFileConfig> |
getEnvironmentFiles()
(experimental) The environment files for this container.
|
Boolean |
getEssential()
(experimental) Specifies whether the container will be marked essential.
|
Number |
getIngressPort()
(experimental) The inbound rules associated with the security group the task or service will use.
|
LinuxParameters |
getLinuxParameters()
(experimental) The Linux-specific modifications that are applied to the container, such as Linux kernel capabilities.
|
LogDriverConfig |
getLogDriverConfig()
(experimental) The log configuration specification for the container.
|
Boolean |
getMemoryLimitSpecified()
(experimental) Whether there was at least one memory limit specified in this definition.
|
List<MountPoint> |
getMountPoints()
(experimental) The mount points for data volumes in your container.
|
List<PortMapping> |
getPortMappings()
(experimental) The list of port mappings for the container.
|
Boolean |
getReferencesSecretJsonField()
(experimental) Whether this container definition references a specific JSON field of a secret stored in Secrets Manager.
|
TaskDefinition |
getTaskDefinition()
(experimental) The name of the task definition that includes this container definition.
|
List<Ulimit> |
getUlimits()
(experimental) An array of ulimits to set in the container.
|
List<VolumeFrom> |
getVolumesFrom()
(experimental) The data volumes to mount from another container in the same task definition.
|
CfnTaskDefinition.ContainerDefinitionProperty |
renderContainerDefinition()
(experimental) Render this container definition to a CloudFormation object.
|
CfnTaskDefinition.ContainerDefinitionProperty |
renderContainerDefinition(TaskDefinition _taskDefinition)
(experimental) Render this container definition to a CloudFormation object.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected ContainerDefinition(software.amazon.jsii.JsiiObjectRef objRef)
protected ContainerDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public ContainerDefinition(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
ContainerDefinitionProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Experimental)
public void addContainerDependencies(@NotNull
ContainerDependency... containerDependencies)
containerDependencies - This parameter is required.@Stability(value=Experimental)
public void addInferenceAcceleratorResource(@NotNull
String... inferenceAcceleratorResources)
inferenceAcceleratorResources - This parameter is required.@Stability(value=Experimental)
public void addLink(@NotNull
ContainerDefinition container,
@Nullable
String alias)
This parameter is only supported if the task definition is using the bridge network mode. Warning: The --link flag is a legacy feature of Docker. It may eventually be removed.
container - This parameter is required.alias - @Stability(value=Experimental)
public void addLink(@NotNull
ContainerDefinition container)
This parameter is only supported if the task definition is using the bridge network mode. Warning: The --link flag is a legacy feature of Docker. It may eventually be removed.
container - This parameter is required.@Stability(value=Experimental)
public void addMountPoints(@NotNull
MountPoint... mountPoints)
mountPoints - This parameter is required.@Stability(value=Experimental)
public void addPortMappings(@NotNull
PortMapping... portMappings)
portMappings - This parameter is required.@Stability(value=Experimental)
public void addScratch(@NotNull
ScratchSpace scratch)
This adds the correct container mountPoint and task definition volume.
scratch - This parameter is required.@Stability(value=Experimental)
public void addToExecutionPolicy(@NotNull
PolicyStatement statement)
statement - This parameter is required.@Stability(value=Experimental)
public void addUlimits(@NotNull
Ulimit... ulimits)
ulimits - This parameter is required.@Stability(value=Experimental)
public void addVolumesFrom(@NotNull
VolumeFrom... volumesFrom)
volumesFrom - This parameter is required.@Stability(value=Experimental) @Nullable public PortMapping findPortMapping(@NotNull Number containerPort, @NotNull Protocol protocol)
containerPort - This parameter is required.protocol - This parameter is required.@Stability(value=Experimental) @NotNull public CfnTaskDefinition.ContainerDefinitionProperty renderContainerDefinition(@Nullable TaskDefinition _taskDefinition)
_taskDefinition - [disable-awslint:ref-via-interface] (unused but kept to avoid breaking change).@Stability(value=Experimental) @NotNull public CfnTaskDefinition.ContainerDefinitionProperty renderContainerDefinition()
@Stability(value=Experimental) @NotNull public List<ContainerDependency> getContainerDependencies()
@Stability(value=Experimental) @NotNull public String getContainerName()
@Stability(value=Experimental) @NotNull public Number getContainerPort()
@Stability(value=Experimental) @NotNull public Boolean getEssential()
If the essential parameter of a container is marked as true, and that container fails or stops for any reason, all other containers that are part of the task are stopped. If the essential parameter of a container is marked as false, then its failure does not affect the rest of the containers in a task.
If this parameter is omitted, a container is assumed to be essential.
@Stability(value=Experimental) @NotNull public Number getIngressPort()
This property is only used for tasks that use the awsvpc network mode.
@Stability(value=Experimental) @NotNull public Boolean getMemoryLimitSpecified()
@Stability(value=Experimental) @NotNull public List<MountPoint> getMountPoints()
@Stability(value=Experimental) @NotNull public List<PortMapping> getPortMappings()
Port mappings allow containers to access ports on the host container instance to send or receive traffic.
@Stability(value=Experimental) @NotNull public TaskDefinition getTaskDefinition()
@Stability(value=Experimental) @NotNull public List<Ulimit> getUlimits()
@Stability(value=Experimental) @NotNull public List<VolumeFrom> getVolumesFrom()
@Stability(value=Experimental) @Nullable public List<EnvironmentFileConfig> getEnvironmentFiles()
@Stability(value=Experimental) @Nullable public LinuxParameters getLinuxParameters()
@Stability(value=Experimental) @Nullable public LogDriverConfig getLogDriverConfig()
@Stability(value=Experimental) @Nullable public Boolean getReferencesSecretJsonField()
Copyright © 2021. All rights reserved.