CfnContainerFleetPropsMixin

class aws_cdk.mixins_preview.aws_gamelift.mixins.CfnContainerFleetPropsMixin(props, *, strategy=None)

Bases: Mixin

Describes an Amazon GameLift Servers managed container fleet.

See:

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

CloudformationResource:

AWS::GameLift::ContainerFleet

Mixin:

true

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.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_gamelift import mixins as gamelift_mixins

cfn_container_fleet_props_mixin = gamelift_mixins.CfnContainerFleetPropsMixin(gamelift_mixins.CfnContainerFleetMixinProps(
    billing_type="billingType",
    deployment_configuration=gamelift_mixins.CfnContainerFleetPropsMixin.DeploymentConfigurationProperty(
        impairment_strategy="impairmentStrategy",
        minimum_healthy_percentage=123,
        protection_strategy="protectionStrategy"
    ),
    description="description",
    fleet_role_arn="fleetRoleArn",
    game_server_container_group_definition_name="gameServerContainerGroupDefinitionName",
    game_server_container_groups_per_instance=123,
    game_session_creation_limit_policy=gamelift_mixins.CfnContainerFleetPropsMixin.GameSessionCreationLimitPolicyProperty(
        new_game_sessions_per_creator=123,
        policy_period_in_minutes=123
    ),
    instance_connection_port_range=gamelift_mixins.CfnContainerFleetPropsMixin.ConnectionPortRangeProperty(
        from_port=123,
        to_port=123
    ),
    instance_inbound_permissions=[gamelift_mixins.CfnContainerFleetPropsMixin.IpPermissionProperty(
        from_port=123,
        ip_range="ipRange",
        protocol="protocol",
        to_port=123
    )],
    instance_type="instanceType",
    locations=[gamelift_mixins.CfnContainerFleetPropsMixin.LocationConfigurationProperty(
        location="location",
        location_capacity=gamelift_mixins.CfnContainerFleetPropsMixin.LocationCapacityProperty(
            desired_ec2_instances=123,
            max_size=123,
            min_size=123
        ),
        stopped_actions=["stoppedActions"]
    )],
    log_configuration=gamelift_mixins.CfnContainerFleetPropsMixin.LogConfigurationProperty(
        log_destination="logDestination",
        log_group_arn="logGroupArn",
        s3_bucket_name="s3BucketName"
    ),
    metric_groups=["metricGroups"],
    new_game_session_protection_policy="newGameSessionProtectionPolicy",
    per_instance_container_group_definition_name="perInstanceContainerGroupDefinitionName",
    scaling_policies=[gamelift_mixins.CfnContainerFleetPropsMixin.ScalingPolicyProperty(
        comparison_operator="comparisonOperator",
        evaluation_periods=123,
        metric_name="metricName",
        name="name",
        policy_type="policyType",
        scaling_adjustment=123,
        scaling_adjustment_type="scalingAdjustmentType",
        target_configuration=gamelift_mixins.CfnContainerFleetPropsMixin.TargetConfigurationProperty(
            target_value=123
        ),
        threshold=123
    )],
    tags=[CfnTag(
        key="key",
        value="value"
    )]
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::GameLift::ContainerFleet.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['billingType', 'deploymentConfiguration', 'description', 'fleetRoleArn', 'gameServerContainerGroupDefinitionName', 'gameServerContainerGroupsPerInstance', 'gameSessionCreationLimitPolicy', 'instanceConnectionPortRange', 'instanceInboundPermissions', 'instanceType', 'locations', 'logConfiguration', 'metricGroups', 'newGameSessionProtectionPolicy', 'perInstanceContainerGroupDefinitionName', 'scalingPolicies', 'tags']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

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

Stability:

experimental

ConnectionPortRangeProperty

class CfnContainerFleetPropsMixin.ConnectionPortRangeProperty(*, from_port=None, to_port=None)

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, None]) – Starting value for the port range.

  • to_port (Union[int, float, None]) – 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.mixins_preview.aws_gamelift import mixins as gamelift_mixins

connection_port_range_property = gamelift_mixins.CfnContainerFleetPropsMixin.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 CfnContainerFleetPropsMixin.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.mixins_preview.aws_gamelift import mixins as gamelift_mixins

deployment_configuration_property = gamelift_mixins.CfnContainerFleetPropsMixin.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 CfnContainerFleetPropsMixin.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.mixins_preview.aws_gamelift import mixins as gamelift_mixins

deployment_details_property = gamelift_mixins.CfnContainerFleetPropsMixin.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 CfnContainerFleetPropsMixin.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 Servers 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 Servers 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.mixins_preview.aws_gamelift import mixins as gamelift_mixins

game_session_creation_limit_policy_property = gamelift_mixins.CfnContainerFleetPropsMixin.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 Servers 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 CfnContainerFleetPropsMixin.IpPermissionProperty(*, from_port=None, ip_range=None, protocol=None, to_port=None)

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 Amazon GameLift Servers Realtime fleets, Amazon GameLift Servers automatically opens two port ranges, one for TCP messaging and one for UDP.

Parameters:
  • from_port (Union[int, float, None]) – 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 (Optional[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 (Optional[str]) – The network communication protocol used by the fleet.

  • to_port (Union[int, float, None]) – 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.mixins_preview.aws_gamelift import mixins as gamelift_mixins

ip_permission_property = gamelift_mixins.CfnContainerFleetPropsMixin.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 CfnContainerFleetPropsMixin.LocationCapacityProperty(*, desired_ec2_instances=None, max_size=None, min_size=None)

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, None]) – Defaults to MinSize if not defined. 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. If any auto-scaling policy is defined for the container fleet, the desired instance will only be applied once during fleet creation and will be ignored in updates to avoid conflicts with auto-scaling. During updates with any auto-scaling policy defined, if current desired instance is lower than the new MinSize, it will be increased to the new MinSize; if current desired instance is larger than the new MaxSize, it will be decreased to the new MaxSize.

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

  • min_size (Union[int, float, None]) – 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.mixins_preview.aws_gamelift import mixins as gamelift_mixins

location_capacity_property = gamelift_mixins.CfnContainerFleetPropsMixin.LocationCapacityProperty(
    desired_ec2_instances=123,
    max_size=123,
    min_size=123
)

Attributes

desired_ec2_instances

Defaults to MinSize if not defined.

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. If any auto-scaling policy is defined for the container fleet, the desired instance will only be applied once during fleet creation and will be ignored in updates to avoid conflicts with auto-scaling. During updates with any auto-scaling policy defined, if current desired instance is lower than the new MinSize, it will be increased to the new MinSize; if current desired instance is larger than the new MaxSize, it will be decreased to the new MaxSize.

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 CfnContainerFleetPropsMixin.LocationConfigurationProperty(*, location=None, 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 (Optional[str]) – An AWS Region code, such as us-west-2 . For a list of supported Regions and Local Zones, see Amazon GameLift Servers 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.mixins_preview.aws_gamelift import mixins as gamelift_mixins

location_configuration_property = gamelift_mixins.CfnContainerFleetPropsMixin.LocationConfigurationProperty(
    location="location",
    location_capacity=gamelift_mixins.CfnContainerFleetPropsMixin.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 Servers 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 CfnContainerFleetPropsMixin.LogConfigurationProperty(*, log_destination=None, log_group_arn=None, s3_bucket_name=None)

Bases: object

A method for collecting container logs for the fleet.

Amazon GameLift Servers 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. This bucket must reside in the fleet’s home AWS Region. - NONE – Don’t collect container logs.

  • log_group_arn (Optional[str]) – If log destination is CLOUDWATCH , logs are sent to the specified log group in Amazon CloudWatch.

  • 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.mixins_preview.aws_gamelift import mixins as gamelift_mixins

log_configuration_property = gamelift_mixins.CfnContainerFleetPropsMixin.LogConfigurationProperty(
    log_destination="logDestination",
    log_group_arn="logGroupArn",
    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. This bucket must reside in the fleet’s home AWS Region.

  • 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

log_group_arn

If log destination is CLOUDWATCH , logs are sent to the specified log group in Amazon CloudWatch.

See:

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

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 CfnContainerFleetPropsMixin.ScalingPolicyProperty(*, comparison_operator=None, evaluation_periods=None, metric_name=None, name=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:
  • 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.

  • metric_name (Optional[str]) – Name of the Amazon GameLift Servers-defined metric that is used to trigger a scaling adjustment. For detailed descriptions of fleet metrics, see Monitor Amazon GameLift Servers 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 (Optional[str]) – A descriptive label that is associated with a fleet’s scaling policy. Policy names do not need to be unique.

  • 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.mixins_preview.aws_gamelift import mixins as gamelift_mixins

scaling_policy_property = gamelift_mixins.CfnContainerFleetPropsMixin.ScalingPolicyProperty(
    comparison_operator="comparisonOperator",
    evaluation_periods=123,
    metric_name="metricName",
    name="name",
    policy_type="policyType",
    scaling_adjustment=123,
    scaling_adjustment_type="scalingAdjustmentType",
    target_configuration=gamelift_mixins.CfnContainerFleetPropsMixin.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 Servers-defined metric that is used to trigger a scaling adjustment.

For detailed descriptions of fleet metrics, see Monitor Amazon GameLift Servers 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 CfnContainerFleetPropsMixin.TargetConfigurationProperty(*, target_value=None)

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 Servers 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, None]) – 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.mixins_preview.aws_gamelift import mixins as gamelift_mixins

target_configuration_property = gamelift_mixins.CfnContainerFleetPropsMixin.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