UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

935 lines 214 kB
import * as cdk from "../../core"; import * as constructs from "constructs"; import * as cfn_parse from "../../core/lib/helpers-internal"; /** * The `AWS::GameLift::Alias` resource creates an alias for an Amazon GameLift (GameLift) fleet destination. * * There are two types of routing strategies for aliases: simple and terminal. A simple alias points to an active fleet. A terminal alias displays a message instead of routing players to an active fleet. For example, a terminal alias might display a URL link that directs players to an upgrade site. You can use aliases to define destinations in a game session queue or when requesting new game sessions. * * @cloudformationResource AWS::GameLift::Alias * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-alias.html */ export declare class CfnAlias extends cdk.CfnResource implements cdk.IInspectable, cdk.ITaggableV2 { /** * The CloudFormation resource type name for this resource class. */ static readonly CFN_RESOURCE_TYPE_NAME: string; /** * Build a CfnAlias from CloudFormation properties * * A factory method that creates a new instance of this class from an object * containing the CloudFormation properties of this resource. * Used in the @aws-cdk/cloudformation-include module. * * @internal */ static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnAlias; /** * The Amazon Resource Name ( [ARN](https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html) ) that is assigned to a Amazon GameLift Servers alias resource and uniquely identifies it. ARNs are unique across all Regions. Format is `arn:aws:gamelift:<region>::alias/alias-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912` . In a GameLift alias ARN, the resource ID matches the alias ID value. * * @cloudformationAttribute AliasArn */ readonly attrAliasArn: string; /** * A unique identifier for the alias. For example, `arn:aws:gamelift:us-west-1::alias/alias-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912` * * Alias IDs are unique within a Region. * * @cloudformationAttribute AliasId */ readonly attrAliasId: string; /** * Tag Manager which manages the tags for this resource */ readonly cdkTagManager: cdk.TagManager; /** * A human-readable description of the alias. */ description?: string; /** * A descriptive label that is associated with an alias. */ name: string; /** * The routing configuration, including routing type and fleet target, for the alias. */ routingStrategy: cdk.IResolvable | CfnAlias.RoutingStrategyProperty; /** * An array of key-value pairs to apply to this resource. */ tags?: Array<cdk.CfnTag>; /** * @param scope Scope in which this resource is defined * @param id Construct identifier for this resource (unique in its scope) * @param props Resource properties */ constructor(scope: constructs.Construct, id: string, props: CfnAliasProps); protected get cfnProperties(): Record<string, any>; /** * Examines the CloudFormation resource and discloses attributes * * @param inspector tree inspector to collect and process attributes */ inspect(inspector: cdk.TreeInspector): void; protected renderProperties(props: Record<string, any>): Record<string, any>; } export declare namespace CfnAlias { /** * The routing configuration for a fleet alias. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-alias-routingstrategy.html */ interface RoutingStrategyProperty { /** * A unique identifier for a fleet that the alias points to. * * If you specify `SIMPLE` for the `Type` property, you must specify this property. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-alias-routingstrategy.html#cfn-gamelift-alias-routingstrategy-fleetid */ readonly fleetId?: string; /** * The message text to be used with a terminal routing strategy. * * If you specify `TERMINAL` for the `Type` property, you must specify this property. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-alias-routingstrategy.html#cfn-gamelift-alias-routingstrategy-message */ readonly message?: string; /** * A type of routing strategy. * * Possible routing types include the following: * * - *SIMPLE* - The alias resolves to one specific fleet. Use this type when routing to active fleets. * - *TERMINAL* - The alias does not resolve to a fleet but instead can be used to display a message to the user. A terminal alias throws a `TerminalRoutingStrategyException` with the message that you specified in the `Message` property. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-alias-routingstrategy.html#cfn-gamelift-alias-routingstrategy-type */ readonly type: string; } } /** * Properties for defining a `CfnAlias` * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-alias.html */ export interface CfnAliasProps { /** * A human-readable description of the alias. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-alias.html#cfn-gamelift-alias-description */ readonly description?: string; /** * A descriptive label that is associated with an alias. * * Alias names do not need to be unique. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-alias.html#cfn-gamelift-alias-name */ readonly name: string; /** * The routing configuration, including routing type and fleet target, for the alias. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-alias.html#cfn-gamelift-alias-routingstrategy */ readonly routingStrategy: cdk.IResolvable | CfnAlias.RoutingStrategyProperty; /** * An array of key-value pairs to apply to this resource. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-alias.html#cfn-gamelift-alias-tags */ readonly tags?: Array<cdk.CfnTag>; } /** * The `AWS::GameLift::Build` resource creates a game server build that is installed and run on instances in an Amazon GameLift fleet. * * This resource points to an Amazon S3 location that contains a zip file with all of the components of the game server build. * * @cloudformationResource AWS::GameLift::Build * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-build.html */ export declare class CfnBuild extends cdk.CfnResource implements cdk.IInspectable, cdk.ITaggableV2 { /** * The CloudFormation resource type name for this resource class. */ static readonly CFN_RESOURCE_TYPE_NAME: string; /** * Build a CfnBuild from CloudFormation properties * * A factory method that creates a new instance of this class from an object * containing the CloudFormation properties of this resource. * Used in the @aws-cdk/cloudformation-include module. * * @internal */ static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnBuild; /** * The Amazon Resource Name ( [ARN](https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html) ) that is assigned to a Amazon GameLift Servers build resource and uniquely identifies it. ARNs are unique across all Regions. Format is `arn:aws:gamelift:<region>::build/build-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912` . In a GameLift build ARN, the resource ID matches the *BuildId* value. * * @cloudformationAttribute BuildArn */ readonly attrBuildArn: string; /** * A unique identifier for the build. * * @cloudformationAttribute BuildId */ readonly attrBuildId: string; /** * Tag Manager which manages the tags for this resource */ readonly cdkTagManager: cdk.TagManager; /** * A descriptive label that is associated with a build. */ name?: string; /** * The operating system that your game server binaries run on. */ operatingSystem?: string; /** * A server SDK version you used when integrating your game server build with Amazon GameLift Servers. */ serverSdkVersion?: string; /** * Information indicating where your game build files are stored. */ storageLocation?: cdk.IResolvable | CfnBuild.StorageLocationProperty; /** * An array of key-value pairs to apply to this resource. */ tags?: Array<cdk.CfnTag>; /** * Version information that is associated with this build. */ version?: string; /** * @param scope Scope in which this resource is defined * @param id Construct identifier for this resource (unique in its scope) * @param props Resource properties */ constructor(scope: constructs.Construct, id: string, props?: CfnBuildProps); protected get cfnProperties(): Record<string, any>; /** * Examines the CloudFormation resource and discloses attributes * * @param inspector tree inspector to collect and process attributes */ inspect(inspector: cdk.TreeInspector): void; protected renderProperties(props: Record<string, any>): Record<string, any>; } export declare namespace CfnBuild { /** * The location in Amazon S3 where build or script files are stored for access by Amazon GameLift. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-build-storagelocation.html */ interface StorageLocationProperty { /** * An Amazon S3 bucket identifier. The name of the S3 bucket. * * > Amazon GameLift doesn't support uploading from Amazon S3 buckets with names that contain a dot (.). * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-build-storagelocation.html#cfn-gamelift-build-storagelocation-bucket */ readonly bucket: string; /** * The name of the zip file that contains the build files or script files. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-build-storagelocation.html#cfn-gamelift-build-storagelocation-key */ readonly key: string; /** * A version of a stored file to retrieve, if the object versioning feature is turned on for the S3 bucket. * * Use this parameter to specify a specific version. If this parameter isn't set, Amazon GameLift Servers retrieves the latest version of the file. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-build-storagelocation.html#cfn-gamelift-build-storagelocation-objectversion */ readonly objectVersion?: string; /** * The ARNfor an IAM role that allows Amazon GameLift to access the S3 bucket. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-build-storagelocation.html#cfn-gamelift-build-storagelocation-rolearn */ readonly roleArn: string; } } /** * Properties for defining a `CfnBuild` * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-build.html */ export interface CfnBuildProps { /** * A descriptive label that is associated with a build. * * Build names do not need to be unique. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-build.html#cfn-gamelift-build-name */ readonly name?: string; /** * The operating system that your game server binaries run on. * * This value determines the type of fleet resources that you use for this build. If your game build contains multiple executables, they all must run on the same operating system. You must specify a valid operating system in this request. There is no default value. You can't change a build's operating system later. * * > Amazon Linux 2 (AL2) will reach end of support on 6/30/2025. See more details in the [Amazon Linux 2 FAQs](https://docs.aws.amazon.com/amazon-linux-2/faqs/) . For game servers that are hosted on AL2 and use server SDK version 4.x for Amazon GameLift Servers, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See [Migrate to server SDK version 5.](https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-serversdk5-migration.html) * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-build.html#cfn-gamelift-build-operatingsystem */ readonly operatingSystem?: string; /** * A server SDK version you used when integrating your game server build with Amazon GameLift Servers. * * For more information see [Integrate games with custom game servers](https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-custom-intro.html) . By default Amazon GameLift Servers sets this value to `4.0.2` . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-build.html#cfn-gamelift-build-serversdkversion */ readonly serverSdkVersion?: string; /** * Information indicating where your game build files are stored. * * Use this parameter only when creating a build with files stored in an Amazon S3 bucket that you own. The storage location must specify an Amazon S3 bucket name and key. The location must also specify a role ARN that you set up to allow Amazon GameLift Servers to access your Amazon S3 bucket. The S3 bucket and your new build must be in the same Region. * * If a `StorageLocation` is specified, the size of your file can be found in your Amazon S3 bucket. Amazon GameLift Servers will report a `SizeOnDisk` of 0. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-build.html#cfn-gamelift-build-storagelocation */ readonly storageLocation?: cdk.IResolvable | CfnBuild.StorageLocationProperty; /** * An array of key-value pairs to apply to this resource. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-build.html#cfn-gamelift-build-tags */ readonly tags?: Array<cdk.CfnTag>; /** * Version information that is associated with this build. * * Version strings do not need to be unique. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-build.html#cfn-gamelift-build-version */ readonly version?: string; } /** * 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. * * @cloudformationResource AWS::GameLift::Fleet * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-fleet.html */ export declare class CfnFleet extends cdk.CfnResource implements cdk.IInspectable, cdk.ITaggableV2 { /** * The CloudFormation resource type name for this resource class. */ static readonly CFN_RESOURCE_TYPE_NAME: string; /** * Build a CfnFleet from CloudFormation properties * * A factory method that creates a new instance of this class from an object * containing the CloudFormation properties of this resource. * Used in the @aws-cdk/cloudformation-include module. * * @internal */ static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnFleet; /** * The Amazon Resource Name ( [ARN](https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html) ) that is assigned to a Amazon GameLift Servers fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is `arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912` . In a GameLift fleet ARN, the resource ID matches the `FleetId` value. * * @cloudformationAttribute FleetArn */ readonly attrFleetArn: string; /** * A unique identifier for the fleet. * * @cloudformationAttribute FleetId */ readonly attrFleetId: string; /** * Amazon GameLift Servers Anywhere configuration options. */ anywhereConfiguration?: CfnFleet.AnywhereConfigurationProperty | cdk.IResolvable; /** * Current resource capacity settings for managed EC2 fleets and managed container fleets. */ applyCapacity?: string; /** * A unique identifier for a build to be deployed on the new fleet. */ buildId?: string; /** * Tag Manager which manages the tags for this resource */ readonly cdkTagManager: cdk.TagManager; /** * Prompts Amazon GameLift Servers to generate a TLS/SSL certificate for the fleet. */ certificateConfiguration?: CfnFleet.CertificateConfigurationProperty | cdk.IResolvable; /** * The type of compute resource used to host your game servers. */ computeType?: string; /** * A description for the fleet. */ description?: string; /** * [DEPRECATED] The number of EC2 instances that you want this fleet to host. * * @deprecated this property has been deprecated */ desiredEc2Instances?: number; /** * The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet. */ ec2InboundPermissions?: Array<CfnFleet.IpPermissionProperty | cdk.IResolvable> | cdk.IResolvable; /** * The Amazon GameLift Servers-supported Amazon EC2 instance type to use with managed EC2 fleets. */ ec2InstanceType?: string; /** * Indicates whether to use On-Demand or Spot instances for this fleet. */ fleetType?: string; /** * A unique identifier for an IAM role that manages access to your AWS services. */ instanceRoleArn?: string; /** * Indicates that fleet instances maintain a shared credentials file for the IAM role defined in `InstanceRoleArn` . */ instanceRoleCredentialsProvider?: string; /** * A set of remote locations to deploy additional instances to and manage as a multi-location fleet. */ locations?: Array<cdk.IResolvable | CfnFleet.LocationConfigurationProperty> | cdk.IResolvable; /** * This parameter is no longer used. * * @deprecated this property has been deprecated */ logPaths?: Array<string>; /** * [DEPRECATED] The maximum value that is allowed for the fleet's instance count. * * @deprecated this property has been deprecated */ maxSize?: number; /** * The name of an AWS CloudWatch metric group to add this fleet to. */ metricGroups?: Array<string>; /** * [DEPRECATED] The minimum value allowed for the fleet's instance count. * * @deprecated this property has been deprecated */ minSize?: number; /** * A descriptive label that is associated with a fleet. */ name: string; /** * The status of termination protection for active game sessions on the fleet. */ newGameSessionProtectionPolicy?: string; /** * Used when peering your Amazon GameLift Servers fleet with a VPC, the unique identifier for the AWS account that owns the VPC. */ peerVpcAwsAccountId?: string; /** * A unique identifier for a VPC with resources to be accessed by your Amazon GameLift Servers fleet. */ peerVpcId?: string; /** * 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. */ resourceCreationLimitPolicy?: cdk.IResolvable | CfnFleet.ResourceCreationLimitPolicyProperty; /** * Instructions for how to launch and maintain server processes on instances in the fleet. */ runtimeConfiguration?: cdk.IResolvable | CfnFleet.RuntimeConfigurationProperty; /** * Rule that controls how a fleet is scaled. */ scalingPolicies?: Array<cdk.IResolvable | CfnFleet.ScalingPolicyProperty> | cdk.IResolvable; /** * The unique identifier for a Realtime configuration script to be deployed on fleet instances. */ scriptId?: string; /** * This parameter is no longer used but is retained for backward compatibility. * * @deprecated this property has been deprecated */ serverLaunchParameters?: string; /** * This parameter is no longer used. * * @deprecated this property has been deprecated */ serverLaunchPath?: string; /** * An array of key-value pairs to apply to this resource. */ tags?: Array<cdk.CfnTag>; /** * @param scope Scope in which this resource is defined * @param id Construct identifier for this resource (unique in its scope) * @param props Resource properties */ constructor(scope: constructs.Construct, id: string, props: CfnFleetProps); protected get cfnProperties(): Record<string, any>; /** * Examines the CloudFormation resource and discloses attributes * * @param inspector tree inspector to collect and process attributes */ inspect(inspector: cdk.TreeInspector): void; protected renderProperties(props: Record<string, any>): Record<string, any>; } export declare namespace CfnFleet { /** * 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. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-ippermission.html */ interface IpPermissionProperty { /** * 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 */ readonly fromPort: number; /** * 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 */ readonly ipRange: string; /** * 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 */ readonly protocol: string; /** * 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 */ readonly toPort: number; } /** * A remote location where a multi-location fleet can deploy game servers for game hosting. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-locationconfiguration.html */ interface LocationConfigurationProperty { /** * An AWS Region code, such as `us-west-2` . * * For a list of supported Regions and Local Zones, see [Amazon GameLift Servers service locations](https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-regions.html) for managed hosting. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-locationconfiguration.html#cfn-gamelift-fleet-locationconfiguration-location */ readonly location: string; /** * Current resource capacity settings for managed EC2 fleets and managed container fleets. * * For multi-location fleets, location values might refer to a fleet's remote location or its home Region. * * *Returned by:* [DescribeFleetCapacity](https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetCapacity.html) , [DescribeFleetLocationCapacity](https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetLocationCapacity.html) , [UpdateFleetCapacity](https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateFleetCapacity.html) * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-locationconfiguration.html#cfn-gamelift-fleet-locationconfiguration-locationcapacity */ readonly locationCapacity?: cdk.IResolvable | CfnFleet.LocationCapacityProperty; } /** * Current resource capacity settings for managed EC2 fleets and managed container fleets. * * For multi-location fleets, location values might refer to a fleet's remote location or its home Region. * * *Returned by:* [DescribeFleetCapacity](https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetCapacity.html) , [DescribeFleetLocationCapacity](https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetLocationCapacity.html) , [UpdateFleetCapacity](https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateFleetCapacity.html) * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-locationcapacity.html */ interface LocationCapacityProperty { /** * 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 */ readonly desiredEc2Instances: number; /** * 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 */ readonly maxSize: number; /** * 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 */ readonly minSize: number; } /** * 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](https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-multiprocess.html) . * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-runtimeconfiguration.html */ interface RuntimeConfigurationProperty { /** * 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 */ readonly gameSessionActivationTimeoutSeconds?: number; /** * The number of game sessions in status `ACTIVATING` to allow on an instance or compute. * * 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 */ readonly maxConcurrentGameSessionActivations?: number; /** * A collection of server process configurations that identify what server processes to run on fleet computes. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-runtimeconfiguration.html#cfn-gamelift-fleet-runtimeconfiguration-serverprocesses */ readonly serverProcesses?: Array<cdk.IResolvable | CfnFleet.ServerProcessProperty> | cdk.IResolvable; } /** * 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. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-serverprocess.html */ interface ServerProcessProperty { /** * The number of server processes using this configuration that run concurrently on each instance or compute. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-serverprocess.html#cfn-gamelift-fleet-serverprocess-concurrentexecutions */ readonly concurrentExecutions: number; /** * 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 Servers 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 */ readonly launchPath: string; /** * 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 */ readonly parameters?: string; } /** * Amazon GameLift Servers configuration options for your Anywhere fleets. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-anywhereconfiguration.html */ interface AnywhereConfigurationProperty { /** * The cost to run your fleet per hour. * * Amazon GameLift Servers uses the provided cost of your fleet to balance usage in queues. For more information about queues, see [Setting up queues](https://docs.aws.amazon.com/gamelift/latest/developerguide/queues-intro.html) in the *Amazon GameLift Servers Developer Guide* . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-anywhereconfiguration.html#cfn-gamelift-fleet-anywhereconfiguration-cost */ readonly cost: string; } /** * 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. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-resourcecreationlimitpolicy.html */ interface ResourceCreationLimitPolicyProperty { /** * A policy that puts limits on the number of game sessions that a player can create within a specified span of time. * * With this policy, you can control players' ability to consume available resources. * * The policy is evaluated when a player tries to create a new game session. On receiving a `CreateGameSession` request, Amazon GameLift Servers checks that the player (identified by `CreatorId` ) has created fewer than game session limit in the specified time period. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-resourcecreationlimitpolicy.html#cfn-gamelift-fleet-resourcecreationlimitpolicy-newgamesessionspercreator */ readonly newGameSessionsPerCreator?: number; /** * 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 */ readonly policyPeriodInMinutes?: number; } /** * 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](https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-serversdk.html) operation `GetInstanceCertificate` . * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-certificateconfiguration.html */ interface CertificateConfigurationProperty { /** * 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 */ readonly certificateType: string; } /** * Rule that controls how a fleet is scaled. * * Scaling policies are uniquely identified by the combination of name and fleet ID. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-scalingpolicy.html */ interface ScalingPolicyProperty { /** * 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 */ readonly comparisonOperator?: string; /** * 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 */ readonly evaluationPeriods?: number; /** * The fleet location. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-scalingpolicy.html#cfn-gamelift-fleet-scalingpolicy-location */ readonly location?: string; /** * Name of the Amazon GameLift Servers-defined metric that is used to trigger a scaling adjustment. * * For detailed descriptions of fleet metrics, see [Monitor Amazon GameLift Servers with Amazon CloudWatch](https://docs.aws.amazon.com/gamelift/latest/developerguide/monitoring-cloudwatch.html) . * * - *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 */ readonly metricName: string; /** * 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 */ readonly name: string; /** * 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 */ readonly policyType?: string; /** * 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 */ readonly scalingAdjustment?: number; /** * 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 */ readonly scalingAdjustmentType?: string; /** * 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 */ readonly status?: string; /** * 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 */ readonly targetConfiguration?: cdk.IResolvable | CfnFleet.TargetConfigurationProperty; /** * 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 */ readonly threshold?: number; /** * 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 */ readonly updateStatus?: string; } /** * Settings for a target-based scaling policy. * * A target-based policy tracks a particular fleet metric specifies a target value for the metric. As player usage changes, the policy triggers Amazon GameLift Servers to adjust capacity so that the metric returns to the target value. The target configuration specifies settings as needed for the target based policy, including the target value. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-fleet-targetconfiguration.html */ interface TargetConfigurationProperty { /** * 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 */ readonly targetValue: number; } } /** * Properties for defining a `CfnFleet` * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-fleet.html */ export interface CfnFleetProps { /** * Amazon GameLift Servers Anywhere configuration options. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-fleet.html#cfn-gamelift-fleet-anywhereconfiguration */ readonly anywhereConfiguration?: CfnFleet.AnywhereConfigurationProperty | cdk.IResolvable; /** * Current resource capacity settings for managed EC2 fleets and managed container fleets. * * For multi-location fleets, location values might refer to a fleet's remote location or its home Region. * * *Returned by:* [DescribeFleetCapacity](https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetCapacity.html) , [DescribeFleetLocationCapacity](https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetLocationCapacity.html) , [UpdateFleetCapacity](https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateFleetCapacity.html) * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-fleet.html#cfn-gamelift-fleet-applycapacity */ readonly applyCapacity?: string; /** * 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. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-fleet.html#cfn-gamelift-fleet-buildid */ readonly buildId?: string; /** * Prompts Amazon GameLift Servers to generate a TLS/SSL certificate for the fleet. * * Amazon GameLift Servers uses the certificates to encrypt traffic between game clients and the game servers running on Amazon GameLift Servers. 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, consid