Interface DaemonContainerDefinition.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<DaemonContainerDefinition.Builder,,DaemonContainerDefinition> SdkBuilder<DaemonContainerDefinition.Builder,,DaemonContainerDefinition> SdkPojo
- Enclosing class:
DaemonContainerDefinition
-
Method Summary
Modifier and TypeMethodDescriptionThe command that's passed to the container.command(Collection<String> command) The command that's passed to the container.The number ofcpuunits reserved for the container.dependsOn(Collection<ContainerDependency> dependsOn) The dependencies defined for container startup and shutdown.dependsOn(Consumer<ContainerDependency.Builder>... dependsOn) The dependencies defined for container startup and shutdown.dependsOn(ContainerDependency... dependsOn) The dependencies defined for container startup and shutdown.entryPoint(String... entryPoint) The entry point that's passed to the container.entryPoint(Collection<String> entryPoint) The entry point that's passed to the container.environment(Collection<KeyValuePair> environment) The environment variables to pass to a container.environment(Consumer<KeyValuePair.Builder>... environment) The environment variables to pass to a container.environment(KeyValuePair... environment) The environment variables to pass to a container.environmentFiles(Collection<EnvironmentFile> environmentFiles) A list of files containing the environment variables to pass to a container.environmentFiles(Consumer<EnvironmentFile.Builder>... environmentFiles) A list of files containing the environment variables to pass to a container.environmentFiles(EnvironmentFile... environmentFiles) A list of files containing the environment variables to pass to a container.If theessentialparameter of a container is marked astrue, and that container fails or stops for any reason, all other containers that are part of the task are stopped.firelensConfiguration(Consumer<FirelensConfiguration.Builder> firelensConfiguration) The FireLens configuration for the container.firelensConfiguration(FirelensConfiguration firelensConfiguration) The FireLens configuration for the container.healthCheck(Consumer<HealthCheck.Builder> healthCheck) The container health check command and associated configuration parameters for the container.healthCheck(HealthCheck healthCheck) The container health check command and associated configuration parameters for the container.The image used to start the container.interactive(Boolean interactive) When this parameter istrue, you can deploy containerized applications that requirestdinor attyto be allocated.linuxParameters(Consumer<DaemonLinuxParameters.Builder> linuxParameters) Linux-specific modifications that are applied to the container configuration, such as Linux kernel capabilities.linuxParameters(DaemonLinuxParameters linuxParameters) Linux-specific modifications that are applied to the container configuration, such as Linux kernel capabilities.logConfiguration(Consumer<LogConfiguration.Builder> logConfiguration) The log configuration specification for the container.logConfiguration(LogConfiguration logConfiguration) The log configuration specification for the container.The amount (in MiB) of memory to present to the container.memoryReservation(Integer memoryReservation) The soft limit (in MiB) of memory to reserve for the container.mountPoints(Collection<MountPoint> mountPoints) The mount points for data volumes in your container.mountPoints(Consumer<MountPoint.Builder>... mountPoints) The mount points for data volumes in your container.mountPoints(MountPoint... mountPoints) The mount points for data volumes in your container.The name of the container.privileged(Boolean privileged) When this parameter is true, the container is given elevated privileges on the host container instance (similar to therootuser).pseudoTerminal(Boolean pseudoTerminal) When this parameter istrue, a TTY is allocated.readonlyRootFilesystem(Boolean readonlyRootFilesystem) When this parameter is true, the container is given read-only access to its root file system.repositoryCredentials(Consumer<RepositoryCredentials.Builder> repositoryCredentials) The private repository authentication credentials to use.repositoryCredentials(RepositoryCredentials repositoryCredentials) The private repository authentication credentials to use.restartPolicy(Consumer<ContainerRestartPolicy.Builder> restartPolicy) The restart policy for the container.restartPolicy(ContainerRestartPolicy restartPolicy) The restart policy for the container.secrets(Collection<Secret> secrets) The secrets to pass to the container.secrets(Consumer<Secret.Builder>... secrets) The secrets to pass to the container.The secrets to pass to the container.startTimeout(Integer startTimeout) Time duration (in seconds) to wait before giving up on resolving dependencies for a container.stopTimeout(Integer stopTimeout) Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own.systemControls(Collection<SystemControl> systemControls) A list of namespaced kernel parameters to set in the container.systemControls(Consumer<SystemControl.Builder>... systemControls) A list of namespaced kernel parameters to set in the container.systemControls(SystemControl... systemControls) A list of namespaced kernel parameters to set in the container.ulimits(Collection<Ulimit> ulimits) A list ofulimitsto set in the container.ulimits(Consumer<Ulimit.Builder>... ulimits) A list ofulimitsto set in the container.A list ofulimitsto set in the container.The user to use inside the container.workingDirectory(String workingDirectory) The working directory to run commands inside the container in.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
name
The name of the container. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.
- Parameters:
name- The name of the container. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
image
The image used to start the container. 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:tagorrepository-url/image@digest.- Parameters:
image- The image used to start the container. This string is passed directly to the Docker daemon. Images in the Docker Hub registry are available by default. Other repositories are specified with eitherrepository-url/image:tagorrepository-url/image@digest.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
memory
The amount (in MiB) of memory to present to the container. If the container attempts to exceed the memory specified here, the container is killed.
- Parameters:
memory- The amount (in MiB) of memory to present to the container. If the container attempts to exceed the memory specified here, the container is killed.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
memoryReservation
The soft limit (in MiB) of memory to reserve for the container.
- Parameters:
memoryReservation- The soft limit (in MiB) of memory to reserve for the container.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
repositoryCredentials
DaemonContainerDefinition.Builder repositoryCredentials(RepositoryCredentials repositoryCredentials) The private repository authentication credentials to use.
- Parameters:
repositoryCredentials- The private repository authentication credentials to use.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
repositoryCredentials
default DaemonContainerDefinition.Builder repositoryCredentials(Consumer<RepositoryCredentials.Builder> repositoryCredentials) The private repository authentication credentials to use.
This is a convenience method that creates an instance of theRepositoryCredentials.Builderavoiding the need to create one manually viaRepositoryCredentials.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed torepositoryCredentials(RepositoryCredentials).- Parameters:
repositoryCredentials- a consumer that will call methods onRepositoryCredentials.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
healthCheck
The container health check command and associated configuration parameters for the container.
- Parameters:
healthCheck- The container health check command and associated configuration parameters for the container.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
healthCheck
The container health check command and associated configuration parameters for the container.
This is a convenience method that creates an instance of theHealthCheck.Builderavoiding the need to create one manually viaHealthCheck.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tohealthCheck(HealthCheck).- Parameters:
healthCheck- a consumer that will call methods onHealthCheck.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
cpu
The number of
cpuunits reserved for the container.- Parameters:
cpu- The number ofcpuunits reserved for the container.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
essential
If the
essentialparameter of a container is marked astrue, and that container fails or stops for any reason, all other containers that are part of the task are stopped.- Parameters:
essential- If theessentialparameter of a container is marked astrue, and that container fails or stops for any reason, all other containers that are part of the task are stopped.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
entryPoint
The entry point that's passed to the container.
- Parameters:
entryPoint- The entry point that's passed to the container.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
entryPoint
The entry point that's passed to the container.
- Parameters:
entryPoint- The entry point that's passed to the container.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
command
The command that's passed to the container.
- Parameters:
command- The command that's passed to the container.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
command
The command that's passed to the container.
- Parameters:
command- The command that's passed to the container.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
workingDirectory
The working directory to run commands inside the container in.
- Parameters:
workingDirectory- The working directory to run commands inside the container in.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
environmentFiles
A list of files containing the environment variables to pass to a container.
- Parameters:
environmentFiles- A list of files containing the environment variables to pass to a container.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
environmentFiles
A list of files containing the environment variables to pass to a container.
- Parameters:
environmentFiles- A list of files containing the environment variables to pass to a container.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
environmentFiles
DaemonContainerDefinition.Builder environmentFiles(Consumer<EnvironmentFile.Builder>... environmentFiles) A list of files containing the environment variables to pass to a container.
This is a convenience method that creates an instance of theEnvironmentFile.Builderavoiding the need to create one manually viaEnvironmentFile.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toenvironmentFiles(List<EnvironmentFile>).- Parameters:
environmentFiles- a consumer that will call methods onEnvironmentFile.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
environment
The environment variables to pass to a container.
- Parameters:
environment- The environment variables to pass to a container.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
environment
The environment variables to pass to a container.
- Parameters:
environment- The environment variables to pass to a container.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
environment
The environment variables to pass to a container.
This is a convenience method that creates an instance of theKeyValuePair.Builderavoiding the need to create one manually viaKeyValuePair.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toenvironment(List<KeyValuePair>).- Parameters:
environment- a consumer that will call methods onKeyValuePair.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
secrets
The secrets to pass to the container.
- Parameters:
secrets- The secrets to pass to the container.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
secrets
The secrets to pass to the container.
- Parameters:
secrets- The secrets to pass to the container.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
secrets
The secrets to pass to the container.
This is a convenience method that creates an instance of theSecret.Builderavoiding the need to create one manually viaSecret.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tosecrets(List<Secret>).- Parameters:
secrets- a consumer that will call methods onSecret.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
readonlyRootFilesystem
When this parameter is true, the container is given read-only access to its root file system.
- Parameters:
readonlyRootFilesystem- When this parameter is true, the container is given read-only access to its root file system.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
mountPoints
The mount points for data volumes in your container.
- Parameters:
mountPoints- The mount points for data volumes in your container.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
mountPoints
The mount points for data volumes in your container.
- Parameters:
mountPoints- The mount points for data volumes in your container.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
mountPoints
The mount points for data volumes in your container.
This is a convenience method that creates an instance of theMountPoint.Builderavoiding the need to create one manually viaMountPoint.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tomountPoints(List<MountPoint>).- Parameters:
mountPoints- a consumer that will call methods onMountPoint.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
logConfiguration
The log configuration specification for the container.
- Parameters:
logConfiguration- The log configuration specification for the container.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
logConfiguration
default DaemonContainerDefinition.Builder logConfiguration(Consumer<LogConfiguration.Builder> logConfiguration) The log configuration specification for the container.
This is a convenience method that creates an instance of theLogConfiguration.Builderavoiding the need to create one manually viaLogConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tologConfiguration(LogConfiguration).- Parameters:
logConfiguration- a consumer that will call methods onLogConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
firelensConfiguration
DaemonContainerDefinition.Builder firelensConfiguration(FirelensConfiguration firelensConfiguration) The FireLens configuration for the container. This is used to specify and configure a log router for container logs.
- Parameters:
firelensConfiguration- The FireLens configuration for the container. This is used to specify and configure a log router for container logs.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
firelensConfiguration
default DaemonContainerDefinition.Builder firelensConfiguration(Consumer<FirelensConfiguration.Builder> firelensConfiguration) The FireLens configuration for the container. This is used to specify and configure a log router for container logs.
This is a convenience method that creates an instance of theFirelensConfiguration.Builderavoiding the need to create one manually viaFirelensConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tofirelensConfiguration(FirelensConfiguration).- Parameters:
firelensConfiguration- a consumer that will call methods onFirelensConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
privileged
When this parameter is true, the container is given elevated privileges on the host container instance (similar to the
rootuser).- Parameters:
privileged- When this parameter is true, the container is given elevated privileges on the host container instance (similar to therootuser).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
user
The user to use inside the container.
- Parameters:
user- The user to use inside the container.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ulimits
A list of
ulimitsto set in the container.- Parameters:
ulimits- A list ofulimitsto set in the container.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ulimits
A list of
ulimitsto set in the container.- Parameters:
ulimits- A list ofulimitsto set in the container.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ulimits
A list of
This is a convenience method that creates an instance of theulimitsto set in the container.Ulimit.Builderavoiding the need to create one manually viaUlimit.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toulimits(List<Ulimit>).- Parameters:
ulimits- a consumer that will call methods onUlimit.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
linuxParameters
Linux-specific modifications that are applied to the container configuration, such as Linux kernel capabilities.
- Parameters:
linuxParameters- Linux-specific modifications that are applied to the container configuration, such as Linux kernel capabilities.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
linuxParameters
default DaemonContainerDefinition.Builder linuxParameters(Consumer<DaemonLinuxParameters.Builder> linuxParameters) Linux-specific modifications that are applied to the container configuration, such as Linux kernel capabilities.
This is a convenience method that creates an instance of theDaemonLinuxParameters.Builderavoiding the need to create one manually viaDaemonLinuxParameters.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tolinuxParameters(DaemonLinuxParameters).- Parameters:
linuxParameters- a consumer that will call methods onDaemonLinuxParameters.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
dependsOn
The dependencies defined for container startup and shutdown. A container can contain multiple dependencies on other containers in a task definition.
- Parameters:
dependsOn- The dependencies defined for container startup and shutdown. A container can contain multiple dependencies on other containers in a task definition.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
dependsOn
The dependencies defined for container startup and shutdown. A container can contain multiple dependencies on other containers in a task definition.
- Parameters:
dependsOn- The dependencies defined for container startup and shutdown. A container can contain multiple dependencies on other containers in a task definition.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
dependsOn
The dependencies defined for container startup and shutdown. A container can contain multiple dependencies on other containers in a task definition.
This is a convenience method that creates an instance of theContainerDependency.Builderavoiding the need to create one manually viaContainerDependency.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed todependsOn(List<ContainerDependency>).- Parameters:
dependsOn- a consumer that will call methods onContainerDependency.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
startTimeout
Time duration (in seconds) to wait before giving up on resolving dependencies for a container.
- Parameters:
startTimeout- Time duration (in seconds) to wait before giving up on resolving dependencies for a container.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
stopTimeout
Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own.
- Parameters:
stopTimeout- Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
systemControls
A list of namespaced kernel parameters to set in the container.
- Parameters:
systemControls- A list of namespaced kernel parameters to set in the container.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
systemControls
A list of namespaced kernel parameters to set in the container.
- Parameters:
systemControls- A list of namespaced kernel parameters to set in the container.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
systemControls
A list of namespaced kernel parameters to set in the container.
This is a convenience method that creates an instance of theSystemControl.Builderavoiding the need to create one manually viaSystemControl.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tosystemControls(List<SystemControl>).- Parameters:
systemControls- a consumer that will call methods onSystemControl.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
interactive
When this parameter is
true, you can deploy containerized applications that requirestdinor attyto be allocated.- Parameters:
interactive- When this parameter istrue, you can deploy containerized applications that requirestdinor attyto be allocated.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
pseudoTerminal
When this parameter is
true, a TTY is allocated.- Parameters:
pseudoTerminal- When this parameter istrue, a TTY is allocated.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
restartPolicy
The restart policy for the container. When you set up a restart policy, Amazon ECS can restart the container without needing to replace the task.
- Parameters:
restartPolicy- The restart policy for the container. When you set up a restart policy, Amazon ECS can restart the container without needing to replace the task.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
restartPolicy
default DaemonContainerDefinition.Builder restartPolicy(Consumer<ContainerRestartPolicy.Builder> restartPolicy) The restart policy for the container. When you set up a restart policy, Amazon ECS can restart the container without needing to replace the task.
This is a convenience method that creates an instance of theContainerRestartPolicy.Builderavoiding the need to create one manually viaContainerRestartPolicy.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed torestartPolicy(ContainerRestartPolicy).- Parameters:
restartPolicy- a consumer that will call methods onContainerRestartPolicy.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-