# CfnContainerGroupDefinitionProps

Properties for defining a `CfnContainerGroupDefinition`.

Used as props by: [CfnContainerGroupDefinition](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_gamelift.CfnContainerGroupDefinition.html)

- Source: Generated at build time
- Type last changed: v2.273.0 · 8 Oct 2026

## Example

TypeScript:

```ts
// 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',
};
```

Python:

```python
from aws_cdk import CfnTag
# 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(
    name="name",
    operating_system="operatingSystem",
    total_memory_limit_mebibytes=123,

    # the properties below are optional
    container_group_type="containerGroupType",
    game_server_container_definition=gamelift.CfnContainerGroupDefinition.GameServerContainerDefinitionProperty(
        container_name="containerName",
        image_uri="imageUri",
        server_sdk_version="serverSdkVersion",

        # the properties below are optional
        depends_on=[gamelift.CfnContainerGroupDefinition.ContainerDependencyProperty(
            condition="condition",
            container_name="containerName"
        )],
        environment_override=[gamelift.CfnContainerGroupDefinition.ContainerEnvironmentProperty(
            name="name",
            value="value"
        )],
        linux_capabilities=gamelift.CfnContainerGroupDefinition.LinuxCapabilitiesProperty(
            include=["include"]
        ),
        mount_points=[gamelift.CfnContainerGroupDefinition.ContainerMountPointProperty(
            instance_path="instancePath",

            # the properties below are optional
            access_level="accessLevel",
            container_path="containerPath"
        )],
        port_configuration=gamelift.CfnContainerGroupDefinition.PortConfigurationProperty(
            container_port_ranges=[gamelift.CfnContainerGroupDefinition.ContainerPortRangeProperty(
                from_port=123,
                protocol="protocol",
                to_port=123
            )]
        ),
        resolved_image_digest="resolvedImageDigest",
        vcpu=123
    ),
    source_version_number=123,
    support_container_definitions=[gamelift.CfnContainerGroupDefinition.SupportContainerDefinitionProperty(
        container_name="containerName",
        image_uri="imageUri",

        # the properties below are optional
        depends_on=[gamelift.CfnContainerGroupDefinition.ContainerDependencyProperty(
            condition="condition",
            container_name="containerName"
        )],
        environment_override=[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
        ),
        linux_capabilities=gamelift.CfnContainerGroupDefinition.LinuxCapabilitiesProperty(
            include=["include"]
        ),
        memory_hard_limit_mebibytes=123,
        mount_points=[gamelift.CfnContainerGroupDefinition.ContainerMountPointProperty(
            instance_path="instancePath",

            # the properties below are optional
            access_level="accessLevel",
            container_path="containerPath"
        )],
        port_configuration=gamelift.CfnContainerGroupDefinition.PortConfigurationProperty(
            container_port_ranges=[gamelift.CfnContainerGroupDefinition.ContainerPortRangeProperty(
                from_port=123,
                protocol="protocol",
                to_port=123
            )]
        ),
        resolved_image_digest="resolvedImageDigest",
        vcpu=123
    )],
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    total_vcpu_limit=123,
    version_description="versionDescription"
)
```

Java:

```java
// 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.*;

CfnContainerGroupDefinitionProps cfnContainerGroupDefinitionProps = CfnContainerGroupDefinitionProps.builder()
        .name("name")
        .operatingSystem("operatingSystem")
        .totalMemoryLimitMebibytes(123)

        // the properties below are optional
        .containerGroupType("containerGroupType")
        .gameServerContainerDefinition(GameServerContainerDefinitionProperty.builder()
                .containerName("containerName")
                .imageUri("imageUri")
                .serverSdkVersion("serverSdkVersion")

                // the properties below are optional
                .dependsOn(List.of(ContainerDependencyProperty.builder()
                        .condition("condition")
                        .containerName("containerName")
                        .build()))
                .environmentOverride(List.of(ContainerEnvironmentProperty.builder()
                        .name("name")
                        .value("value")
                        .build()))
                .linuxCapabilities(LinuxCapabilitiesProperty.builder()
                        .include(List.of("include"))
                        .build())
                .mountPoints(List.of(ContainerMountPointProperty.builder()
                        .instancePath("instancePath")

                        // the properties below are optional
                        .accessLevel("accessLevel")
                        .containerPath("containerPath")
                        .build()))
                .portConfiguration(PortConfigurationProperty.builder()
                        .containerPortRanges(List.of(ContainerPortRangeProperty.builder()
                                .fromPort(123)
                                .protocol("protocol")
                                .toPort(123)
                                .build()))
                        .build())
                .resolvedImageDigest("resolvedImageDigest")
                .vcpu(123)
                .build())
        .sourceVersionNumber(123)
        .supportContainerDefinitions(List.of(SupportContainerDefinitionProperty.builder()
                .containerName("containerName")
                .imageUri("imageUri")

                // the properties below are optional
                .dependsOn(List.of(ContainerDependencyProperty.builder()
                        .condition("condition")
                        .containerName("containerName")
                        .build()))
                .environmentOverride(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())
                .linuxCapabilities(LinuxCapabilitiesProperty.builder()
                        .include(List.of("include"))
                        .build())
                .memoryHardLimitMebibytes(123)
                .mountPoints(List.of(ContainerMountPointProperty.builder()
                        .instancePath("instancePath")

                        // the properties below are optional
                        .accessLevel("accessLevel")
                        .containerPath("containerPath")
                        .build()))
                .portConfiguration(PortConfigurationProperty.builder()
                        .containerPortRanges(List.of(ContainerPortRangeProperty.builder()
                                .fromPort(123)
                                .protocol("protocol")
                                .toPort(123)
                                .build()))
                        .build())
                .resolvedImageDigest("resolvedImageDigest")
                .vcpu(123)
                .build()))
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .totalVcpuLimit(123)
        .versionDescription("versionDescription")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.GameLift;

var cfnContainerGroupDefinitionProps = new CfnContainerGroupDefinitionProps {
    Name = "name",
    OperatingSystem = "operatingSystem",
    TotalMemoryLimitMebibytes = 123,

    // the properties below are optional
    ContainerGroupType = "containerGroupType",
    GameServerContainerDefinition = new GameServerContainerDefinitionProperty {
        ContainerName = "containerName",
        ImageUri = "imageUri",
        ServerSdkVersion = "serverSdkVersion",

        // the properties below are optional
        DependsOn = new [] { new ContainerDependencyProperty {
            Condition = "condition",
            ContainerName = "containerName"
        } },
        EnvironmentOverride = new [] { new ContainerEnvironmentProperty {
            Name = "name",
            Value = "value"
        } },
        LinuxCapabilities = new LinuxCapabilitiesProperty {
            Include = new [] { "include" }
        },
        MountPoints = new [] { new ContainerMountPointProperty {
            InstancePath = "instancePath",

            // the properties below are optional
            AccessLevel = "accessLevel",
            ContainerPath = "containerPath"
        } },
        PortConfiguration = new PortConfigurationProperty {
            ContainerPortRanges = new [] { new ContainerPortRangeProperty {
                FromPort = 123,
                Protocol = "protocol",
                ToPort = 123
            } }
        },
        ResolvedImageDigest = "resolvedImageDigest",
        Vcpu = 123
    },
    SourceVersionNumber = 123,
    SupportContainerDefinitions = new [] { new SupportContainerDefinitionProperty {
        ContainerName = "containerName",
        ImageUri = "imageUri",

        // the properties below are optional
        DependsOn = new [] { new ContainerDependencyProperty {
            Condition = "condition",
            ContainerName = "containerName"
        } },
        EnvironmentOverride = new [] { new ContainerEnvironmentProperty {
            Name = "name",
            Value = "value"
        } },
        Essential = false,
        HealthCheck = new ContainerHealthCheckProperty {
            Command = new [] { "command" },

            // the properties below are optional
            Interval = 123,
            Retries = 123,
            StartPeriod = 123,
            Timeout = 123
        },
        LinuxCapabilities = new LinuxCapabilitiesProperty {
            Include = new [] { "include" }
        },
        MemoryHardLimitMebibytes = 123,
        MountPoints = new [] { new ContainerMountPointProperty {
            InstancePath = "instancePath",

            // the properties below are optional
            AccessLevel = "accessLevel",
            ContainerPath = "containerPath"
        } },
        PortConfiguration = new PortConfigurationProperty {
            ContainerPortRanges = new [] { new ContainerPortRangeProperty {
                FromPort = 123,
                Protocol = "protocol",
                ToPort = 123
            } }
        },
        ResolvedImageDigest = "resolvedImageDigest",
        Vcpu = 123
    } },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    TotalVcpuLimit = 123,
    VersionDescription = "versionDescription"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnContainerGroupDefinitionProps := &CfnContainerGroupDefinitionProps{
	Name: jsii.String("name"),
	OperatingSystem: jsii.String("operatingSystem"),
	TotalMemoryLimitMebibytes: jsii.Number(123),

	// the properties below are optional
	ContainerGroupType: jsii.String("containerGroupType"),
	GameServerContainerDefinition: &GameServerContainerDefinitionProperty{
		ContainerName: jsii.String("containerName"),
		ImageUri: jsii.String("imageUri"),
		ServerSdkVersion: jsii.String("serverSdkVersion"),

		// the properties below are optional
		DependsOn: []interface{}{
			&ContainerDependencyProperty{
				Condition: jsii.String("condition"),
				ContainerName: jsii.String("containerName"),
			},
		},
		EnvironmentOverride: []interface{}{
			&ContainerEnvironmentProperty{
				Name: jsii.String("name"),
				Value: jsii.String("value"),
			},
		},
		LinuxCapabilities: &LinuxCapabilitiesProperty{
			Include: []*string{
				jsii.String("include"),
			},
		},
		MountPoints: []interface{}{
			&ContainerMountPointProperty{
				InstancePath: jsii.String("instancePath"),

				// the properties below are optional
				AccessLevel: jsii.String("accessLevel"),
				ContainerPath: jsii.String("containerPath"),
			},
		},
		PortConfiguration: &PortConfigurationProperty{
			ContainerPortRanges: []interface{}{
				&ContainerPortRangeProperty{
					FromPort: jsii.Number(123),
					Protocol: jsii.String("protocol"),
					ToPort: jsii.Number(123),
				},
			},
		},
		ResolvedImageDigest: jsii.String("resolvedImageDigest"),
		Vcpu: jsii.Number(123),
	},
	SourceVersionNumber: jsii.Number(123),
	SupportContainerDefinitions: []interface{}{
		&SupportContainerDefinitionProperty{
			ContainerName: jsii.String("containerName"),
			ImageUri: jsii.String("imageUri"),

			// the properties below are optional
			DependsOn: []interface{}{
				&ContainerDependencyProperty{
					Condition: jsii.String("condition"),
					ContainerName: jsii.String("containerName"),
				},
			},
			EnvironmentOverride: []interface{}{
				&ContainerEnvironmentProperty{
					Name: jsii.String("name"),
					Value: jsii.String("value"),
				},
			},
			Essential: jsii.Boolean(false),
			HealthCheck: &ContainerHealthCheckProperty{
				Command: []*string{
					jsii.String("command"),
				},

				// the properties below are optional
				Interval: jsii.Number(123),
				Retries: jsii.Number(123),
				StartPeriod: jsii.Number(123),
				Timeout: jsii.Number(123),
			},
			LinuxCapabilities: &LinuxCapabilitiesProperty{
				Include: []*string{
					jsii.String("include"),
				},
			},
			MemoryHardLimitMebibytes: jsii.Number(123),
			MountPoints: []interface{}{
				&ContainerMountPointProperty{
					InstancePath: jsii.String("instancePath"),

					// the properties below are optional
					AccessLevel: jsii.String("accessLevel"),
					ContainerPath: jsii.String("containerPath"),
				},
			},
			PortConfiguration: &PortConfigurationProperty{
				ContainerPortRanges: []interface{}{
					&ContainerPortRangeProperty{
						FromPort: jsii.Number(123),
						Protocol: jsii.String("protocol"),
						ToPort: jsii.Number(123),
					},
				},
			},
			ResolvedImageDigest: jsii.String("resolvedImageDigest"),
			Vcpu: jsii.Number(123),
		},
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	TotalVcpuLimit: jsii.Number(123),
	VersionDescription: jsii.String("versionDescription"),
}
```

## Properties

- `containerGroupType`: string — The type of container group.

  Container group type determines how Amazon GameLift Servers deploys the container group on each fleet instance.

- `gameServerContainerDefinition`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnContainerGroupDefinition.GameServerContainerDefinitionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_gamelift.CfnContainerGroupDefinition.GameServerContainerDefinitionProperty.html) — The definition for the game server container in this group.

  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.

- `name`: string (required) — A descriptive identifier for the container group definition.

  The name value is unique in an AWS Region.

- `operatingSystem`: string (required) — The platform that all containers in the container group definition run on.

  > Amazon Linux 2 (AL2) will reach end of support on 6/30/2026. See more details in the [Amazon Linux 2 FAQs](https://docs.aws.amazon.com/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.](https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-serversdk5-migration.html)

- `sourceVersionNumber`: number — A specific ContainerGroupDefinition version to be updated.

- `supportContainerDefinitions`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnContainerGroupDefinition.SupportContainerDefinitionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_gamelift.CfnContainerGroupDefinition.SupportContainerDefinitionProperty.html)[] — 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.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — An array of key-value pairs to apply to this resource.

- `totalMemoryLimitMebibytes`: number (required) — 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 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.

- `totalVcpuLimit`: number — The amount of vCPU units on a fleet instance to allocate for the container group (1 vCPU is equal to 1024 CPU units).

  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.

- `versionDescription`: string — An optional description that was provided for a container group definition update.

  Each version can have a unique description.
