@Stability(value=Experimental) public static final class ContainerDefinitionOptions.Builder extends Object implements software.amazon.jsii.Builder<ContainerDefinitionOptions>
ContainerDefinitionOptions| Constructor and Description |
|---|
Builder() |
@Stability(value=Experimental) public ContainerDefinitionOptions.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=Experimental) public ContainerDefinitionOptions.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=Experimental) public ContainerDefinitionOptions.Builder containerName(String containerName)
ContainerDefinitionOptions.getContainerName()containerName - The name of the container.this@Stability(value=Experimental) public ContainerDefinitionOptions.Builder cpu(Number cpu)
ContainerDefinitionOptions.getCpu()cpu - The minimum number of CPU units to reserve for the container.this@Stability(value=Experimental) public ContainerDefinitionOptions.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=Experimental) public ContainerDefinitionOptions.Builder dnsSearchDomains(List<String> dnsSearchDomains)
ContainerDefinitionOptions.getDnsSearchDomains()dnsSearchDomains - A list of DNS search domains that are presented to the container.this@Stability(value=Experimental) public ContainerDefinitionOptions.Builder dnsServers(List<String> dnsServers)
ContainerDefinitionOptions.getDnsServers()dnsServers - A list of DNS servers that are presented to the container.this@Stability(value=Experimental) public ContainerDefinitionOptions.Builder dockerLabels(Map<String,String> dockerLabels)
ContainerDefinitionOptions.getDockerLabels()dockerLabels - A key/value map of labels to add to the container.this@Stability(value=Experimental) public ContainerDefinitionOptions.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=Experimental) public ContainerDefinitionOptions.Builder entryPoint(List<String> entryPoint)
ContainerDefinitionOptions.getEntryPoint()entryPoint - The ENTRYPOINT value to pass to the container.this@Stability(value=Experimental) public ContainerDefinitionOptions.Builder environment(Map<String,String> environment)
ContainerDefinitionOptions.getEnvironment()environment - The environment variables to pass to the container.this@Stability(value=Experimental) public ContainerDefinitionOptions.Builder environmentFiles(List<? extends EnvironmentFile> environmentFiles)
ContainerDefinitionOptions.getEnvironmentFiles()environmentFiles - The environment files to pass to the container.this@Stability(value=Experimental) public ContainerDefinitionOptions.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=Experimental) public ContainerDefinitionOptions.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=Experimental) public ContainerDefinitionOptions.Builder gpuCount(Number gpuCount)
ContainerDefinitionOptions.getGpuCount()gpuCount - The number of GPUs assigned to the container.this@Stability(value=Experimental) public ContainerDefinitionOptions.Builder healthCheck(HealthCheck healthCheck)
ContainerDefinitionOptions.getHealthCheck()healthCheck - The health check command and associated configuration parameters for the container.this@Stability(value=Experimental) public ContainerDefinitionOptions.Builder hostname(String hostname)
ContainerDefinitionOptions.getHostname()hostname - The hostname to use for your container.this@Stability(value=Experimental) public ContainerDefinitionOptions.Builder inferenceAcceleratorResources(List<String> inferenceAcceleratorResources)
ContainerDefinitionOptions.getInferenceAcceleratorResources()inferenceAcceleratorResources - The inference accelerators referenced by the container.this@Stability(value=Experimental) public ContainerDefinitionOptions.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=Experimental) public ContainerDefinitionOptions.Builder logging(LogDriver logging)
ContainerDefinitionOptions.getLogging()logging - The log configuration specification for the container.this@Stability(value=Experimental) public ContainerDefinitionOptions.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=Experimental) public ContainerDefinitionOptions.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=Experimental) public ContainerDefinitionOptions.Builder portMappings(List<? extends PortMapping> portMappings)
ContainerDefinitionOptions.getPortMappings()portMappings - The port mappings to add to the container definition.this@Stability(value=Experimental) public ContainerDefinitionOptions.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=Experimental) public ContainerDefinitionOptions.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=Experimental) public ContainerDefinitionOptions.Builder secrets(Map<String,? extends Secret> secrets)
ContainerDefinitionOptions.getSecrets()secrets - The secret environment variables to pass to the container.this@Stability(value=Experimental) public ContainerDefinitionOptions.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=Experimental) public ContainerDefinitionOptions.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=Experimental) public ContainerDefinitionOptions.Builder user(String user)
ContainerDefinitionOptions.getUser()user - The user name to use inside the container.this@Stability(value=Experimental) public ContainerDefinitionOptions.Builder workingDirectory(String workingDirectory)
ContainerDefinitionOptions.getWorkingDirectory()workingDirectory - The working directory in which to run commands inside the container.this@Stability(value=Experimental) public ContainerDefinitionOptions build()
build in interface software.amazon.jsii.Builder<ContainerDefinitionOptions>ContainerDefinitionOptionsNullPointerException - if any required attribute was not providedCopyright © 2021. All rights reserved.