CfnFleet

class aws_cdk.aws_gamelift.CfnFleet(scope, id, *, name, anywhere_configuration=None, apply_capacity=None, build_id=None, certificate_configuration=None, compute_type=None, container_groups_configuration=None, description=None, desired_ec2_instances=None, ec2_inbound_permissions=None, ec2_instance_type=None, fleet_type=None, instance_role_arn=None, instance_role_credentials_provider=None, locations=None, log_paths=None, max_size=None, metric_groups=None, min_size=None, new_game_session_protection_policy=None, peer_vpc_aws_account_id=None, peer_vpc_id=None, resource_creation_limit_policy=None, runtime_configuration=None, scaling_policies=None, script_id=None, server_launch_parameters=None, server_launch_path=None)

Bases: CfnResource

The AWS::GameLift::Fleet resource creates an Amazon GameLift (GameLift) fleet to host custom game server or Realtime Servers.

A fleet is a set of EC2 instances, configured with instructions to run game servers on each instance.

See:

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

CloudformationResource:

AWS::GameLift::Fleet

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_fleet = gamelift.CfnFleet(self, "MyCfnFleet",
    name="name",

    # the properties below are optional
    anywhere_configuration=gamelift.CfnFleet.AnywhereConfigurationProperty(
        cost="cost"
    ),
    apply_capacity="applyCapacity",
    build_id="buildId",
    certificate_configuration=gamelift.CfnFleet.CertificateConfigurationProperty(
        certificate_type="certificateType"
    ),
    compute_type="computeType",
    container_groups_configuration=gamelift.CfnFleet.ContainerGroupsConfigurationProperty(
        connection_port_range=gamelift.CfnFleet.ConnectionPortRangeProperty(
            from_port=123,
            to_port=123
        ),
        container_group_definition_names=["containerGroupDefinitionNames"],

        # the properties below are optional
        container_groups_per_instance=gamelift.CfnFleet.ContainerGroupsPerInstanceProperty(
            desired_replica_container_groups_per_instance=123,
            max_replica_container_groups_per_instance=123
        )
    ),
    description="description",
    desired_ec2_instances=123,
    ec2_inbound_permissions=[gamelift.CfnFleet.IpPermissionProperty(
        from_port=123,
        ip_range="ipRange",
        protocol="protocol",
        to_port=123
    )],
    ec2_instance_type="ec2InstanceType",
    fleet_type="fleetType",
    instance_role_arn="instanceRoleArn",
    instance_role_credentials_provider="instanceRoleCredentialsProvider",
    locations=[gamelift.CfnFleet.LocationConfigurationProperty(
        location="location",

        # the properties below are optional
        location_capacity=gamelift.CfnFleet.LocationCapacityProperty(
            desired_ec2_instances=123,
            max_size=123,
            min_size=123
        )
    )],
    log_paths=["logPaths"],
    max_size=123,
    metric_groups=["metricGroups"],
    min_size=123,
    new_game_session_protection_policy="newGameSessionProtectionPolicy",
    peer_vpc_aws_account_id="peerVpcAwsAccountId",
    peer_vpc_id="peerVpcId",
    resource_creation_limit_policy=gamelift.CfnFleet.ResourceCreationLimitPolicyProperty(
        new_game_sessions_per_creator=123,
        policy_period_in_minutes=123
    ),
    runtime_configuration=gamelift.CfnFleet.RuntimeConfigurationProperty(
        game_session_activation_timeout_seconds=123,
        max_concurrent_game_session_activations=123,
        server_processes=[gamelift.CfnFleet.ServerProcessProperty(
            concurrent_executions=123,
            launch_path="launchPath",

            # the properties below are optional
            parameters="parameters"
        )]
    ),
    scaling_policies=[gamelift.CfnFleet.ScalingPolicyProperty(
        metric_name="metricName",
        name="name",

        # the properties below are optional
        comparison_operator="comparisonOperator",
        evaluation_periods=123,
        location="location",
        policy_type="policyType",
        scaling_adjustment=123,
        scaling_adjustment_type="scalingAdjustmentType",
        status="status",
        target_configuration=gamelift.CfnFleet.TargetConfigurationProperty(
            target_value=123
        ),
        threshold=123,
        update_status="updateStatus"
    )],
    script_id="scriptId",
    server_launch_parameters="serverLaunchParameters",
    server_launch_path="serverLaunchPath"
)
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 label that is associated with a fleet. Fleet names do not need to be unique.

  • anywhere_configuration (Union[IResolvable, AnywhereConfigurationProperty, Dict[str, Any], None]) – Amazon GameLift Anywhere configuration options.

  • apply_capacity (Optional[str]) – 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. Related actions DescribeFleetCapacity | DescribeFleetLocationCapacity | UpdateFleetCapacity

  • build_id (Optional[str]) – A unique identifier for a build to be deployed on the new fleet. If you are deploying the fleet with a custom game build, you must specify this property. The build must have been successfully uploaded to Amazon GameLift and be in a READY status. This fleet setting cannot be changed once the fleet is created.

  • certificate_configuration (Union[IResolvable, CertificateConfigurationProperty, Dict[str, Any], None]) – Prompts Amazon GameLift to generate a TLS/SSL certificate for the fleet. Amazon GameLift uses the certificates to encrypt traffic between game clients and the game servers running on Amazon GameLift. By default, the CertificateConfiguration is DISABLED . You can’t change this property after you create the fleet. AWS Certificate Manager (ACM) certificates expire after 13 months. Certificate expiration can cause fleets to fail, preventing players from connecting to instances in the fleet. We recommend you replace fleets before 13 months, consider using fleet aliases for a smooth transition. .. epigraph:: ACM isn’t available in all AWS regions. A fleet creation request with certificate generation enabled in an unsupported Region, fails with a 4xx error. For more information about the supported Regions, see Supported Regions in the AWS Certificate Manager User Guide .

  • compute_type (Optional[str]) – The type of compute resource used to host your game servers. You can use your own compute resources with Amazon GameLift Anywhere or use Amazon EC2 instances with managed Amazon GameLift. By default, this property is set to EC2 .

  • container_groups_configuration (Union[IResolvable, ContainerGroupsConfigurationProperty, Dict[str, Any], None]) – Specifies container groups that this instance will hold. You must specify exactly one replica group. Optionally, you may specify exactly one daemon group. You can’t change this property after you create the fleet.

  • description (Optional[str]) – A description for the fleet.

  • desired_ec2_instances (Union[int, float, None]) – The number of EC2 instances that you want this fleet to host. When creating a new fleet, GameLift automatically sets this value to “1” and initiates a single instance. Once the fleet is active, update this value to trigger GameLift to add or remove instances from the fleet.

  • ec2_inbound_permissions (Union[IResolvable, Sequence[Union[IResolvable, IpPermissionProperty, Dict[str, Any]]], None]) – The allowed IP address ranges and port settings that allow inbound traffic to access game sessions on this fleet. If the fleet is hosting a custom game build, this property must be set before players can connect to game sessions. For Realtime Servers fleets, Amazon GameLift automatically sets TCP and UDP ranges.

  • ec2_instance_type (Optional[str]) – The Amazon GameLift-supported Amazon EC2 instance type to use for all fleet instances. Instance type determines the computing resources that will be used to host your game servers, including CPU, memory, storage, and networking capacity. See Amazon Elastic Compute Cloud Instance Types for detailed descriptions of Amazon EC2 instance types.

  • fleet_type (Optional[str]) – Indicates whether to use On-Demand or Spot instances for this fleet. By default, this property is set to ON_DEMAND . Learn more about when to use On-Demand versus Spot Instances . This fleet property can’t be changed after the fleet is created.

  • instance_role_arn (Optional[str]) – A unique identifier for an IAM role with access permissions to other AWS services. Any application that runs on an instance in the fleet–including install scripts, server processes, and other processes–can use these permissions to interact with AWS resources that you own or have access to. For more information about using the role with your game server builds, see Communicate with other AWS resources from your fleets .

  • instance_role_credentials_provider (Optional[str]) –

    Indicates that fleet instances maintain a shared credentials file for the IAM role defined in InstanceRoleArn . Shared credentials allow applications that are deployed with the game server executable to communicate with other AWS resources. This property is used only when the game server is integrated with the server SDK version 5.x. For more information about using shared credentials, see Communicate with other AWS resources from your fleets .

  • locations (Union[IResolvable, Sequence[Union[IResolvable, LocationConfigurationProperty, Dict[str, Any]]], None]) – A set of remote locations to deploy additional instances to and manage as part of the fleet. This parameter can only be used when creating fleets in AWS Regions that support multiple locations. You can add any Amazon GameLift-supported AWS Region as a remote location, in the form of an AWS Region code such as us-west-2 . To create a fleet with instances in the home Region only, don’t use this parameter. To use this parameter, Amazon GameLift requires you to use your home location in the request.

  • log_paths (Optional[Sequence[str]]) – (deprecated) This parameter is no longer used. When hosting a custom game build, specify where Amazon GameLift should store log files using the Amazon GameLift server API call ProcessReady()

  • max_size (Union[int, float, None]) – The maximum number of instances that are allowed in the specified fleet location. If this parameter is not set, the default is 1.

  • metric_groups (Optional[Sequence[str]]) – The name of an AWS CloudWatch metric group to add this fleet to. A metric group is used to aggregate the metrics for multiple fleets. You can specify an existing metric group name or set a new name to create a new metric group. A fleet can be included in only one metric group at a time.

  • min_size (Union[int, float, None]) – The minimum number of instances that are allowed in the specified fleet location. If this parameter is not set, the default is 0.

  • new_game_session_protection_policy (Optional[str]) – The status of termination protection for active game sessions on the fleet. By default, this property is set to NoProtection . - NoProtection - Game sessions can be terminated during active gameplay as a result of a scale-down event. - FullProtection - Game sessions in ACTIVE status cannot be terminated during a scale-down event.

  • peer_vpc_aws_account_id (Optional[str]) – Used when peering your Amazon GameLift fleet with a VPC, the unique identifier for the AWS account that owns the VPC. You can find your account ID in the AWS Management Console under account settings.

  • peer_vpc_id (Optional[str]) – A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same Region as your fleet. To look up a VPC ID, use the VPC Dashboard in the AWS Management Console . Learn more about VPC peering in VPC Peering with Amazon GameLift Fleets .

  • resource_creation_limit_policy (Union[IResolvable, ResourceCreationLimitPolicyProperty, Dict[str, Any], None]) – A policy that limits the number of game sessions that an individual player can create on instances in this fleet within a specified span of time.

  • runtime_configuration (Union[IResolvable, RuntimeConfigurationProperty, Dict[str, Any], None]) – Instructions for how to launch and maintain server processes on instances in the fleet. The runtime configuration defines one or more server process configurations, each identifying a build executable or Realtime script file and the number of processes of that type to run concurrently. .. epigraph:: The RuntimeConfiguration parameter is required unless the fleet is being configured using the older parameters ServerLaunchPath and ServerLaunchParameters , which are still supported for backward compatibility.

  • scaling_policies (Union[IResolvable, Sequence[Union[IResolvable, ScalingPolicyProperty, Dict[str, Any]]], None]) – Rule that controls how a fleet is scaled. Scaling policies are uniquely identified by the combination of name and fleet ID.

  • script_id (Optional[str]) – The unique identifier for a Realtime configuration script to be deployed on fleet instances. You can use either the script ID or ARN. Scripts must be uploaded to Amazon GameLift prior to creating the fleet. This fleet property cannot be changed later. .. epigraph:: You can’t use the !Ref command to reference a script created with a CloudFormation template for the fleet property ScriptId . Instead, use Fn::GetAtt Script.Arn or Fn::GetAtt Script.Id to retrieve either of these properties as input for ScriptId . Alternatively, enter a ScriptId string manually.

  • server_launch_parameters (Optional[str]) – (deprecated) This parameter is no longer used but is retained for backward compatibility. Instead, specify server launch parameters in the RuntimeConfiguration parameter. A request must specify either a runtime configuration or values for both ServerLaunchParameters and ServerLaunchPath.

  • server_launch_path (Optional[str]) – (deprecated) This parameter is no longer used. Instead, specify a server launch path using the RuntimeConfiguration parameter. Requests that specify a server launch path and launch parameters instead of a runtime configuration will continue to work.

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::Fleet'
anywhere_configuration

Amazon GameLift Anywhere configuration options.

apply_capacity

Current resource capacity settings in a specified fleet or location.

attr_container_groups_configuration_container_groups_per_instance_max_replica_container_groups_per_instance

GameLift calculates the maximum number of replica container groups it can launch per instance based on instance properties such as CPU, memory, and connection ports.

CloudformationAttribute:

ContainerGroupsConfiguration.ContainerGroupsPerInstance.MaxReplicaContainerGroupsPerInstance

attr_fleet_id

A unique identifier for the fleet.

CloudformationAttribute:

FleetId

build_id

A unique identifier for a build to be deployed on the new fleet.

certificate_configuration

Prompts Amazon GameLift to generate a TLS/SSL certificate for the fleet.

cfn_options

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

cfn_resource_type

AWS resource type.

compute_type

The type of compute resource used to host your game servers.

container_groups_configuration

Specifies container groups that this instance will hold.

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.

description

A description for the fleet.

desired_ec2_instances

The number of EC2 instances that you want this fleet to host.

ec2_inbound_permissions

The allowed IP address ranges and port settings that allow inbound traffic to access game sessions on this fleet.

ec2_instance_type

The Amazon GameLift-supported Amazon EC2 instance type to use for all fleet instances.

fleet_type

Indicates whether to use On-Demand or Spot instances for this fleet.

instance_role_arn

A unique identifier for an IAM role with access permissions to other AWS services.

instance_role_credentials_provider

Indicates that fleet instances maintain a shared credentials file for the IAM role defined in InstanceRoleArn .

locations

A set of remote locations to deploy additional instances to and manage as part of the fleet.

log_paths

(deprecated) This parameter is no longer used.

Deprecated:

this property has been deprecated

Stability:

deprecated

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.

max_size

The maximum number of instances that are allowed in the specified fleet location.

metric_groups

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

min_size

The minimum number of instances that are allowed in the specified fleet location.

name

A descriptive label that is associated with a fleet.

new_game_session_protection_policy

The status of termination protection for active game sessions on the fleet.

node

The tree node.

peer_vpc_aws_account_id

Used when peering your Amazon GameLift fleet with a VPC, the unique identifier for the AWS account that owns the VPC.

peer_vpc_id

A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet.

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

resource_creation_limit_policy

A policy that limits the number of game sessions that an individual player can create on instances in this fleet within a specified span of time.

runtime_configuration

Instructions for how to launch and maintain server processes on instances in the fleet.

scaling_policies

Rule that controls how a fleet is scaled.

script_id

The unique identifier for a Realtime configuration script to be deployed on fleet instances.

server_launch_parameters

(deprecated) This parameter is no longer used but is retained for backward compatibility.

Deprecated:

this property has been deprecated

Stability:

deprecated

server_launch_path

(deprecated) This parameter is no longer used.

Deprecated:

this property has been deprecated

Stability:

deprecated

stack

The stack in which this element is defined.

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

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.

AnywhereConfigurationProperty

class CfnFleet.AnywhereConfigurationProperty(*, cost)

Bases: object

Amazon GameLift Anywhere configuration options for your Anywhere fleets.

Parameters:

cost (str) – The cost to run your fleet per hour. Amazon GameLift uses the provided cost of your fleet to balance usage in queues. For more information about queues, see Setting up queues in the Amazon GameLift Developer Guide .

See:

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

anywhere_configuration_property = gamelift.CfnFleet.AnywhereConfigurationProperty(
    cost="cost"
)

Attributes

cost

The cost to run your fleet per hour.

Amazon GameLift uses the provided cost of your fleet to balance usage in queues. For more information about queues, see Setting up queues in the Amazon GameLift Developer Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-anywhereconfiguration.html#cfn-gamelift-fleet-anywhereconfiguration-cost

CertificateConfigurationProperty

class CfnFleet.CertificateConfigurationProperty(*, certificate_type)

Bases: object

Determines whether a TLS/SSL certificate is generated for a fleet.

This feature must be enabled when creating the fleet. All instances in a fleet share the same certificate. The certificate can be retrieved by calling the GameLift Server SDK operation GetInstanceCertificate .

Parameters:

certificate_type (str) – Indicates whether a TLS/SSL certificate is generated for a fleet. Valid values include: - GENERATED - Generate a TLS/SSL certificate for this fleet. - DISABLED - (default) Do not generate a TLS/SSL certificate for this fleet.

See:

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

certificate_configuration_property = gamelift.CfnFleet.CertificateConfigurationProperty(
    certificate_type="certificateType"
)

Attributes

certificate_type

Indicates whether a TLS/SSL certificate is generated for a fleet.

Valid values include:

  • GENERATED - Generate a TLS/SSL certificate for this fleet.

  • DISABLED - (default) Do not generate a TLS/SSL certificate for this fleet.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-certificateconfiguration.html#cfn-gamelift-fleet-certificateconfiguration-certificatetype

ConnectionPortRangeProperty

class CfnFleet.ConnectionPortRangeProperty(*, from_port, to_port)

Bases: object

Defines the range of ports on the instance that allow inbound traffic to connect with containers in a fleet.

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

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-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.CfnFleet.ConnectionPortRangeProperty(
    from_port=123,
    to_port=123
)

Attributes

from_port

A starting value for a range of allowed port numbers.

See:

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

to_port

An ending value for a range of allowed port numbers.

Port numbers are end-inclusive. This value must be higher than FromPort.

See:

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

ContainerGroupsConfigurationProperty

class CfnFleet.ContainerGroupsConfigurationProperty(*, connection_port_range, container_group_definition_names, container_groups_per_instance=None)

Bases: object

Specifies container groups that this instance will hold.

You must specify exactly one replica group. Optionally, you may specify exactly one daemon group. You can’t change this property after you create the fleet.

Parameters:
  • connection_port_range (Union[IResolvable, ConnectionPortRangeProperty, Dict[str, Any]]) – Defines the range of ports on the instance that allow inbound traffic to connect with containers in a fleet.

  • container_group_definition_names (Sequence[str]) – The names of the container group definitions that will be created in an instance. You must specify exactly one REPLICA container group. You have the option to also specify one DAEMON container group.

  • container_groups_per_instance (Union[IResolvable, ContainerGroupsPerInstanceProperty, Dict[str, Any], None]) – The number of container groups per instance.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-containergroupsconfiguration.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_groups_configuration_property = gamelift.CfnFleet.ContainerGroupsConfigurationProperty(
    connection_port_range=gamelift.CfnFleet.ConnectionPortRangeProperty(
        from_port=123,
        to_port=123
    ),
    container_group_definition_names=["containerGroupDefinitionNames"],

    # the properties below are optional
    container_groups_per_instance=gamelift.CfnFleet.ContainerGroupsPerInstanceProperty(
        desired_replica_container_groups_per_instance=123,
        max_replica_container_groups_per_instance=123
    )
)

Attributes

connection_port_range

Defines the range of ports on the instance that allow inbound traffic to connect with containers in a fleet.

See:

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

container_group_definition_names

The names of the container group definitions that will be created in an instance.

You must specify exactly one REPLICA container group. You have the option to also specify one DAEMON container group.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-containergroupsconfiguration.html#cfn-gamelift-fleet-containergroupsconfiguration-containergroupdefinitionnames

container_groups_per_instance

The number of container groups per instance.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-containergroupsconfiguration.html#cfn-gamelift-fleet-containergroupsconfiguration-containergroupsperinstance

ContainerGroupsPerInstanceProperty

class CfnFleet.ContainerGroupsPerInstanceProperty(*, desired_replica_container_groups_per_instance=None, max_replica_container_groups_per_instance=None)

Bases: object

The number of container groups per instance.

Parameters:
  • desired_replica_container_groups_per_instance (Union[int, float, None]) – Use this parameter to override the number of replica container groups GameLift will launch per instance with a number that is lower than that calculated maximum.

  • max_replica_container_groups_per_instance (Union[int, float, None]) – GameLift calculates the maximum number of replica container groups it can launch per instance based on instance properties such as CPU, memory, and connection ports.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-containergroupsperinstance.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_groups_per_instance_property = gamelift.CfnFleet.ContainerGroupsPerInstanceProperty(
    desired_replica_container_groups_per_instance=123,
    max_replica_container_groups_per_instance=123
)

Attributes

desired_replica_container_groups_per_instance

Use this parameter to override the number of replica container groups GameLift will launch per instance with a number that is lower than that calculated maximum.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-containergroupsperinstance.html#cfn-gamelift-fleet-containergroupsperinstance-desiredreplicacontainergroupsperinstance

max_replica_container_groups_per_instance

GameLift calculates the maximum number of replica container groups it can launch per instance based on instance properties such as CPU, memory, and connection ports.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-containergroupsperinstance.html#cfn-gamelift-fleet-containergroupsperinstance-maxreplicacontainergroupsperinstance

IpPermissionProperty

class CfnFleet.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 server processes on an instance in a fleet.

New game sessions are assigned an IP address/port number combination, which must fall into the fleet’s allowed ranges. Fleets with custom game builds must have permissions explicitly set. For Realtime Servers fleets, 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-fleet-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.CfnFleet.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-fleet-ippermission.html#cfn-gamelift-fleet-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-fleet-ippermission.html#cfn-gamelift-fleet-ippermission-iprange

protocol

The network communication protocol used by the fleet.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-ippermission.html#cfn-gamelift-fleet-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-fleet-ippermission.html#cfn-gamelift-fleet-ippermission-toport

LocationCapacityProperty

class CfnFleet.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.

Related actions

DescribeFleetCapacity | DescribeFleetLocationCapacity | UpdateFleetCapacity

Parameters:
  • desired_ec2_instances (Union[int, float]) – The number of Amazon EC2 instances you want to maintain in the specified fleet location. This value must fall between the minimum and maximum size limits. Changes in desired instance value can take up to 1 minute to be reflected when viewing the fleet’s capacity settings.

  • max_size (Union[int, float]) – The maximum number of instances that are allowed in the specified fleet location. If this parameter is not set, the default is 1.

  • min_size (Union[int, float]) – The minimum number of instances that are allowed in the specified fleet location. If this parameter is not set, the default is 0.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-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.CfnFleet.LocationCapacityProperty(
    desired_ec2_instances=123,
    max_size=123,
    min_size=123
)

Attributes

desired_ec2_instances

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

This value must fall between the minimum and maximum size limits. Changes in desired instance value can take up to 1 minute to be reflected when viewing the fleet’s capacity settings.

See:

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

max_size

The maximum number of instances that are allowed in the specified fleet location.

If this parameter is not set, the default is 1.

See:

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

min_size

The minimum number of instances that are allowed in the specified fleet location.

If this parameter is not set, the default is 0.

See:

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

LocationConfigurationProperty

class CfnFleet.LocationConfigurationProperty(*, location, location_capacity=None)

Bases: object

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

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-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.CfnFleet.LocationConfigurationProperty(
    location="location",

    # the properties below are optional
    location_capacity=gamelift.CfnFleet.LocationCapacityProperty(
        desired_ec2_instances=123,
        max_size=123,
        min_size=123
    )
)

Attributes

location

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

See:

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

Related actions

DescribeFleetCapacity | DescribeFleetLocationCapacity | UpdateFleetCapacity

See:

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

ResourceCreationLimitPolicyProperty

class CfnFleet.ResourceCreationLimitPolicyProperty(*, new_game_sessions_per_creator=None, policy_period_in_minutes=None)

Bases: object

A policy that limits the number of game sessions a player can create on the same fleet.

This optional policy gives game owners control over how players can consume available game server resources. A resource creation policy makes the following statement: “An individual player can create a maximum number of new game sessions within a specified time period”.

The policy is evaluated when a player tries to create a new game session. For example, assume you have a policy of 10 new game sessions and a time period of 60 minutes. On receiving a CreateGameSession request, Amazon GameLift checks that the player (identified by CreatorId ) has created fewer than 10 game sessions in the past 60 minutes.

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

  • 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-fleet-resourcecreationlimitpolicy.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

resource_creation_limit_policy_property = gamelift.CfnFleet.ResourceCreationLimitPolicyProperty(
    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 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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-resourcecreationlimitpolicy.html#cfn-gamelift-fleet-resourcecreationlimitpolicy-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-fleet-resourcecreationlimitpolicy.html#cfn-gamelift-fleet-resourcecreationlimitpolicy-policyperiodinminutes

RuntimeConfigurationProperty

class CfnFleet.RuntimeConfigurationProperty(*, game_session_activation_timeout_seconds=None, max_concurrent_game_session_activations=None, server_processes=None)

Bases: object

A collection of server process configurations that describe the set of processes to run on each instance in a fleet.

Server processes run either an executable in a custom game build or a Realtime Servers script. GameLift launches the configured processes, manages their life cycle, and replaces them as needed. Each instance checks regularly for an updated runtime configuration.

A GameLift instance is limited to 50 processes running concurrently. To calculate the total number of processes in a runtime configuration, add the values of the ConcurrentExecutions parameter for each ServerProcess. Learn more about Running Multiple Processes on a Fleet .

Parameters:
  • game_session_activation_timeout_seconds (Union[int, float, None]) – The maximum amount of time (in seconds) allowed to launch a new game session and have it report ready to host players. During this time, the game session is in status ACTIVATING . If the game session does not become active before the timeout, it is ended and the game session status is changed to TERMINATED .

  • max_concurrent_game_session_activations (Union[int, float, None]) – The number of game sessions in status ACTIVATING to allow on an instance. This setting limits the instance resources that can be used for new game activations at any one time.

  • server_processes (Union[IResolvable, Sequence[Union[IResolvable, ServerProcessProperty, Dict[str, Any]]], None]) – A collection of server process configurations that identify what server processes to run on each instance in a fleet.

See:

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

runtime_configuration_property = gamelift.CfnFleet.RuntimeConfigurationProperty(
    game_session_activation_timeout_seconds=123,
    max_concurrent_game_session_activations=123,
    server_processes=[gamelift.CfnFleet.ServerProcessProperty(
        concurrent_executions=123,
        launch_path="launchPath",

        # the properties below are optional
        parameters="parameters"
    )]
)

Attributes

game_session_activation_timeout_seconds

The maximum amount of time (in seconds) allowed to launch a new game session and have it report ready to host players.

During this time, the game session is in status ACTIVATING . If the game session does not become active before the timeout, it is ended and the game session status is changed to TERMINATED .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-runtimeconfiguration.html#cfn-gamelift-fleet-runtimeconfiguration-gamesessionactivationtimeoutseconds

max_concurrent_game_session_activations

The number of game sessions in status ACTIVATING to allow on an instance.

This setting limits the instance resources that can be used for new game activations at any one time.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-runtimeconfiguration.html#cfn-gamelift-fleet-runtimeconfiguration-maxconcurrentgamesessionactivations

server_processes

A collection of server process configurations that identify what server processes to run on each instance in a fleet.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-runtimeconfiguration.html#cfn-gamelift-fleet-runtimeconfiguration-serverprocesses

ScalingPolicyProperty

class CfnFleet.ScalingPolicyProperty(*, metric_name, name, comparison_operator=None, evaluation_periods=None, location=None, policy_type=None, scaling_adjustment=None, scaling_adjustment_type=None, status=None, target_configuration=None, threshold=None, update_status=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.

  • location (Optional[str]) – The fleet location.

  • 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.

  • status (Optional[str]) – Current status of the scaling policy. The scaling policy can be in force only when in an ACTIVE status. Scaling policies can be suspended for individual fleets. If the policy is suspended for a fleet, the policy status does not change. - ACTIVE – The scaling policy can be used for auto-scaling a fleet. - UPDATE_REQUESTED – A request to update the scaling policy has been received. - UPDATING – A change is being made to the scaling policy. - DELETE_REQUESTED – A request to delete the scaling policy has been received. - DELETING – The scaling policy is being deleted. - DELETED – The scaling policy has been deleted. - ERROR – An error occurred in creating the policy. It should be removed and recreated.

  • 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.

  • update_status (Optional[str]) – The current status of the fleet’s scaling policies in a requested fleet location. The status PENDING_UPDATE indicates that an update was requested for the fleet but has not yet been completed for the location.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-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.CfnFleet.ScalingPolicyProperty(
    metric_name="metricName",
    name="name",

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

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-fleet-scalingpolicy.html#cfn-gamelift-fleet-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-fleet-scalingpolicy.html#cfn-gamelift-fleet-scalingpolicy-evaluationperiods

location

The fleet location.

See:

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

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-fleet-scalingpolicy.html#cfn-gamelift-fleet-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-fleet-scalingpolicy.html#cfn-gamelift-fleet-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-fleet-scalingpolicy.html#cfn-gamelift-fleet-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-fleet-scalingpolicy.html#cfn-gamelift-fleet-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-fleet-scalingpolicy.html#cfn-gamelift-fleet-scalingpolicy-scalingadjustmenttype

status

Current status of the scaling policy.

The scaling policy can be in force only when in an ACTIVE status. Scaling policies can be suspended for individual fleets. If the policy is suspended for a fleet, the policy status does not change.

  • ACTIVE – The scaling policy can be used for auto-scaling a fleet.

  • UPDATE_REQUESTED – A request to update the scaling policy has been received.

  • UPDATING – A change is being made to the scaling policy.

  • DELETE_REQUESTED – A request to delete the scaling policy has been received.

  • DELETING – The scaling policy is being deleted.

  • DELETED – The scaling policy has been deleted.

  • ERROR – An error occurred in creating the policy. It should be removed and recreated.

See:

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

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-fleet-scalingpolicy.html#cfn-gamelift-fleet-scalingpolicy-targetconfiguration

threshold

Metric value used to trigger a scaling event.

See:

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

update_status

The current status of the fleet’s scaling policies in a requested fleet location.

The status PENDING_UPDATE indicates that an update was requested for the fleet but has not yet been completed for the location.

See:

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

ServerProcessProperty

class CfnFleet.ServerProcessProperty(*, concurrent_executions, launch_path, parameters=None)

Bases: object

A set of instructions for launching server processes on each instance in a fleet.

Server processes run either an executable in a custom game build or a Realtime Servers script.

Parameters:
  • concurrent_executions (Union[int, float]) – The number of server processes using this configuration that run concurrently on each instance.

  • launch_path (str) – The location of a game build executable or Realtime script. Game builds and Realtime scripts are installed on instances at the root: - Windows (custom game builds only): C:\game . Example: “ C:\game\MyGame\server.exe “ - Linux: /local/game . Examples: “ /local/game/MyGame/server.exe “ or “ /local/game/MyRealtimeScript.js “ .. epigraph:: Amazon GameLift doesn’t support the use of setup scripts that launch the game executable. For custom game builds, this parameter must indicate the executable that calls the server SDK operations initSDK() and ProcessReady() .

  • parameters (Optional[str]) – An optional list of parameters to pass to the server executable or Realtime script on launch. Length Constraints: Minimum length of 1. Maximum length of 1024. Pattern: [A-Za-z0-9_:.+/- =@{},?’[]”]+

See:

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

server_process_property = gamelift.CfnFleet.ServerProcessProperty(
    concurrent_executions=123,
    launch_path="launchPath",

    # the properties below are optional
    parameters="parameters"
)

Attributes

concurrent_executions

The number of server processes using this configuration that run concurrently on each instance.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-serverprocess.html#cfn-gamelift-fleet-serverprocess-concurrentexecutions

launch_path

The location of a game build executable or Realtime script.

Game builds and Realtime scripts are installed on instances at the root:

  • Windows (custom game builds only): C:\game . Example: “ C:\game\MyGame\server.exe

  • Linux: /local/game . Examples: “ /local/game/MyGame/server.exe “ or “ /local/game/MyRealtimeScript.js

Amazon GameLift doesn’t support the use of setup scripts that launch the game executable. For custom game builds, this parameter must indicate the executable that calls the server SDK operations initSDK() and ProcessReady() .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-serverprocess.html#cfn-gamelift-fleet-serverprocess-launchpath

parameters

An optional list of parameters to pass to the server executable or Realtime script on launch.

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: [A-Za-z0-9_:.+/- =@{},?’[]”]+

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-serverprocess.html#cfn-gamelift-fleet-serverprocess-parameters

TargetConfigurationProperty

class CfnFleet.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-fleet-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.CfnFleet.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-fleet-targetconfiguration.html#cfn-gamelift-fleet-targetconfiguration-targetvalue