Class CfnContainerGroupDefinitionProps.Builder
java.lang.Object
software.amazon.awscdk.services.gamelift.CfnContainerGroupDefinitionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnContainerGroupDefinitionProps>
- Enclosing interface:
CfnContainerGroupDefinitionProps
@Stability(Stable)
public static final class CfnContainerGroupDefinitionProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnContainerGroupDefinitionProps>
A builder for
CfnContainerGroupDefinitionProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.containerGroupType
(String containerGroupType) Sets the value ofCfnContainerGroupDefinitionProps.getContainerGroupType()
gameServerContainerDefinition
(IResolvable gameServerContainerDefinition) Sets the value ofCfnContainerGroupDefinitionProps.getGameServerContainerDefinition()
gameServerContainerDefinition
(CfnContainerGroupDefinition.GameServerContainerDefinitionProperty gameServerContainerDefinition) Sets the value ofCfnContainerGroupDefinitionProps.getGameServerContainerDefinition()
Sets the value ofCfnContainerGroupDefinitionProps.getName()
operatingSystem
(String operatingSystem) Sets the value ofCfnContainerGroupDefinitionProps.getOperatingSystem()
sourceVersionNumber
(Number sourceVersionNumber) Sets the value ofCfnContainerGroupDefinitionProps.getSourceVersionNumber()
supportContainerDefinitions
(List<? extends Object> supportContainerDefinitions) Sets the value ofCfnContainerGroupDefinitionProps.getSupportContainerDefinitions()
supportContainerDefinitions
(IResolvable supportContainerDefinitions) Sets the value ofCfnContainerGroupDefinitionProps.getSupportContainerDefinitions()
Sets the value ofCfnContainerGroupDefinitionProps.getTags()
totalMemoryLimitMebibytes
(Number totalMemoryLimitMebibytes) Sets the value ofCfnContainerGroupDefinitionProps.getTotalMemoryLimitMebibytes()
totalVcpuLimit
(Number totalVcpuLimit) Sets the value ofCfnContainerGroupDefinitionProps.getTotalVcpuLimit()
versionDescription
(String versionDescription) Sets the value ofCfnContainerGroupDefinitionProps.getVersionDescription()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
name
Sets the value ofCfnContainerGroupDefinitionProps.getName()
- Parameters:
name
- A descriptive identifier for the container group definition. This parameter is required. The name value is unique in an AWS Region.- Returns:
this
-
operatingSystem
@Stability(Stable) public CfnContainerGroupDefinitionProps.Builder operatingSystem(String operatingSystem) Sets the value ofCfnContainerGroupDefinitionProps.getOperatingSystem()
- Parameters:
operatingSystem
- The platform that all containers in the container group definition run on. This parameter is required.Amazon Linux 2 (AL2) will reach end of support on 6/30/2025. See more details in the Amazon Linux 2 FAQs . For game servers that are hosted on AL2 and use Amazon GameLift server SDK 4.x, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See Migrate to Amazon GameLift server SDK version 5.
- Returns:
this
-
totalMemoryLimitMebibytes
@Stability(Stable) public CfnContainerGroupDefinitionProps.Builder totalMemoryLimitMebibytes(Number totalMemoryLimitMebibytes) Sets the value ofCfnContainerGroupDefinitionProps.getTotalMemoryLimitMebibytes()
- Parameters:
totalMemoryLimitMebibytes
- The amount of memory (in MiB) on a fleet instance to allocate for the container group. This parameter is required. All containers in the group share these resources.You can set a limit for each container definition in the group. If individual containers have limits, this total value must be greater than any individual container's memory limit.
- Returns:
this
-
totalVcpuLimit
@Stability(Stable) public CfnContainerGroupDefinitionProps.Builder totalVcpuLimit(Number totalVcpuLimit) Sets the value ofCfnContainerGroupDefinitionProps.getTotalVcpuLimit()
- Parameters:
totalVcpuLimit
- The amount of vCPU units on a fleet instance to allocate for the container group (1 vCPU is equal to 1024 CPU units). This parameter is required. All containers in the group share these resources. You can set a limit for each container definition in the group. If individual containers have limits, this total value must be equal to or greater than the sum of the limits for each container in the group.- Returns:
this
-
containerGroupType
@Stability(Stable) public CfnContainerGroupDefinitionProps.Builder containerGroupType(String containerGroupType) Sets the value ofCfnContainerGroupDefinitionProps.getContainerGroupType()
- Parameters:
containerGroupType
- The type of container group. Container group type determines how Amazon GameLift deploys the container group on each fleet instance.- Returns:
this
-
gameServerContainerDefinition
@Stability(Stable) public CfnContainerGroupDefinitionProps.Builder gameServerContainerDefinition(IResolvable gameServerContainerDefinition) Sets the value ofCfnContainerGroupDefinitionProps.getGameServerContainerDefinition()
- Parameters:
gameServerContainerDefinition
- The definition for the game server container in this group. This property is used only when the container group type isGAME_SERVER
. This container definition specifies a container image with the game server build.- Returns:
this
-
gameServerContainerDefinition
@Stability(Stable) public CfnContainerGroupDefinitionProps.Builder gameServerContainerDefinition(CfnContainerGroupDefinition.GameServerContainerDefinitionProperty gameServerContainerDefinition) Sets the value ofCfnContainerGroupDefinitionProps.getGameServerContainerDefinition()
- Parameters:
gameServerContainerDefinition
- The definition for the game server container in this group. This property is used only when the container group type isGAME_SERVER
. This container definition specifies a container image with the game server build.- Returns:
this
-
sourceVersionNumber
@Stability(Stable) public CfnContainerGroupDefinitionProps.Builder sourceVersionNumber(Number sourceVersionNumber) Sets the value ofCfnContainerGroupDefinitionProps.getSourceVersionNumber()
- Parameters:
sourceVersionNumber
- A specific ContainerGroupDefinition version to be updated.- Returns:
this
-
supportContainerDefinitions
@Stability(Stable) public CfnContainerGroupDefinitionProps.Builder supportContainerDefinitions(IResolvable supportContainerDefinitions) Sets the value ofCfnContainerGroupDefinitionProps.getSupportContainerDefinitions()
- Parameters:
supportContainerDefinitions
- The set of definitions for support containers in this group. A container group definition might have zero support container definitions. Support container can be used in any type of container group.- Returns:
this
-
supportContainerDefinitions
@Stability(Stable) public CfnContainerGroupDefinitionProps.Builder supportContainerDefinitions(List<? extends Object> supportContainerDefinitions) Sets the value ofCfnContainerGroupDefinitionProps.getSupportContainerDefinitions()
- Parameters:
supportContainerDefinitions
- The set of definitions for support containers in this group. A container group definition might have zero support container definitions. Support container can be used in any type of container group.- Returns:
this
-
tags
@Stability(Stable) public CfnContainerGroupDefinitionProps.Builder tags(List<? extends CfnTag> tags) Sets the value ofCfnContainerGroupDefinitionProps.getTags()
- Parameters:
tags
- An array of key-value pairs to apply to this resource.- Returns:
this
-
versionDescription
@Stability(Stable) public CfnContainerGroupDefinitionProps.Builder versionDescription(String versionDescription) Sets the value ofCfnContainerGroupDefinitionProps.getVersionDescription()
- Parameters:
versionDescription
- An optional description that was provided for a container group definition update. Each version can have a unique description.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnContainerGroupDefinitionProps>
- Returns:
- a new instance of
CfnContainerGroupDefinitionProps
- Throws:
NullPointerException
- if any required attribute was not provided
-