Interface CfnContainerGroupDefinitionProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnContainerGroupDefinitionProps.Jsii$Proxy
CfnContainerGroupDefinition.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.gamelift.*;
Object supportContainerDefinitions;
CfnContainerGroupDefinitionProps cfnContainerGroupDefinitionProps = CfnContainerGroupDefinitionProps.builder()
.containerDefinitions(List.of(ContainerDefinitionProperty.builder()
.containerName("containerName")
.imageUri("imageUri")
// the properties below are optional
.command(List.of("command"))
.cpu(123)
.dependsOn(List.of(ContainerDependencyProperty.builder()
.condition("condition")
.containerName("containerName")
.build()))
.entryPoint(List.of("entryPoint"))
.environment(List.of(ContainerEnvironmentProperty.builder()
.name("name")
.value("value")
.build()))
.essential(false)
.healthCheck(ContainerHealthCheckProperty.builder()
.command(List.of("command"))
// the properties below are optional
.interval(123)
.retries(123)
.startPeriod(123)
.timeout(123)
.build())
.memoryLimits(MemoryLimitsProperty.builder()
.hardLimit(123)
.softLimit(123)
.build())
.portConfiguration(PortConfigurationProperty.builder()
.containerPortRanges(List.of(ContainerPortRangeProperty.builder()
.fromPort(123)
.protocol("protocol")
.toPort(123)
.build()))
.build())
.resolvedImageDigest("resolvedImageDigest")
.workingDirectory("workingDirectory")
.build()))
.name("name")
.operatingSystem("operatingSystem")
.totalCpuLimit(123)
.totalMemoryLimit(123)
// the properties below are optional
.schedulingStrategy("schedulingStrategy")
.sourceVersionNumber(123)
.supportContainerDefinitions(List.of(supportContainerDefinitions))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnContainerGroupDefinitionPropsstatic final classAn implementation forCfnContainerGroupDefinitionProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()The set of container definitions that are included in the container group.getName()A descriptive identifier for the container group definition.The platform required for all containers in the container group definition.default StringThe method for deploying the container group across fleet instances.default NumberA specific ContainerGroupDefinition version to be updated.default ObjectA collection of support container definitions that define the containers in this group.getTags()An array of key-value pairs to apply to this resource.The amount of CPU units on a fleet instance to allocate for the container group.The amount of memory (in MiB) on a fleet instance to allocate for the container group.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getContainerDefinitions
The set of container definitions that are included in the container group.- See Also:
-
getName
A descriptive identifier for the container group definition.The name value is unique in an AWS Region.
- See Also:
-
getOperatingSystem
The platform required for all containers in the container group definition.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.
- See Also:
-
getTotalCpuLimit
The amount of CPU units on a fleet instance to allocate for the container group.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
ContainerDefinitionin 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 .
- See Also:
-
getTotalMemoryLimit
The amount of memory (in MiB) on a fleet instance to allocate for the container group.All containers in the group share these resources.
You can set additional limits for each
ContainerDefinitionin 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 .
- See Also:
-
getSchedulingStrategy
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.
- See Also:
-
getSourceVersionNumber
A specific ContainerGroupDefinition version to be updated.- See Also:
-
getSupportContainerDefinitions
A collection of support container definitions that define the containers in this group.- See Also:
-
getTags
An array of key-value pairs to apply to this resource.- See Also:
-
builder
-