CfnContainerGroupDefinition

class aws_cdk.aws_gamelift.CfnContainerGroupDefinition(scope, id, *, name, operating_system, total_memory_limit_mebibytes, total_vcpu_limit, container_group_type=None, game_server_container_definition=None, source_version_number=None, support_container_definitions=None, tags=None, version_description=None)

Bases: CfnResource

The properties that describe a container group resource.

You can update all properties of a container group definition properties. Updates to a container group definition are saved as new versions.

Used with: CreateContainerGroupDefinition

Returned by: DescribeContainerGroupDefinition , ListContainerGroupDefinitions , UpdateContainerGroupDefinition

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-containergroupdefinition.html

CloudformationResource:

AWS::GameLift::ContainerGroupDefinition

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 = gamelift.CfnContainerGroupDefinition(self, "MyCfnContainerGroupDefinition",
    name="name",
    operating_system="operatingSystem",
    total_memory_limit_mebibytes=123,
    total_vcpu_limit=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"
        )],
        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"
    ),
    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
        ),
        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"
    )],
    version_description="versionDescription"
)
Parameters:
  • scope (Construct) – Scope in which this resource is defined.

  • id (str) – Construct identifier for this resource (unique in its scope).

  • name (str) – A descriptive identifier for the container group definition. The name value is unique in an AWS Region.

  • operating_system (str) – The platform that all containers in the container group definition run on. .. 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_memory_limit_mebibytes (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 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.

  • total_vcpu_limit (Union[int, float]) – 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.

  • container_group_type (Optional[str]) – The type of container group. Container group type determines how Amazon GameLift deploys the container group on each fleet instance.

  • game_server_container_definition (Union[IResolvable, GameServerContainerDefinitionProperty, Dict[str, Any], None]) – 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.

  • source_version_number (Union[int, float, None]) – A specific ContainerGroupDefinition version to be updated.

  • support_container_definitions (Union[IResolvable, Sequence[Union[IResolvable, SupportContainerDefinitionProperty, Dict[str, Any]]], None]) – 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 (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – An array of key-value pairs to apply to this resource.

  • version_description (Optional[str]) – An optional description that was provided for a container group definition update. Each version can have a unique description.

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_dependency(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

add_depends_on(target)

(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

Parameters:

target (CfnResource) –

Deprecated:

use addDependency

Stability:

deprecated

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
  "GlobalSecondaryIndexes": [
    {
      "Projection": {
        "NonKeyAttributes": [ "myattribute" ]
        ...
      }
      ...
    },
    {
      "ProjectionType": "INCLUDE"
      ...
    },
  ]
  ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

Parameters:
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resource, please consult that specific resource’s documentation.

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options

Return type:

None

get_att(attribute_name, type_hint=None)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:
  • attribute_name (str) – The name of the attribute.

  • type_hint (Optional[ResolutionTypeHint]) –

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) – tree inspector to collect and process attributes.

Return type:

None

obtain_dependencies()

Retrieves an array of resources this resource depends on.

This assembles dependencies on resources across stacks (including nested stacks) automatically.

Return type:

List[Union[Stack, CfnResource]]

obtain_resource_dependencies()

Get a shallow copy of dependencies between this resource and other resources in the same stack.

Return type:

List[CfnResource]

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

remove_dependency(target)

Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

replace_dependency(target, new_target)

Replaces one dependency with another.

Parameters:
Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::GameLift::ContainerGroupDefinition'
attr_container_group_definition_arn

//docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html>`_ ) that is assigned to an Amazon GameLift ContainerGroupDefinition resource. It uniquely identifies the resource across all AWS Regions. Format is arn:aws:gamelift:[region]::containergroupdefinition/[container group definition name]:[version] .

CloudformationAttribute:

ContainerGroupDefinitionArn

Type:

The Amazon Resource Name ( `ARN <https

attr_creation_time

A time stamp indicating when this data object was created.

Format is a number expressed in Unix time as milliseconds (for example "1469498468.057" ).

CloudformationAttribute:

CreationTime

attr_status

.

  • COPYING – Amazon GameLift is in the process of making copies of all container images that are defined in the group. While in this state, the resource can’t be used to create a container fleet.

  • READY – Amazon GameLift has copied the registry images for all containers that are defined in the group. You can use a container group definition in this status to create a container fleet.

  • FAILED – Amazon GameLift failed to create a valid container group definition resource. For more details on the cause of the failure, see StatusReason . A container group definition resource in failed status will be deleted within a few minutes.

CloudformationAttribute:

Status

Type:

Current status of the container group definition resource. Values include

attr_status_reason

.

  • An internal issue prevented Amazon GameLift from creating the container group definition resource. Delete the failed resource and call CreateContainerGroupDefinition again.

  • An access-denied message means that you don’t have permissions to access the container image on ECR. See IAM permission examples for help setting up required IAM permissions for Amazon GameLift.

  • The ImageUri value for at least one of the containers in the container group definition was invalid or not found in the current AWS account.

  • At least one of the container images referenced in the container group definition exceeds the allowed size. For size limits, see Amazon GameLift endpoints and quotas .

  • At least one of the container images referenced in the container group definition uses a different operating system than the one defined for the container group.

CloudformationAttribute:

StatusReason

Type:

Additional information about a container group definition that’s in FAILED status. Possible reasons include

attr_version_number

Indicates the version of a particular container group definition.

This number is incremented automatically when you update a container group definition. You can view, update, or delete individual versions or the entire container group definition.

CloudformationAttribute:

VersionNumber

cdk_tag_manager

Tag Manager which manages the tags for this resource.

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

container_group_type

The type of container group.

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

game_server_container_definition

The definition for the game server container in this group.

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

name

A descriptive identifier for the container group definition.

node

The tree node.

operating_system

The platform that all containers in the container group definition run on.

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

source_version_number

A specific ContainerGroupDefinition version to be updated.

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

support_container_definitions

The set of definitions for support containers in this group.

tags

An array of key-value pairs to apply to this resource.

total_memory_limit_mebibytes

The amount of memory (in MiB) on a fleet instance to allocate for the container group.

total_vcpu_limit

The amount of vCPU units on a fleet instance to allocate for the container group (1 vCPU is equal to 1024 CPU units).

version_description

An optional description that was provided for a container group definition update.

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any) –

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(x)

Check whether the given object is a CfnResource.

Parameters:

x (Any) –

Return type:

bool

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.

ContainerDependencyProperty

class CfnContainerGroupDefinition.ContainerDependencyProperty(*, condition, container_name)

Bases: object

A container’s dependency on another container in the same container group.

The dependency impacts how the dependent container is able to start or shut down based the status of the other container.

For example, ContainerA is configured with the following dependency: a START dependency on ContainerB . This means that ContainerA can’t start until ContainerB has started. It also means that ContainerA must shut down before ContainerB .

Part of: GameServerContainerDefinition , GameServerContainerDefinitionInput , SupportContainerDefinition , SupportContainerDefinitionInput

Parameters:
  • condition (str) – The condition that the dependency container must reach before the dependent container can start. Valid conditions include:. - START - The dependency container must have started. - COMPLETE - The dependency container has run to completion (exits). Use this condition with nonessential containers, such as those that run a script and then exit. The dependency container can’t be an essential container. - SUCCESS - The dependency container has run to completion and exited with a zero status. The dependency container can’t be an essential container. - HEALTHY - The dependency container has passed its Docker health check. Use this condition with dependency containers that have health checks configured. This condition is confirmed at container group startup only.

  • container_name (str) – A descriptive label for the container definition that this container depends on.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-containerdependency.html

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

container_dependency_property = gamelift.CfnContainerGroupDefinition.ContainerDependencyProperty(
    condition="condition",
    container_name="containerName"
)

Attributes

condition

.

  • START - The dependency container must have started.

  • COMPLETE - The dependency container has run to completion (exits). Use this condition with nonessential containers, such as those that run a script and then exit. The dependency container can’t be an essential container.

  • SUCCESS - The dependency container has run to completion and exited with a zero status. The dependency container can’t be an essential container.

  • HEALTHY - The dependency container has passed its Docker health check. Use this condition with dependency containers that have health checks configured. This condition is confirmed at container group startup only.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-containerdependency.html#cfn-gamelift-containergroupdefinition-containerdependency-condition

Type:

The condition that the dependency container must reach before the dependent container can start. Valid conditions include

container_name

A descriptive label for the container definition that this container depends on.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-containerdependency.html#cfn-gamelift-containergroupdefinition-containerdependency-containername

ContainerEnvironmentProperty

class CfnContainerGroupDefinition.ContainerEnvironmentProperty(*, name, value)

Bases: object

An environment variable to set inside a container, in the form of a key-value pair.

Part of: GameServerContainerDefinition , GameServerContainerDefinitionInput , SupportContainerDefinition , SupportContainerDefinitionInput

Parameters:
  • name (str) – The environment variable name.

  • value (str) – The environment variable value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-containerenvironment.html

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

container_environment_property = gamelift.CfnContainerGroupDefinition.ContainerEnvironmentProperty(
    name="name",
    value="value"
)

Attributes

name

The environment variable name.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-containerenvironment.html#cfn-gamelift-containergroupdefinition-containerenvironment-name

value

The environment variable value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-containerenvironment.html#cfn-gamelift-containergroupdefinition-containerenvironment-value

ContainerHealthCheckProperty

class CfnContainerGroupDefinition.ContainerHealthCheckProperty(*, command, interval=None, retries=None, start_period=None, timeout=None)

Bases: object

Instructions on when and how to check the health of a support container in a container fleet.

These properties override any Docker health checks that are set in the container image. For more information on container health checks, see HealthCheck command in the Amazon Elastic Container Service API . Game server containers don’t have a health check parameter; Amazon GameLift automatically handles health checks for these containers.

The following example instructs the container to initiate a health check command every 60 seconds and wait 10 seconds for it to succeed. If it fails, retry the command 3 times before flagging the container as unhealthy. It also tells the container to wait 100 seconds after launch before counting failed health checks.

{"Command": [ "CMD-SHELL", "ps cax | grep "processmanager" || exit 1" ], "Interval": 60, "Timeout": 10, "Retries": 3, "StartPeriod": 100 }

Part of: SupportContainerDefinition , SupportContainerDefinitionInput

Parameters:
  • command (Sequence[str]) – A string array that specifies the command that the container runs to determine if it’s healthy.

  • interval (Union[int, float, None]) – The time period (in seconds) between each health check.

  • retries (Union[int, float, None]) – The number of times to retry a failed health check before flagging the container unhealthy. The first run of the command does not count as a retry.

  • start_period (Union[int, float, None]) – The optional grace period (in seconds) to give a container time to bootstrap before the first failed health check counts toward the number of retries.

  • timeout (Union[int, float, None]) – The time period (in seconds) to wait for a health check to succeed before counting a failed health check.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-containerhealthcheck.html

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

container_health_check_property = gamelift.CfnContainerGroupDefinition.ContainerHealthCheckProperty(
    command=["command"],

    # the properties below are optional
    interval=123,
    retries=123,
    start_period=123,
    timeout=123
)

Attributes

command

A string array that specifies the command that the container runs to determine if it’s healthy.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-containerhealthcheck.html#cfn-gamelift-containergroupdefinition-containerhealthcheck-command

interval

The time period (in seconds) between each health check.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-containerhealthcheck.html#cfn-gamelift-containergroupdefinition-containerhealthcheck-interval

retries

The number of times to retry a failed health check before flagging the container unhealthy.

The first run of the command does not count as a retry.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-containerhealthcheck.html#cfn-gamelift-containergroupdefinition-containerhealthcheck-retries

start_period

The optional grace period (in seconds) to give a container time to bootstrap before the first failed health check counts toward the number of retries.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-containerhealthcheck.html#cfn-gamelift-containergroupdefinition-containerhealthcheck-startperiod

timeout

The time period (in seconds) to wait for a health check to succeed before counting a failed health check.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-containerhealthcheck.html#cfn-gamelift-containergroupdefinition-containerhealthcheck-timeout

ContainerMountPointProperty

class CfnContainerGroupDefinition.ContainerMountPointProperty(*, instance_path, access_level=None, container_path=None)

Bases: object

A mount point that binds a container to a file or directory on the host system.

Part of: GameServerContainerDefinition , ` <https://docs.aws.amazon.com/gamelift/latest/apireference/API_GameServerContainerDefinitionInput.html>`_ , SupportContainerDefinition , ` <https://docs.aws.amazon.com/gamelift/latest/apireference/API_SupportContainerDefinitionInput.html>`_

Parameters:
  • instance_path (str) – The path to the source file or directory.

  • access_level (Optional[str]) – The type of access for the container.

  • container_path (Optional[str]) – The mount path on the container. If this property isn’t set, the instance path is used.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-containermountpoint.html

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

container_mount_point_property = gamelift.CfnContainerGroupDefinition.ContainerMountPointProperty(
    instance_path="instancePath",

    # the properties below are optional
    access_level="accessLevel",
    container_path="containerPath"
)

Attributes

access_level

The type of access for the container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-containermountpoint.html#cfn-gamelift-containergroupdefinition-containermountpoint-accesslevel

container_path

The mount path on the container.

If this property isn’t set, the instance path is used.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-containermountpoint.html#cfn-gamelift-containergroupdefinition-containermountpoint-containerpath

instance_path

The path to the source file or directory.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-containermountpoint.html#cfn-gamelift-containergroupdefinition-containermountpoint-instancepath

ContainerPortRangeProperty

class CfnContainerGroupDefinition.ContainerPortRangeProperty(*, from_port, protocol, to_port)

Bases: object

A set of one or more port numbers that can be opened on the container.

Part of: ContainerPortConfiguration

Parameters:
  • from_port (Union[int, float]) – A starting value for the range of allowed port numbers.

  • protocol (str) – The network protocol that these ports support.

  • to_port (Union[int, float]) – An ending value for the range of allowed port numbers. Port numbers are end-inclusive. This value must be equal to or greater than FromPort .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-containerportrange.html

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

container_port_range_property = gamelift.CfnContainerGroupDefinition.ContainerPortRangeProperty(
    from_port=123,
    protocol="protocol",
    to_port=123
)

Attributes

from_port

A starting value for the range of allowed port numbers.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-containerportrange.html#cfn-gamelift-containergroupdefinition-containerportrange-fromport

protocol

The network protocol that these ports support.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-containerportrange.html#cfn-gamelift-containergroupdefinition-containerportrange-protocol

to_port

An ending value for the range of allowed port numbers.

Port numbers are end-inclusive. This value must be equal to or greater than FromPort .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-containerportrange.html#cfn-gamelift-containergroupdefinition-containerportrange-toport

GameServerContainerDefinitionProperty

class CfnContainerGroupDefinition.GameServerContainerDefinitionProperty(*, container_name, image_uri, server_sdk_version, depends_on=None, environment_override=None, mount_points=None, port_configuration=None, resolved_image_digest=None)

Bases: object

Describes the game server container in an existing game server container group.

A game server container identifies a container image with your game server build. A game server container is automatically considered essential; if an essential container fails, the entire container group restarts.

You can update a container definition and deploy the updates to an existing fleet. When creating or updating a game server container group definition, use the property ` <https://docs.aws.amazon.com/gamelift/latest/apireference/API_GameServerContainerDefinitionInput>`_ .

Part of: ContainerGroupDefinition

Returned by: DescribeContainerGroupDefinition , ListContainerGroupDefinitions , UpdateContainerGroupDefinition

Parameters:
  • container_name (str) – The container definition identifier. Container names are unique within a container group definition.

  • image_uri (str) – The URI to the image that Amazon GameLift uses when deploying this container to a container fleet. For a more specific identifier, see ResolvedImageDigest .

  • server_sdk_version (str) – The Amazon GameLift server SDK version that the game server is integrated with. Only game servers using 5.2.0 or higher are compatible with container fleets.

  • depends_on (Union[IResolvable, Sequence[Union[IResolvable, ContainerDependencyProperty, Dict[str, Any]]], None]) – Indicates that the container relies on the status of other containers in the same container group during startup and shutdown sequences. A container might have dependencies on multiple containers.

  • environment_override (Union[IResolvable, Sequence[Union[IResolvable, ContainerEnvironmentProperty, Dict[str, Any]]], None]) – A set of environment variables that’s passed to the container on startup. See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API Reference .

  • mount_points (Union[IResolvable, Sequence[Union[IResolvable, ContainerMountPointProperty, Dict[str, Any]]], None]) – A mount point that binds a path inside the container to a file or directory on the host system and lets it access the file or directory.

  • port_configuration (Union[IResolvable, PortConfigurationProperty, Dict[str, Any], None]) – The set of ports that are available to bind to processes in the container. For example, a game server process requires a container port to allow game clients to connect to it. Container ports aren’t directly accessed by inbound traffic. Amazon GameLift maps these container ports to externally accessible connection ports, which are assigned as needed from the container fleet’s ConnectionPortRange .

  • resolved_image_digest (Optional[str]) – A unique and immutable identifier for the container image. The digest is a SHA 256 hash of the container image manifest.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-gameservercontainerdefinition.html

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

game_server_container_definition_property = 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"
    )],
    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"
)

Attributes

container_name

The container definition identifier.

Container names are unique within a container group definition.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-gameservercontainerdefinition.html#cfn-gamelift-containergroupdefinition-gameservercontainerdefinition-containername

depends_on

Indicates that the container relies on the status of other containers in the same container group during startup and shutdown sequences.

A container might have dependencies on multiple containers.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-gameservercontainerdefinition.html#cfn-gamelift-containergroupdefinition-gameservercontainerdefinition-dependson

environment_override

A set of environment variables that’s passed to the container on startup.

See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API Reference .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-gameservercontainerdefinition.html#cfn-gamelift-containergroupdefinition-gameservercontainerdefinition-environmentoverride

image_uri

The URI to the image that Amazon GameLift uses when deploying this container to a container fleet.

For a more specific identifier, see ResolvedImageDigest .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-gameservercontainerdefinition.html#cfn-gamelift-containergroupdefinition-gameservercontainerdefinition-imageuri

mount_points

A mount point that binds a path inside the container to a file or directory on the host system and lets it access the file or directory.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-gameservercontainerdefinition.html#cfn-gamelift-containergroupdefinition-gameservercontainerdefinition-mountpoints

port_configuration

The set of ports that are available to bind to processes in the container.

For example, a game server process requires a container port to allow game clients to connect to it. Container ports aren’t directly accessed by inbound traffic. Amazon GameLift maps these container ports to externally accessible connection ports, which are assigned as needed from the container fleet’s ConnectionPortRange .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-gameservercontainerdefinition.html#cfn-gamelift-containergroupdefinition-gameservercontainerdefinition-portconfiguration

resolved_image_digest

A unique and immutable identifier for the container image.

The digest is a SHA 256 hash of the container image manifest.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-gameservercontainerdefinition.html#cfn-gamelift-containergroupdefinition-gameservercontainerdefinition-resolvedimagedigest

server_sdk_version

The Amazon GameLift server SDK version that the game server is integrated with.

Only game servers using 5.2.0 or higher are compatible with container fleets.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-gameservercontainerdefinition.html#cfn-gamelift-containergroupdefinition-gameservercontainerdefinition-serversdkversion

PortConfigurationProperty

class CfnContainerGroupDefinition.PortConfigurationProperty(*, container_port_ranges)

Bases: object

Defines the ports on a container.

Parameters:

container_port_ranges (Union[IResolvable, Sequence[Union[IResolvable, ContainerPortRangeProperty, Dict[str, Any]]]]) – Specifies one or more ranges of ports on a container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-portconfiguration.html

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

port_configuration_property = gamelift.CfnContainerGroupDefinition.PortConfigurationProperty(
    container_port_ranges=[gamelift.CfnContainerGroupDefinition.ContainerPortRangeProperty(
        from_port=123,
        protocol="protocol",
        to_port=123
    )]
)

Attributes

container_port_ranges

Specifies one or more ranges of ports on a container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-portconfiguration.html#cfn-gamelift-containergroupdefinition-portconfiguration-containerportranges

SupportContainerDefinitionProperty

class CfnContainerGroupDefinition.SupportContainerDefinitionProperty(*, container_name, image_uri, depends_on=None, environment_override=None, essential=None, health_check=None, memory_hard_limit_mebibytes=None, mount_points=None, port_configuration=None, resolved_image_digest=None, vcpu=None)

Bases: object

Describes a support container in a container group.

A support container might be in a game server container group or a per-instance container group. Support containers don’t run game server processes.

You can update a support container definition and deploy the updates to an existing fleet. When creating or updating a game server container group definition, use the property GameServerContainerDefinitionInput .

Part of: ContainerGroupDefinition

Returned by: DescribeContainerGroupDefinition , ListContainerGroupDefinitions , UpdateContainerGroupDefinition

Parameters:
  • container_name (str) – The container definition identifier. Container names are unique within a container group definition.

  • image_uri (str) – The URI to the image that Amazon GameLift deploys to a container fleet. For a more specific identifier, see ResolvedImageDigest .

  • depends_on (Union[IResolvable, Sequence[Union[IResolvable, ContainerDependencyProperty, Dict[str, Any]]], None]) – Indicates that the container relies on the status of other containers in the same container group during its startup and shutdown sequences. A container might have dependencies on multiple containers.

  • environment_override (Union[IResolvable, Sequence[Union[IResolvable, ContainerEnvironmentProperty, Dict[str, Any]]], None]) –

    A set of environment variables that’s passed to the container on startup. See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API Reference .

  • essential (Union[bool, IResolvable, None]) – Indicates whether the container is vital to the container group. If an essential container fails, the entire container group restarts.

  • health_check (Union[IResolvable, ContainerHealthCheckProperty, Dict[str, Any], None]) – A configuration for a non-terminal health check. A support container automatically restarts if it stops functioning or if it fails this health check.

  • memory_hard_limit_mebibytes (Union[int, float, None]) – The amount of memory that Amazon GameLift makes available to the container. If memory limits aren’t set for an individual container, the container shares the container group’s total memory allocation. Related data type: ContainerGroupDefinition TotalMemoryLimitMebibytes

  • mount_points (Union[IResolvable, Sequence[Union[IResolvable, ContainerMountPointProperty, Dict[str, Any]]], None]) – A mount point that binds a path inside the container to a file or directory on the host system and lets it access the file or directory.

  • port_configuration (Union[IResolvable, PortConfigurationProperty, Dict[str, Any], None]) – A set of ports that allow access to the container from external users. Processes running in the container can bind to a one of these ports. Container ports aren’t directly accessed by inbound traffic. Amazon GameLift maps these container ports to externally accessible connection ports, which are assigned as needed from the container fleet’s ConnectionPortRange .

  • resolved_image_digest (Optional[str]) – A unique and immutable identifier for the container image. The digest is a SHA 256 hash of the container image manifest.

  • vcpu (Union[int, float, None]) – The number of vCPU units that are reserved for the container. If no resources are reserved, the container shares the total vCPU limit for the container group. Related data type: ContainerGroupDefinition TotalVcpuLimit

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-supportcontainerdefinition.html

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

support_container_definition_property = 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
    ),
    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
)

Attributes

container_name

The container definition identifier.

Container names are unique within a container group definition.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-supportcontainerdefinition.html#cfn-gamelift-containergroupdefinition-supportcontainerdefinition-containername

depends_on

Indicates that the container relies on the status of other containers in the same container group during its startup and shutdown sequences.

A container might have dependencies on multiple containers.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-supportcontainerdefinition.html#cfn-gamelift-containergroupdefinition-supportcontainerdefinition-dependson

environment_override

A set of environment variables that’s passed to the container on startup.

See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API Reference .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-supportcontainerdefinition.html#cfn-gamelift-containergroupdefinition-supportcontainerdefinition-environmentoverride

essential

Indicates whether the container is vital to the container group.

If an essential container fails, the entire container group restarts.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-supportcontainerdefinition.html#cfn-gamelift-containergroupdefinition-supportcontainerdefinition-essential

health_check

A configuration for a non-terminal health check.

A support container automatically restarts if it stops functioning or if it fails this health check.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-supportcontainerdefinition.html#cfn-gamelift-containergroupdefinition-supportcontainerdefinition-healthcheck

image_uri

The URI to the image that Amazon GameLift deploys to a container fleet.

For a more specific identifier, see ResolvedImageDigest .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-supportcontainerdefinition.html#cfn-gamelift-containergroupdefinition-supportcontainerdefinition-imageuri

memory_hard_limit_mebibytes

The amount of memory that Amazon GameLift makes available to the container.

If memory limits aren’t set for an individual container, the container shares the container group’s total memory allocation.

Related data type: ContainerGroupDefinition TotalMemoryLimitMebibytes

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-supportcontainerdefinition.html#cfn-gamelift-containergroupdefinition-supportcontainerdefinition-memoryhardlimitmebibytes

mount_points

A mount point that binds a path inside the container to a file or directory on the host system and lets it access the file or directory.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-supportcontainerdefinition.html#cfn-gamelift-containergroupdefinition-supportcontainerdefinition-mountpoints

port_configuration

A set of ports that allow access to the container from external users.

Processes running in the container can bind to a one of these ports. Container ports aren’t directly accessed by inbound traffic. Amazon GameLift maps these container ports to externally accessible connection ports, which are assigned as needed from the container fleet’s ConnectionPortRange .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-supportcontainerdefinition.html#cfn-gamelift-containergroupdefinition-supportcontainerdefinition-portconfiguration

resolved_image_digest

A unique and immutable identifier for the container image.

The digest is a SHA 256 hash of the container image manifest.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-supportcontainerdefinition.html#cfn-gamelift-containergroupdefinition-supportcontainerdefinition-resolvedimagedigest

vcpu

The number of vCPU units that are reserved for the container.

If no resources are reserved, the container shares the total vCPU limit for the container group.

Related data type: ContainerGroupDefinition TotalVcpuLimit

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containergroupdefinition-supportcontainerdefinition.html#cfn-gamelift-containergroupdefinition-supportcontainerdefinition-vcpu