CfnContainerGroupDefinitionProps Struct
Properties for defining a CfnContainerGroupDefinition.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_gamelift as gamelift } from 'aws-cdk-lib';
const cfnContainerGroupDefinitionProps: gamelift.CfnContainerGroupDefinitionProps = {
name: 'name',
operatingSystem: 'operatingSystem',
totalMemoryLimitMebibytes: 123,
// the properties below are optional
containerGroupType: 'containerGroupType',
gameServerContainerDefinition: {
containerName: 'containerName',
imageUri: 'imageUri',
serverSdkVersion: 'serverSdkVersion',
// the properties below are optional
dependsOn: [{
condition: 'condition',
containerName: 'containerName',
}],
environmentOverride: [{
name: 'name',
value: 'value',
}],
linuxCapabilities: {
include: ['include'],
},
mountPoints: [{
instancePath: 'instancePath',
// the properties below are optional
accessLevel: 'accessLevel',
containerPath: 'containerPath',
}],
portConfiguration: {
containerPortRanges: [{
fromPort: 123,
protocol: 'protocol',
toPort: 123,
}],
},
resolvedImageDigest: 'resolvedImageDigest',
vcpu: 123,
},
sourceVersionNumber: 123,
supportContainerDefinitions: [{
containerName: 'containerName',
imageUri: 'imageUri',
// the properties below are optional
dependsOn: [{
condition: 'condition',
containerName: 'containerName',
}],
environmentOverride: [{
name: 'name',
value: 'value',
}],
essential: false,
healthCheck: {
command: ['command'],
// the properties below are optional
interval: 123,
retries: 123,
startPeriod: 123,
timeout: 123,
},
linuxCapabilities: {
include: ['include'],
},
memoryHardLimitMebibytes: 123,
mountPoints: [{
instancePath: 'instancePath',
// the properties below are optional
accessLevel: 'accessLevel',
containerPath: 'containerPath',
}],
portConfiguration: {
containerPortRanges: [{
fromPort: 123,
protocol: 'protocol',
toPort: 123,
}],
},
resolvedImageDigest: 'resolvedImageDigest',
vcpu: 123,
}],
tags: [{
key: 'key',
value: 'value',
}],
totalVcpuLimit: 123,
versionDescription: 'versionDescription',
};
Properties
containerGroupTypeoptionalstringcontainer_group_typeoptionalstrcontainerGroupTypeoptionalStringContainerGroupTypeoptionalstringContainerGroupTypeoptional*string#Container group type determines how Amazon GameLift Servers deploys the container group on each fleet instance.
gameServerContainerDefinitionoptionalIResolvable | CfnContainerGroupDefinition.GameServerContainerDefinitionPropertygame_server_container_definitionoptionaltyping.Union[IResolvable, GameServerContainerDefinitionProperty]gameServerContainerDefinitionoptionalIResolvableGameServerContainerDefinitionoptionalIResolvableGameServerContainerDefinitionoptionalinterface{}#This property is used only when the container group type is GAME_SERVER . This container definition specifies a container image with the game server build.
The name value is unique in an AWS Region.
operatingSystemstringoperating_systemstroperatingSystemStringOperatingSystemstringOperatingSystem*stringrequired#notes
Amazon Linux 2 (AL2) will reach end of support on 6/30/2026. See more details in the Amazon Linux 2 FAQs . For game servers that are hosted on AL2 and use server SDK version 4.x for Amazon GameLift Servers, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See Migrate to server SDK version 5.
sourceVersionNumberoptionalnumbersource_version_numberoptionalint | floatsourceVersionNumberoptionalNumberSourceVersionNumberoptionaldoubleSourceVersionNumberoptional*float64#supportContainerDefinitionsoptionalIResolvable | IResolvable | CfnContainerGroupDefinition.SupportContainerDefinitionProperty[]support_container_definitionsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, SupportContainerDefinitionProperty]]]supportContainerDefinitionsoptionalIResolvableSupportContainerDefinitionsoptionalIResolvableSupportContainerDefinitionsoptionalinterface{}#A container group definition might have zero support container definitions. Support container can be used in any type of container group.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#totalMemoryLimitMebibytesnumbertotal_memory_limit_mebibytesint | floattotalMemoryLimitMebibytesNumberTotalMemoryLimitMebibytesdoubleTotalMemoryLimitMebibytes*float64required#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.
totalVcpuLimitoptionalnumbertotal_vcpu_limitoptionalint | floattotalVcpuLimitoptionalNumberTotalVcpuLimitoptionaldoubleTotalVcpuLimitoptional*float64#notes
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.
versionDescriptionoptionalstringversion_descriptionoptionalstrversionDescriptionoptionalStringVersionDescriptionoptionalstringVersionDescriptionoptional*string#Each version can have a unique description.