Interface ContainerDefinitionInput.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<ContainerDefinitionInput.Builder,ContainerDefinitionInput>,SdkBuilder<ContainerDefinitionInput.Builder,ContainerDefinitionInput>,SdkPojo
- Enclosing class:
- ContainerDefinitionInput
public static interface ContainerDefinitionInput.Builder extends SdkPojo, CopyableBuilder<ContainerDefinitionInput.Builder,ContainerDefinitionInput>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ContainerDefinitionInput.Buildercommand(String... command)A command to pass to the container on startup.ContainerDefinitionInput.Buildercommand(Collection<String> command)A command to pass to the container on startup.ContainerDefinitionInput.BuildercontainerName(String containerName)A string that uniquely identifies the container definition within a container group.ContainerDefinitionInput.Buildercpu(Integer cpu)The number of CPU units to reserve for this container.ContainerDefinitionInput.BuilderdependsOn(Collection<ContainerDependency> dependsOn)Sets up dependencies between this container and the status of other containers in the same container group.ContainerDefinitionInput.BuilderdependsOn(Consumer<ContainerDependency.Builder>... dependsOn)Sets up dependencies between this container and the status of other containers in the same container group.ContainerDefinitionInput.BuilderdependsOn(ContainerDependency... dependsOn)Sets up dependencies between this container and the status of other containers in the same container group.ContainerDefinitionInput.BuilderentryPoint(String... entryPoint)An entry point to pass to the container on startup.ContainerDefinitionInput.BuilderentryPoint(Collection<String> entryPoint)An entry point to pass to the container on startup.ContainerDefinitionInput.Builderenvironment(Collection<ContainerEnvironment> environment)A set of environment variables to pass to the container on startup.ContainerDefinitionInput.Builderenvironment(Consumer<ContainerEnvironment.Builder>... environment)A set of environment variables to pass to the container on startup.ContainerDefinitionInput.Builderenvironment(ContainerEnvironment... environment)A set of environment variables to pass to the container on startup.ContainerDefinitionInput.Builderessential(Boolean essential)Specifies whether the container is vital for the container group to function properly.default ContainerDefinitionInput.BuilderhealthCheck(Consumer<ContainerHealthCheck.Builder> healthCheck)Configuration for a non-terminal health check.ContainerDefinitionInput.BuilderhealthCheck(ContainerHealthCheck healthCheck)Configuration for a non-terminal health check.ContainerDefinitionInput.BuilderimageUri(String imageUri)The location of a container image that $short; will copy and deploy to a container fleet.default ContainerDefinitionInput.BuildermemoryLimits(Consumer<ContainerMemoryLimits.Builder> memoryLimits)The amount of memory to make available to the container.ContainerDefinitionInput.BuildermemoryLimits(ContainerMemoryLimits memoryLimits)The amount of memory to make available to the container.default ContainerDefinitionInput.BuilderportConfiguration(Consumer<ContainerPortConfiguration.Builder> portConfiguration)A set of ports that Amazon GameLift can assign to processes in the container.ContainerDefinitionInput.BuilderportConfiguration(ContainerPortConfiguration portConfiguration)A set of ports that Amazon GameLift can assign to processes in the container.ContainerDefinitionInput.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
ContainerDefinitionInput.Builder containerName(String containerName)
A string that uniquely identifies the container definition within a container group.
- Parameters:
containerName- A string that uniquely identifies the container definition within a container group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
imageUri
ContainerDefinitionInput.Builder imageUri(String imageUri)
The location of a container image that $short; will copy and deploy to a container fleet. Images in Amazon Elastic Container Registry private repositories are supported. The repository must be in the same Amazon Web Services account and Amazon Web Services Region where you're creating the container group definition. For limits on image size, see Amazon GameLift endpoints and quotas. You can use any of the following image URI formats:
-
Image ID only:
[AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID] -
Image ID and digest:
[AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID]@[digest] -
Image ID and tag:
[AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID]:[tag]
- Parameters:
imageUri- The location of a container image that $short; will copy and deploy to a container fleet. Images in Amazon Elastic Container Registry private repositories are supported. The repository must be in the same Amazon Web Services account and Amazon Web Services Region where you're creating the container group definition. For limits on image size, see Amazon GameLift endpoints and quotas. You can use any of the following image URI formats:-
Image ID only:
[AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID] -
Image ID and digest:
[AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID]@[digest] -
Image ID and tag:
[AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID]:[tag]
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
memoryLimits
ContainerDefinitionInput.Builder memoryLimits(ContainerMemoryLimits memoryLimits)
The amount of memory to make available to the container. If you don't specify memory limits for this container, then it shares the container group's total memory allocation.
Related data type: ContainerGroupDefinition$TotalMemoryLimit
- Parameters:
memoryLimits- The amount of memory to make available to the container. If you don't specify memory limits for this container, then it 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 ContainerDefinitionInput.Builder memoryLimits(Consumer<ContainerMemoryLimits.Builder> memoryLimits)
The amount of memory to make available to the container. If you don't specify memory limits for this container, then it 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
ContainerDefinitionInput.Builder portConfiguration(ContainerPortConfiguration portConfiguration)
A set of ports that Amazon GameLift can assign to processes in the container. All processes that accept inbound traffic connections, including game server processes, must be assigned a port from this set. The set of ports must be large enough to assign one to each process in the container that needs one. If the container includes your game server, include enough ports to assign one port to each concurrent server process (as defined in a container fleet's RuntimeConfiguration). For more details, see Networking for container fleets.
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- A set of ports that Amazon GameLift can assign to processes in the container. All processes that accept inbound traffic connections, including game server processes, must be assigned a port from this set. The set of ports must be large enough to assign one to each process in the container that needs one. If the container includes your game server, include enough ports to assign one port to each concurrent server process (as defined in a container fleet's RuntimeConfiguration). For more details, see Networking for container fleets.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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
portConfiguration
default ContainerDefinitionInput.Builder portConfiguration(Consumer<ContainerPortConfiguration.Builder> portConfiguration)
A set of ports that Amazon GameLift can assign to processes in the container. All processes that accept inbound traffic connections, including game server processes, must be assigned a port from this set. The set of ports must be large enough to assign one to each process in the container that needs one. If the container includes your game server, include enough ports to assign one port to each concurrent server process (as defined in a container fleet's RuntimeConfiguration). For more details, see Networking for container fleets.
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
ContainerDefinitionInput.Builder cpu(Integer cpu)
The number of CPU units to reserve for this container. The container can use more resources when needed, if available. Note: 1 vCPU unit equals 1024 CPU units. If you don't reserve CPU units for this container, then it shares the total CPU limit for the container group. This property is similar to the Amazon ECS container definition parameter environment (Amazon Elastic Container Service Developer Guide).
Related data type: ContainerGroupDefinition$TotalCpuLimit
- Parameters:
cpu- The number of CPU units to reserve for this container. The container can use more resources when needed, if available. Note: 1 vCPU unit equals 1024 CPU units. If you don't reserve CPU units for this container, then it shares the total CPU limit for the container group. This property is similar to the Amazon ECS container definition parameter environment (Amazon Elastic Container Service Developer Guide).Related data type: ContainerGroupDefinition$TotalCpuLimit
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
healthCheck
ContainerDefinitionInput.Builder healthCheck(ContainerHealthCheck healthCheck)
Configuration for a non-terminal health check. A container automatically restarts if it stops functioning. This parameter lets you define additional reasons to consider a container unhealthy and restart it. You can set a health check for any container except for the essential container in the replica container group. If an essential container in the daemon group fails a health check, the entire container group is restarted.
- Parameters:
healthCheck- Configuration for a non-terminal health check. A container automatically restarts if it stops functioning. This parameter lets you define additional reasons to consider a container unhealthy and restart it. You can set a health check for any container except for the essential container in the replica container group. If an essential container in the daemon group fails a health check, the entire container group is restarted.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
healthCheck
default ContainerDefinitionInput.Builder healthCheck(Consumer<ContainerHealthCheck.Builder> healthCheck)
Configuration for a non-terminal health check. A container automatically restarts if it stops functioning. This parameter lets you define additional reasons to consider a container unhealthy and restart it. You can set a health check for any container except for the essential container in the replica container group. If an essential container in the daemon group fails a health check, the entire container group is restarted.
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
ContainerDefinitionInput.Builder command(Collection<String> command)
A command to pass to the container on startup. Add multiple arguments as additional strings in the array. See the ContainerDefinition command parameter in the Amazon Elastic Container Service API reference.
- Parameters:
command- A command to pass to the container on startup. Add multiple arguments as additional strings 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
ContainerDefinitionInput.Builder command(String... command)
A command to pass to the container on startup. Add multiple arguments as additional strings in the array. See the ContainerDefinition command parameter in the Amazon Elastic Container Service API reference.
- Parameters:
command- A command to pass to the container on startup. Add multiple arguments as additional strings 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
ContainerDefinitionInput.Builder essential(Boolean essential)
Specifies whether the container is vital for the container group to function properly. If an essential container fails, it causes the entire container group to restart. Each container group must have an essential container.
Replica container groups - A replica group must have exactly one essential container. Use the following to configure an essential replica container:
-
Choose a container is running your game server and the Amazon GameLift Agent.
-
Include a port configuration. This container runs your game server processes, and each process requires a container port to allow access to game clients.
-
Don't configure a health check. The Agent handles this task for the essential replica container.
Daemon container groups - A daemon group must have at least one essential container.
- Parameters:
essential- Specifies whether the container is vital for the container group to function properly. If an essential container fails, it causes the entire container group to restart. Each container group must have an essential container.Replica container groups - A replica group must have exactly one essential container. Use the following to configure an essential replica container:
-
Choose a container is running your game server and the Amazon GameLift Agent.
-
Include a port configuration. This container runs your game server processes, and each process requires a container port to allow access to game clients.
-
Don't configure a health check. The Agent handles this task for the essential replica container.
Daemon container groups - A daemon group must have at least one essential container.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
entryPoint
ContainerDefinitionInput.Builder entryPoint(Collection<String> entryPoint)
An entry point to pass to the container on startup. Add multiple arguments as additional strings in the array. See the ContainerDefinition::entryPoint parameter in the Amazon Elastic Container Service API Reference.
- Parameters:
entryPoint- An entry point to pass to the container on startup. Add multiple arguments as additional strings 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
ContainerDefinitionInput.Builder entryPoint(String... entryPoint)
An entry point to pass to the container on startup. Add multiple arguments as additional strings in the array. See the ContainerDefinition::entryPoint parameter in the Amazon Elastic Container Service API Reference.
- Parameters:
entryPoint- An entry point to pass to the container on startup. Add multiple arguments as additional strings 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
ContainerDefinitionInput.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
ContainerDefinitionInput.Builder environment(Collection<ContainerEnvironment> environment)
A set of environment variables to pass 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 to pass 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
ContainerDefinitionInput.Builder environment(ContainerEnvironment... environment)
A set of environment variables to pass 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 to pass 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
ContainerDefinitionInput.Builder environment(Consumer<ContainerEnvironment.Builder>... environment)
A set of environment variables to pass 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
ContainerDefinitionInput.Builder dependsOn(Collection<ContainerDependency> dependsOn)
Sets up dependencies between this container and the status of other containers in the same container group. A container can have dependencies on multiple different containers.
You can use dependencies to establish a startup/shutdown sequence across the container group. A container startup dependency is reversed on shutdown.
For example, you might specify that SideCarContainerB has a
STARTdependency on SideCarContainerA. This dependency means that SideCarContainerB can't start until after SideCarContainerA has started. This dependency is reversed on shutdown, which means that SideCarContainerB must shut down before SideCarContainerA can shut down.- Parameters:
dependsOn- Sets up dependencies between this container and the status of other containers in the same container group. A container can have dependencies on multiple different containers.You can use dependencies to establish a startup/shutdown sequence across the container group. A container startup dependency is reversed on shutdown.
For example, you might specify that SideCarContainerB has a
STARTdependency on SideCarContainerA. This dependency means that SideCarContainerB can't start until after SideCarContainerA has started. This dependency is reversed on shutdown, which means that SideCarContainerB must shut down before SideCarContainerA can shut down.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
dependsOn
ContainerDefinitionInput.Builder dependsOn(ContainerDependency... dependsOn)
Sets up dependencies between this container and the status of other containers in the same container group. A container can have dependencies on multiple different containers.
You can use dependencies to establish a startup/shutdown sequence across the container group. A container startup dependency is reversed on shutdown.
For example, you might specify that SideCarContainerB has a
STARTdependency on SideCarContainerA. This dependency means that SideCarContainerB can't start until after SideCarContainerA has started. This dependency is reversed on shutdown, which means that SideCarContainerB must shut down before SideCarContainerA can shut down.- Parameters:
dependsOn- Sets up dependencies between this container and the status of other containers in the same container group. A container can have dependencies on multiple different containers.You can use dependencies to establish a startup/shutdown sequence across the container group. A container startup dependency is reversed on shutdown.
For example, you might specify that SideCarContainerB has a
STARTdependency on SideCarContainerA. This dependency means that SideCarContainerB can't start until after SideCarContainerA has started. This dependency is reversed on shutdown, which means that SideCarContainerB must shut down before SideCarContainerA can shut down.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
dependsOn
ContainerDefinitionInput.Builder dependsOn(Consumer<ContainerDependency.Builder>... dependsOn)
Sets up dependencies between this container and the status of other containers in the same container group. A container can have dependencies on multiple different containers.
You can use dependencies to establish a startup/shutdown sequence across the container group. A container startup dependency is reversed on shutdown.
For example, you might specify that SideCarContainerB has a
This is a convenience method that creates an instance of theSTARTdependency on SideCarContainerA. This dependency means that SideCarContainerB can't start until after SideCarContainerA has started. This dependency is reversed on shutdown, which means that SideCarContainerB must shut down before SideCarContainerA can shut down.ContainerDependency.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)
-
-