CfnContainerFleet

class aws_cdk.aws_gamelift.CfnContainerFleet(scope, id, *, fleet_role_arn, billing_type=None, deployment_configuration=None, description=None, game_server_container_group_definition_name=None, game_server_container_groups_per_instance=None, game_session_creation_limit_policy=None, instance_connection_port_range=None, instance_inbound_permissions=None, instance_type=None, locations=None, log_configuration=None, metric_groups=None, new_game_session_protection_policy=None, per_instance_container_group_definition_name=None, scaling_policies=None, tags=None)

Bases: CfnResource

Describes an Amazon GameLift managed container fleet.

See:

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

CloudformationResource:

AWS::GameLift::ContainerFleet

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_fleet = gamelift.CfnContainerFleet(self, "MyCfnContainerFleet",
    fleet_role_arn="fleetRoleArn",

    # the properties below are optional
    billing_type="billingType",
    deployment_configuration=gamelift.CfnContainerFleet.DeploymentConfigurationProperty(
        impairment_strategy="impairmentStrategy",
        minimum_healthy_percentage=123,
        protection_strategy="protectionStrategy"
    ),
    description="description",
    game_server_container_group_definition_name="gameServerContainerGroupDefinitionName",
    game_server_container_groups_per_instance=123,
    game_session_creation_limit_policy=gamelift.CfnContainerFleet.GameSessionCreationLimitPolicyProperty(
        new_game_sessions_per_creator=123,
        policy_period_in_minutes=123
    ),
    instance_connection_port_range=gamelift.CfnContainerFleet.ConnectionPortRangeProperty(
        from_port=123,
        to_port=123
    ),
    instance_inbound_permissions=[gamelift.CfnContainerFleet.IpPermissionProperty(
        from_port=123,
        ip_range="ipRange",
        protocol="protocol",
        to_port=123
    )],
    instance_type="instanceType",
    locations=[gamelift.CfnContainerFleet.LocationConfigurationProperty(
        location="location",

        # the properties below are optional
        location_capacity=gamelift.CfnContainerFleet.LocationCapacityProperty(
            desired_ec2_instances=123,
            max_size=123,
            min_size=123
        ),
        stopped_actions=["stoppedActions"]
    )],
    log_configuration=gamelift.CfnContainerFleet.LogConfigurationProperty(
        log_destination="logDestination",
        s3_bucket_name="s3BucketName"
    ),
    metric_groups=["metricGroups"],
    new_game_session_protection_policy="newGameSessionProtectionPolicy",
    per_instance_container_group_definition_name="perInstanceContainerGroupDefinitionName",
    scaling_policies=[gamelift.CfnContainerFleet.ScalingPolicyProperty(
        metric_name="metricName",
        name="name",

        # the properties below are optional
        comparison_operator="comparisonOperator",
        evaluation_periods=123,
        policy_type="policyType",
        scaling_adjustment=123,
        scaling_adjustment_type="scalingAdjustmentType",
        target_configuration=gamelift.CfnContainerFleet.TargetConfigurationProperty(
            target_value=123
        ),
        threshold=123
    )],
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
Parameters:
  • scope (Construct) – Scope in which this resource is defined.

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

  • fleet_role_arn (str) – The unique identifier for an AWS Identity and Access Management (IAM) role with permissions to run your containers on resources that are managed by Amazon GameLift. See Set up an IAM service role . This fleet property can’t be changed.

  • billing_type (Optional[str]) – Indicates whether the fleet uses On-Demand or Spot instances for this fleet. Learn more about when to use On-Demand versus Spot Instances . You can’t update this fleet property. By default, this property is set to ON_DEMAND .

  • deployment_configuration (Union[IResolvable, DeploymentConfigurationProperty, Dict[str, Any], None]) – Set of rules for processing a deployment for a container fleet update.

  • description (Optional[str]) – A meaningful description of the container fleet.

  • game_server_container_group_definition_name (Optional[str]) – The name of the fleet’s game server container group definition, which describes how to deploy containers with your game server build and support software onto each fleet instance.

  • game_server_container_groups_per_instance (Union[int, float, None]) – The number of times to replicate the game server container group on each fleet instance.

  • game_session_creation_limit_policy (Union[IResolvable, GameSessionCreationLimitPolicyProperty, Dict[str, Any], None]) – A policy that limits the number of game sessions that each individual player can create on instances in this fleet. The limit applies for a specified span of time.

  • instance_connection_port_range (Union[IResolvable, ConnectionPortRangeProperty, Dict[str, Any], None]) – The set of port numbers to open on each instance in a container fleet. Connection ports are used by inbound traffic to connect with processes that are running in containers on the fleet.

  • instance_inbound_permissions (Union[IResolvable, Sequence[Union[IResolvable, IpPermissionProperty, Dict[str, Any]]], None]) – The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet.

  • instance_type (Optional[str]) – The Amazon EC2 instance type to use for all instances in the fleet. Instance type determines the computing resources and processing power that’s available to host your game servers. This includes including CPU, memory, storage, and networking capacity. You can’t update this fleet property.

  • locations (Union[IResolvable, Sequence[Union[IResolvable, LocationConfigurationProperty, Dict[str, Any]]], None]) –

  • log_configuration (Union[IResolvable, LogConfigurationProperty, Dict[str, Any], None]) – The method that is used to collect container logs for the fleet. Amazon GameLift saves all standard output for each container in logs, including game session logs. - CLOUDWATCH – Send logs to an Amazon CloudWatch log group that you define. Each container emits a log stream, which is organized in the log group. - S3 – Store logs in an Amazon S3 bucket that you define. - NONE – Don’t collect container logs.

  • metric_groups (Optional[Sequence[str]]) – The name of an AWS CloudWatch metric group to add this fleet to. Metric groups aggregate metrics for multiple fleets.

  • new_game_session_protection_policy (Optional[str]) – Determines whether Amazon GameLift can shut down game sessions on the fleet that are actively running and hosting players. Amazon GameLift might prompt an instance shutdown when scaling down fleet capacity or when retiring unhealthy instances. You can also set game session protection for individual game sessions using UpdateGameSession . - NoProtection – Game sessions can be shut down during active gameplay. - FullProtection – Game sessions in ACTIVE status can’t be shut down.

  • per_instance_container_group_definition_name (Optional[str]) – The name of the fleet’s per-instance container group definition.

  • scaling_policies (Union[IResolvable, Sequence[Union[IResolvable, ScalingPolicyProperty, Dict[str, Any]]], None]) – A list of rules that control how a fleet is scaled.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – An array of key-value pairs to apply to this resource.

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::ContainerFleet'
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_deployment_details

Provides information about the last deployment ID and its status.

CloudformationAttribute:

DeploymentDetails

attr_fleet_arn

//docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html>`_ ) that is assigned to a Amazon GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 . In a GameLift fleet ARN, the resource ID matches the FleetId value.

CloudformationAttribute:

FleetArn

Type:

The Amazon Resource Name ( `ARN <https

attr_fleet_id

A unique identifier for the container fleet to retrieve.

CloudformationAttribute:

FleetId

attr_game_server_container_group_definition_arn

//docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html>`_ ) that is assigned to the fleet’s game server container group. The ARN value also identifies the specific container group definition version in use.

CloudformationAttribute:

GameServerContainerGroupDefinitionArn

Type:

The Amazon Resource Name ( `ARN <https

attr_maximum_game_server_container_groups_per_instance

The calculated maximum number of game server container group that can be deployed on each fleet instance.

The calculation depends on the resource needs of the container group and the CPU and memory resources of the fleet’s instance type.

CloudformationAttribute:

MaximumGameServerContainerGroupsPerInstance

attr_per_instance_container_group_definition_arn

//docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html>`_ ) that is assigned to the fleet’s per-instance container group. The ARN value also identifies the specific container group definition version in use.

CloudformationAttribute:

PerInstanceContainerGroupDefinitionArn

Type:

The Amazon Resource Name ( `ARN <https

attr_status

The current status of the container fleet.

  • PENDING – A new container fleet has been requested.

  • CREATING – A new container fleet resource is being created.

  • CREATED – A new container fleet resource has been created. No fleet instances have been deployed.

  • ACTIVATING – New container fleet instances are being deployed.

  • ACTIVE – The container fleet has been deployed and is ready to host game sessions.

  • UPDATING – Updates to the container fleet is being updated. A deployment is in progress.

CloudformationAttribute:

Status

billing_type

Indicates whether the fleet uses On-Demand or Spot instances for this fleet.

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.

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.

deployment_configuration

Set of rules for processing a deployment for a container fleet update.

description

A meaningful description of the container fleet.

fleet_role_arn

The unique identifier for an AWS Identity and Access Management (IAM) role with permissions to run your containers on resources that are managed by Amazon GameLift.

game_server_container_group_definition_name

The name of the fleet’s game server container group definition, which describes how to deploy containers with your game server build and support software onto each fleet instance.

game_server_container_groups_per_instance

The number of times to replicate the game server container group on each fleet instance.

game_session_creation_limit_policy

A policy that limits the number of game sessions that each individual player can create on instances in this fleet.

instance_connection_port_range

The set of port numbers to open on each instance in a container fleet.

instance_inbound_permissions

The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet.

instance_type

The Amazon EC2 instance type to use for all instances in the fleet.

locations
log_configuration

The method that is used to collect container logs for the fleet.

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.

metric_groups

The name of an AWS CloudWatch metric group to add this fleet to.

new_game_session_protection_policy

Determines whether Amazon GameLift can shut down game sessions on the fleet that are actively running and hosting players.

node

The tree node.

per_instance_container_group_definition_name

The name of the fleet’s per-instance container group definition.

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 }).

scaling_policies

A list of rules that control how a fleet is scaled.

stack

The stack in which this element is defined.

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

tags

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

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.

ConnectionPortRangeProperty

class CfnContainerFleet.ConnectionPortRangeProperty(*, from_port, to_port)

Bases: object

The set of port numbers to open on each instance in a container fleet.

Connection ports are used by inbound traffic to connect with processes that are running in containers on the fleet.

Parameters:
  • from_port (Union[int, float]) – Starting value for the port range.

  • to_port (Union[int, float]) – Ending value for the port. 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-containerfleet-connectionportrange.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

connection_port_range_property = gamelift.CfnContainerFleet.ConnectionPortRangeProperty(
    from_port=123,
    to_port=123
)

Attributes

from_port

Starting value for the port range.

See:

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

to_port

Ending value for the port.

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-containerfleet-connectionportrange.html#cfn-gamelift-containerfleet-connectionportrange-toport

DeploymentConfigurationProperty

class CfnContainerFleet.DeploymentConfigurationProperty(*, impairment_strategy=None, minimum_healthy_percentage=None, protection_strategy=None)

Bases: object

Set of rules for processing a deployment for a container fleet update.

Parameters:
  • impairment_strategy (Optional[str]) – Determines what actions to take if a deployment fails. If the fleet is multi-location, this strategy applies across all fleet locations. With a rollback strategy, updated fleet instances are rolled back to the last successful deployment. Alternatively, you can maintain a few impaired containers for the purpose of debugging, while all other tasks return to the last successful deployment.

  • minimum_healthy_percentage (Union[int, float, None]) – Sets a minimum level of healthy tasks to maintain during deployment activity.

  • protection_strategy (Optional[str]) – Determines how fleet deployment activity affects active game sessions on the fleet. With protection, a deployment honors game session protection, and delays actions that would interrupt a protected active game session until the game session ends. Without protection, deployment activity can shut down all running tasks, including active game sessions, regardless of game session protection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-deploymentconfiguration.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

deployment_configuration_property = gamelift.CfnContainerFleet.DeploymentConfigurationProperty(
    impairment_strategy="impairmentStrategy",
    minimum_healthy_percentage=123,
    protection_strategy="protectionStrategy"
)

Attributes

impairment_strategy

Determines what actions to take if a deployment fails.

If the fleet is multi-location, this strategy applies across all fleet locations. With a rollback strategy, updated fleet instances are rolled back to the last successful deployment. Alternatively, you can maintain a few impaired containers for the purpose of debugging, while all other tasks return to the last successful deployment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-deploymentconfiguration.html#cfn-gamelift-containerfleet-deploymentconfiguration-impairmentstrategy

minimum_healthy_percentage

Sets a minimum level of healthy tasks to maintain during deployment activity.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-deploymentconfiguration.html#cfn-gamelift-containerfleet-deploymentconfiguration-minimumhealthypercentage

protection_strategy

Determines how fleet deployment activity affects active game sessions on the fleet.

With protection, a deployment honors game session protection, and delays actions that would interrupt a protected active game session until the game session ends. Without protection, deployment activity can shut down all running tasks, including active game sessions, regardless of game session protection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-deploymentconfiguration.html#cfn-gamelift-containerfleet-deploymentconfiguration-protectionstrategy

DeploymentDetailsProperty

class CfnContainerFleet.DeploymentDetailsProperty(*, latest_deployment_id=None)

Bases: object

Information about the most recent deployment for the container fleet.

Parameters:

latest_deployment_id (Optional[str]) – A unique identifier for a fleet deployment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-deploymentdetails.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

deployment_details_property = gamelift.CfnContainerFleet.DeploymentDetailsProperty(
    latest_deployment_id="latestDeploymentId"
)

Attributes

latest_deployment_id

A unique identifier for a fleet deployment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-deploymentdetails.html#cfn-gamelift-containerfleet-deploymentdetails-latestdeploymentid

GameSessionCreationLimitPolicyProperty

class CfnContainerFleet.GameSessionCreationLimitPolicyProperty(*, new_game_sessions_per_creator=None, policy_period_in_minutes=None)

Bases: object

A policy that puts limits on the number of game sessions that a player can create within a specified span of time.

With this policy, you can control players’ ability to consume available resources.

The policy is evaluated when a player tries to create a new game session. On receiving a CreateGameSession request, Amazon GameLift checks that the player (identified by CreatorId ) has created fewer than game session limit in the specified time period.

Parameters:
  • new_game_sessions_per_creator (Union[int, float, None]) – A policy that puts limits on the number of game sessions that a player can create within a specified span of time. With this policy, you can control players’ ability to consume available resources. The policy evaluates when a player tries to create a new game session. On receiving a CreateGameSession request, Amazon GameLift checks that the player (identified by CreatorId ) has created fewer than game session limit in the specified time period.

  • policy_period_in_minutes (Union[int, float, None]) – The time span used in evaluating the resource creation limit policy.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-gamesessioncreationlimitpolicy.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_session_creation_limit_policy_property = gamelift.CfnContainerFleet.GameSessionCreationLimitPolicyProperty(
    new_game_sessions_per_creator=123,
    policy_period_in_minutes=123
)

Attributes

new_game_sessions_per_creator

A policy that puts limits on the number of game sessions that a player can create within a specified span of time.

With this policy, you can control players’ ability to consume available resources.

The policy evaluates when a player tries to create a new game session. On receiving a CreateGameSession request, Amazon GameLift checks that the player (identified by CreatorId ) has created fewer than game session limit in the specified time period.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-gamesessioncreationlimitpolicy.html#cfn-gamelift-containerfleet-gamesessioncreationlimitpolicy-newgamesessionspercreator

policy_period_in_minutes

The time span used in evaluating the resource creation limit policy.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-gamesessioncreationlimitpolicy.html#cfn-gamelift-containerfleet-gamesessioncreationlimitpolicy-policyperiodinminutes

IpPermissionProperty

class CfnContainerFleet.IpPermissionProperty(*, from_port, ip_range, protocol, to_port)

Bases: object

A range of IP addresses and port settings that allow inbound traffic to connect to processes on an instance in a fleet.

Processes are assigned an IP address/port number combination, which must fall into the fleet’s allowed ranges.

For Realtime Servers fleets, Amazon GameLift automatically opens two port ranges, one for TCP messaging and one for UDP.

Parameters:
  • from_port (Union[int, float]) – A starting value for a range of allowed port numbers. For fleets using Linux builds, only ports 22 and 1026-60000 are valid. For fleets using Windows builds, only ports 1026-60000 are valid.

  • ip_range (str) – A range of allowed IP addresses. This value must be expressed in CIDR notation. Example: “ 000.000.000.000/[subnet mask] “ or optionally the shortened version “ 0.0.0.0/[subnet mask] “.

  • protocol (str) – The network communication protocol used by the fleet.

  • to_port (Union[int, float]) – An ending value for a range of allowed port numbers. Port numbers are end-inclusive. This value must be equal to or greater than FromPort . For fleets using Linux builds, only ports 22 and 1026-60000 are valid. For fleets using Windows builds, only ports 1026-60000 are valid.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-ippermission.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

ip_permission_property = gamelift.CfnContainerFleet.IpPermissionProperty(
    from_port=123,
    ip_range="ipRange",
    protocol="protocol",
    to_port=123
)

Attributes

from_port

A starting value for a range of allowed port numbers.

For fleets using Linux builds, only ports 22 and 1026-60000 are valid.

For fleets using Windows builds, only ports 1026-60000 are valid.

See:

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

ip_range

A range of allowed IP addresses.

This value must be expressed in CIDR notation. Example: “ 000.000.000.000/[subnet mask] “ or optionally the shortened version “ 0.0.0.0/[subnet mask] “.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-ippermission.html#cfn-gamelift-containerfleet-ippermission-iprange

protocol

The network communication protocol used by the fleet.

See:

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

to_port

An ending value for a range of allowed port numbers.

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

For fleets using Linux builds, only ports 22 and 1026-60000 are valid.

For fleets using Windows builds, only ports 1026-60000 are valid.

See:

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

LocationCapacityProperty

class CfnContainerFleet.LocationCapacityProperty(*, desired_ec2_instances, max_size, min_size)

Bases: object

Current resource capacity settings in a specified fleet or location.

The location value might refer to a fleet’s remote location or its home Region.

Parameters:
  • desired_ec2_instances (Union[int, float]) – The number of EC2 instances you want to maintain in the specified fleet location. This value must fall between the minimum and maximum size limits.

  • max_size (Union[int, float]) – The maximum value that is allowed for the fleet’s instance count for a location.

  • min_size (Union[int, float]) – The minimum value allowed for the fleet’s instance count for a location.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-locationcapacity.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

location_capacity_property = gamelift.CfnContainerFleet.LocationCapacityProperty(
    desired_ec2_instances=123,
    max_size=123,
    min_size=123
)

Attributes

desired_ec2_instances

The number of EC2 instances you want to maintain in the specified fleet location.

This value must fall between the minimum and maximum size limits.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-locationcapacity.html#cfn-gamelift-containerfleet-locationcapacity-desiredec2instances

max_size

The maximum value that is allowed for the fleet’s instance count for a location.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-locationcapacity.html#cfn-gamelift-containerfleet-locationcapacity-maxsize

min_size

The minimum value allowed for the fleet’s instance count for a location.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-locationcapacity.html#cfn-gamelift-containerfleet-locationcapacity-minsize

LocationConfigurationProperty

class CfnContainerFleet.LocationConfigurationProperty(*, location, location_capacity=None, stopped_actions=None)

Bases: object

A remote location where a multi-location fleet can deploy game servers for game hosting.

Parameters:
  • location (str) – An AWS Region code, such as us-west-2 . For a list of supported Regions and Local Zones, see Amazon GameLift service locations for managed hosting.

  • location_capacity (Union[IResolvable, LocationCapacityProperty, Dict[str, Any], None]) – Current resource capacity settings in a specified fleet or location. The location value might refer to a fleet’s remote location or its home Region.

  • stopped_actions (Optional[Sequence[str]]) – A list of fleet actions that have been suspended in the fleet location.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-locationconfiguration.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

location_configuration_property = gamelift.CfnContainerFleet.LocationConfigurationProperty(
    location="location",

    # the properties below are optional
    location_capacity=gamelift.CfnContainerFleet.LocationCapacityProperty(
        desired_ec2_instances=123,
        max_size=123,
        min_size=123
    ),
    stopped_actions=["stoppedActions"]
)

Attributes

location

An AWS Region code, such as us-west-2 .

For a list of supported Regions and Local Zones, see Amazon GameLift service locations for managed hosting.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-locationconfiguration.html#cfn-gamelift-containerfleet-locationconfiguration-location

location_capacity

Current resource capacity settings in a specified fleet or location.

The location value might refer to a fleet’s remote location or its home Region.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-locationconfiguration.html#cfn-gamelift-containerfleet-locationconfiguration-locationcapacity

stopped_actions

A list of fleet actions that have been suspended in the fleet location.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-locationconfiguration.html#cfn-gamelift-containerfleet-locationconfiguration-stoppedactions

LogConfigurationProperty

class CfnContainerFleet.LogConfigurationProperty(*, log_destination=None, s3_bucket_name=None)

Bases: object

A method for collecting container logs for the fleet.

Amazon GameLift saves all standard output for each container in logs, including game session logs. You can select from the following methods:

Parameters:
  • log_destination (Optional[str]) – The type of log collection to use for a fleet. - CLOUDWATCH – (default value) Send logs to an Amazon CloudWatch log group that you define. Each container emits a log stream, which is organized in the log group. - S3 – Store logs in an Amazon S3 bucket that you define. - NONE – Don’t collect container logs.

  • s3_bucket_name (Optional[str]) – If log destination is S3 , logs are sent to the specified Amazon S3 bucket name.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-logconfiguration.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

log_configuration_property = gamelift.CfnContainerFleet.LogConfigurationProperty(
    log_destination="logDestination",
    s3_bucket_name="s3BucketName"
)

Attributes

log_destination

The type of log collection to use for a fleet.

  • CLOUDWATCH – (default value) Send logs to an Amazon CloudWatch log group that you define. Each container emits a log stream, which is organized in the log group.

  • S3 – Store logs in an Amazon S3 bucket that you define.

  • NONE – Don’t collect container logs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-logconfiguration.html#cfn-gamelift-containerfleet-logconfiguration-logdestination

s3_bucket_name

If log destination is S3 , logs are sent to the specified Amazon S3 bucket name.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-logconfiguration.html#cfn-gamelift-containerfleet-logconfiguration-s3bucketname

ScalingPolicyProperty

class CfnContainerFleet.ScalingPolicyProperty(*, metric_name, name, comparison_operator=None, evaluation_periods=None, policy_type=None, scaling_adjustment=None, scaling_adjustment_type=None, target_configuration=None, threshold=None)

Bases: object

Rule that controls how a fleet is scaled.

Scaling policies are uniquely identified by the combination of name and fleet ID.

Parameters:
  • metric_name (str) – Name of the Amazon GameLift-defined metric that is used to trigger a scaling adjustment. For detailed descriptions of fleet metrics, see Monitor Amazon GameLift with Amazon CloudWatch . - ActivatingGameSessions – Game sessions in the process of being created. - ActiveGameSessions – Game sessions that are currently running. - ActiveInstances – Fleet instances that are currently running at least one game session. - AvailableGameSessions – Additional game sessions that fleet could host simultaneously, given current capacity. - AvailablePlayerSessions – Empty player slots in currently active game sessions. This includes game sessions that are not currently accepting players. Reserved player slots are not included. - CurrentPlayerSessions – Player slots in active game sessions that are being used by a player or are reserved for a player. - IdleInstances – Active instances that are currently hosting zero game sessions. - PercentAvailableGameSessions – Unused percentage of the total number of game sessions that a fleet could host simultaneously, given current capacity. Use this metric for a target-based scaling policy. - PercentIdleInstances – Percentage of the total number of active instances that are hosting zero game sessions. - QueueDepth – Pending game session placement requests, in any queue, where the current fleet is the top-priority destination. - WaitTime – Current wait time for pending game session placement requests, in any queue, where the current fleet is the top-priority destination.

  • name (str) – A descriptive label that is associated with a fleet’s scaling policy. Policy names do not need to be unique.

  • comparison_operator (Optional[str]) – Comparison operator to use when measuring a metric against the threshold value.

  • evaluation_periods (Union[int, float, None]) – Length of time (in minutes) the metric must be at or beyond the threshold before a scaling event is triggered.

  • policy_type (Optional[str]) – The type of scaling policy to create. For a target-based policy, set the parameter MetricName to ‘PercentAvailableGameSessions’ and specify a TargetConfiguration . For a rule-based policy set the following parameters: MetricName , ComparisonOperator , Threshold , EvaluationPeriods , ScalingAdjustmentType , and ScalingAdjustment .

  • scaling_adjustment (Union[int, float, None]) – Amount of adjustment to make, based on the scaling adjustment type.

  • scaling_adjustment_type (Optional[str]) – The type of adjustment to make to a fleet’s instance count. - ChangeInCapacity – add (or subtract) the scaling adjustment value from the current instance count. Positive values scale up while negative values scale down. - ExactCapacity – set the instance count to the scaling adjustment value. - PercentChangeInCapacity – increase or reduce the current instance count by the scaling adjustment, read as a percentage. Positive values scale up while negative values scale down.

  • target_configuration (Union[IResolvable, TargetConfigurationProperty, Dict[str, Any], None]) – An object that contains settings for a target-based scaling policy.

  • threshold (Union[int, float, None]) – Metric value used to trigger a scaling event.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-scalingpolicy.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

scaling_policy_property = gamelift.CfnContainerFleet.ScalingPolicyProperty(
    metric_name="metricName",
    name="name",

    # the properties below are optional
    comparison_operator="comparisonOperator",
    evaluation_periods=123,
    policy_type="policyType",
    scaling_adjustment=123,
    scaling_adjustment_type="scalingAdjustmentType",
    target_configuration=gamelift.CfnContainerFleet.TargetConfigurationProperty(
        target_value=123
    ),
    threshold=123
)

Attributes

comparison_operator

Comparison operator to use when measuring a metric against the threshold value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-scalingpolicy.html#cfn-gamelift-containerfleet-scalingpolicy-comparisonoperator

evaluation_periods

Length of time (in minutes) the metric must be at or beyond the threshold before a scaling event is triggered.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-scalingpolicy.html#cfn-gamelift-containerfleet-scalingpolicy-evaluationperiods

metric_name

Name of the Amazon GameLift-defined metric that is used to trigger a scaling adjustment.

For detailed descriptions of fleet metrics, see Monitor Amazon GameLift with Amazon CloudWatch .

  • ActivatingGameSessions – Game sessions in the process of being created.

  • ActiveGameSessions – Game sessions that are currently running.

  • ActiveInstances – Fleet instances that are currently running at least one game session.

  • AvailableGameSessions – Additional game sessions that fleet could host simultaneously, given current capacity.

  • AvailablePlayerSessions – Empty player slots in currently active game sessions. This includes game sessions that are not currently accepting players. Reserved player slots are not included.

  • CurrentPlayerSessions – Player slots in active game sessions that are being used by a player or are reserved for a player.

  • IdleInstances – Active instances that are currently hosting zero game sessions.

  • PercentAvailableGameSessions – Unused percentage of the total number of game sessions that a fleet could host simultaneously, given current capacity. Use this metric for a target-based scaling policy.

  • PercentIdleInstances – Percentage of the total number of active instances that are hosting zero game sessions.

  • QueueDepth – Pending game session placement requests, in any queue, where the current fleet is the top-priority destination.

  • WaitTime – Current wait time for pending game session placement requests, in any queue, where the current fleet is the top-priority destination.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-scalingpolicy.html#cfn-gamelift-containerfleet-scalingpolicy-metricname

name

A descriptive label that is associated with a fleet’s scaling policy.

Policy names do not need to be unique.

See:

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

policy_type

The type of scaling policy to create.

For a target-based policy, set the parameter MetricName to ‘PercentAvailableGameSessions’ and specify a TargetConfiguration . For a rule-based policy set the following parameters: MetricName , ComparisonOperator , Threshold , EvaluationPeriods , ScalingAdjustmentType , and ScalingAdjustment .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-scalingpolicy.html#cfn-gamelift-containerfleet-scalingpolicy-policytype

scaling_adjustment

Amount of adjustment to make, based on the scaling adjustment type.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-scalingpolicy.html#cfn-gamelift-containerfleet-scalingpolicy-scalingadjustment

scaling_adjustment_type

The type of adjustment to make to a fleet’s instance count.

  • ChangeInCapacity – add (or subtract) the scaling adjustment value from the current instance count. Positive values scale up while negative values scale down.

  • ExactCapacity – set the instance count to the scaling adjustment value.

  • PercentChangeInCapacity – increase or reduce the current instance count by the scaling adjustment, read as a percentage. Positive values scale up while negative values scale down.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-scalingpolicy.html#cfn-gamelift-containerfleet-scalingpolicy-scalingadjustmenttype

target_configuration

An object that contains settings for a target-based scaling policy.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-scalingpolicy.html#cfn-gamelift-containerfleet-scalingpolicy-targetconfiguration

threshold

Metric value used to trigger a scaling event.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-scalingpolicy.html#cfn-gamelift-containerfleet-scalingpolicy-threshold

TargetConfigurationProperty

class CfnContainerFleet.TargetConfigurationProperty(*, target_value)

Bases: object

Settings for a target-based scaling policy.

A target-based policy tracks a particular fleet metric specifies a target value for the metric. As player usage changes, the policy triggers Amazon GameLift to adjust capacity so that the metric returns to the target value. The target configuration specifies settings as needed for the target based policy, including the target value.

Parameters:

target_value (Union[int, float]) – Desired value to use with a target-based scaling policy. The value must be relevant for whatever metric the scaling policy is using. For example, in a policy using the metric PercentAvailableGameSessions, the target value should be the preferred size of the fleet’s buffer (the percent of capacity that should be idle and ready for new game sessions).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-targetconfiguration.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

target_configuration_property = gamelift.CfnContainerFleet.TargetConfigurationProperty(
    target_value=123
)

Attributes

target_value

Desired value to use with a target-based scaling policy.

The value must be relevant for whatever metric the scaling policy is using. For example, in a policy using the metric PercentAvailableGameSessions, the target value should be the preferred size of the fleet’s buffer (the percent of capacity that should be idle and ready for new game sessions).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-targetconfiguration.html#cfn-gamelift-containerfleet-targetconfiguration-targetvalue