CfnFleet

class aws_cdk.aws_gamelift.CfnFleet(scope, id, *, build_id=None, certificate_configuration=None, description=None, desired_ec2_instances=None, ec2_inbound_permissions=None, ec2_instance_type=None, fleet_type=None, instance_role_arn=None, locations=None, max_size=None, metric_groups=None, min_size=None, name=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, script_id=None)

Bases: aws_cdk.core.CfnResource

A CloudFormation AWS::GameLift::Fleet.

The AWS::GameLift::Fleet resource creates an Amazon GameLift (GameLift) fleet to host game servers. A fleet is a set of EC2 instances, each of which can host multiple game sessions.

CloudformationResource

AWS::GameLift::Fleet

Link

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

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 as gamelift

cfn_fleet = gamelift.CfnFleet(self, "MyCfnFleet",
    build_id="buildId",
    certificate_configuration=gamelift.CfnFleet.CertificateConfigurationProperty(
        certificate_type="certificateType"
    ),
    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",
    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
        )
    )],
    max_size=123,
    metric_groups=["metricGroups"],
    min_size=123,
    name="name",
    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"
        )]
    ),
    script_id="scriptId"
)

Create a new AWS::GameLift::Fleet.

Parameters
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • 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, None]) – Indicates whether to generate a TLS/SSL certificate for the new fleet. TLS certificates are used for encrypting traffic between game clients and game servers running on GameLift. If this parameter is not set, certificate generation is disabled. This fleet setting cannot be changed once the fleet is created. Learn more at Securing Client/Server Communication . Note: This feature requires the AWS Certificate Manager service, which is available in the AWS global partition but not in all other partitions. When working in a partition that does not support this feature, a request for a new fleet with certificate generation results fails with a 4xx unsupported region error.

  • description (Optional[str]) – A human-readable description of 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]], None]) – A range of IP addresses and port settings that allow inbound traffic to connect to server processes on an Amazon GameLift server.

  • ec2_instance_type (Optional[str]) – The 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 property cannot be changed after the fleet is created.

  • instance_role_arn (Optional[str]) – A unique identifier for an IAM role that manages access to your AWS services. With an instance role ARN set, any application that runs on an instance in this fleet can assume the role, including install scripts, server processes, and daemons (background processes). Create a role or look up a role’s ARN by using the IAM dashboard in the AWS Management Console . Learn more about using on-box credentials for your game servers at Access external resources from a game server . This property cannot be changed after the fleet is created.

  • locations (Union[IResolvable, Sequence[Union[IResolvable, LocationConfigurationProperty]], 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 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, omit this parameter.

  • max_size (Union[int, float, None]) – The maximum value that is allowed for the fleet’s instance count. When creating a new fleet, GameLift automatically sets this value to “1”. Once the fleet is active, you can change this value.

  • metric_groups (Optional[Sequence[str]]) – The name of an Amazon CloudWatch metric group. A metric group aggregates the metrics for all fleets in the group. Specify a string containing the metric group name. You can use an existing name or use a new name to create a new metric group. Currently, this parameter can have only one string.

  • min_size (Union[int, float, None]) – The minimum value allowed for the fleet’s instance count. When creating a new fleet, GameLift automatically sets this value to “0”. After the fleet is active, you can change this value.

  • name (Optional[str]) – A descriptive label that is associated with a fleet. Fleet names do not need to be unique.

  • new_game_session_protection_policy (Optional[str]) – A game session protection policy to apply to all game sessions hosted on instances in this fleet. When protected, active game sessions cannot be terminated during a scale-down event. If this parameter is not set, instances in this fleet default to no protection. You can change a fleet’s protection policy to affect future game sessions on the fleet. You can also set protection for individual game sessions.

  • peer_vpc_aws_account_id (Optional[str]) – Used when peering your 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 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 GameLift Fleets .

  • resource_creation_limit_policy (Union[IResolvable, ResourceCreationLimitPolicyProperty, 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, None]) – Instructions for launching server processes on each instance in the fleet. Server processes run either a custom game build executable or a Realtime script. The runtime configuration defines the server executables or launch script file, launch parameters, and the number of processes to run concurrently on each instance. When creating a fleet, the runtime configuration must have at least one server process configuration; otherwise the request fails with an invalid request exception. This parameter is required unless the parameters ServerLaunchPath and ServerLaunchParameters are defined. Runtime configuration has replaced these parameters, but fleets that use them will continue to work.

  • script_id (Optional[str]) – A unique identifier for a Realtime script to be deployed on a new Realtime Servers fleet. The script must have been successfully uploaded to Amazon GameLift. This fleet setting cannot be changed once the fleet is created. Note: It is not currently possible to 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.

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_depends_on(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_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters
  • key (str) –

  • value (Any) –

See

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.

Return type

None

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"
       ...
     },
   ]
   ...
}
Parameters
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermdediate 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).

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 resoure, please consult that specific resource’s documentation.

Return type

None

get_att(attribute_name)

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.

Return type

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters

key (str) –

See

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.

Return type

Any

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type

None

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

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'
attr_fleet_id

FleetId

Type

cloudformationAttribute

Return type

str

build_id

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.

Link

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

Return type

Optional[str]

certificate_configuration

Indicates whether to generate a TLS/SSL certificate for the new fleet.

TLS certificates are used for encrypting traffic between game clients and game servers running on GameLift. If this parameter is not set, certificate generation is disabled. This fleet setting cannot be changed once the fleet is created. Learn more at Securing Client/Server Communication .

Note: This feature requires the AWS Certificate Manager service, which is available in the AWS global partition but not in all other partitions. When working in a partition that does not support this feature, a request for a new fleet with certificate generation results fails with a 4xx unsupported region error.

Link

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

Return type

Union[IResolvable, CertificateConfigurationProperty, None]

cfn_options

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

Return type

ICfnResourceOptions

cfn_resource_type

AWS resource type.

Return type

str

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.

Return type

List[str]

description

A human-readable description of the fleet.

Link

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

Return type

Optional[str]

desired_ec2_instances

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.

Link

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

Return type

Union[int, float, None]

ec2_inbound_permissions

A range of IP addresses and port settings that allow inbound traffic to connect to server processes on an Amazon GameLift server.

Link

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

Return type

Union[IResolvable, List[Union[IResolvable, IpPermissionProperty]], None]

ec2_instance_type

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

Link

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

Return type

Optional[str]

fleet_type

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 property cannot be changed after the fleet is created.

Link

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

Return type

Optional[str]

instance_role_arn

A unique identifier for an IAM role that manages access to your AWS services.

With an instance role ARN set, any application that runs on an instance in this fleet can assume the role, including install scripts, server processes, and daemons (background processes). Create a role or look up a role’s ARN by using the IAM dashboard in the AWS Management Console . Learn more about using on-box credentials for your game servers at Access external resources from a game server . This property cannot be changed after the fleet is created.

Link

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

Return type

Optional[str]

locations

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 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, omit this parameter.

Link

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

Return type

Union[IResolvable, List[Union[IResolvable, LocationConfigurationProperty]], None]

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

Return type

str

Returns

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

max_size

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

When creating a new fleet, GameLift automatically sets this value to “1”. Once the fleet is active, you can change this value.

Link

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

Return type

Union[int, float, None]

metric_groups

The name of an Amazon CloudWatch metric group.

A metric group aggregates the metrics for all fleets in the group. Specify a string containing the metric group name. You can use an existing name or use a new name to create a new metric group. Currently, this parameter can have only one string.

Link

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

Return type

Optional[List[str]]

min_size

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

When creating a new fleet, GameLift automatically sets this value to “0”. After the fleet is active, you can change this value.

Link

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

Return type

Union[int, float, None]

name

A descriptive label that is associated with a fleet.

Fleet names do not need to be unique.

Link

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

Return type

Optional[str]

new_game_session_protection_policy

A game session protection policy to apply to all game sessions hosted on instances in this fleet.

When protected, active game sessions cannot be terminated during a scale-down event. If this parameter is not set, instances in this fleet default to no protection. You can change a fleet’s protection policy to affect future game sessions on the fleet. You can also set protection for individual game sessions.

Link

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

Return type

Optional[str]

node

The construct tree node associated with this construct.

Return type

ConstructNode

peer_vpc_aws_account_id

Used when peering your 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.

Link

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

Return type

Optional[str]

peer_vpc_id

A unique identifier for a VPC with resources to be accessed by your 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 GameLift Fleets .

Link

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

Return type

Optional[str]

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

Return type

str

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.

Link

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

Return type

Union[IResolvable, ResourceCreationLimitPolicyProperty, None]

runtime_configuration

Instructions for launching server processes on each instance in the fleet.

Server processes run either a custom game build executable or a Realtime script. The runtime configuration defines the server executables or launch script file, launch parameters, and the number of processes to run concurrently on each instance. When creating a fleet, the runtime configuration must have at least one server process configuration; otherwise the request fails with an invalid request exception.

This parameter is required unless the parameters ServerLaunchPath and ServerLaunchParameters are defined. Runtime configuration has replaced these parameters, but fleets that use them will continue to work.

Link

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

Return type

Union[IResolvable, RuntimeConfigurationProperty, None]

script_id

A unique identifier for a Realtime script to be deployed on a new Realtime Servers fleet.

The script must have been successfully uploaded to Amazon GameLift. This fleet setting cannot be changed once the fleet is created.

Note: It is not currently possible to 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.

Link

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

Return type

Optional[str]

stack

The stack in which this element is defined.

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

Return type

Stack

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(construct)

Check whether the given construct is a CfnResource.

Parameters

construct (IConstruct) –

Return type

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool

CertificateConfigurationProperty

class CfnFleet.CertificateConfigurationProperty(*, certificate_type)

Bases: object

Information about the use of a TLS/SSL certificate for a fleet.

TLS certificate generation is enabled at the fleet level, with one certificate generated for the fleet. When this feature is enabled, the certificate can be retrieved using the GameLift Server SDK call GetInstanceCertificate . All instances in a fleet share the same certificate.

Parameters

certificate_type (str) – Indicates whether a TLS/SSL certificate is generated for the fleet.

Link

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.
import aws_cdk.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 the fleet.

Link

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

Return type

str

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 Amazon GameLift hosting resource.

New game sessions that are started on the fleet are assigned an IP address/port number combination, which must fall into the fleet’s allowed ranges. For fleets created with a custom game server, the ranges reflect the server’s game session assignments. For Realtime Servers fleets, Amazon GameLift automatically opens two port ranges, one for TCP messaging and one for UDP, for use by the Realtime servers.

Parameters
  • from_port (Union[int, float]) – A starting value for a range of allowed port numbers. For fleets using Linux builds, only port 22, 443, 1026-60000 are valid. For fleets using Windows builds, only port 443, 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 higher than FromPort . For fleets using Linux builds, only port 22, 443, 1026-60000 are valid. For fleets using Windows builds, only port 443, 1026-60000 are valid.

Link

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.
import aws_cdk.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 port 22, 443, 1026-60000 are valid. For fleets using Windows builds, only port 443, 1026-60000 are valid.

Link

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

Return type

Union[int, float]

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

Link

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

Return type

str

protocol

The network communication protocol used by the fleet.

Link

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

Return type

str

to_port

An ending value for a range of allowed port numbers.

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

For fleets using Linux builds, only port 22, 443, 1026-60000 are valid. For fleets using Windows builds, only port 443, 1026-60000 are valid.

Link

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

Return type

Union[int, float]

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.

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

Link

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

Link

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

Return type

Union[int, float]

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.

Link

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

Return type

Union[int, float]

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.

Link

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

Return type

Union[int, float]

LocationConfigurationProperty

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

Bases: object

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

Related actions

CreateFleet

Parameters
Link

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

Link

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

Return type

str

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

Link

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

Return type

Union[IResolvable, LocationCapacityProperty, None]

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]) – The maximum number of game sessions that an individual can create during the policy period.

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

Link

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

The maximum number of game sessions that an individual can create during the policy period.

Link

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

Return type

Union[int, float, None]

policy_period_in_minutes

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

Link

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

Return type

Union[int, float, None]

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 processes to run on each instance in a fleet.

All fleets must have a runtime configuration. Each instance in the fleet maintains server processes as specified in the runtime configuration, launching new ones as existing processes end. Each instance regularly checks for an updated runtime configuration makes adjustments as called for.

The runtime configuration enables the instances in a fleet to run multiple processes simultaneously. Potential scenarios are as follows: (1) Run multiple processes of a single game server executable to maximize usage of your hosting resources. (2) Run one or more processes of different executables, such as your game server and a metrics tracking program. (3) Run multiple processes of a single game server but with different launch parameters, for example to run one process on each instance in debug mode.

An Amazon GameLift instance is limited to 50 processes running simultaneously. A runtime configuration must specify fewer than this limit. To calculate the total number of processes specified in a runtime configuration, add the values of the ConcurrentExecutions parameter for each ServerProcess object in the runtime configuration.

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]], None]) – A collection of server process configurations that identify what server processes to run on each instance in a fleet.

Link

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

Link

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

Return type

Union[int, float, None]

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.

Link

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

Return type

Union[int, float, None]

server_processes

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

Link

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

Return type

Union[IResolvable, List[Union[IResolvable, ServerProcessProperty]], None]

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.

Each instruction set identifies the location of the server executable, optional launch parameters, and the number of server processes with this configuration to maintain concurrently on the instance. Server process configurations make up a fleet’s RuntimeConfiguration .

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 the Realtime script file that contains the Init() function. 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

  • parameters (Optional[str]) – An optional list of parameters to pass to the server executable or Realtime script on launch.

Link

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

Link

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

Return type

Union[int, float]

launch_path

The location of a game build executable or the Realtime script file that contains the Init() function.

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

Link

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

Return type

str

parameters

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

Link

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

Return type

Optional[str]