Class CfnContainerGroupDefinition.ContainerDefinitionProperty.Builder
java.lang.Object
software.amazon.awscdk.services.gamelift.CfnContainerGroupDefinition.ContainerDefinitionProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnContainerGroupDefinition.ContainerDefinitionProperty>
- Enclosing interface:
CfnContainerGroupDefinition.ContainerDefinitionProperty
@Stability(Stable)
public static final class CfnContainerGroupDefinition.ContainerDefinitionProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnContainerGroupDefinition.ContainerDefinitionProperty>
A builder for
CfnContainerGroupDefinition.ContainerDefinitionProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getCommand()
containerName
(String containerName) Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getCpu()
Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getDependsOn()
dependsOn
(IResolvable dependsOn) Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getDependsOn()
entryPoint
(List<String> entryPoint) Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getEntryPoint()
environment
(List<? extends Object> environment) Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getEnvironment()
environment
(IResolvable environment) Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getEnvironment()
Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getEssential()
essential
(IResolvable essential) Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getEssential()
healthCheck
(IResolvable healthCheck) Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getHealthCheck()
Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getHealthCheck()
Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getImageUri()
memoryLimits
(IResolvable memoryLimits) memoryLimits
(CfnContainerGroupDefinition.MemoryLimitsProperty memoryLimits) portConfiguration
(IResolvable portConfiguration) portConfiguration
(CfnContainerGroupDefinition.PortConfigurationProperty portConfiguration) resolvedImageDigest
(String resolvedImageDigest) workingDirectory
(String workingDirectory)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
containerName
@Stability(Stable) public CfnContainerGroupDefinition.ContainerDefinitionProperty.Builder containerName(String containerName) - Parameters:
containerName
- The container definition identifier. This parameter is required. Container names are unique within a container group definition.- Returns:
this
-
imageUri
@Stability(Stable) public CfnContainerGroupDefinition.ContainerDefinitionProperty.Builder imageUri(String imageUri) Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getImageUri()
- Parameters:
imageUri
- The URI to the image that $short;. This parameter is required. copied and deployed to a container fleet. For a more specific identifier, seeResolvedImageDigest
.- Returns:
this
-
command
@Stability(Stable) public CfnContainerGroupDefinition.ContainerDefinitionProperty.Builder command(List<String> command) Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getCommand()
- 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:
this
-
cpu
@Stability(Stable) public CfnContainerGroupDefinition.ContainerDefinitionProperty.Builder cpu(Number cpu) Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getCpu()
- 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:
this
-
dependsOn
@Stability(Stable) public CfnContainerGroupDefinition.ContainerDefinitionProperty.Builder dependsOn(IResolvable dependsOn) Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getDependsOn()
- 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:
this
-
dependsOn
@Stability(Stable) public CfnContainerGroupDefinition.ContainerDefinitionProperty.Builder dependsOn(List<? extends Object> dependsOn) Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getDependsOn()
- 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:
this
-
entryPoint
@Stability(Stable) public CfnContainerGroupDefinition.ContainerDefinitionProperty.Builder entryPoint(List<String> entryPoint) Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getEntryPoint()
- 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:
this
-
environment
@Stability(Stable) public CfnContainerGroupDefinition.ContainerDefinitionProperty.Builder environment(IResolvable environment) Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getEnvironment()
- 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:
this
-
environment
@Stability(Stable) public CfnContainerGroupDefinition.ContainerDefinitionProperty.Builder environment(List<? extends Object> environment) Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getEnvironment()
- 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:
this
-
essential
@Stability(Stable) public CfnContainerGroupDefinition.ContainerDefinitionProperty.Builder essential(Boolean essential) Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getEssential()
- Parameters:
essential
- Indicates whether the container is vital to the container group. If an essential container fails, the entire container group is restarted.- Returns:
this
-
essential
@Stability(Stable) public CfnContainerGroupDefinition.ContainerDefinitionProperty.Builder essential(IResolvable essential) Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getEssential()
- Parameters:
essential
- Indicates whether the container is vital to the container group. If an essential container fails, the entire container group is restarted.- Returns:
this
-
healthCheck
@Stability(Stable) public CfnContainerGroupDefinition.ContainerDefinitionProperty.Builder healthCheck(IResolvable healthCheck) Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getHealthCheck()
- 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:
this
-
healthCheck
@Stability(Stable) public CfnContainerGroupDefinition.ContainerDefinitionProperty.Builder healthCheck(CfnContainerGroupDefinition.ContainerHealthCheckProperty healthCheck) Sets the value ofCfnContainerGroupDefinition.ContainerDefinitionProperty.getHealthCheck()
- 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:
this
-
memoryLimits
@Stability(Stable) public CfnContainerGroupDefinition.ContainerDefinitionProperty.Builder memoryLimits(IResolvable memoryLimits) - 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:
this
-
memoryLimits
@Stability(Stable) public CfnContainerGroupDefinition.ContainerDefinitionProperty.Builder memoryLimits(CfnContainerGroupDefinition.MemoryLimitsProperty memoryLimits) - 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:
this
-
portConfiguration
@Stability(Stable) public CfnContainerGroupDefinition.ContainerDefinitionProperty.Builder portConfiguration(IResolvable portConfiguration) - 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:
this
-
portConfiguration
@Stability(Stable) public CfnContainerGroupDefinition.ContainerDefinitionProperty.Builder portConfiguration(CfnContainerGroupDefinition.PortConfigurationProperty portConfiguration) - 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:
this
-
resolvedImageDigest
@Stability(Stable) public CfnContainerGroupDefinition.ContainerDefinitionProperty.Builder resolvedImageDigest(String resolvedImageDigest) - 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:
this
-
workingDirectory
@Stability(Stable) public CfnContainerGroupDefinition.ContainerDefinitionProperty.Builder workingDirectory(String workingDirectory) - 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:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnContainerGroupDefinition.ContainerDefinitionProperty>
- Returns:
- a new instance of
CfnContainerGroupDefinition.ContainerDefinitionProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-