CfnContainerGroupDefinitionProps
- class aws_cdk.aws_gamelift.CfnContainerGroupDefinitionProps(*, container_definitions, name, operating_system, total_cpu_limit, total_memory_limit, scheduling_strategy=None, tags=None)
Bases:
object
Properties for defining a
CfnContainerGroupDefinition
.- Parameters:
container_definitions (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,ContainerDefinitionProperty
,Dict
[str
,Any
]]]]) – The set of container definitions that are included in the container group.name (
str
) – A descriptive identifier for the container group definition. The name value is unique in an AWS Region.operating_system (
str
) – The platform required for all containers in the container group definition. .. epigraph:: 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.total_cpu_limit (
Union
[int
,float
]) – 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 eachContainerDefinition
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 .total_memory_limit (
Union
[int
,float
]) –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
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 .scheduling_strategy (
Optional
[str
]) – 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.tags (
Optional
[Sequence
[Union
[CfnTag
,Dict
[str
,Any
]]]]) – An array of key-value pairs to apply to this resource.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_gamelift as gamelift cfn_container_group_definition_props = gamelift.CfnContainerGroupDefinitionProps( container_definitions=[gamelift.CfnContainerGroupDefinition.ContainerDefinitionProperty( container_name="containerName", image_uri="imageUri", # the properties below are optional command=["command"], cpu=123, depends_on=[gamelift.CfnContainerGroupDefinition.ContainerDependencyProperty( condition="condition", container_name="containerName" )], entry_point=["entryPoint"], environment=[gamelift.CfnContainerGroupDefinition.ContainerEnvironmentProperty( name="name", value="value" )], essential=False, health_check=gamelift.CfnContainerGroupDefinition.ContainerHealthCheckProperty( command=["command"], # the properties below are optional interval=123, retries=123, start_period=123, timeout=123 ), memory_limits=gamelift.CfnContainerGroupDefinition.MemoryLimitsProperty( hard_limit=123, soft_limit=123 ), port_configuration=gamelift.CfnContainerGroupDefinition.PortConfigurationProperty( container_port_ranges=[gamelift.CfnContainerGroupDefinition.ContainerPortRangeProperty( from_port=123, protocol="protocol", to_port=123 )] ), resolved_image_digest="resolvedImageDigest", working_directory="workingDirectory" )], name="name", operating_system="operatingSystem", total_cpu_limit=123, total_memory_limit=123, # the properties below are optional scheduling_strategy="schedulingStrategy", tags=[CfnTag( key="key", value="value" )] )
Attributes
- container_definitions
The set of container definitions that are included in the container group.
- name
A descriptive identifier for the container group definition.
The name value is unique in an AWS Region.
- operating_system
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.
- scheduling_strategy
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.
- tags
An array of key-value pairs to apply to this resource.
- total_cpu_limit
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
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 .
- total_memory_limit
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
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 .