CfnFleetProps

class aws_cdk.aws_gamelift.CfnFleetProps(*, 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: object

Properties for defining a CfnFleet.

Parameters
  • 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]) – Prompts GameLift to generate a TLS/SSL certificate for the fleet. TLS certificates are used for encrypting traffic between game clients and the game servers that are running on GameLift. By default, the CertificateConfiguration is set to DISABLED . This property cannot be changed after the fleet is created. Note: This feature requires the AWS Certificate Manager (ACM) service, which is not available in all AWS regions. When working in a region that does not support this feature, a fleet creation request with certificate generation fails with a 4xx 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]) – 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, GameLift automatically sets TCP and UDP ranges.

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

  • 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]) – 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 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 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.

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

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_props = gamelift.CfnFleetProps(
    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"
)

Attributes

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

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

TLS certificates are used for encrypting traffic between game clients and the game servers that are running on GameLift. By default, the CertificateConfiguration is set to DISABLED . This property cannot be changed after the fleet is created.

Note: This feature requires the AWS Certificate Manager (ACM) service, which is not available in all AWS regions. When working in a region that does not support this feature, a fleet creation request with certificate generation fails with a 4xx 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]

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

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, GameLift automatically sets TCP and UDP ranges.

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]

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-resource-gamelift-fleet.html#cfn-gamelift-fleet-maxsize

Return type

Union[int, float, None]

metric_groups

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.

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

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.

Link

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

Return type

Optional[str]

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]

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

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

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

Return type

Optional[str]