Class CfnContainerGroupDefinitionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnContainerGroupDefinitionProps>
- Enclosing interface:
CfnContainerGroupDefinitionProps
CfnContainerGroupDefinitionProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.containerDefinitions
(List<? extends Object> containerDefinitions) Sets the value ofCfnContainerGroupDefinitionProps.getContainerDefinitions()
containerDefinitions
(IResolvable containerDefinitions) Sets the value ofCfnContainerGroupDefinitionProps.getContainerDefinitions()
Sets the value ofCfnContainerGroupDefinitionProps.getName()
operatingSystem
(String operatingSystem) Sets the value ofCfnContainerGroupDefinitionProps.getOperatingSystem()
schedulingStrategy
(String schedulingStrategy) Sets the value ofCfnContainerGroupDefinitionProps.getSchedulingStrategy()
Sets the value ofCfnContainerGroupDefinitionProps.getTags()
totalCpuLimit
(Number totalCpuLimit) Sets the value ofCfnContainerGroupDefinitionProps.getTotalCpuLimit()
totalMemoryLimit
(Number totalMemoryLimit) Sets the value ofCfnContainerGroupDefinitionProps.getTotalMemoryLimit()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
containerDefinitions
@Stability(Stable) public CfnContainerGroupDefinitionProps.Builder containerDefinitions(IResolvable containerDefinitions) Sets the value ofCfnContainerGroupDefinitionProps.getContainerDefinitions()
- Parameters:
containerDefinitions
- The set of container definitions that are included in the container group. This parameter is required.- Returns:
this
-
containerDefinitions
@Stability(Stable) public CfnContainerGroupDefinitionProps.Builder containerDefinitions(List<? extends Object> containerDefinitions) Sets the value ofCfnContainerGroupDefinitionProps.getContainerDefinitions()
- Parameters:
containerDefinitions
- The set of container definitions that are included in the container group. This parameter is required.- Returns:
this
-
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 required for all containers in the container group definition. 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
-
totalCpuLimit
@Stability(Stable) public CfnContainerGroupDefinitionProps.Builder totalCpuLimit(Number totalCpuLimit) Sets the value ofCfnContainerGroupDefinitionProps.getTotalCpuLimit()
- Parameters:
totalCpuLimit
- The amount of CPU units on a fleet instance to allocate for the container group. This parameter is required. All containers in the group share these resources. This property is an integer value in CPU units (1 vCPU is equal to 1024 CPU units).You can set additional limits for each
ContainerDefinition
in the group. If individual containers have limits, this value must be equal to or greater than the sum of all container-specific CPU limits in the group.For more details on memory allocation, see the Container fleet design guide .
- Returns:
this
-
totalMemoryLimit
@Stability(Stable) public CfnContainerGroupDefinitionProps.Builder totalMemoryLimit(Number totalMemoryLimit) Sets the value ofCfnContainerGroupDefinitionProps.getTotalMemoryLimit()
- Parameters:
totalMemoryLimit
- 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 additional limits for each
ContainerDefinition
in the group. If individual containers have limits, this value must meet the following requirements:- Equal to or greater than the sum of all container-specific soft memory limits in the group.
- Equal to or greater than any container-specific hard limits in the group.
For more details on memory allocation, see the Container fleet design guide .
- Returns:
this
-
schedulingStrategy
@Stability(Stable) public CfnContainerGroupDefinitionProps.Builder schedulingStrategy(String schedulingStrategy) Sets the value ofCfnContainerGroupDefinitionProps.getSchedulingStrategy()
- Parameters:
schedulingStrategy
- The method for deploying the container group across fleet instances. A replica container group might have multiple copies on each fleet instance. A daemon container group maintains only one copy per fleet instance.- 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
-
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
-