InstanceDefinition

class aws_cdk.aws_gamelift_alpha.InstanceDefinition(*, instance_type, weight=None)

Bases: object

(experimental) An allowed instance type for a game server group.

All game server groups must have at least two instance types defined for it. GameLift FleetIQ periodically evaluates each defined instance type for viability. It then updates the Auto Scaling group with the list of viable instance types.

Parameters:
  • instance_type (InstanceType) – (experimental) An Amazon EC2 instance type designation.

  • weight (Union[int, float, None]) – (experimental) Instance weighting that indicates how much this instance type contributes to the total capacity of a game server group. Instance weights are used by GameLift FleetIQ to calculate the instance type’s cost per unit hour and better identify the most cost-effective options. Default: default value is 1

Stability:

experimental

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_gamelift_alpha as gamelift_alpha
from aws_cdk import aws_ec2 as ec2

# instance_type: ec2.InstanceType

instance_definition = gamelift_alpha.InstanceDefinition(
    instance_type=instance_type,

    # the properties below are optional
    weight=123
)

Attributes

instance_type

(experimental) An Amazon EC2 instance type designation.

Stability:

experimental

weight

(experimental) Instance weighting that indicates how much this instance type contributes to the total capacity of a game server group.

Instance weights are used by GameLift FleetIQ to calculate the instance type’s cost per unit hour and better identify the most cost-effective options.

Default:

default value is 1

See:

https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-weighting.html

Stability:

experimental