@Stability(value=Stable) public static final class ContainerDefinitionProps.Builder extends Object implements software.amazon.jsii.Builder<ContainerDefinitionProps>
ContainerDefinitionProps
Constructor and Description |
---|
Builder() |
@Stability(value=Stable) public ContainerDefinitionProps.Builder taskDefinition(TaskDefinition taskDefinition)
ContainerDefinitionProps.getTaskDefinition()
taskDefinition
- The name of the task definition that includes this container definition. This parameter is required.
[disable-awslint:ref-via-interface]this
@Stability(value=Stable) public ContainerDefinitionProps.Builder image(ContainerImage image)
ContainerDefinitionOptions.getImage()
image
- The image used to start a container. This parameter is required.
This string is passed directly to the Docker daemon.
Images in the Docker Hub registry are available by default.
Other repositories are specified with either repository-url/image:tag or repository-url/image@digest.
TODO: Update these to specify using classes of IContainerImagethis
@Stability(value=Stable) public ContainerDefinitionProps.Builder command(List<String> command)
ContainerDefinitionOptions.getCommand()
command
- The command that is passed to the container.
If you provide a shell command as a single string, you have to quote command-line arguments.this
@Stability(value=Stable) public ContainerDefinitionProps.Builder cpu(Number cpu)
ContainerDefinitionOptions.getCpu()
cpu
- The minimum number of CPU units to reserve for the container.this
@Stability(value=Stable) public ContainerDefinitionProps.Builder disableNetworking(Boolean disableNetworking)
ContainerDefinitionOptions.getDisableNetworking()
disableNetworking
- Specifies whether networking is disabled within the container.
When this parameter is true, networking is disabled within the container.this
@Stability(value=Stable) public ContainerDefinitionProps.Builder dnsSearchDomains(List<String> dnsSearchDomains)
ContainerDefinitionOptions.getDnsSearchDomains()
dnsSearchDomains
- A list of DNS search domains that are presented to the container.this
@Stability(value=Stable) public ContainerDefinitionProps.Builder dnsServers(List<String> dnsServers)
ContainerDefinitionOptions.getDnsServers()
dnsServers
- A list of DNS servers that are presented to the container.this
@Stability(value=Stable) public ContainerDefinitionProps.Builder dockerLabels(Map<String,String> dockerLabels)
ContainerDefinitionOptions.getDockerLabels()
dockerLabels
- A key/value map of labels to add to the container.this
@Stability(value=Stable) public ContainerDefinitionProps.Builder dockerSecurityOptions(List<String> dockerSecurityOptions)
ContainerDefinitionOptions.getDockerSecurityOptions()
dockerSecurityOptions
- A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems.this
@Stability(value=Stable) public ContainerDefinitionProps.Builder entryPoint(List<String> entryPoint)
ContainerDefinitionOptions.getEntryPoint()
entryPoint
- The ENTRYPOINT value to pass to the container.this
@Stability(value=Stable) public ContainerDefinitionProps.Builder environment(Map<String,String> environment)
ContainerDefinitionOptions.getEnvironment()
environment
- The environment variables to pass to the container.this
@Stability(value=Stable) public ContainerDefinitionProps.Builder essential(Boolean essential)
ContainerDefinitionOptions.getEssential()
essential
- Specifies whether the container is marked essential.
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. All tasks must have at least one essential container.
If this parameter is omitted, a container is assumed to be essential.
this
@Stability(value=Stable) public ContainerDefinitionProps.Builder extraHosts(Map<String,String> extraHosts)
ContainerDefinitionOptions.getExtraHosts()
extraHosts
- A list of hostnames and IP address mappings to append to the /etc/hosts file on the container.this
@Stability(value=Stable) public ContainerDefinitionProps.Builder gpuCount(Number gpuCount)
ContainerDefinitionOptions.getGpuCount()
gpuCount
- The number of GPUs assigned to the container.this
@Stability(value=Stable) public ContainerDefinitionProps.Builder healthCheck(HealthCheck healthCheck)
ContainerDefinitionOptions.getHealthCheck()
healthCheck
- The health check command and associated configuration parameters for the container.this
@Stability(value=Stable) public ContainerDefinitionProps.Builder hostname(String hostname)
ContainerDefinitionOptions.getHostname()
hostname
- The hostname to use for your container.this
@Stability(value=Stable) public ContainerDefinitionProps.Builder linuxParameters(LinuxParameters linuxParameters)
ContainerDefinitionOptions.getLinuxParameters()
linuxParameters
- Linux-specific modifications that are applied to the container, such as Linux kernel capabilities.
For more information see KernelCapabilities.this
@Stability(value=Stable) public ContainerDefinitionProps.Builder logging(LogDriver logging)
ContainerDefinitionOptions.getLogging()
logging
- The log configuration specification for the container.this
@Stability(value=Stable) public ContainerDefinitionProps.Builder memoryLimitMiB(Number memoryLimitMiB)
ContainerDefinitionOptions.getMemoryLimitMiB()
memoryLimitMiB
- The amount (in MiB) of memory to present to the container.
If your container attempts to exceed the allocated memory, the container
is terminated.
At least one of memoryLimitMiB and memoryReservationMiB is required for non-Fargate services.
this
@Stability(value=Stable) public ContainerDefinitionProps.Builder memoryReservationMiB(Number memoryReservationMiB)
ContainerDefinitionOptions.getMemoryReservationMiB()
memoryReservationMiB
- The soft limit (in MiB) of memory to reserve for the container.
When system memory is under heavy contention, Docker attempts to keep the
container memory to this soft limit. However, your container can consume more
memory when it needs to, up to either the hard limit specified with the memory
parameter (if applicable), or all of the available memory on the container
instance, whichever comes first.
At least one of memoryLimitMiB and memoryReservationMiB is required for non-Fargate services.
this
@Stability(value=Stable) public ContainerDefinitionProps.Builder privileged(Boolean privileged)
ContainerDefinitionOptions.getPrivileged()
privileged
- Specifies whether the container is marked as privileged.
When this parameter is true, the container is given elevated privileges on the host container instance (similar to the root user).this
@Stability(value=Stable) public ContainerDefinitionProps.Builder readonlyRootFilesystem(Boolean readonlyRootFilesystem)
ContainerDefinitionOptions.getReadonlyRootFilesystem()
readonlyRootFilesystem
- When this parameter is true, the container is given read-only access to its root file system.this
@Stability(value=Stable) public ContainerDefinitionProps.Builder secrets(Map<String,? extends Secret> secrets)
ContainerDefinitionOptions.getSecrets()
secrets
- The secret environment variables to pass to the container.this
@Stability(value=Stable) public ContainerDefinitionProps.Builder startTimeout(Duration startTimeout)
ContainerDefinitionOptions.getStartTimeout()
startTimeout
- Time duration (in seconds) to wait before giving up on resolving dependencies for a container.this
@Stability(value=Stable) public ContainerDefinitionProps.Builder stopTimeout(Duration stopTimeout)
ContainerDefinitionOptions.getStopTimeout()
stopTimeout
- Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own.this
@Stability(value=Stable) public ContainerDefinitionProps.Builder user(String user)
ContainerDefinitionOptions.getUser()
user
- The user name to use inside the container.this
@Stability(value=Stable) public ContainerDefinitionProps.Builder workingDirectory(String workingDirectory)
ContainerDefinitionOptions.getWorkingDirectory()
workingDirectory
- The working directory in which to run commands inside the container.this
@Stability(value=Stable) public ContainerDefinitionProps build()
build
in interface software.amazon.jsii.Builder<ContainerDefinitionProps>
ContainerDefinitionProps
NullPointerException
- if any required attribute was not providedCopyright © 2020. All rights reserved.