Interface ContainerDefinition.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<ContainerDefinition.Builder,ContainerDefinition>,SdkBuilder<ContainerDefinition.Builder,ContainerDefinition>,SdkPojo
- Enclosing class:
- ContainerDefinition
public static interface ContainerDefinition.Builder extends SdkPojo, CopyableBuilder<ContainerDefinition.Builder,ContainerDefinition>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ContainerDefinition.Buildercommand(String... command)A command that's passed to the container on startup.ContainerDefinition.Buildercommand(Collection<String> command)A command that's passed to the container on startup.ContainerDefinition.BuildercontainerName(String containerName)The container definition identifier.ContainerDefinition.Buildercpu(Integer cpu)The number of CPU units that are reserved for the container.ContainerDefinition.BuilderdependsOn(Collection<ContainerDependency> dependsOn)Indicates that the container relies on the status of other containers in the same container group during its startup and shutdown sequences.ContainerDefinition.BuilderdependsOn(Consumer<ContainerDependency.Builder>... dependsOn)Indicates that the container relies on the status of other containers in the same container group during its startup and shutdown sequences.ContainerDefinition.BuilderdependsOn(ContainerDependency... dependsOn)Indicates that the container relies on the status of other containers in the same container group during its startup and shutdown sequences.ContainerDefinition.BuilderentryPoint(String... entryPoint)The entry point that's passed to the container on startup.ContainerDefinition.BuilderentryPoint(Collection<String> entryPoint)The entry point that's passed to the container on startup.ContainerDefinition.Builderenvironment(Collection<ContainerEnvironment> environment)A set of environment variables that's passed to the container on startup.ContainerDefinition.Builderenvironment(Consumer<ContainerEnvironment.Builder>... environment)A set of environment variables that's passed to the container on startup.ContainerDefinition.Builderenvironment(ContainerEnvironment... environment)A set of environment variables that's passed to the container on startup.ContainerDefinition.Builderessential(Boolean essential)Indicates whether the container is vital to the container group.default ContainerDefinition.BuilderhealthCheck(Consumer<ContainerHealthCheck.Builder> healthCheck)A configuration for a non-terminal health check.ContainerDefinition.BuilderhealthCheck(ContainerHealthCheck healthCheck)A configuration for a non-terminal health check.ContainerDefinition.BuilderimageUri(String imageUri)The URI to the image that $short; copied and deployed to a container fleet.default ContainerDefinition.BuildermemoryLimits(Consumer<ContainerMemoryLimits.Builder> memoryLimits)The amount of memory that Amazon GameLift makes available to the container.ContainerDefinition.BuildermemoryLimits(ContainerMemoryLimits memoryLimits)The amount of memory that Amazon GameLift makes available to the container.default ContainerDefinition.BuilderportConfiguration(Consumer<ContainerPortConfiguration.Builder> portConfiguration)Defines the ports that are available to assign to processes in the container.ContainerDefinition.BuilderportConfiguration(ContainerPortConfiguration portConfiguration)Defines the ports that are available to assign to processes in the container.ContainerDefinition.BuilderresolvedImageDigest(String resolvedImageDigest)A unique and immutable identifier for the container image that is deployed to a container fleet.ContainerDefinition.BuilderworkingDirectory(String workingDirectory)The directory in the container where commands are run.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
-
-
-
Method Detail
-
containerName
ContainerDefinition.Builder containerName(String containerName)
The container definition identifier. Container names are unique within a container group definition.
- Parameters:
containerName- The container definition identifier. Container names are unique within a container group definition.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
imageUri
ContainerDefinition.Builder imageUri(String imageUri)
The URI to the image that $short; copied and deployed to a container fleet. For a more specific identifier, see
ResolvedImageDigest.- Parameters:
imageUri- The URI to the image that $short; copied and deployed to a container fleet. For a more specific identifier, seeResolvedImageDigest.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
resolvedImageDigest
ContainerDefinition.Builder resolvedImageDigest(String resolvedImageDigest)
A unique and immutable identifier for the container image that is deployed to a container fleet. The digest is a SHA 256 hash of the container image manifest.
- Parameters:
resolvedImageDigest- A unique and immutable identifier for the container image that is deployed to a container fleet. The digest is a SHA 256 hash of the container image manifest.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
memoryLimits
ContainerDefinition.Builder memoryLimits(ContainerMemoryLimits memoryLimits)
The amount of memory that Amazon GameLift makes available to the container. If memory limits aren't set for an individual container, the container shares the container group's total memory allocation.
Related data type: ContainerGroupDefinition$TotalMemoryLimit
- Parameters:
memoryLimits- The amount of memory that Amazon GameLift makes available to the container. If memory limits aren't set for an individual container, the container shares the container group's total memory allocation.Related data type: ContainerGroupDefinition$TotalMemoryLimit
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
memoryLimits
default ContainerDefinition.Builder memoryLimits(Consumer<ContainerMemoryLimits.Builder> memoryLimits)
The amount of memory that Amazon GameLift makes available to the container. If memory limits aren't set for an individual container, the container shares the container group's total memory allocation.
Related data type: ContainerGroupDefinition$TotalMemoryLimit
This is a convenience method that creates an instance of theContainerMemoryLimits.Builderavoiding the need to create one manually viaContainerMemoryLimits.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tomemoryLimits(ContainerMemoryLimits).- Parameters:
memoryLimits- a consumer that will call methods onContainerMemoryLimits.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
memoryLimits(ContainerMemoryLimits)
-
portConfiguration
ContainerDefinition.Builder portConfiguration(ContainerPortConfiguration portConfiguration)
Defines the ports that are available to assign to processes in the container. For example, a game server process requires a container port to allow game clients to connect to it. Container ports aren't directly accessed by inbound traffic. Amazon GameLift maps these container ports to externally accessible connection ports, which are assigned as needed from the container fleet's
ConnectionPortRange.- Parameters:
portConfiguration- Defines the ports that are available to assign to processes in the container. For example, a game server process requires a container port to allow game clients to connect to it. Container ports aren't directly accessed by inbound traffic. Amazon GameLift maps these container ports to externally accessible connection ports, which are assigned as needed from the container fleet'sConnectionPortRange.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
portConfiguration
default ContainerDefinition.Builder portConfiguration(Consumer<ContainerPortConfiguration.Builder> portConfiguration)
Defines the ports that are available to assign to processes in the container. For example, a game server process requires a container port to allow game clients to connect to it. Container ports aren't directly accessed by inbound traffic. Amazon GameLift maps these container ports to externally accessible connection ports, which are assigned as needed from the container fleet's
This is a convenience method that creates an instance of theConnectionPortRange.ContainerPortConfiguration.Builderavoiding the need to create one manually viaContainerPortConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toportConfiguration(ContainerPortConfiguration).- Parameters:
portConfiguration- a consumer that will call methods onContainerPortConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
portConfiguration(ContainerPortConfiguration)
-
cpu
ContainerDefinition.Builder cpu(Integer cpu)
The number of CPU units that are reserved for the container. Note: 1 vCPU unit equals 1024 CPU units. If no resources are reserved, the container shares the total CPU limit for the container group.
Related data type: ContainerGroupDefinition$TotalCpuLimit
- Parameters:
cpu- The number of CPU units that are reserved for the container. Note: 1 vCPU unit equals 1024 CPU units. If no resources are reserved, the container shares the total CPU limit for the container group.Related data type: ContainerGroupDefinition$TotalCpuLimit
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
healthCheck
ContainerDefinition.Builder healthCheck(ContainerHealthCheck healthCheck)
A configuration for a non-terminal health check. A container, which automatically restarts if it stops functioning, also restarts if it fails this health check. If an essential container in the daemon group fails a health check, the entire container group is restarted. The essential container in the replica group doesn't use this health check mechanism, because the Amazon GameLift Agent automatically handles the task.
- Parameters:
healthCheck- A configuration for a non-terminal health check. A container, which automatically restarts if it stops functioning, also restarts if it fails this health check. If an essential container in the daemon group fails a health check, the entire container group is restarted. The essential container in the replica group doesn't use this health check mechanism, because the Amazon GameLift Agent automatically handles the task.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
healthCheck
default ContainerDefinition.Builder healthCheck(Consumer<ContainerHealthCheck.Builder> healthCheck)
A configuration for a non-terminal health check. A container, which automatically restarts if it stops functioning, also restarts if it fails this health check. If an essential container in the daemon group fails a health check, the entire container group is restarted. The essential container in the replica group doesn't use this health check mechanism, because the Amazon GameLift Agent automatically handles the task.
This is a convenience method that creates an instance of theContainerHealthCheck.Builderavoiding the need to create one manually viaContainerHealthCheck.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tohealthCheck(ContainerHealthCheck).- Parameters:
healthCheck- a consumer that will call methods onContainerHealthCheck.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
healthCheck(ContainerHealthCheck)
-
command
ContainerDefinition.Builder command(Collection<String> command)
A command that's passed to the container on startup. Each argument for the command is an additional string in the array. See the ContainerDefinition::command parameter in the Amazon Elastic Container Service API reference.
- Parameters:
command- A command that's passed to the container on startup. Each argument for the command is an additional string in the array. See the ContainerDefinition::command parameter in the Amazon Elastic Container Service API reference.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
command
ContainerDefinition.Builder command(String... command)
A command that's passed to the container on startup. Each argument for the command is an additional string in the array. See the ContainerDefinition::command parameter in the Amazon Elastic Container Service API reference.
- Parameters:
command- A command that's passed to the container on startup. Each argument for the command is an additional string in the array. See the ContainerDefinition::command parameter in the Amazon Elastic Container Service API reference.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
essential
ContainerDefinition.Builder essential(Boolean essential)
Indicates whether the container is vital to the container group. If an essential container fails, the entire container group is restarted.
- Parameters:
essential- Indicates whether the container is vital to the container group. If an essential container fails, the entire container group is restarted.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
entryPoint
ContainerDefinition.Builder entryPoint(Collection<String> entryPoint)
The entry point that's passed to the container on startup. If there are multiple arguments, each argument is an additional string in the array. See the ContainerDefinition::entryPoint parameter in the Amazon Elastic Container Service API Reference.
- Parameters:
entryPoint- The entry point that's passed to the container on startup. If there are multiple arguments, each argument is an additional string in the array. See the ContainerDefinition::entryPoint parameter in the Amazon Elastic Container Service API Reference.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
entryPoint
ContainerDefinition.Builder entryPoint(String... entryPoint)
The entry point that's passed to the container on startup. If there are multiple arguments, each argument is an additional string in the array. See the ContainerDefinition::entryPoint parameter in the Amazon Elastic Container Service API Reference.
- Parameters:
entryPoint- The entry point that's passed to the container on startup. If there are multiple arguments, each argument is an additional string in the array. See the ContainerDefinition::entryPoint parameter in the Amazon Elastic Container Service API Reference.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
workingDirectory
ContainerDefinition.Builder workingDirectory(String workingDirectory)
The directory in the container where commands are run. See the ContainerDefinition::workingDirectory parameter in the Amazon Elastic Container Service API Reference.
- Parameters:
workingDirectory- The directory in the container where commands are run. See the ContainerDefinition::workingDirectory parameter in the Amazon Elastic Container Service API Reference.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
environment
ContainerDefinition.Builder environment(Collection<ContainerEnvironment> environment)
A set of environment variables that's passed to the container on startup. See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API Reference.
- Parameters:
environment- A set of environment variables that's passed to the container on startup. See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API Reference.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
environment
ContainerDefinition.Builder environment(ContainerEnvironment... environment)
A set of environment variables that's passed to the container on startup. See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API Reference.
- Parameters:
environment- A set of environment variables that's passed to the container on startup. See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API Reference.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
environment
ContainerDefinition.Builder environment(Consumer<ContainerEnvironment.Builder>... environment)
A set of environment variables that's passed to the container on startup. See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API Reference.
This is a convenience method that creates an instance of theContainerEnvironment.Builderavoiding the need to create one manually viaContainerEnvironment.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#environment(List.) - Parameters:
environment- a consumer that will call methods onContainerEnvironment.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#environment(java.util.Collection)
-
dependsOn
ContainerDefinition.Builder dependsOn(Collection<ContainerDependency> dependsOn)
Indicates that the container relies on the status of other containers in the same container group during its startup and shutdown sequences. A container might have dependencies on multiple containers.
- Parameters:
dependsOn- Indicates that the container relies on the status of other containers in the same container group during its startup and shutdown sequences. A container might have dependencies on multiple containers.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
dependsOn
ContainerDefinition.Builder dependsOn(ContainerDependency... dependsOn)
Indicates that the container relies on the status of other containers in the same container group during its startup and shutdown sequences. A container might have dependencies on multiple containers.
- Parameters:
dependsOn- Indicates that the container relies on the status of other containers in the same container group during its startup and shutdown sequences. A container might have dependencies on multiple containers.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
dependsOn
ContainerDefinition.Builder dependsOn(Consumer<ContainerDependency.Builder>... dependsOn)
Indicates that the container relies on the status of other containers in the same container group during its startup and shutdown sequences. A container might have dependencies on multiple containers.
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 to#dependsOn(List.) - 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:
#dependsOn(java.util.Collection)
-
-