awscdkgameliftalpha

package module
v2.159.1-alpha.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

README

Amazon GameLift Construct Library

---

The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.


Amazon GameLift is a service used to deploy, operate, and scale dedicated, low-cost servers in the cloud for session-based multiplayer games. Built on AWS global computing infrastructure, GameLift helps deliver high-performance, high-reliability game servers while dynamically scaling your resource usage to meet worldwide player demand.

GameLift is composed of three main components:

  • GameLift FlexMatch which is a customizable matchmaking service for multiplayer games. With FlexMatch, you can build a custom set of rules that defines what a multiplayer match looks like for your game, and determines how to evaluate and select compatible players for each match. You can also customize key aspects of the matchmaking process to fit your game, including fine-tuning the matching algorithm.
  • GameLift hosting for custom or realtime servers which helps you deploy, operate, and scale dedicated game servers. It regulates the resources needed to host games, finds available game servers to host new game sessions, and puts players into games.
  • GameLift FleetIQ to optimize the use of low-cost Amazon Elastic Compute Cloud (Amazon EC2) Spot Instances for cloud-based game hosting. With GameLift FleetIQ, you can work directly with your hosting resources in Amazon EC2 and Amazon EC2 Auto Scaling while taking advantage of GameLift optimizations to deliver inexpensive, resilient game hosting for your players

This module is part of the AWS Cloud Development Kit project. It allows you to define components for your matchmaking configuration or game server fleet management system.

GameLift FlexMatch

Defining a Matchmaking configuration

FlexMatch is available both as a GameLift game hosting solution (including Realtime Servers) and as a standalone matchmaking service. To set up a FlexMatch matchmaker to process matchmaking requests, you have to create a matchmaking configuration based on a RuleSet.

More details about matchmaking ruleSet are covered below.

There is two types of Matchmaking configuration:

Through a game session queue system to let FlexMatch forms matches and uses the specified GameLift queue to start a game session for the match.

var queue gameSessionQueue
var ruleSet matchmakingRuleSet


gamelift.NewQueuedMatchmakingConfiguration(this, jsii.String("QueuedMatchmakingConfiguration"), &QueuedMatchmakingConfigurationProps{
	MatchmakingConfigurationName: jsii.String("test-queued-config-name"),
	GameSessionQueues: []iGameSessionQueue{
		queue,
	},
	RuleSet: ruleSet,
})

Or through a standalone version to let FlexMatch forms matches and returns match information in an event.

var ruleSet matchmakingRuleSet


gamelift.NewStandaloneMatchmakingConfiguration(this, jsii.String("StandaloneMatchmaking"), &StandaloneMatchmakingConfigurationProps{
	MatchmakingConfigurationName: jsii.String("test-standalone-config-name"),
	RuleSet: ruleSet,
})

More details about Game session queue are covered below.

Matchmaking RuleSet

Every FlexMatch matchmaker must have a rule set. The rule set determines the two key elements of a match: your game's team structure and size, and how to group players together for the best possible match.

For example, a rule set might describe a match like this: Create a match with two teams of four to eight players each, one team is the cowboy and the other team the aliens. A team can have novice and experienced players, but the average skill of the two teams must be within 10 points of each other. If no match is made after 30 seconds, gradually relax the skill requirements.

gamelift.NewMatchmakingRuleSet(this, jsii.String("RuleSet"), &MatchmakingRuleSetProps{
	MatchmakingRuleSetName: jsii.String("my-test-ruleset"),
	Content: gamelift.RuleSetContent_FromJsonFile(path.join(__dirname, jsii.String("my-ruleset"), jsii.String("ruleset.json"))),
})
FlexMatch Monitoring

You can monitor GameLift FlexMatch activity for matchmaking configurations and matchmaking rules using Amazon CloudWatch. These statistics are used to provide a historical perspective on how your Gamelift FlexMatch solution is performing.

FlexMatch Metrics

GameLift FlexMatch sends metrics to CloudWatch so that you can collect and analyze the activity of your matchmaking solution, including match acceptance workflow, ticket consumtion.

You can then use CloudWatch alarms to alert you, for example, when matches has been rejected (potential matches that were rejected by at least one player since the last report) exceed a certain thresold which could means that you may have an issue in your matchmaking rules.

CDK provides methods for accessing GameLift FlexMatch metrics with default configuration, such as metricRuleEvaluationsPassed, or metricRuleEvaluationsFailed (see IMatchmakingRuleSet for a full list). CDK also provides a generic metric method that can be used to produce metric configurations for any metric provided by GameLift FlexMatch; the configurations are pre-populated with the correct dimensions for the matchmaking configuration.

var matchmakingRuleSet matchmakingRuleSet

// Alarm that triggers when the per-second average of not placed matches exceed 10%
ruleEvaluationRatio := cloudwatch.NewMathExpression(&MathExpressionProps{
	Expression: jsii.String("1 - (ruleEvaluationsPassed / ruleEvaluationsFailed)"),
	UsingMetrics: map[string]iMetric{
		"ruleEvaluationsPassed": matchmakingRuleSet.metricRuleEvaluationsPassed(&MetricOptions{
			"statistic": cloudwatch.Statistic_SUM,
		}),
		"ruleEvaluationsFailed": matchmakingRuleSet.metric(jsii.String("ruleEvaluationsFailed")),
	},
})
cloudwatch.NewAlarm(this, jsii.String("Alarm"), &AlarmProps{
	Metric: ruleEvaluationRatio,
	Threshold: jsii.Number(0.1),
	EvaluationPeriods: jsii.Number(3),
})

See: Monitoring Using CloudWatch Metrics in the Amazon GameLift Developer Guide.

GameLift Hosting

Uploading builds and scripts to GameLift

Before deploying your GameLift-enabled multiplayer game servers for hosting with the GameLift service, you need to upload your game server files. This section provides guidance on preparing and uploading custom game server build files or Realtime Servers server script files. When you upload files, you create a GameLift build or script resource, which you then deploy on fleets of hosting resources.

To troubleshoot fleet activation problems related to the server script, see Debug GameLift fleet issues.

Upload a custom server build to GameLift

Before uploading your configured game server to GameLift for hosting, package the game build files into a build directory. This directory must include all components required to run your game servers and host game sessions, including the following:

  • Game server binaries – The binary files required to run the game server. A build can include binaries for multiple game servers built to run on the same platform. For a list of supported platforms, see Download Amazon GameLift SDKs.
  • Dependencies – Any dependent files that your game server executables require to run. Examples include assets, configuration files, and dependent libraries.
  • Install script – A script file to handle tasks that are required to fully install your game build on GameLift hosting servers. Place this file at the root of the build directory. GameLift runs the install script as part of fleet creation.

You can set up any application in your build, including your install script, to access your resources securely on other AWS services.

var bucket bucket

build := gamelift.NewBuild(this, jsii.String("Build"), &BuildProps{
	Content: gamelift.Content_FromBucket(bucket, jsii.String("sample-asset-key")),
})

awscdk.NewCfnOutput(this, jsii.String("BuildArn"), &CfnOutputProps{
	Value: build.BuildArn,
})
awscdk.NewCfnOutput(this, jsii.String("BuildId"), &CfnOutputProps{
	Value: build.BuildId,
})

To specify a server SDK version you used when integrating your game server build with Amazon GameLift use the serverSdkVersion parameter:

See Integrate games with custom game servers for more details.

var bucket bucket

build := gamelift.NewBuild(this, jsii.String("Build"), &BuildProps{
	Content: gamelift.Content_FromBucket(bucket, jsii.String("sample-asset-key")),
	ServerSdkVersion: jsii.String("5.0.0"),
})
Upload a realtime server Script

Your server script can include one or more files combined into a single .zip file for uploading. The .zip file must contain all files that your script needs to run.

You can store your zipped script files in either a local file directory or in an Amazon Simple Storage Service (Amazon S3) bucket or defines a directory asset which is archived as a .zip file and uploaded to S3 during deployment.

After you create the script resource, GameLift deploys the script with a new Realtime Servers fleet. GameLift installs your server script onto each instance in the fleet, placing the script files in /local/game.

var bucket bucket

gamelift.NewScript(this, jsii.String("Script"), &ScriptProps{
	Content: gamelift.Content_FromBucket(bucket, jsii.String("sample-asset-key")),
})
Defining a GameLift Fleet
Creating a custom game server fleet

Your uploaded game servers are hosted on GameLift virtual computing resources, called instances. You set up your hosting resources by creating a fleet of instances and deploying them to run your game servers. You can design a fleet to fit your game's needs.

gamelift.NewBuildFleet(this, jsii.String("Game server fleet"), &BuildFleetProps{
	FleetName: jsii.String("test-fleet"),
	Content: gamelift.Build_FromAsset(this, jsii.String("Build"), path.join(__dirname, jsii.String("CustomerGameServer"))),
	InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_C4, ec2.InstanceSize_LARGE),
	RuntimeConfiguration: &RuntimeConfiguration{
		ServerProcesses: []serverProcess{
			&serverProcess{
				LaunchPath: jsii.String("test-launch-path"),
			},
		},
	},
})
Managing game servers launch configuration

GameLift uses a fleet's runtime configuration to determine the type and number of processes to run on each instance in the fleet. At a minimum, a runtime configuration contains one server process configuration that represents one game server executable. You can also define additional server process configurations to run other types of processes related to your game. Each server process configuration contains the following information:

  • The file name and path of an executable in your game build.
  • Optionally Parameters to pass to the process on launch.
  • The number of processes to run concurrently.

A GameLift instance is limited to 50 processes running concurrently.

var build build

// Server processes can be delcared in a declarative way through the constructor
fleet := gamelift.NewBuildFleet(this, jsii.String("Game server fleet"), &BuildFleetProps{
	FleetName: jsii.String("test-fleet"),
	Content: build,
	InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_C4, ec2.InstanceSize_LARGE),
	RuntimeConfiguration: &RuntimeConfiguration{
		ServerProcesses: []serverProcess{
			&serverProcess{
				LaunchPath: jsii.String("/local/game/GameLiftExampleServer.x86_64"),
				Parameters: jsii.String("-logFile /local/game/logs/myserver1935.log -port 1935"),
				ConcurrentExecutions: jsii.Number(100),
			},
		},
	},
})

See Managing how game servers are launched for hosting in the Amazon GameLift Developer Guide.

Defining an instance type

GameLift uses Amazon Elastic Compute Cloud (Amazon EC2) resources, called instances, to deploy your game servers and host game sessions for your players. When setting up a new fleet, you decide what type of instances your game needs and how to run game server processes on them (using a runtime configuration). All instances in a fleet use the same type of resources and the same runtime configuration. You can edit a fleet's runtime configuration and other fleet properties, but the type of resources cannot be changed.

var build build

gamelift.NewBuildFleet(this, jsii.String("Game server fleet"), &BuildFleetProps{
	FleetName: jsii.String("test-fleet"),
	Content: build,
	InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_C5, ec2.InstanceSize_LARGE),
	RuntimeConfiguration: &RuntimeConfiguration{
		ServerProcesses: []serverProcess{
			&serverProcess{
				LaunchPath: jsii.String("/local/game/GameLiftExampleServer.x86_64"),
			},
		},
	},
})
Using Spot instances

When setting up your hosting resources, you have the option of using Spot Instances, On-Demand Instances, or a combination.

By default, fleet are using on demand capacity.

var build build

gamelift.NewBuildFleet(this, jsii.String("Game server fleet"), &BuildFleetProps{
	FleetName: jsii.String("test-fleet"),
	Content: build,
	InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_C4, ec2.InstanceSize_LARGE),
	RuntimeConfiguration: &RuntimeConfiguration{
		ServerProcesses: []serverProcess{
			&serverProcess{
				LaunchPath: jsii.String("/local/game/GameLiftExampleServer.x86_64"),
			},
		},
	},
	UseSpot: jsii.Boolean(true),
})
Allowing Ingress traffic

The allowed IP address ranges and port settings that allow inbound traffic to access game sessions on this 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.

var build build


fleet := gamelift.NewBuildFleet(this, jsii.String("Game server fleet"), &BuildFleetProps{
	FleetName: jsii.String("test-fleet"),
	Content: build,
	InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_C4, ec2.InstanceSize_LARGE),
	RuntimeConfiguration: &RuntimeConfiguration{
		ServerProcesses: []serverProcess{
			&serverProcess{
				LaunchPath: jsii.String("/local/game/GameLiftExampleServer.x86_64"),
			},
		},
	},
	IngressRules: []ingressRule{
		&ingressRule{
			Source: gamelift.Peer_AnyIpv4(),
			Port: gamelift.Port_TcpRange(jsii.Number(100), jsii.Number(200)),
		},
	},
})
// Allowing a specific CIDR for port 1111 on UDP Protocol
fleet.AddIngressRule(gamelift.Peer_Ipv4(jsii.String("1.2.3.4/32")), gamelift.Port_Udp(jsii.Number(1111)))
Managing locations

A single Amazon GameLift fleet has a home Region by default (the Region you deploy it to), but it can deploy resources to any number of GameLift supported Regions. Select Regions based on where your players are located and your latency needs.

By default, home region is used as default location but we can add new locations if needed and define desired capacity

var build build


// Locations can be added directly through constructor
fleet := gamelift.NewBuildFleet(this, jsii.String("Game server fleet"), &BuildFleetProps{
	FleetName: jsii.String("test-fleet"),
	Content: build,
	InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_C4, ec2.InstanceSize_LARGE),
	RuntimeConfiguration: &RuntimeConfiguration{
		ServerProcesses: []serverProcess{
			&serverProcess{
				LaunchPath: jsii.String("/local/game/GameLiftExampleServer.x86_64"),
			},
		},
	},
	Locations: []location{
		&location{
			Region: jsii.String("eu-west-1"),
			Capacity: &LocationCapacity{
				DesiredCapacity: jsii.Number(5),
				MinSize: jsii.Number(2),
				MaxSize: jsii.Number(10),
			},
		},
		&location{
			Region: jsii.String("us-east-1"),
			Capacity: &LocationCapacity{
				DesiredCapacity: jsii.Number(5),
				MinSize: jsii.Number(2),
				MaxSize: jsii.Number(10),
			},
		},
	},
})

// Or through dedicated methods
fleet.AddLocation(jsii.String("ap-southeast-1"), jsii.Number(5), jsii.Number(2), jsii.Number(10))
Specifying an IAM role for a Fleet

Some GameLift features require you to extend limited access to your AWS resources. This is done by creating an AWS IAM role. The GameLift Fleet class automatically created an IAM role with all the minimum necessary permissions for GameLift to access your resources. If you wish, you may specify your own IAM role.

var build build

role := iam.NewRole(this, jsii.String("Role"), &RoleProps{
	AssumedBy: iam.NewCompositePrincipal(iam.NewServicePrincipal(jsii.String("gamelift.amazonaws.com"))),
})
role.AddManagedPolicy(iam.ManagedPolicy_FromAwsManagedPolicyName(jsii.String("CloudWatchAgentServerPolicy")))

fleet := gamelift.NewBuildFleet(this, jsii.String("Game server fleet"), &BuildFleetProps{
	FleetName: jsii.String("test-fleet"),
	Content: build,
	InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_C5, ec2.InstanceSize_LARGE),
	RuntimeConfiguration: &RuntimeConfiguration{
		ServerProcesses: []serverProcess{
			&serverProcess{
				LaunchPath: jsii.String("/local/game/GameLiftExampleServer.x86_64"),
			},
		},
	},
	Role: role,
})

// Actions can also be grantted through dedicated method
fleet.Grant(role, jsii.String("gamelift:ListFleets"))
Alias

A GameLift alias is used to abstract a fleet designation. Fleet designations tell Amazon GameLift where to search for available resources when creating new game sessions for players. By using aliases instead of specific fleet IDs, you can more easily and seamlessly switch player traffic from one fleet to another by changing the alias's target location.

var fleet buildFleet


// Add an alias to an existing fleet using a dedicated fleet method
liveAlias := fleet.AddAlias(jsii.String("live"))

// You can also create a standalone alias
// You can also create a standalone alias
gamelift.NewAlias(this, jsii.String("TerminalAlias"), &AliasProps{
	AliasName: jsii.String("terminal-alias"),
	TerminalMessage: jsii.String("A terminal message"),
})

See Add an alias to a GameLift fleet in the Amazon GameLift Developer Guide.

Monitoring your Fleet

GameLift is integrated with CloudWatch, so you can monitor the performance of your game servers via logs and metrics.

Fleet Metrics

GameLift Fleet sends metrics to CloudWatch so that you can collect and analyze the activity of your Fleet, including game and player sessions and server processes.

You can then use CloudWatch alarms to alert you, for example, when matches has been rejected (potential matches that were rejected by at least one player since the last report) exceed a certain threshold which could means that you may have an issue in your matchmaking rules.

CDK provides methods for accessing GameLift Fleet metrics with default configuration, such as metricActiveInstances, or metricIdleInstances (see IFleet for a full list). CDK also provides a generic metric method that can be used to produce metric configurations for any metric provided by GameLift Fleet, Game sessions or server processes; the configurations are pre-populated with the correct dimensions for the matchmaking configuration.

var fleet buildFleet

// Alarm that triggers when the per-second average of not used instances exceed 10%
instancesUsedRatio := cloudwatch.NewMathExpression(&MathExpressionProps{
	Expression: jsii.String("1 - (activeInstances / idleInstances)"),
	UsingMetrics: map[string]iMetric{
		"activeInstances": fleet.metric(jsii.String("ActiveInstances"), &MetricOptions{
			"statistic": cloudwatch.Statistic_SUM,
		}),
		"idleInstances": fleet.metricIdleInstances(),
	},
})
cloudwatch.NewAlarm(this, jsii.String("Alarm"), &AlarmProps{
	Metric: instancesUsedRatio,
	Threshold: jsii.Number(0.1),
	EvaluationPeriods: jsii.Number(3),
})

See: Monitoring Using CloudWatch Metrics in the Amazon GameLift Developer Guide.

Game session queue

The game session queue is the primary mechanism for processing new game session requests and locating available game servers to host them. Although it is possible to request a new game session be hosted on specific fleet or location.

The GameSessionQueue resource creates a placement queue that processes requests for new game sessions. A queue uses FleetIQ algorithms to determine the best placement locations and find an available game server, then prompts the game server to start a new game session. Queues can have destinations (GameLift fleets or aliases), which determine where the queue can place new game sessions. A queue can have destinations with varied fleet type (Spot and On-Demand), instance type, and AWS Region.

var fleet buildFleet
var alias alias


queue := gamelift.NewGameSessionQueue(this, jsii.String("GameSessionQueue"), &GameSessionQueueProps{
	GameSessionQueueName: jsii.String("my-queue-name"),
	Destinations: []iGameSessionQueueDestination{
		fleet,
	},
})
queue.AddDestination(alias)

A more complex configuration can also be definied to override how FleetIQ algorithms prioritize game session placement in order to favour a destination based on Cost, Latency, Destination orderor Location.

var fleet buildFleet
var topic topic


gamelift.NewGameSessionQueue(this, jsii.String("MyGameSessionQueue"), &GameSessionQueueProps{
	GameSessionQueueName: jsii.String("test-gameSessionQueue"),
	CustomEventData: jsii.String("test-event-data"),
	AllowedLocations: []*string{
		jsii.String("eu-west-1"),
		jsii.String("eu-west-2"),
	},
	Destinations: []iGameSessionQueueDestination{
		fleet,
	},
	NotificationTarget: topic,
	PlayerLatencyPolicies: []playerLatencyPolicy{
		&playerLatencyPolicy{
			MaximumIndividualPlayerLatency: awscdk.Duration_Millis(jsii.Number(100)),
			PolicyDuration: awscdk.Duration_Seconds(jsii.Number(300)),
		},
	},
	PriorityConfiguration: &PriorityConfiguration{
		LocationOrder: []*string{
			jsii.String("eu-west-1"),
			jsii.String("eu-west-2"),
		},
		PriorityOrder: []priorityType{
			gamelift.*priorityType_LATENCY,
			gamelift.*priorityType_COST,
			gamelift.*priorityType_DESTINATION,
			gamelift.*priorityType_LOCATION,
		},
	},
	Timeout: awscdk.Duration_*Seconds(jsii.Number(300)),
})

See Setting up GameLift queues for game session placement in the Amazon GameLift Developer Guide.

GameLift FleetIQ

The GameLift FleetIQ solution is a game hosting layer that supplements the full set of computing resource management tools that you get with Amazon EC2 and Auto Scaling. This solution lets you directly manage your Amazon EC2 and Auto Scaling resources and integrate as needed with other AWS services.

Defining a Game Server Group

When using GameLift FleetIQ, you prepare to launch Amazon EC2 instances as usual: make an Amazon Machine Image (AMI) with your game server software, create an Amazon EC2 launch template, and define configuration settings for an Auto Scaling group. However, instead of creating an Auto Scaling group directly, you create a GameLift FleetIQ game server group with your Amazon EC2 and Auto Scaling resources and configuration. All game server groups must have at least two instance types defined for it.

Once a game server group and Auto Scaling group are up and running with instances deployed, when updating a Game Server Group instance, only certain properties in the Auto Scaling group may be overwrite. For all other Auto Scaling group properties, such as MinSize, MaxSize, and LaunchTemplate, you can modify these directly on the Auto Scaling group using the AWS Console or dedicated Api.

var launchTemplate iLaunchTemplate
var vpc iVpc


gamelift.NewGameServerGroup(this, jsii.String("Game server group"), &GameServerGroupProps{
	GameServerGroupName: jsii.String("sample-gameservergroup-name"),
	InstanceDefinitions: []instanceDefinition{
		&instanceDefinition{
			InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_C5, ec2.InstanceSize_LARGE),
		},
		&instanceDefinition{
			InstanceType: ec2.InstanceType_*Of(ec2.InstanceClass_C4, ec2.InstanceSize_LARGE),
		},
	},
	LaunchTemplate: launchTemplate,
	Vpc: vpc,
})

See Manage game server groups in the Amazon GameLift FleetIQ Developer Guide.

Scaling Policy

The scaling policy uses the metric PercentUtilizedGameServers to maintain a buffer of idle game servers that can immediately accommodate new games and players.

var launchTemplate iLaunchTemplate
var vpc iVpc


gamelift.NewGameServerGroup(this, jsii.String("Game server group"), &GameServerGroupProps{
	GameServerGroupName: jsii.String("sample-gameservergroup-name"),
	InstanceDefinitions: []instanceDefinition{
		&instanceDefinition{
			InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_C5, ec2.InstanceSize_LARGE),
		},
		&instanceDefinition{
			InstanceType: ec2.InstanceType_*Of(ec2.InstanceClass_C4, ec2.InstanceSize_LARGE),
		},
	},
	LaunchTemplate: launchTemplate,
	Vpc: vpc,
	AutoScalingPolicy: &AutoScalingPolicy{
		EstimatedInstanceWarmup: awscdk.Duration_Minutes(jsii.Number(5)),
		TargetTrackingConfiguration: jsii.Number(5),
	},
})

See Manage game server groups in the Amazon GameLift FleetIQ Developer Guide.

Specifying an IAM role for GameLift

The GameLift FleetIQ class automatically creates an IAM role with all the minimum necessary permissions for GameLift to access your Amazon EC2 Auto Scaling groups. If you wish, you may specify your own IAM role. It must have the correct permissions, or FleetIQ creation or resource usage may fail.

var launchTemplate iLaunchTemplate
var vpc iVpc


role := iam.NewRole(this, jsii.String("Role"), &RoleProps{
	AssumedBy: iam.NewCompositePrincipal(iam.NewServicePrincipal(jsii.String("gamelift.amazonaws.com")),
	iam.NewServicePrincipal(jsii.String("autoscaling.amazonaws.com"))),
})
role.AddManagedPolicy(iam.ManagedPolicy_FromAwsManagedPolicyName(jsii.String("GameLiftGameServerGroupPolicy")))

gamelift.NewGameServerGroup(this, jsii.String("Game server group"), &GameServerGroupProps{
	GameServerGroupName: jsii.String("sample-gameservergroup-name"),
	InstanceDefinitions: []instanceDefinition{
		&instanceDefinition{
			InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_C5, ec2.InstanceSize_LARGE),
		},
		&instanceDefinition{
			InstanceType: ec2.InstanceType_*Of(ec2.InstanceClass_C4, ec2.InstanceSize_LARGE),
		},
	},
	LaunchTemplate: launchTemplate,
	Vpc: vpc,
	Role: role,
})

See Controlling Access in the Amazon GameLift FleetIQ Developer Guide.

Specifying VPC Subnets

GameLift FleetIQ use by default, all supported GameLift FleetIQ Availability Zones in your chosen region. You can override this parameter to specify VPCs subnets that you've set up.

This property cannot be updated after the game server group is created, and the corresponding Auto Scaling group will always use the property value that is set with this request, even if the Auto Scaling group is updated directly.

var launchTemplate iLaunchTemplate
var vpc iVpc


gamelift.NewGameServerGroup(this, jsii.String("GameServerGroup"), &GameServerGroupProps{
	GameServerGroupName: jsii.String("sample-gameservergroup-name"),
	InstanceDefinitions: []instanceDefinition{
		&instanceDefinition{
			InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_C5, ec2.InstanceSize_LARGE),
		},
		&instanceDefinition{
			InstanceType: ec2.InstanceType_*Of(ec2.InstanceClass_C4, ec2.InstanceSize_LARGE),
		},
	},
	LaunchTemplate: launchTemplate,
	Vpc: vpc,
	VpcSubnets: &SubnetSelection{
		SubnetType: ec2.SubnetType_PUBLIC,
	},
})
FleetIQ Monitoring

GameLift FleetIQ sends metrics to CloudWatch so that you can collect and analyze the activity of your Game server fleet, including the number of utilized game servers, and the number of game server interruption due to limited Spot availability.

You can then use CloudWatch alarms to alert you, for example, when the portion of game servers that are currently supporting game executions exceed a certain threshold which could means that your autoscaling policy need to be adjust to add more instances to match with player demand.

CDK provides a generic metric method that can be used to produce metric configurations for any metric provided by GameLift FleetIQ; the configurations are pre-populated with the correct dimensions for the matchmaking configuration.

var gameServerGroup iGameServerGroup

// Alarm that triggers when the percent of utilized game servers exceed 90%
// Alarm that triggers when the percent of utilized game servers exceed 90%
cloudwatch.NewAlarm(this, jsii.String("Alarm"), &AlarmProps{
	Metric: gameServerGroup.Metric(jsii.String("UtilizedGameServers")),
	Threshold: jsii.Number(0.9),
	EvaluationPeriods: jsii.Number(2),
})

See: Monitoring with CloudWatch in the Amazon GameLift FleetIQ Developer Guide.

Documentation

Overview

The CDK Construct Library for AWS::GameLift

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AliasBase_IsConstruct

func AliasBase_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func AliasBase_IsOwnedResource

func AliasBase_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func AliasBase_IsResource

func AliasBase_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func Alias_IsConstruct

func Alias_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func Alias_IsOwnedResource

func Alias_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func Alias_IsResource

func Alias_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func BuildBase_IsConstruct

func BuildBase_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func BuildBase_IsOwnedResource

func BuildBase_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func BuildBase_IsResource

func BuildBase_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func BuildFleet_IsConstruct

func BuildFleet_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func BuildFleet_IsOwnedResource

func BuildFleet_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func BuildFleet_IsResource

func BuildFleet_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func Build_IsConstruct

func Build_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func Build_IsOwnedResource

func Build_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func Build_IsResource

func Build_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func FleetBase_IsConstruct

func FleetBase_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func FleetBase_IsOwnedResource

func FleetBase_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func FleetBase_IsResource

func FleetBase_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func GameServerGroupBase_IsConstruct

func GameServerGroupBase_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func GameServerGroupBase_IsOwnedResource

func GameServerGroupBase_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func GameServerGroupBase_IsResource

func GameServerGroupBase_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func GameServerGroup_IsConstruct

func GameServerGroup_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func GameServerGroup_IsOwnedResource

func GameServerGroup_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func GameServerGroup_IsResource

func GameServerGroup_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func GameSessionQueueBase_IsConstruct

func GameSessionQueueBase_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func GameSessionQueueBase_IsOwnedResource

func GameSessionQueueBase_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func GameSessionQueueBase_IsResource

func GameSessionQueueBase_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func GameSessionQueue_IsConstruct

func GameSessionQueue_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func GameSessionQueue_IsOwnedResource

func GameSessionQueue_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func GameSessionQueue_IsResource

func GameSessionQueue_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func MatchmakingConfigurationBase_IsConstruct

func MatchmakingConfigurationBase_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func MatchmakingConfigurationBase_IsOwnedResource

func MatchmakingConfigurationBase_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func MatchmakingConfigurationBase_IsResource

func MatchmakingConfigurationBase_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func MatchmakingRuleSetBase_IsConstruct

func MatchmakingRuleSetBase_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func MatchmakingRuleSetBase_IsOwnedResource

func MatchmakingRuleSetBase_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func MatchmakingRuleSetBase_IsResource

func MatchmakingRuleSetBase_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func MatchmakingRuleSet_IsConstruct

func MatchmakingRuleSet_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func MatchmakingRuleSet_IsOwnedResource

func MatchmakingRuleSet_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func MatchmakingRuleSet_IsResource

func MatchmakingRuleSet_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func NewAliasBase_Override

func NewAliasBase_Override(a AliasBase, scope constructs.Construct, id *string, props *awscdk.ResourceProps)

Experimental.

func NewAlias_Override

func NewAlias_Override(a Alias, scope constructs.Construct, id *string, props *AliasProps)

Experimental.

func NewAssetContent_Override

func NewAssetContent_Override(a AssetContent, path *string, options *awss3assets.AssetOptions)

Experimental.

func NewBuildBase_Override

func NewBuildBase_Override(b BuildBase, scope constructs.Construct, id *string, props *awscdk.ResourceProps)

Experimental.

func NewBuildFleet_Override

func NewBuildFleet_Override(b BuildFleet, scope constructs.Construct, id *string, props *BuildFleetProps)

Experimental.

func NewBuild_Override

func NewBuild_Override(b Build, scope constructs.Construct, id *string, props *BuildProps)

Experimental.

func NewContent_Override

func NewContent_Override(c Content)

Experimental.

func NewFleetBase_Override

func NewFleetBase_Override(f FleetBase, scope constructs.Construct, id *string, props *awscdk.ResourceProps)

Experimental.

func NewGameServerGroupBase_Override

func NewGameServerGroupBase_Override(g GameServerGroupBase, scope constructs.Construct, id *string, props *awscdk.ResourceProps)

Experimental.

func NewGameServerGroup_Override

func NewGameServerGroup_Override(g GameServerGroup, scope constructs.Construct, id *string, props *GameServerGroupProps)

Experimental.

func NewGameSessionQueueBase_Override

func NewGameSessionQueueBase_Override(g GameSessionQueueBase, scope constructs.Construct, id *string, props *awscdk.ResourceProps)

Experimental.

func NewGameSessionQueue_Override

func NewGameSessionQueue_Override(g GameSessionQueue, scope constructs.Construct, id *string, props *GameSessionQueueProps)

Experimental.

func NewMatchmakingConfigurationBase_Override

func NewMatchmakingConfigurationBase_Override(m MatchmakingConfigurationBase, scope constructs.Construct, id *string, props *awscdk.ResourceProps)

Experimental.

func NewMatchmakingRuleSetBase_Override

func NewMatchmakingRuleSetBase_Override(m MatchmakingRuleSetBase, scope constructs.Construct, id *string, props *awscdk.ResourceProps)

Experimental.

func NewMatchmakingRuleSet_Override

func NewMatchmakingRuleSet_Override(m MatchmakingRuleSet, scope constructs.Construct, id *string, props *MatchmakingRuleSetProps)

Experimental.

func NewPeer_Override

func NewPeer_Override(p Peer)

Experimental.

func NewPort_Override

func NewPort_Override(p Port, props *PortProps)

Experimental.

func NewQueuedMatchmakingConfiguration_Override

func NewQueuedMatchmakingConfiguration_Override(q QueuedMatchmakingConfiguration, scope constructs.Construct, id *string, props *QueuedMatchmakingConfigurationProps)

Experimental.

func NewRuleSetContent_Override

func NewRuleSetContent_Override(r RuleSetContent, props *RuleSetContentProps)

Experimental.

func NewS3Content_Override

func NewS3Content_Override(s S3Content, bucket awss3.IBucket, key *string, objectVersion *string)

Experimental.

func NewScriptBase_Override

func NewScriptBase_Override(s ScriptBase, scope constructs.Construct, id *string, props *awscdk.ResourceProps)

Experimental.

func NewScript_Override

func NewScript_Override(s Script, scope constructs.Construct, id *string, props *ScriptProps)

Experimental.

func NewStandaloneMatchmakingConfiguration_Override

func NewStandaloneMatchmakingConfiguration_Override(s StandaloneMatchmakingConfiguration, scope constructs.Construct, id *string, props *StandaloneMatchmakingConfigurationProps)

Experimental.

func QueuedMatchmakingConfiguration_IsConstruct

func QueuedMatchmakingConfiguration_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func QueuedMatchmakingConfiguration_IsOwnedResource

func QueuedMatchmakingConfiguration_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func QueuedMatchmakingConfiguration_IsResource

func QueuedMatchmakingConfiguration_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func ScriptBase_IsConstruct

func ScriptBase_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func ScriptBase_IsOwnedResource

func ScriptBase_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func ScriptBase_IsResource

func ScriptBase_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func Script_IsConstruct

func Script_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func Script_IsOwnedResource

func Script_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func Script_IsResource

func Script_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func StandaloneMatchmakingConfiguration_IsConstruct

func StandaloneMatchmakingConfiguration_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func StandaloneMatchmakingConfiguration_IsOwnedResource

func StandaloneMatchmakingConfiguration_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func StandaloneMatchmakingConfiguration_IsResource

func StandaloneMatchmakingConfiguration_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

Types

type Alias

type Alias interface {
	AliasBase
	// The ARN of the alias.
	// Experimental.
	AliasArn() *string
	// The Identifier of the alias.
	// Experimental.
	AliasId() *string
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// A fleet that the alias points to.
	// Experimental.
	Fleet() IFleet
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The ARN to put into the destination field of a game session queue.
	// Experimental.
	ResourceArnForDestination() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// 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`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
}

A Amazon GameLift alias is used to abstract a fleet designation.

Fleet designations tell GameLift where to search for available resources when creating new game sessions for players. Use aliases instead of specific fleet IDs to seamlessly switch player traffic from one fleet to another by changing the alias's target location.

Aliases are useful in games that don't use queues. Switching fleets in a queue is a simple matter of creating a new fleet, adding it to the queue, and removing the old fleet, none of which is visible to players. In contrast, game clients that don't use queues must specify which fleet to use when communicating with the GameLift service. Without aliases, a fleet switch requires updates to your game code and possibly distribution of an updated game clients to players.

When updating the fleet-id an alias points to, there is a transition period of up to 2 minutes where game sessions on the alias may end up on the old fleet.

Example:

var fleet buildFleet

// Add an alias to an existing fleet using a dedicated fleet method
liveAlias := fleet.AddAlias(jsii.String("live"))

// You can also create a standalone alias
// You can also create a standalone alias
gamelift.NewAlias(this, jsii.String("TerminalAlias"), &AliasProps{
	AliasName: jsii.String("terminal-alias"),
	TerminalMessage: jsii.String("A terminal message"),
})

See: https://docs.aws.amazon.com/gamelift/latest/developerguide/aliases-creating.html

Experimental.

func NewAlias

func NewAlias(scope constructs.Construct, id *string, props *AliasProps) Alias

Experimental.

type AliasAttributes

type AliasAttributes struct {
	// The ARN of the alias.
	//
	// At least one of `aliasArn` and `aliasId` must be provided.
	// Default: derived from `aliasId`.
	//
	// Experimental.
	AliasArn *string `field:"optional" json:"aliasArn" yaml:"aliasArn"`
	// The identifier of the alias.
	//
	// At least one of `aliasId` and `aliasArn`  must be provided.
	// Default: derived from `aliasArn`.
	//
	// Experimental.
	AliasId *string `field:"optional" json:"aliasId" yaml:"aliasId"`
}

A full specification of an alias that can be used to import it fluently into the CDK application.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"

aliasAttributes := &AliasAttributes{
	AliasArn: jsii.String("aliasArn"),
	AliasId: jsii.String("aliasId"),
}

Experimental.

type AliasBase

type AliasBase interface {
	awscdk.Resource
	IAlias
	// The ARN of the alias.
	// Experimental.
	AliasArn() *string
	// The Identifier of the alias.
	// Experimental.
	AliasId() *string
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The ARN to put into the destination field of a game session queue.
	// Experimental.
	ResourceArnForDestination() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// 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`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
}

Base class for new and imported GameLift Alias. Experimental.

type AliasOptions

type AliasOptions struct {
	// Description for the alias.
	// Default: No description.
	//
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
}

Options for `gamelift.Alias`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"

aliasOptions := &AliasOptions{
	Description: jsii.String("description"),
}

Experimental.

type AliasProps

type AliasProps struct {
	// Name of this alias.
	// Experimental.
	AliasName *string `field:"required" json:"aliasName" yaml:"aliasName"`
	// A human-readable description of the alias.
	// Default: no description.
	//
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// A fleet that the alias points to. If specified, the alias resolves to one specific fleet.
	//
	// At least one of `fleet` and `terminalMessage` must be provided.
	// Default: no fleet that the alias points to.
	//
	// Experimental.
	Fleet IFleet `field:"optional" json:"fleet" yaml:"fleet"`
	// The message text to be used with a terminal routing strategy.
	//
	// At least one of `fleet` and `terminalMessage` must be provided.
	// Default: no terminal message.
	//
	// Experimental.
	TerminalMessage *string `field:"optional" json:"terminalMessage" yaml:"terminalMessage"`
}

Properties for a new Fleet alias.

Example:

var fleet buildFleet

// Add an alias to an existing fleet using a dedicated fleet method
liveAlias := fleet.AddAlias(jsii.String("live"))

// You can also create a standalone alias
// You can also create a standalone alias
gamelift.NewAlias(this, jsii.String("TerminalAlias"), &AliasProps{
	AliasName: jsii.String("terminal-alias"),
	TerminalMessage: jsii.String("A terminal message"),
})

Experimental.

type AssetContent

type AssetContent interface {
	Content
	// The path to the asset file or directory.
	// Experimental.
	Path() *string
	// Called when the Build is initialized to allow this object to bind.
	// Experimental.
	Bind(scope constructs.Construct, role awsiam.IRole) *ContentConfig
}

Game content from a local directory.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var dockerImage dockerImage
var grantable iGrantable
var localBundling iLocalBundling

assetContent := gamelift_alpha.NewAssetContent(jsii.String("path"), &AssetOptions{
	AssetHash: jsii.String("assetHash"),
	AssetHashType: cdk.AssetHashType_SOURCE,
	Bundling: &BundlingOptions{
		Image: dockerImage,

		// the properties below are optional
		BundlingFileAccess: cdk.BundlingFileAccess_VOLUME_COPY,
		Command: []*string{
			jsii.String("command"),
		},
		Entrypoint: []*string{
			jsii.String("entrypoint"),
		},
		Environment: map[string]*string{
			"environmentKey": jsii.String("environment"),
		},
		Local: localBundling,
		Network: jsii.String("network"),
		OutputType: cdk.BundlingOutput_ARCHIVED,
		Platform: jsii.String("platform"),
		SecurityOpt: jsii.String("securityOpt"),
		User: jsii.String("user"),
		Volumes: []dockerVolume{
			&dockerVolume{
				ContainerPath: jsii.String("containerPath"),
				HostPath: jsii.String("hostPath"),

				// the properties below are optional
				Consistency: cdk.DockerVolumeConsistency_CONSISTENT,
			},
		},
		VolumesFrom: []*string{
			jsii.String("volumesFrom"),
		},
		WorkingDirectory: jsii.String("workingDirectory"),
	},
	DeployTime: jsii.Boolean(false),
	Exclude: []*string{
		jsii.String("exclude"),
	},
	FollowSymlinks: cdk.SymlinkFollowMode_NEVER,
	IgnoreMode: cdk.IgnoreMode_GLOB,
	Readers: []*iGrantable{
		grantable,
	},
})

Experimental.

func AssetContent_FromAsset

func AssetContent_FromAsset(path *string, options *awss3assets.AssetOptions) AssetContent

Loads the game content from a local disk path. Experimental.

func Content_FromAsset

func Content_FromAsset(path *string, options *awss3assets.AssetOptions) AssetContent

Loads the game content from a local disk path. Experimental.

func NewAssetContent

func NewAssetContent(path *string, options *awss3assets.AssetOptions) AssetContent

Experimental.

func S3Content_FromAsset

func S3Content_FromAsset(path *string, options *awss3assets.AssetOptions) AssetContent

Loads the game content from a local disk path. Experimental.

type AutoScalingPolicy

type AutoScalingPolicy struct {
	// Settings for a target-based scaling policy applied to Auto Scaling group.
	//
	// These settings are used to create a target-based policy that tracks the GameLift FleetIQ metric `PercentUtilizedGameServers` and specifies a target value for the metric.
	//
	// As player usage changes, the policy triggers to adjust the game server group capacity so that the metric returns to the target value.
	// Experimental.
	TargetTrackingConfiguration *float64 `field:"required" json:"targetTrackingConfiguration" yaml:"targetTrackingConfiguration"`
	// Length of time, it takes for a new instance to start new game server processes and register with GameLift FleetIQ.
	//
	// Specifying a warm-up time can be useful, particularly with game servers that take a long time to start up, because it avoids prematurely starting new instances.
	// Default: no instance warmup duration settled.
	//
	// Experimental.
	EstimatedInstanceWarmup awscdk.Duration `field:"optional" json:"estimatedInstanceWarmup" yaml:"estimatedInstanceWarmup"`
}

Configuration settings for intelligent automatic scaling that uses target tracking.

After the Auto Scaling group is created, all updates to Auto Scaling policies, including changing this policy and adding or removing other policies, is done directly on the Auto Scaling group.

Example:

var launchTemplate iLaunchTemplate
var vpc iVpc

gamelift.NewGameServerGroup(this, jsii.String("Game server group"), &GameServerGroupProps{
	GameServerGroupName: jsii.String("sample-gameservergroup-name"),
	InstanceDefinitions: []instanceDefinition{
		&instanceDefinition{
			InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_C5, ec2.InstanceSize_LARGE),
		},
		&instanceDefinition{
			InstanceType: ec2.InstanceType_*Of(ec2.InstanceClass_C4, ec2.InstanceSize_LARGE),
		},
	},
	LaunchTemplate: launchTemplate,
	Vpc: vpc,
	AutoScalingPolicy: &AutoScalingPolicy{
		EstimatedInstanceWarmup: awscdk.Duration_Minutes(jsii.Number(5)),
		TargetTrackingConfiguration: jsii.Number(5),
	},
})

Experimental.

type BalancingStrategy

type BalancingStrategy string

Indicates how GameLift FleetIQ balances the use of Spot Instances and On-Demand Instances in the game server group. Experimental.

const (
	// Only Spot Instances are used in the game server group.
	//
	// If Spot Instances are unavailable or not viable for game hosting, the game server group provides no hosting capacity until Spot Instances can again be used.
	// Until then, no new instances are started, and the existing nonviable Spot Instances are terminated (after current gameplay ends) and are not replaced.
	// Experimental.
	BalancingStrategy_SPOT_ONLY BalancingStrategy = "SPOT_ONLY"
	// Spot Instances are used whenever available in the game server group.
	//
	// If Spot Instances are unavailable, the game server group continues to provide hosting capacity by falling back to On-Demand Instances.
	// Existing nonviable Spot Instances are terminated (after current gameplay ends) and are replaced with new On-Demand Instances.
	// Experimental.
	BalancingStrategy_SPOT_PREFERRED BalancingStrategy = "SPOT_PREFERRED"
	// Only On-Demand Instances are used in the game server group.
	//
	// No Spot Instances are used, even when available, while this balancing strategy is in force.
	// Experimental.
	BalancingStrategy_ON_DEMAND_ONLY BalancingStrategy = "ON_DEMAND_ONLY"
)

type Build

type Build interface {
	BuildBase
	// The ARN of the build.
	// Experimental.
	BuildArn() *string
	// The Identifier of the build.
	// Experimental.
	BuildId() *string
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The principal this GameLift Build is using.
	// Experimental.
	GrantPrincipal() awsiam.IPrincipal
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The IAM role GameLift assumes to acccess server build content.
	// Experimental.
	Role() awsiam.IRole
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// 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`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
}

A GameLift build, that is installed and runs on instances in an Amazon GameLift fleet.

It consists of a zip file with all of the components of the game server build.

Example:

var bucket bucket

build := gamelift.NewBuild(this, jsii.String("Build"), &BuildProps{
	Content: gamelift.Content_FromBucket(bucket, jsii.String("sample-asset-key")),
})

awscdk.NewCfnOutput(this, jsii.String("BuildArn"), &CfnOutputProps{
	Value: build.BuildArn,
})
awscdk.NewCfnOutput(this, jsii.String("BuildId"), &CfnOutputProps{
	Value: build.BuildId,
})

See: https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-cli-uploading.html

Experimental.

func Build_FromAsset

func Build_FromAsset(scope constructs.Construct, id *string, path *string, options *awss3assets.AssetOptions) Build

Create a new Build from asset content. Experimental.

func Build_FromBucket

func Build_FromBucket(scope constructs.Construct, id *string, bucket awss3.IBucket, key *string, objectVersion *string) Build

Create a new Build from s3 content. Experimental.

func NewBuild

func NewBuild(scope constructs.Construct, id *string, props *BuildProps) Build

Experimental.

type BuildAttributes

type BuildAttributes struct {
	// The ARN of the build.
	//
	// At least one of `buildArn` and `buildId` must be provided.
	// Default: derived from `buildId`.
	//
	// Experimental.
	BuildArn *string `field:"optional" json:"buildArn" yaml:"buildArn"`
	// The identifier of the build.
	//
	// At least one of `buildId` and `buildArn`  must be provided.
	// Default: derived from `buildArn`.
	//
	// Experimental.
	BuildId *string `field:"optional" json:"buildId" yaml:"buildId"`
	// The IAM role assumed by GameLift to access server build in S3.
	// Default: the imported fleet cannot be granted access to other resources as an `iam.IGrantable`.
	//
	// Experimental.
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
}

Represents a Build content defined outside of this stack.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"
import "github.com/aws/aws-cdk-go/awscdk"

var role role

buildAttributes := &BuildAttributes{
	BuildArn: jsii.String("buildArn"),
	BuildId: jsii.String("buildId"),
	Role: role,
}

Experimental.

type BuildBase

type BuildBase interface {
	awscdk.Resource
	IBuild
	// The ARN of the build.
	// Experimental.
	BuildArn() *string
	// The Identifier of the build.
	// Experimental.
	BuildId() *string
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The principal to grant permissions to.
	// Experimental.
	GrantPrincipal() awsiam.IPrincipal
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// 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`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
}

Base class for new and imported GameLift server build. Experimental.

type BuildFleet

type BuildFleet interface {
	FleetBase
	IBuildFleet
	// The build content of the fleet.
	// Experimental.
	Content() IBuild
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The ARN of the fleet.
	// Experimental.
	FleetArn() *string
	// The Identifier of the fleet.
	// Experimental.
	FleetId() *string
	// The principal this GameLift fleet is using.
	// Experimental.
	GrantPrincipal() awsiam.IPrincipal
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The ARN to put into the destination field of a game session queue.
	// Experimental.
	ResourceArnForDestination() *string
	// The IAM role GameLift assumes by fleet instances to access AWS ressources.
	// Experimental.
	Role() awsiam.IRole
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Defines an alias for this fleet.
	//
	// “`ts
	// declare const fleet: gamelift.FleetBase;
	//
	// fleet.addAlias('Live');
	//
	// // Is equivalent to
	//
	// new gamelift.Alias(this, 'AliasLive', {
	//   aliasName: 'Live',
	//   fleet: fleet,
	// });
	// “`.
	// Experimental.
	AddAlias(aliasName *string, options *AliasOptions) Alias
	// Adds an ingress rule to allow inbound traffic to access game sessions on this fleet.
	// Experimental.
	AddIngressRule(source IPeer, port Port)
	// Adds a remote locations to deploy additional instances to and manage as part of the fleet.
	// Experimental.
	AddInternalLocation(location *Location)
	// Adds a remote locations to deploy additional instances to and manage as part of the fleet.
	// Experimental.
	AddLocation(region *string, desiredCapacity *float64, minSize *float64, maxSize *float64)
	// Apply the given removal policy to this resource.
	//
	// 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`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Grant the `grantee` identity permissions to perform `actions`.
	// Experimental.
	Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant
	// Return the given named metric for this fleet.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Instances with `ACTIVE` status, which means they are running active server processes.
	//
	// The count includes idle instances and those that are hosting one or more game sessions.
	// This metric measures current total instance capacity.
	//
	// This metric can be used with automatic scaling.
	// Experimental.
	MetricActiveInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Target number of active instances that GameLift is working to maintain in the fleet.
	//
	// With automatic scaling, this value is determined based on the scaling policies currently in force.
	// Without automatic scaling, this value is set manually.
	// This metric is not available when viewing data for fleet metric groups.
	// Experimental.
	MetricDesiredInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Active instances that are currently hosting zero (0) game sessions.
	//
	// This metric measures capacity that is available but unused.
	// This metric can be used with automatic scaling.
	// Experimental.
	MetricIdleInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Number of spot instances that have been interrupted.
	// Experimental.
	MetricInstanceInterruptions(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Maximum number of instances that are allowed for the fleet.
	//
	// A fleet's instance maximum determines the capacity ceiling during manual or automatic scaling up.
	// This metric is not available when viewing data for fleet metric groups.
	// Experimental.
	MetricMaxInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Minimum number of instances allowed for the fleet.
	//
	// A fleet's instance minimum determines the capacity floor during manual or automatic scaling down.
	// This metric is not available when viewing data for fleet metric groups.
	// Experimental.
	MetricMinInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Percentage of all active instances that are idle (calculated as IdleInstances / ActiveInstances).
	//
	// This metric can be used for automatic scaling.
	// Experimental.
	MetricPercentIdleInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Experimental.
	ParseLocationCapacity(capacity *LocationCapacity) *awsgamelift.CfnFleet_LocationCapacityProperty
	// Experimental.
	ParseLocations() *[]*awsgamelift.CfnFleet_LocationConfigurationProperty
	// Experimental.
	ParseResourceCreationLimitPolicy(props *FleetProps) *awsgamelift.CfnFleet_ResourceCreationLimitPolicyProperty
	// Experimental.
	ParseRuntimeConfiguration(props *FleetProps) *awsgamelift.CfnFleet_RuntimeConfigurationProperty
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Experimental.
	WarnVpcPeeringAuthorizations(scope constructs.Construct)
}

A fleet contains Amazon Elastic Compute Cloud (Amazon EC2) instances that GameLift hosts.

A fleet uses the configuration and scaling logic that you define to run your game server build. You can use a fleet directly without a queue. You can also associate multiple fleets with a GameLift queue.

For example, you can use Spot Instance fleets configured with your preferred locations, along with a backup On-Demand Instance fleet with the same locations. Using multiple Spot Instance fleets of different instance types reduces the chance of needing On-Demand Instance placement.

Example:

var build build

// Server processes can be delcared in a declarative way through the constructor
fleet := gamelift.NewBuildFleet(this, jsii.String("Game server fleet"), &BuildFleetProps{
	FleetName: jsii.String("test-fleet"),
	Content: build,
	InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_C4, ec2.InstanceSize_LARGE),
	RuntimeConfiguration: &RuntimeConfiguration{
		ServerProcesses: []serverProcess{
			&serverProcess{
				LaunchPath: jsii.String("/local/game/GameLiftExampleServer.x86_64"),
				Parameters: jsii.String("-logFile /local/game/logs/myserver1935.log -port 1935"),
				ConcurrentExecutions: jsii.Number(100),
			},
		},
	},
})

Experimental.

func NewBuildFleet

func NewBuildFleet(scope constructs.Construct, id *string, props *BuildFleetProps) BuildFleet

Experimental.

type BuildFleetProps

type BuildFleetProps struct {
	// A descriptive label that is associated with a fleet.
	//
	// Fleet names do not need to be unique.
	// Experimental.
	FleetName *string `field:"required" json:"fleetName" yaml:"fleetName"`
	// 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: http://aws.amazon.com/ec2/instance-types/ for detailed descriptions of Amazon EC2 instance types.
	//
	// Experimental.
	InstanceType awsec2.InstanceType `field:"required" json:"instanceType" yaml:"instanceType"`
	// 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.
	// See: https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-multiprocess.html
	//
	// Experimental.
	RuntimeConfiguration *RuntimeConfiguration `field:"required" json:"runtimeConfiguration" yaml:"runtimeConfiguration"`
	// A human-readable description of the fleet.
	// Default: no description is provided.
	//
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// 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.
	// Default: Default capacity is 0.
	//
	// Experimental.
	DesiredCapacity *float64 `field:"optional" json:"desiredCapacity" yaml:"desiredCapacity"`
	// 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.
	// Default: Create a fleet with instances in the home region only.
	//
	// Experimental.
	Locations *[]*Location `field:"optional" json:"locations" yaml:"locations"`
	// The maximum number of instances that are allowed in the specified fleet location.
	// Default: the default is 1.
	//
	// Experimental.
	MaxSize *float64 `field:"optional" json:"maxSize" yaml:"maxSize"`
	// 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.
	// Default: Fleet metrics are aggregated with other fleets in the default metric group.
	//
	// Experimental.
	MetricGroup *string `field:"optional" json:"metricGroup" yaml:"metricGroup"`
	// The minimum number of instances that are allowed in the specified fleet location.
	// Default: the default is 0.
	//
	// Experimental.
	MinSize *float64 `field:"optional" json:"minSize" yaml:"minSize"`
	// A VPC peering connection between your GameLift-hosted game servers and your other non-GameLift resources.
	//
	// Use Amazon Virtual Private Cloud (VPC) peering connections to enable your game servers to communicate directly and privately with your other AWS resources, such as a web service or a repository.
	// You can establish VPC peering with any resources that run on AWS and are managed by an AWS account that you have access to.
	// The VPC must be in the same Region as your fleet.
	//
	// Warning:
	// Be sure to create a VPC Peering authorization through Gamelift Service API.
	// See: https://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html
	//
	// Default: no vpc peering.
	//
	// Experimental.
	PeerVpc awsec2.IVpc `field:"optional" json:"peerVpc" yaml:"peerVpc"`
	// The status of termination protection for active game sessions on the fleet.
	//
	// By default, new game sessions are protected and cannot be terminated during a scale-down event.
	// Default: true - Game sessions in `ACTIVE` status cannot be terminated during a scale-down event.
	//
	// Experimental.
	ProtectNewGameSession *bool `field:"optional" json:"protectNewGameSession" yaml:"protectNewGameSession"`
	// 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.
	// Default: No resource creation limit policy.
	//
	// Experimental.
	ResourceCreationLimitPolicy *ResourceCreationLimitPolicy `field:"optional" json:"resourceCreationLimitPolicy" yaml:"resourceCreationLimitPolicy"`
	// The IAM role assumed by GameLift fleet instances to access AWS ressources.
	//
	// With a role set, any application that runs on an instance in this fleet can assume the role, including install scripts, server processes, and daemons (background processes).
	// If providing a custom role, it needs to trust the GameLift service principal (gamelift.amazonaws.com).
	// No permission is required by default.
	//
	// This property cannot be changed after the fleet is created.
	// See: https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-resources.html
	//
	// Default: - a role will be created with default trust to Gamelift service principal.
	//
	// Experimental.
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// Prompts GameLift to generate a TLS/SSL certificate for the fleet.
	//
	// GameLift uses the certificates to encrypt traffic between game clients and the game servers running on GameLift.
	//
	// You can't change this property after you create the fleet.
	//
	// Additionnal info:
	// AWS Certificate Manager (ACM) certificates expire after 13 months.
	// Certificate expiration can cause fleets to fail, preventing players from connecting to instances in the fleet.
	// We recommend you replace fleets before 13 months, consider using fleet aliases for a smooth transition.
	// Default: TLS/SSL certificate are generated for the fleet.
	//
	// Experimental.
	UseCertificate *bool `field:"optional" json:"useCertificate" yaml:"useCertificate"`
	// Indicates whether to use On-Demand or Spot instances for this fleet. By default, fleet use on demand capacity.
	//
	// This property cannot be changed after the fleet is created.
	// See: https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-ec2-instances.html#gamelift-ec2-instances-spot
	//
	// Default: Gamelift fleet use on demand capacity.
	//
	// Experimental.
	UseSpot *bool `field:"optional" json:"useSpot" yaml:"useSpot"`
	// A build to be deployed on the fleet.
	//
	// 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.
	// Experimental.
	Content IBuild `field:"required" json:"content" yaml:"content"`
	// The allowed IP address ranges and port settings that allow inbound traffic to access game sessions on this fleet.
	//
	// This property must be set before players can connect to game sessions.
	// Default: no inbound traffic allowed.
	//
	// Experimental.
	IngressRules *[]*IngressRule `field:"optional" json:"ingressRules" yaml:"ingressRules"`
}

Properties for a new Gamelift build fleet.

Example:

var build build

// Server processes can be delcared in a declarative way through the constructor
fleet := gamelift.NewBuildFleet(this, jsii.String("Game server fleet"), &BuildFleetProps{
	FleetName: jsii.String("test-fleet"),
	Content: build,
	InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_C4, ec2.InstanceSize_LARGE),
	RuntimeConfiguration: &RuntimeConfiguration{
		ServerProcesses: []serverProcess{
			&serverProcess{
				LaunchPath: jsii.String("/local/game/GameLiftExampleServer.x86_64"),
				Parameters: jsii.String("-logFile /local/game/logs/myserver1935.log -port 1935"),
				ConcurrentExecutions: jsii.Number(100),
			},
		},
	},
})

Experimental.

type BuildProps

type BuildProps struct {
	// The game build file storage.
	// Experimental.
	Content Content `field:"required" json:"content" yaml:"content"`
	// Name of this build.
	// Default: No name.
	//
	// Experimental.
	BuildName *string `field:"optional" json:"buildName" yaml:"buildName"`
	// Version of this build.
	// Default: No version.
	//
	// Experimental.
	BuildVersion *string `field:"optional" json:"buildVersion" yaml:"buildVersion"`
	// The operating system that the game server binaries are built to run on.
	// Default: No version.
	//
	// Experimental.
	OperatingSystem OperatingSystem `field:"optional" json:"operatingSystem" yaml:"operatingSystem"`
	// The IAM role assumed by GameLift to access server build in S3.
	//
	// If providing a custom role, it needs to trust the GameLift service principal (gamelift.amazonaws.com) and be granted sufficient permissions
	// to have Read access to a specific key content into a specific S3 bucket.
	// Below an example of required permission:
	// {
	//  "Version": "2012-10-17",
	//  "Statement": [{
	//        "Effect": "Allow",
	//        "Action": [
	//            "s3:GetObject",
	//            "s3:GetObjectVersion"
	//        ],
	//        "Resource": "arn:aws:s3:::bucket-name/object-name"
	//  }]
	// }.
	// See: https://docs.aws.amazon.com/gamelift/latest/developerguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-access-storage-loc
	//
	// Default: - a role will be created with default permissions.
	//
	// Experimental.
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// A server SDK version you used when integrating your game server build with Amazon GameLift.
	// See: https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-custom-intro.html
	//
	// Default: - 4.0.2
	//
	// Experimental.
	ServerSdkVersion *string `field:"optional" json:"serverSdkVersion" yaml:"serverSdkVersion"`
}

Properties for a new build.

Example:

var bucket bucket

build := gamelift.NewBuild(this, jsii.String("Build"), &BuildProps{
	Content: gamelift.Content_FromBucket(bucket, jsii.String("sample-asset-key")),
})

awscdk.NewCfnOutput(this, jsii.String("BuildArn"), &CfnOutputProps{
	Value: build.BuildArn,
})
awscdk.NewCfnOutput(this, jsii.String("BuildId"), &CfnOutputProps{
	Value: build.BuildId,
})

Experimental.

type Content

type Content interface {
	// Called when the Build is initialized to allow this object to bind.
	// Experimental.
	Bind(scope constructs.Construct, role awsiam.IRole) *ContentConfig
}

Before deploying your GameLift-enabled multiplayer game servers for hosting with the GameLift service, you need to upload your game server files.

The class helps you on preparing and uploading custom game server build files or Realtime Servers server script files.

Example:

var bucket bucket

build := gamelift.NewBuild(this, jsii.String("Build"), &BuildProps{
	Content: gamelift.Content_FromBucket(bucket, jsii.String("sample-asset-key")),
	ServerSdkVersion: jsii.String("5.0.0"),
})

Experimental.

type ContentConfig

type ContentConfig struct {
	// The location of the content in S3.
	// Experimental.
	S3Location *awss3.Location `field:"required" json:"s3Location" yaml:"s3Location"`
}

Result of binding `Content` into a `Build`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"

contentConfig := &ContentConfig{
	S3Location: &Location{
		BucketName: jsii.String("bucketName"),
		ObjectKey: jsii.String("objectKey"),

		// the properties below are optional
		ObjectVersion: jsii.String("objectVersion"),
	},
}

Experimental.

type DeleteOption

type DeleteOption string

The type of delete to perform.

To delete a game server group, specify the DeleteOption. Experimental.

const (
	// Terminates the game server group and Amazon EC2 Auto Scaling group only when it has no game servers that are in UTILIZED status.
	// Experimental.
	DeleteOption_SAFE_DELETE DeleteOption = "SAFE_DELETE"
	// Terminates the game server group, including all active game servers regardless of their utilization status, and the Amazon EC2 Auto Scaling group.
	// Experimental.
	DeleteOption_FORCE_DELETE DeleteOption = "FORCE_DELETE"
	// Does a safe delete of the game server group but retains the Amazon EC2 Auto Scaling group as is.
	// Experimental.
	DeleteOption_RETAIN DeleteOption = "RETAIN"
)

type FleetAttributes

type FleetAttributes struct {
	// The ARN of the fleet.
	//
	// At least one of `fleetArn` and `fleetId` must be provided.
	// Default: derived from `fleetId`.
	//
	// Experimental.
	FleetArn *string `field:"optional" json:"fleetArn" yaml:"fleetArn"`
	// The identifier of the fleet.
	//
	// At least one of `fleetId` and `fleetArn`  must be provided.
	// Default: derived from `fleetArn`.
	//
	// Experimental.
	FleetId *string `field:"optional" json:"fleetId" yaml:"fleetId"`
	// The IAM role assumed by GameLift fleet instances to access AWS ressources.
	// Default: the imported fleet cannot be granted access to other resources as an `iam.IGrantable`.
	//
	// Experimental.
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
}

A full specification of a fleet that can be used to import it fluently into the CDK application.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"
import "github.com/aws/aws-cdk-go/awscdk"

var role role

fleetAttributes := &FleetAttributes{
	FleetArn: jsii.String("fleetArn"),
	FleetId: jsii.String("fleetId"),
	Role: role,
}

Experimental.

type FleetBase

type FleetBase interface {
	awscdk.Resource
	IFleet
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The ARN of the fleet.
	// Experimental.
	FleetArn() *string
	// The Identifier of the fleet.
	// Experimental.
	FleetId() *string
	// The principal this GameLift fleet is using.
	// Experimental.
	GrantPrincipal() awsiam.IPrincipal
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The ARN to put into the destination field of a game session queue.
	// Experimental.
	ResourceArnForDestination() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Defines an alias for this fleet.
	//
	// “`ts
	// declare const fleet: gamelift.FleetBase;
	//
	// fleet.addAlias('Live');
	//
	// // Is equivalent to
	//
	// new gamelift.Alias(this, 'AliasLive', {
	//   aliasName: 'Live',
	//   fleet: fleet,
	// });
	// “`.
	// Experimental.
	AddAlias(aliasName *string, options *AliasOptions) Alias
	// Adds a remote locations to deploy additional instances to and manage as part of the fleet.
	// Experimental.
	AddInternalLocation(location *Location)
	// Adds a remote locations to deploy additional instances to and manage as part of the fleet.
	// Experimental.
	AddLocation(region *string, desiredCapacity *float64, minSize *float64, maxSize *float64)
	// Apply the given removal policy to this resource.
	//
	// 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`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Grant the `grantee` identity permissions to perform `actions`.
	// Experimental.
	Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant
	// Return the given named metric for this fleet.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Instances with `ACTIVE` status, which means they are running active server processes.
	//
	// The count includes idle instances and those that are hosting one or more game sessions.
	// This metric measures current total instance capacity.
	//
	// This metric can be used with automatic scaling.
	// Experimental.
	MetricActiveInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Target number of active instances that GameLift is working to maintain in the fleet.
	//
	// With automatic scaling, this value is determined based on the scaling policies currently in force.
	// Without automatic scaling, this value is set manually.
	// This metric is not available when viewing data for fleet metric groups.
	// Experimental.
	MetricDesiredInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Active instances that are currently hosting zero (0) game sessions.
	//
	// This metric measures capacity that is available but unused.
	// This metric can be used with automatic scaling.
	// Experimental.
	MetricIdleInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Number of spot instances that have been interrupted.
	// Experimental.
	MetricInstanceInterruptions(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Maximum number of instances that are allowed for the fleet.
	//
	// A fleet's instance maximum determines the capacity ceiling during manual or automatic scaling up.
	// This metric is not available when viewing data for fleet metric groups.
	// Experimental.
	MetricMaxInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Minimum number of instances allowed for the fleet.
	//
	// A fleet's instance minimum determines the capacity floor during manual or automatic scaling down.
	// This metric is not available when viewing data for fleet metric groups.
	// Experimental.
	MetricMinInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Percentage of all active instances that are idle (calculated as IdleInstances / ActiveInstances).
	//
	// This metric can be used for automatic scaling.
	// Experimental.
	MetricPercentIdleInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Experimental.
	ParseLocationCapacity(capacity *LocationCapacity) *awsgamelift.CfnFleet_LocationCapacityProperty
	// Experimental.
	ParseLocations() *[]*awsgamelift.CfnFleet_LocationConfigurationProperty
	// Experimental.
	ParseResourceCreationLimitPolicy(props *FleetProps) *awsgamelift.CfnFleet_ResourceCreationLimitPolicyProperty
	// Experimental.
	ParseRuntimeConfiguration(props *FleetProps) *awsgamelift.CfnFleet_RuntimeConfigurationProperty
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Experimental.
	WarnVpcPeeringAuthorizations(scope constructs.Construct)
}

Base class for new and imported GameLift fleet.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"
import "github.com/aws/aws-cdk-go/awscdk"

var role role

fleetBase := gamelift_alpha.FleetBase_FromFleetAttributes(this, jsii.String("MyFleetBase"), &FleetAttributes{
	FleetArn: jsii.String("fleetArn"),
	FleetId: jsii.String("fleetId"),
	Role: role,
})

Experimental.

type FleetProps

type FleetProps struct {
	// A descriptive label that is associated with a fleet.
	//
	// Fleet names do not need to be unique.
	// Experimental.
	FleetName *string `field:"required" json:"fleetName" yaml:"fleetName"`
	// 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: http://aws.amazon.com/ec2/instance-types/ for detailed descriptions of Amazon EC2 instance types.
	//
	// Experimental.
	InstanceType awsec2.InstanceType `field:"required" json:"instanceType" yaml:"instanceType"`
	// 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.
	// See: https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-multiprocess.html
	//
	// Experimental.
	RuntimeConfiguration *RuntimeConfiguration `field:"required" json:"runtimeConfiguration" yaml:"runtimeConfiguration"`
	// A human-readable description of the fleet.
	// Default: no description is provided.
	//
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// 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.
	// Default: Default capacity is 0.
	//
	// Experimental.
	DesiredCapacity *float64 `field:"optional" json:"desiredCapacity" yaml:"desiredCapacity"`
	// 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.
	// Default: Create a fleet with instances in the home region only.
	//
	// Experimental.
	Locations *[]*Location `field:"optional" json:"locations" yaml:"locations"`
	// The maximum number of instances that are allowed in the specified fleet location.
	// Default: the default is 1.
	//
	// Experimental.
	MaxSize *float64 `field:"optional" json:"maxSize" yaml:"maxSize"`
	// 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.
	// Default: Fleet metrics are aggregated with other fleets in the default metric group.
	//
	// Experimental.
	MetricGroup *string `field:"optional" json:"metricGroup" yaml:"metricGroup"`
	// The minimum number of instances that are allowed in the specified fleet location.
	// Default: the default is 0.
	//
	// Experimental.
	MinSize *float64 `field:"optional" json:"minSize" yaml:"minSize"`
	// A VPC peering connection between your GameLift-hosted game servers and your other non-GameLift resources.
	//
	// Use Amazon Virtual Private Cloud (VPC) peering connections to enable your game servers to communicate directly and privately with your other AWS resources, such as a web service or a repository.
	// You can establish VPC peering with any resources that run on AWS and are managed by an AWS account that you have access to.
	// The VPC must be in the same Region as your fleet.
	//
	// Warning:
	// Be sure to create a VPC Peering authorization through Gamelift Service API.
	// See: https://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html
	//
	// Default: no vpc peering.
	//
	// Experimental.
	PeerVpc awsec2.IVpc `field:"optional" json:"peerVpc" yaml:"peerVpc"`
	// The status of termination protection for active game sessions on the fleet.
	//
	// By default, new game sessions are protected and cannot be terminated during a scale-down event.
	// Default: true - Game sessions in `ACTIVE` status cannot be terminated during a scale-down event.
	//
	// Experimental.
	ProtectNewGameSession *bool `field:"optional" json:"protectNewGameSession" yaml:"protectNewGameSession"`
	// 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.
	// Default: No resource creation limit policy.
	//
	// Experimental.
	ResourceCreationLimitPolicy *ResourceCreationLimitPolicy `field:"optional" json:"resourceCreationLimitPolicy" yaml:"resourceCreationLimitPolicy"`
	// The IAM role assumed by GameLift fleet instances to access AWS ressources.
	//
	// With a role set, any application that runs on an instance in this fleet can assume the role, including install scripts, server processes, and daemons (background processes).
	// If providing a custom role, it needs to trust the GameLift service principal (gamelift.amazonaws.com).
	// No permission is required by default.
	//
	// This property cannot be changed after the fleet is created.
	// See: https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-resources.html
	//
	// Default: - a role will be created with default trust to Gamelift service principal.
	//
	// Experimental.
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// Prompts GameLift to generate a TLS/SSL certificate for the fleet.
	//
	// GameLift uses the certificates to encrypt traffic between game clients and the game servers running on GameLift.
	//
	// You can't change this property after you create the fleet.
	//
	// Additionnal info:
	// AWS Certificate Manager (ACM) certificates expire after 13 months.
	// Certificate expiration can cause fleets to fail, preventing players from connecting to instances in the fleet.
	// We recommend you replace fleets before 13 months, consider using fleet aliases for a smooth transition.
	// Default: TLS/SSL certificate are generated for the fleet.
	//
	// Experimental.
	UseCertificate *bool `field:"optional" json:"useCertificate" yaml:"useCertificate"`
	// Indicates whether to use On-Demand or Spot instances for this fleet. By default, fleet use on demand capacity.
	//
	// This property cannot be changed after the fleet is created.
	// See: https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-ec2-instances.html#gamelift-ec2-instances-spot
	//
	// Default: Gamelift fleet use on demand capacity.
	//
	// Experimental.
	UseSpot *bool `field:"optional" json:"useSpot" yaml:"useSpot"`
}

Properties for a new Gamelift fleet.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var instanceType instanceType
var role role
var vpc vpc

fleetProps := &FleetProps{
	FleetName: jsii.String("fleetName"),
	InstanceType: instanceType,
	RuntimeConfiguration: &RuntimeConfiguration{
		ServerProcesses: []serverProcess{
			&serverProcess{
				LaunchPath: jsii.String("launchPath"),

				// the properties below are optional
				ConcurrentExecutions: jsii.Number(123),
				Parameters: jsii.String("parameters"),
			},
		},

		// the properties below are optional
		GameSessionActivationTimeout: cdk.Duration_Minutes(jsii.Number(30)),
		MaxConcurrentGameSessionActivations: jsii.Number(123),
	},

	// the properties below are optional
	Description: jsii.String("description"),
	DesiredCapacity: jsii.Number(123),
	Locations: []location{
		&location{
			Region: jsii.String("region"),

			// the properties below are optional
			Capacity: &LocationCapacity{
				DesiredCapacity: jsii.Number(123),
				MaxSize: jsii.Number(123),
				MinSize: jsii.Number(123),
			},
		},
	},
	MaxSize: jsii.Number(123),
	MetricGroup: jsii.String("metricGroup"),
	MinSize: jsii.Number(123),
	PeerVpc: vpc,
	ProtectNewGameSession: jsii.Boolean(false),
	ResourceCreationLimitPolicy: &ResourceCreationLimitPolicy{
		NewGameSessionsPerCreator: jsii.Number(123),
		PolicyPeriod: cdk.Duration_*Minutes(jsii.Number(30)),
	},
	Role: role,
	UseCertificate: jsii.Boolean(false),
	UseSpot: jsii.Boolean(false),
}

Experimental.

type GameProperty

type GameProperty struct {
	// The game property identifier.
	// Experimental.
	Key *string `field:"required" json:"key" yaml:"key"`
	// The game property value.
	// Experimental.
	Value *string `field:"required" json:"value" yaml:"value"`
}

A set of custom properties for a game session, formatted as key-value pairs.

These properties are passed to a game server process with a request to start a new game session.

This parameter is not used for Standalone FlexMatch mode.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"

gameProperty := &GameProperty{
	Key: jsii.String("key"),
	Value: jsii.String("value"),
}

See: https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession

Experimental.

type GameServerGroup

type GameServerGroup interface {
	GameServerGroupBase
	// The ARN of the generated AutoScaling group.
	// Experimental.
	AutoScalingGroupArn() *string
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The ARN of the game server group.
	// Experimental.
	GameServerGroupArn() *string
	// The name of the game server group.
	// Experimental.
	GameServerGroupName() *string
	// The principal this GameLift game server group is using.
	// Experimental.
	GrantPrincipal() awsiam.IPrincipal
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The IAM role that allows Amazon GameLift to access your Amazon EC2 Auto Scaling groups.
	// Experimental.
	Role() awsiam.IRole
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// The VPC network to place the game server group in.
	// Experimental.
	Vpc() awsec2.IVpc
	// The game server group's subnets.
	// Experimental.
	VpcSubnets() *awsec2.SubnetSelection
	// Apply the given removal policy to this resource.
	//
	// 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`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Grant the `grantee` identity permissions to perform `actions`.
	// Experimental.
	Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant
	// Return the given named metric for this fleet.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Experimental.
	ParseAutoScalingPolicy(props *GameServerGroupProps) *awsgamelift.CfnGameServerGroup_AutoScalingPolicyProperty
	// Experimental.
	ParseInstanceDefinitions(props *GameServerGroupProps) *[]*awsgamelift.CfnGameServerGroup_InstanceDefinitionProperty
	// Experimental.
	ParseLaunchTemplate(props *GameServerGroupProps) *awsgamelift.CfnGameServerGroup_LaunchTemplateProperty
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
}

Creates a GameLift FleetIQ game server group for managing game hosting on a collection of Amazon EC2 instances for game hosting.

This operation creates the game server group, creates an Auto Scaling group in your AWS account, and establishes a link between the two groups. You can view the status of your game server groups in the GameLift console. Game server group metrics and events are emitted to Amazon CloudWatch. Before creating a new game server group, you must have the following:

  • An Amazon EC2 launch template that specifies how to launch Amazon EC2 instances with your game server build.
  • An IAM role that extends limited access to your AWS account to allow GameLift FleetIQ to create and interact with the Auto Scaling group.

To create a new game server group, specify a unique group name, IAM role and Amazon EC2 launch template, and provide a list of instance types that can be used in the group. You must also set initial maximum and minimum limits on the group's instance count. You can optionally set an Auto Scaling policy with target tracking based on a GameLift FleetIQ metric.

Once the game server group and corresponding Auto Scaling group are created, you have full access to change the Auto Scaling group's configuration as needed. Several properties that are set when creating a game server group, including maximum/minimum size and auto-scaling policy settings, must be updated directly in the Auto Scaling group. Keep in mind that some Auto Scaling group properties are periodically updated by GameLift FleetIQ as part of its balancing activities to optimize for availability and cost.

Example:

var launchTemplate iLaunchTemplate
var vpc iVpc

gamelift.NewGameServerGroup(this, jsii.String("GameServerGroup"), &GameServerGroupProps{
	GameServerGroupName: jsii.String("sample-gameservergroup-name"),
	InstanceDefinitions: []instanceDefinition{
		&instanceDefinition{
			InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_C5, ec2.InstanceSize_LARGE),
		},
		&instanceDefinition{
			InstanceType: ec2.InstanceType_*Of(ec2.InstanceClass_C4, ec2.InstanceSize_LARGE),
		},
	},
	LaunchTemplate: launchTemplate,
	Vpc: vpc,
	VpcSubnets: &SubnetSelection{
		SubnetType: ec2.SubnetType_PUBLIC,
	},
})

See: https://docs.aws.amazon.com/gamelift/latest/fleetiqguide/gsg-intro.html

Experimental.

func NewGameServerGroup

func NewGameServerGroup(scope constructs.Construct, id *string, props *GameServerGroupProps) GameServerGroup

Experimental.

type GameServerGroupAttributes

type GameServerGroupAttributes struct {
	// The ARN of the generated AutoScaling group.
	// Default: the imported game server group does not have autoscaling group information.
	//
	// Experimental.
	AutoScalingGroupArn *string `field:"required" json:"autoScalingGroupArn" yaml:"autoScalingGroupArn"`
	// The ARN of the game server group.
	//
	// At least one of `gameServerGroupArn` and `gameServerGroupName` must be provided.
	// Default: derived from `gameServerGroupName`.
	//
	// Experimental.
	GameServerGroupArn *string `field:"optional" json:"gameServerGroupArn" yaml:"gameServerGroupArn"`
	// The name of the game server group.
	//
	// At least one of `gameServerGroupArn` and `gameServerGroupName` must be provided.
	// Default: derived from `gameServerGroupArn`.
	//
	// Experimental.
	GameServerGroupName *string `field:"optional" json:"gameServerGroupName" yaml:"gameServerGroupName"`
	// The IAM role that allows Amazon GameLift to access your Amazon EC2 Auto Scaling groups.
	// Default: the imported game server group cannot be granted access to other resources as an `iam.IGrantable`.
	//
	// Experimental.
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
}

Represents a GameServerGroup content defined outside of this stack.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"
import "github.com/aws/aws-cdk-go/awscdk"

var role role

gameServerGroupAttributes := &GameServerGroupAttributes{
	AutoScalingGroupArn: jsii.String("autoScalingGroupArn"),

	// the properties below are optional
	GameServerGroupArn: jsii.String("gameServerGroupArn"),
	GameServerGroupName: jsii.String("gameServerGroupName"),
	Role: role,
}

Experimental.

type GameServerGroupBase

type GameServerGroupBase interface {
	awscdk.Resource
	IGameServerGroup
	// The ARN of the generated AutoScaling group.
	// Experimental.
	AutoScalingGroupArn() *string
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The ARN of the game server group.
	// Experimental.
	GameServerGroupArn() *string
	// The name of the game server group.
	// Experimental.
	GameServerGroupName() *string
	// The principal this GameLift game server group is using.
	// Experimental.
	GrantPrincipal() awsiam.IPrincipal
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// 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`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Grant the `grantee` identity permissions to perform `actions`.
	// Experimental.
	Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant
	// Return the given named metric for this fleet.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
}

Base class for new and imported GameLift FleetIQ game server group. Experimental.

type GameServerGroupProps

type GameServerGroupProps struct {
	// A developer-defined identifier for the game server group.
	//
	// The name is unique for each Region in each AWS account.
	// Experimental.
	GameServerGroupName *string `field:"required" json:"gameServerGroupName" yaml:"gameServerGroupName"`
	// The set of Amazon EC2 instance types that GameLift FleetIQ can use when balancing and automatically scaling instances in the corresponding Auto Scaling group.
	// Experimental.
	InstanceDefinitions *[]*InstanceDefinition `field:"required" json:"instanceDefinitions" yaml:"instanceDefinitions"`
	// The Amazon EC2 launch template that contains configuration settings and game server code to be deployed to all instances in the game server group.
	//
	// After the Auto Scaling group is created, update this value directly in the Auto Scaling group using the AWS console or APIs.
	//
	// NOTE:
	// If you specify network interfaces in your launch template, you must explicitly set the property AssociatePublicIpAddress to `true`.
	// If no network interface is specified in the launch template, GameLift FleetIQ uses your account's default VPC.
	// See: https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html
	//
	// Experimental.
	LaunchTemplate awsec2.ILaunchTemplate `field:"required" json:"launchTemplate" yaml:"launchTemplate"`
	// The VPC network to place the game server group in.
	//
	// By default, all GameLift FleetIQ-supported Availability Zones are used.
	//
	// You can use this parameter to specify VPCs that you've set up.
	//
	// This property cannot be updated after the game server group is created,
	// and the corresponding Auto Scaling group will always use the property value that is set with this request,
	// even if the Auto Scaling group is updated directly.
	// Experimental.
	Vpc awsec2.IVpc `field:"required" json:"vpc" yaml:"vpc"`
	// Configuration settings to define a scaling policy for the Auto Scaling group that is optimized for game hosting.
	//
	// The scaling policy uses the metric `PercentUtilizedGameServers` to maintain a buffer of idle game servers that can immediately accommodate new games and players.
	//
	// After the Auto Scaling group is created, update this value directly in the Auto Scaling group using the AWS console or APIs.
	// Default: no autoscaling policy settled.
	//
	// Experimental.
	AutoScalingPolicy *AutoScalingPolicy `field:"optional" json:"autoScalingPolicy" yaml:"autoScalingPolicy"`
	// Indicates how GameLift FleetIQ balances the use of Spot Instances and On-Demand Instances in the game server group.
	// Default: SPOT_PREFERRED.
	//
	// Experimental.
	BalancingStrategy BalancingStrategy `field:"optional" json:"balancingStrategy" yaml:"balancingStrategy"`
	// The type of delete to perform.
	//
	// To delete a game server group, specify the DeleteOption.
	// Default: SAFE_DELETE.
	//
	// Experimental.
	DeleteOption DeleteOption `field:"optional" json:"deleteOption" yaml:"deleteOption"`
	// The maximum number of instances allowed in the Amazon EC2 Auto Scaling group.
	//
	// During automatic scaling events, GameLift FleetIQ and EC2 do not scale up the group above this maximum.
	//
	// After the Auto Scaling group is created, update this value directly in the Auto Scaling group using the AWS console or APIs.
	// Default: the default is 1.
	//
	// Experimental.
	MaxSize *float64 `field:"optional" json:"maxSize" yaml:"maxSize"`
	// The minimum number of instances allowed in the Amazon EC2 Auto Scaling group.
	//
	// During automatic scaling events, GameLift FleetIQ and Amazon EC2 do not scale down the group below this minimum.
	//
	// In production, this value should be set to at least 1.
	//
	// After the Auto Scaling group is created, update this value directly in the Auto Scaling group using the AWS console or APIs.
	// Default: the default is 0.
	//
	// Experimental.
	MinSize *float64 `field:"optional" json:"minSize" yaml:"minSize"`
	// A flag that indicates whether instances in the game server group are protected from early termination.
	//
	// Unprotected instances that have active game servers running might be terminated during a scale-down event, causing players to be dropped from the game.
	// Protected instances cannot be terminated while there are active game servers running except in the event of a forced game server group deletion.
	//
	// An exception to this is with Spot Instances, which can be terminated by AWS regardless of protection status.
	// Default: game servers running might be terminated during a scale-down event.
	//
	// Experimental.
	ProtectGameServer *bool `field:"optional" json:"protectGameServer" yaml:"protectGameServer"`
	// The IAM role that allows Amazon GameLift to access your Amazon EC2 Auto Scaling groups.
	// See: https://docs.aws.amazon.com/gamelift/latest/fleetiqguide/gsg-iam-permissions-roles.html
	//
	// Default: - a role will be created with default trust to Gamelift and Autoscaling service principal with a default policy `GameLiftGameServerGroupPolicy` attached.
	//
	// Experimental.
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// Game server group subnet selection.
	// Default: all GameLift FleetIQ-supported Availability Zones are used.
	//
	// Experimental.
	VpcSubnets *awsec2.SubnetSelection `field:"optional" json:"vpcSubnets" yaml:"vpcSubnets"`
}

Properties for a new Gamelift FleetIQ Game server group.

Example:

var launchTemplate iLaunchTemplate
var vpc iVpc

gamelift.NewGameServerGroup(this, jsii.String("GameServerGroup"), &GameServerGroupProps{
	GameServerGroupName: jsii.String("sample-gameservergroup-name"),
	InstanceDefinitions: []instanceDefinition{
		&instanceDefinition{
			InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_C5, ec2.InstanceSize_LARGE),
		},
		&instanceDefinition{
			InstanceType: ec2.InstanceType_*Of(ec2.InstanceClass_C4, ec2.InstanceSize_LARGE),
		},
	},
	LaunchTemplate: launchTemplate,
	Vpc: vpc,
	VpcSubnets: &SubnetSelection{
		SubnetType: ec2.SubnetType_PUBLIC,
	},
})

Experimental.

type GameSessionQueue

type GameSessionQueue interface {
	GameSessionQueueBase
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The ARN of the gameSessionQueue.
	// Experimental.
	GameSessionQueueArn() *string
	// The Identifier of the gameSessionQueue.
	// Experimental.
	GameSessionQueueName() *string
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Adds a destination to fulfill requests for new game sessions.
	// Experimental.
	AddDestination(destination IGameSessionQueueDestination)
	// Apply the given removal policy to this resource.
	//
	// 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`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Return the given named metric for this fleet.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Average amount of time that game session placement requests in the queue with status PENDING have been waiting to be fulfilled.
	// Experimental.
	MetricAverageWaitTime(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Game session placement requests that were canceled before timing out since the last report.
	// Experimental.
	MetricPlacementsCanceled(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Game session placement requests that failed for any reason since the last report.
	// Experimental.
	MetricPlacementsFailed(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// New game session placement requests that were added to the queue since the last report.
	// Experimental.
	MetricPlacementsStarted(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Game session placement requests that resulted in a new game session since the last report.
	// Experimental.
	MetricPlacementsSucceeded(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Game session placement requests that reached the queue's timeout limit without being fulfilled since the last report.
	// Experimental.
	MetricPlacementsTimedOut(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Experimental.
	ParseFilterConfiguration(props *GameSessionQueueProps) *awsgamelift.CfnGameSessionQueue_FilterConfigurationProperty
	// Experimental.
	ParsePlayerLatencyPolicies(props *GameSessionQueueProps) *[]*awsgamelift.CfnGameSessionQueue_PlayerLatencyPolicyProperty
	// Experimental.
	ParsePriorityConfiguration(props *GameSessionQueueProps) *awsgamelift.CfnGameSessionQueue_PriorityConfigurationProperty
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
}

The GameSessionQueue resource creates a placement queue that processes requests for new game sessions.

A queue uses FleetIQ algorithms to determine the best placement locations and find an available game server, then prompts the game server to start a new game session. Queues can have destinations (GameLift fleets or gameSessionQueuees), which determine where the queue can place new game sessions. A queue can have destinations with varied fleet type (Spot and On-Demand), instance type, and AWS Region.

Example:

var fleet buildFleet
var alias alias

queue := gamelift.NewGameSessionQueue(this, jsii.String("GameSessionQueue"), &GameSessionQueueProps{
	GameSessionQueueName: jsii.String("my-queue-name"),
	Destinations: []iGameSessionQueueDestination{
		fleet,
	},
})
queue.AddDestination(alias)

Experimental.

func NewGameSessionQueue

func NewGameSessionQueue(scope constructs.Construct, id *string, props *GameSessionQueueProps) GameSessionQueue

Experimental.

type GameSessionQueueAttributes

type GameSessionQueueAttributes struct {
	// The ARN of the gameSessionQueue.
	//
	// At least one of `gameSessionQueueArn` and `gameSessionQueueName` must be provided.
	// Default: derived from `gameSessionQueueName`.
	//
	// Experimental.
	GameSessionQueueArn *string `field:"optional" json:"gameSessionQueueArn" yaml:"gameSessionQueueArn"`
	// The name of the gameSessionQueue.
	//
	// At least one of `gameSessionQueueName` and `gameSessionQueueArn`  must be provided.
	// Default: derived from `gameSessionQueueArn`.
	//
	// Experimental.
	GameSessionQueueName *string `field:"optional" json:"gameSessionQueueName" yaml:"gameSessionQueueName"`
}

A full specification of an gameSessionQueue that can be used to import it fluently into the CDK application.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"

gameSessionQueueAttributes := &GameSessionQueueAttributes{
	GameSessionQueueArn: jsii.String("gameSessionQueueArn"),
	GameSessionQueueName: jsii.String("gameSessionQueueName"),
}

Experimental.

type GameSessionQueueBase

type GameSessionQueueBase interface {
	awscdk.Resource
	IGameSessionQueue
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The ARN of the gameSessionQueue.
	// Experimental.
	GameSessionQueueArn() *string
	// The name of the gameSessionQueue.
	// Experimental.
	GameSessionQueueName() *string
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// 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`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Return the given named metric for this fleet.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Average amount of time that game session placement requests in the queue with status PENDING have been waiting to be fulfilled.
	// Experimental.
	MetricAverageWaitTime(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Game session placement requests that were canceled before timing out since the last report.
	// Experimental.
	MetricPlacementsCanceled(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Game session placement requests that failed for any reason since the last report.
	// Experimental.
	MetricPlacementsFailed(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// New game session placement requests that were added to the queue since the last report.
	// Experimental.
	MetricPlacementsStarted(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Game session placement requests that resulted in a new game session since the last report.
	// Experimental.
	MetricPlacementsSucceeded(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Game session placement requests that reached the queue's timeout limit without being fulfilled since the last report.
	// Experimental.
	MetricPlacementsTimedOut(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
}

Base class for new and imported GameLift GameSessionQueue. Experimental.

type GameSessionQueueProps

type GameSessionQueueProps struct {
	// A list of fleets and/or fleet alias that can be used to fulfill game session placement requests in the queue.
	//
	// Destinations are listed in order of placement preference.
	// Experimental.
	Destinations *[]IGameSessionQueueDestination `field:"required" json:"destinations" yaml:"destinations"`
	// Name of this gameSessionQueue.
	// Experimental.
	GameSessionQueueName *string `field:"required" json:"gameSessionQueueName" yaml:"gameSessionQueueName"`
	// A list of locations where a queue is allowed to place new game sessions.
	//
	// Locations are specified in the form of AWS Region codes, such as `us-west-2`.
	//
	// For queues that have multi-location fleets, you can use a filter configuration allow placement with some, but not all of these locations.
	// Default: game sessions can be placed in any queue location.
	//
	// Experimental.
	AllowedLocations *[]*string `field:"optional" json:"allowedLocations" yaml:"allowedLocations"`
	// Information to be added to all events that are related to this game session queue.
	// Default: no customer event data.
	//
	// Experimental.
	CustomEventData *string `field:"optional" json:"customEventData" yaml:"customEventData"`
	// An SNS topic is set up to receive game session placement notifications.
	// See: https://docs.aws.amazon.com/gamelift/latest/developerguide/queue-notification.html
	//
	// Default: no notification.
	//
	// Experimental.
	NotificationTarget awssns.ITopic `field:"optional" json:"notificationTarget" yaml:"notificationTarget"`
	// A set of policies that act as a sliding cap on player latency.
	//
	// FleetIQ works to deliver low latency for most players in a game session.
	// These policies ensure that no individual player can be placed into a game with unreasonably high latency.
	// Use multiple policies to gradually relax latency requirements a step at a time.
	// Multiple policies are applied based on their maximum allowed latency, starting with the lowest value.
	// Default: no player latency policy.
	//
	// Experimental.
	PlayerLatencyPolicies *[]*PlayerLatencyPolicy `field:"optional" json:"playerLatencyPolicies" yaml:"playerLatencyPolicies"`
	// Custom settings to use when prioritizing destinations and locations for game session placements.
	//
	// This configuration replaces the FleetIQ default prioritization process.
	//
	// Priority types that are not explicitly named will be automatically applied at the end of the prioritization process.
	// Default: no priority configuration.
	//
	// Experimental.
	PriorityConfiguration *PriorityConfiguration `field:"optional" json:"priorityConfiguration" yaml:"priorityConfiguration"`
	// The maximum time, that a new game session placement request remains in the queue.
	//
	// When a request exceeds this time, the game session placement changes to a `TIMED_OUT` status.
	// Default: 50 seconds.
	//
	// Experimental.
	Timeout awscdk.Duration `field:"optional" json:"timeout" yaml:"timeout"`
}

Properties for a new Fleet gameSessionQueue.

Example:

var fleet buildFleet
var alias alias

queue := gamelift.NewGameSessionQueue(this, jsii.String("GameSessionQueue"), &GameSessionQueueProps{
	GameSessionQueueName: jsii.String("my-queue-name"),
	Destinations: []iGameSessionQueueDestination{
		fleet,
	},
})
queue.AddDestination(alias)

Experimental.

type IAlias

type IAlias interface {
	IGameSessionQueueDestination
	awscdk.IResource
	// The ARN of the alias.
	// Experimental.
	AliasArn() *string
	// The Identifier of the alias.
	// Experimental.
	AliasId() *string
}

Represents a Gamelift Alias for a Gamelift fleet destination. Experimental.

func Alias_FromAliasArn

func Alias_FromAliasArn(scope constructs.Construct, id *string, aliasArn *string) IAlias

Import an existing alias from its ARN. Experimental.

func Alias_FromAliasAttributes

func Alias_FromAliasAttributes(scope constructs.Construct, id *string, attrs *AliasAttributes) IAlias

Import an existing alias from its attributes. Experimental.

func Alias_FromAliasId

func Alias_FromAliasId(scope constructs.Construct, id *string, aliasId *string) IAlias

Import an existing alias from its identifier. Experimental.

type IBuild

type IBuild interface {
	awsiam.IGrantable
	awscdk.IResource
	// The ARN of the build.
	// Experimental.
	BuildArn() *string
	// The Identifier of the build.
	// Experimental.
	BuildId() *string
}

Your custom-built game server software that runs on GameLift and hosts game sessions for your players.

A game build represents the set of files that run your game server on a particular operating system. You can have many different builds, such as for different flavors of your game. The game build must be integrated with the GameLift service. You upload game build files to the GameLift service in the Regions where you plan to set up fleets. See: https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-cli-uploading.html

Experimental.

func Build_FromBuildArn

func Build_FromBuildArn(scope constructs.Construct, id *string, buildArn *string) IBuild

Import a build into CDK using its ARN. Experimental.

func Build_FromBuildAttributes

func Build_FromBuildAttributes(scope constructs.Construct, id *string, attrs *BuildAttributes) IBuild

Import an existing build from its attributes. Experimental.

func Build_FromBuildId

func Build_FromBuildId(scope constructs.Construct, id *string, buildId *string) IBuild

Import a build into CDK using its identifier. Experimental.

type IBuildFleet

type IBuildFleet interface {
	IFleet
}

Represents a GameLift Fleet used to run a custom game build. Experimental.

func BuildFleet_FromBuildFleetArn

func BuildFleet_FromBuildFleetArn(scope constructs.Construct, id *string, buildFleetArn *string) IBuildFleet

Import an existing fleet from its ARN. Experimental.

func BuildFleet_FromBuildFleetId

func BuildFleet_FromBuildFleetId(scope constructs.Construct, id *string, buildFleetId *string) IBuildFleet

Import an existing fleet from its identifier. Experimental.

type IFleet

type IFleet interface {
	IGameSessionQueueDestination
	awsiam.IGrantable
	awscdk.IResource
	// Grant the `grantee` identity permissions to perform `actions`.
	// Experimental.
	Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant
	// Return the given named metric for this fleet.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Instances with `ACTIVE` status, which means they are running active server processes.
	//
	// The count includes idle instances and those that are hosting one or more game sessions.
	// This metric measures current total instance capacity.
	//
	// This metric can be used with automatic scaling.
	// Experimental.
	MetricActiveInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Target number of active instances that GameLift is working to maintain in the fleet.
	//
	// With automatic scaling, this value is determined based on the scaling policies currently in force.
	// Without automatic scaling, this value is set manually.
	// This metric is not available when viewing data for fleet metric groups.
	// Experimental.
	MetricDesiredInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Active instances that are currently hosting zero (0) game sessions.
	//
	// This metric measures capacity that is available but unused.
	// This metric can be used with automatic scaling.
	// Experimental.
	MetricIdleInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Number of spot instances that have been interrupted.
	// Experimental.
	MetricInstanceInterruptions(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Maximum number of instances that are allowed for the fleet.
	//
	// A fleet's instance maximum determines the capacity ceiling during manual or automatic scaling up.
	// This metric is not available when viewing data for fleet metric groups.
	// Experimental.
	MetricMaxInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Minimum number of instances allowed for the fleet.
	//
	// A fleet's instance minimum determines the capacity floor during manual or automatic scaling down.
	// This metric is not available when viewing data for fleet metric groups.
	// Experimental.
	MetricMinInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Percentage of all active instances that are idle (calculated as IdleInstances / ActiveInstances).
	//
	// This metric can be used for automatic scaling.
	// Experimental.
	MetricPercentIdleInstances(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The ARN of the fleet.
	// Experimental.
	FleetArn() *string
	// The Identifier of the fleet.
	// Experimental.
	FleetId() *string
}

Represents a Gamelift fleet. Experimental.

func BuildFleet_FromFleetAttributes

func BuildFleet_FromFleetAttributes(scope constructs.Construct, id *string, attrs *FleetAttributes) IFleet

Import an existing fleet from its attributes. Experimental.

func FleetBase_FromFleetAttributes

func FleetBase_FromFleetAttributes(scope constructs.Construct, id *string, attrs *FleetAttributes) IFleet

Import an existing fleet from its attributes. Experimental.

type IGameServerGroup

type IGameServerGroup interface {
	awsiam.IGrantable
	awscdk.IResource
	// Grant the `grantee` identity permissions to perform `actions`.
	// Experimental.
	Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant
	// Return the given named metric for this fleet.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The ARN of the generated AutoScaling group.
	// Experimental.
	AutoScalingGroupArn() *string
	// The ARN of the game server group.
	// Experimental.
	GameServerGroupArn() *string
	// The name of the game server group.
	// Experimental.
	GameServerGroupName() *string
}

Represent a GameLift FleetIQ game server group. Experimental.

func GameServerGroup_FromGameServerGroupAttributes

func GameServerGroup_FromGameServerGroupAttributes(scope constructs.Construct, id *string, attrs *GameServerGroupAttributes) IGameServerGroup

Import an existing game server group from its attributes. Experimental.

type IGameSessionQueue

type IGameSessionQueue interface {
	awscdk.IResource
	// Return the given named metric for this fleet.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Average amount of time that game session placement requests in the queue with status PENDING have been waiting to be fulfilled.
	// Experimental.
	MetricAverageWaitTime(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Game session placement requests that were canceled before timing out since the last report.
	// Experimental.
	MetricPlacementsCanceled(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Game session placement requests that failed for any reason since the last report.
	// Experimental.
	MetricPlacementsFailed(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// New game session placement requests that were added to the queue since the last report.
	// Experimental.
	MetricPlacementsStarted(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Game session placement requests that resulted in a new game session since the last report.
	// Experimental.
	MetricPlacementsSucceeded(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Game session placement requests that reached the queue's timeout limit without being fulfilled since the last report.
	// Experimental.
	MetricPlacementsTimedOut(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The ARN of the gameSessionQueue.
	// Experimental.
	GameSessionQueueArn() *string
	// The Name of the gameSessionQueue.
	// Experimental.
	GameSessionQueueName() *string
}

Represents a Gamelift GameSessionQueue for a Gamelift fleet destination. Experimental.

func GameSessionQueue_FromGameSessionQueueArn

func GameSessionQueue_FromGameSessionQueueArn(scope constructs.Construct, id *string, gameSessionQueueArn *string) IGameSessionQueue

Import an existing gameSessionQueue from its ARN. Experimental.

func GameSessionQueue_FromGameSessionQueueAttributes

func GameSessionQueue_FromGameSessionQueueAttributes(scope constructs.Construct, id *string, attrs *GameSessionQueueAttributes) IGameSessionQueue

Import an existing gameSessionQueue from its attributes. Experimental.

func GameSessionQueue_FromGameSessionQueueName

func GameSessionQueue_FromGameSessionQueueName(scope constructs.Construct, id *string, gameSessionQueueName *string) IGameSessionQueue

Import an existing gameSessionQueue from its name. Experimental.

type IGameSessionQueueDestination

type IGameSessionQueueDestination interface {
	// The ARN(s) to put into the destination field for a game session queue.
	//
	// This property is for cdk modules to consume only. You should not need to use this property.
	// Instead, use dedicated identifier on each components.
	// Experimental.
	ResourceArnForDestination() *string
}

Represents a game session queue destination. Experimental.

type IMatchmakingConfiguration

type IMatchmakingConfiguration interface {
	awscdk.IResource
	// Return the given named metric for this matchmaking configuration.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Matchmaking requests currently being processed or waiting to be processed.
	// Experimental.
	MetricCurrentTickets(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// For matchmaking configurations that require acceptance, the potential matches that were accepted since the last report.
	// Experimental.
	MetricMatchesAccepted(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Potential matches that were created since the last report.
	// Experimental.
	MetricMatchesCreated(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Matches that were successfully placed into a game session since the last report.
	// Experimental.
	MetricMatchesPlaced(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// For matchmaking configurations that require acceptance, the potential matches that were rejected by at least one player since the last report.
	// Experimental.
	MetricMatchesRejected(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Players in matchmaking tickets that were added since the last report.
	// Experimental.
	MetricPlayersStarted(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// For matchmaking requests that were put into a potential match before the last report, the amount of time between ticket creation and potential match creation.
	//
	// Units: seconds.
	// Experimental.
	MetricTimeToMatch(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The ARN of the matchmaking configuration.
	// Experimental.
	MatchmakingConfigurationArn() *string
	// The name of the matchmaking configuration.
	// Experimental.
	MatchmakingConfigurationName() *string
	// The notification target for matchmaking events.
	// Experimental.
	NotificationTarget() awssns.ITopic
}

Represents a Gamelift matchmaking configuration. Experimental.

func MatchmakingConfigurationBase_FromMatchmakingConfigurationAttributes

func MatchmakingConfigurationBase_FromMatchmakingConfigurationAttributes(scope constructs.Construct, id *string, attrs *MatchmakingConfigurationAttributes) IMatchmakingConfiguration

Import an existing matchmaking configuration from its attributes. Experimental.

func QueuedMatchmakingConfiguration_FromMatchmakingConfigurationAttributes

func QueuedMatchmakingConfiguration_FromMatchmakingConfigurationAttributes(scope constructs.Construct, id *string, attrs *MatchmakingConfigurationAttributes) IMatchmakingConfiguration

Import an existing matchmaking configuration from its attributes. Experimental.

func QueuedMatchmakingConfiguration_FromQueuedMatchmakingConfigurationArn

func QueuedMatchmakingConfiguration_FromQueuedMatchmakingConfigurationArn(scope constructs.Construct, id *string, matchmakingConfigurationArn *string) IMatchmakingConfiguration

Import an existing matchmaking configuration from its ARN. Experimental.

func QueuedMatchmakingConfiguration_FromQueuedMatchmakingConfigurationName

func QueuedMatchmakingConfiguration_FromQueuedMatchmakingConfigurationName(scope constructs.Construct, id *string, matchmakingConfigurationName *string) IMatchmakingConfiguration

Import an existing matchmaking configuration from its name. Experimental.

func StandaloneMatchmakingConfiguration_FromMatchmakingConfigurationAttributes

func StandaloneMatchmakingConfiguration_FromMatchmakingConfigurationAttributes(scope constructs.Construct, id *string, attrs *MatchmakingConfigurationAttributes) IMatchmakingConfiguration

Import an existing matchmaking configuration from its attributes. Experimental.

func StandaloneMatchmakingConfiguration_FromStandaloneMatchmakingConfigurationArn

func StandaloneMatchmakingConfiguration_FromStandaloneMatchmakingConfigurationArn(scope constructs.Construct, id *string, matchmakingConfigurationArn *string) IMatchmakingConfiguration

Import an existing matchmaking configuration from its ARN. Experimental.

func StandaloneMatchmakingConfiguration_FromStandaloneMatchmakingConfigurationName

func StandaloneMatchmakingConfiguration_FromStandaloneMatchmakingConfigurationName(scope constructs.Construct, id *string, matchmakingConfigurationName *string) IMatchmakingConfiguration

Import an existing matchmaking configuration from its name. Experimental.

type IMatchmakingRuleSet

type IMatchmakingRuleSet interface {
	awscdk.IResource
	// Return the given named metric for this matchmaking ruleSet.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Rule evaluations during matchmaking that failed since the last report.
	//
	// This metric is limited to the top 50 rules.
	// Experimental.
	MetricRuleEvaluationsFailed(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Rule evaluations during the matchmaking process that passed since the last report.
	//
	// This metric is limited to the top 50 rules.
	// Experimental.
	MetricRuleEvaluationsPassed(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// The ARN of the ruleSet.
	// Experimental.
	MatchmakingRuleSetArn() *string
	// The unique name of the ruleSet.
	// Experimental.
	MatchmakingRuleSetName() *string
}

Represents a Gamelift matchmaking ruleset. Experimental.

func MatchmakingRuleSet_FromMatchmakingRuleSetArn

func MatchmakingRuleSet_FromMatchmakingRuleSetArn(scope constructs.Construct, id *string, matchmakingRuleSetArn *string) IMatchmakingRuleSet

Import a ruleSet into CDK using its ARN. Experimental.

func MatchmakingRuleSet_FromMatchmakingRuleSetAttributes

func MatchmakingRuleSet_FromMatchmakingRuleSetAttributes(scope constructs.Construct, id *string, attrs *MatchmakingRuleSetAttributes) IMatchmakingRuleSet

Import an existing matchmaking ruleSet from its attributes. Experimental.

func MatchmakingRuleSet_FromMatchmakingRuleSetName

func MatchmakingRuleSet_FromMatchmakingRuleSetName(scope constructs.Construct, id *string, matchmakingRuleSetName *string) IMatchmakingRuleSet

Import a ruleSet into CDK using its name. Experimental.

type IPeer

type IPeer interface {
	// Produce the ingress rule JSON for the given connection.
	// Experimental.
	ToJson() interface{}
	// A unique identifier for this connection peer.
	// Experimental.
	UniqueId() *string
}

Interface for classes that provide the peer-specification parts of an inbound permission. Experimental.

func Peer_AnyIpv4

func Peer_AnyIpv4() IPeer

Any IPv4 address. Experimental.

func Peer_Ipv4

func Peer_Ipv4(cidrIp *string) IPeer

Create an IPv4 peer from a CIDR. Experimental.

type IRuleSetBody

type IRuleSetBody interface {
}

Interface to represent Matchmaking RuleSet schema. Experimental.

type IRuleSetContent

type IRuleSetContent interface {
	// Called when the matchmaking ruleSet is initialized to allow this object to bind to the stack and add resources.
	// Experimental.
	Bind(_scope constructs.Construct) *RuleSetBodyConfig
	// RuleSet body content.
	// Experimental.
	Content() IRuleSetBody
}

Interface to represent a Matchmaking RuleSet content. Experimental.

func RuleSetContent_FromInline

func RuleSetContent_FromInline(body *string) IRuleSetContent

Inline body for Matchmaking ruleSet.

Returns: `RuleSetContent` with inline code. Experimental.

func RuleSetContent_FromJsonFile

func RuleSetContent_FromJsonFile(path *string) IRuleSetContent

Matchmaking ruleSet body from a file.

Returns: `RuleSetContentBase` based on JSON file content. Experimental.

type IScript

type IScript interface {
	awsiam.IGrantable
	awscdk.IResource
	// The ARN of the realtime server script.
	// Experimental.
	ScriptArn() *string
	// The Identifier of the realtime server script.
	// Experimental.
	ScriptId() *string
}

Your configuration and custom game logic for use with Realtime Servers.

Realtime Servers are provided by GameLift to use instead of a custom-built game server. You configure Realtime Servers for your game clients by creating a script using JavaScript, and add custom game logic as appropriate to host game sessions for your players. You upload the Realtime script to the GameLift service in the Regions where you plan to set up fleets. See: https://docs.aws.amazon.com/gamelift/latest/developerguide/realtime-script-uploading.html

Experimental.

func Script_FromScriptArn

func Script_FromScriptArn(scope constructs.Construct, id *string, scriptArn *string) IScript

Import a script into CDK using its ARN. Experimental.

func Script_FromScriptAttributes

func Script_FromScriptAttributes(scope constructs.Construct, id *string, attrs *ScriptAttributes) IScript

Import an existing realtime server script from its attributes. Experimental.

type IngressRule

type IngressRule struct {
	// The port range used for ingress traffic.
	// Experimental.
	Port Port `field:"required" json:"port" yaml:"port"`
	// A range of allowed IP addresses .
	// Experimental.
	Source IPeer `field:"required" json:"source" yaml:"source"`
}

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.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"

var peer iPeer
var port port

ingressRule := &IngressRule{
	Port: port,
	Source: peer,
}

Experimental.

type InstanceDefinition

type InstanceDefinition struct {
	// An Amazon EC2 instance type designation.
	// Experimental.
	InstanceType awsec2.InstanceType `field:"required" json:"instanceType" yaml:"instanceType"`
	// Instance weighting that indicates how much this instance type contributes to the total capacity of a game server group.
	//
	// Instance weights are used by GameLift FleetIQ to calculate the instance type's cost per unit hour and better identify the most cost-effective options.
	// See: https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-weighting.html
	//
	// Default: default value is 1.
	//
	// Experimental.
	Weight *float64 `field:"optional" json:"weight" yaml:"weight"`
}

An allowed instance type for a game server group.

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

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"
import "github.com/aws/aws-cdk-go/awscdk"

var instanceType instanceType

instanceDefinition := &InstanceDefinition{
	InstanceType: instanceType,

	// the properties below are optional
	Weight: jsii.Number(123),
}

Experimental.

type Location

type Location struct {
	// An AWS Region code.
	// Experimental.
	Region *string `field:"required" json:"region" yaml:"region"`
	// 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.
	// Default: no capacity settings on the specified location.
	//
	// Experimental.
	Capacity *LocationCapacity `field:"optional" json:"capacity" yaml:"capacity"`
}

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

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"

location := &Location{
	Region: jsii.String("region"),

	// the properties below are optional
	Capacity: &LocationCapacity{
		DesiredCapacity: jsii.Number(123),
		MaxSize: jsii.Number(123),
		MinSize: jsii.Number(123),
	},
}

Experimental.

type LocationCapacity

type LocationCapacity struct {
	// 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.
	// Default: the default value is 0.
	//
	// Experimental.
	DesiredCapacity *float64 `field:"optional" json:"desiredCapacity" yaml:"desiredCapacity"`
	// The maximum number of instances that are allowed in the specified fleet location.
	// Default: the default value is 1.
	//
	// Experimental.
	MaxSize *float64 `field:"optional" json:"maxSize" yaml:"maxSize"`
	// The minimum number of instances that are allowed in the specified fleet location.
	// Default: the default value is 0.
	//
	// Experimental.
	MinSize *float64 `field:"optional" json:"minSize" yaml:"minSize"`
}

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.

Example:

var build build

// Locations can be added directly through constructor
fleet := gamelift.NewBuildFleet(this, jsii.String("Game server fleet"), &BuildFleetProps{
	FleetName: jsii.String("test-fleet"),
	Content: build,
	InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_C4, ec2.InstanceSize_LARGE),
	RuntimeConfiguration: &RuntimeConfiguration{
		ServerProcesses: []serverProcess{
			&serverProcess{
				LaunchPath: jsii.String("/local/game/GameLiftExampleServer.x86_64"),
			},
		},
	},
	Locations: []location{
		&location{
			Region: jsii.String("eu-west-1"),
			Capacity: &LocationCapacity{
				DesiredCapacity: jsii.Number(5),
				MinSize: jsii.Number(2),
				MaxSize: jsii.Number(10),
			},
		},
		&location{
			Region: jsii.String("us-east-1"),
			Capacity: &LocationCapacity{
				DesiredCapacity: jsii.Number(5),
				MinSize: jsii.Number(2),
				MaxSize: jsii.Number(10),
			},
		},
	},
})

// Or through dedicated methods
fleet.AddLocation(jsii.String("ap-southeast-1"), jsii.Number(5), jsii.Number(2), jsii.Number(10))

Experimental.

type MatchmakingConfigurationAttributes

type MatchmakingConfigurationAttributes struct {
	// The ARN of the Matchmaking configuration.
	//
	// At least one of `matchmakingConfigurationArn` and `matchmakingConfigurationName` must be provided.
	// Default: derived from `matchmakingConfigurationName`.
	//
	// Experimental.
	MatchmakingConfigurationArn *string `field:"optional" json:"matchmakingConfigurationArn" yaml:"matchmakingConfigurationArn"`
	// The identifier of the Matchmaking configuration.
	//
	// At least one of `matchmakingConfigurationName` and `matchmakingConfigurationArn`  must be provided.
	// Default: derived from `matchmakingConfigurationArn`.
	//
	// Experimental.
	MatchmakingConfigurationName *string `field:"optional" json:"matchmakingConfigurationName" yaml:"matchmakingConfigurationName"`
	// An SNS topic ARN that is set up to receive matchmaking notifications.
	// See: https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-notification.html
	//
	// Default: no notification target binded to imported ressource.
	//
	// Experimental.
	NotificationTarget awssns.ITopic `field:"optional" json:"notificationTarget" yaml:"notificationTarget"`
}

A full specification of a matchmaking configuration that can be used to import it fluently into the CDK application.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"
import "github.com/aws/aws-cdk-go/awscdk"

var topic topic

matchmakingConfigurationAttributes := &MatchmakingConfigurationAttributes{
	MatchmakingConfigurationArn: jsii.String("matchmakingConfigurationArn"),
	MatchmakingConfigurationName: jsii.String("matchmakingConfigurationName"),
	NotificationTarget: topic,
}

Experimental.

type MatchmakingConfigurationBase

type MatchmakingConfigurationBase interface {
	awscdk.Resource
	IMatchmakingConfiguration
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The ARN of the matchmaking configuration.
	// Experimental.
	MatchmakingConfigurationArn() *string
	// The Identifier of the matchmaking configuration.
	// Experimental.
	MatchmakingConfigurationName() *string
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// The notification target for matchmaking events.
	// Experimental.
	NotificationTarget() awssns.ITopic
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// 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`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Return the given named metric for this matchmaking configuration.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Matchmaking requests currently being processed or waiting to be processed.
	// Experimental.
	MetricCurrentTickets(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// For matchmaking configurations that require acceptance, the potential matches that were accepted since the last report.
	// Experimental.
	MetricMatchesAccepted(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Potential matches that were created since the last report.
	// Experimental.
	MetricMatchesCreated(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Matches that were successfully placed into a game session since the last report.
	// Experimental.
	MetricMatchesPlaced(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// For matchmaking configurations that require acceptance, the potential matches that were rejected by at least one player since the last report.
	// Experimental.
	MetricMatchesRejected(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Players in matchmaking tickets that were added since the last report.
	// Experimental.
	MetricPlayersStarted(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// For matchmaking requests that were put into a potential match before the last report, the amount of time between ticket creation and potential match creation.
	//
	// Units: seconds.
	// Experimental.
	MetricTimeToMatch(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
}

Base class for new and imported GameLift Matchmaking configuration.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"
import "github.com/aws/aws-cdk-go/awscdk"

var topic topic

matchmakingConfigurationBase := gamelift_alpha.MatchmakingConfigurationBase_FromMatchmakingConfigurationAttributes(this, jsii.String("MyMatchmakingConfigurationBase"), &MatchmakingConfigurationAttributes{
	MatchmakingConfigurationArn: jsii.String("matchmakingConfigurationArn"),
	MatchmakingConfigurationName: jsii.String("matchmakingConfigurationName"),
	NotificationTarget: topic,
})

Experimental.

type MatchmakingConfigurationProps

type MatchmakingConfigurationProps struct {
	// A unique identifier for the matchmaking configuration.
	//
	// This name is used to identify the configuration associated with a matchmaking request or ticket.
	// Experimental.
	MatchmakingConfigurationName *string `field:"required" json:"matchmakingConfigurationName" yaml:"matchmakingConfigurationName"`
	// A matchmaking rule set to use with this configuration.
	//
	// A matchmaking configuration can only use rule sets that are defined in the same Region.
	// Experimental.
	RuleSet IMatchmakingRuleSet `field:"required" json:"ruleSet" yaml:"ruleSet"`
	// The length of time (in seconds) to wait for players to accept a proposed match, if acceptance is required.
	// Default: 300 seconds.
	//
	// Experimental.
	AcceptanceTimeout awscdk.Duration `field:"optional" json:"acceptanceTimeout" yaml:"acceptanceTimeout"`
	// Information to add to all events related to the matchmaking configuration.
	// Default: no custom data added to events.
	//
	// Experimental.
	CustomEventData *string `field:"optional" json:"customEventData" yaml:"customEventData"`
	// A human-readable description of the matchmaking configuration.
	// Default: no description is provided.
	//
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// An SNS topic ARN that is set up to receive matchmaking notifications.
	// See: https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-notification.html
	//
	// Default: no notification target.
	//
	// Experimental.
	NotificationTarget awssns.ITopic `field:"optional" json:"notificationTarget" yaml:"notificationTarget"`
	// The maximum duration, that a matchmaking ticket can remain in process before timing out.
	//
	// Requests that fail due to timing out can be resubmitted as needed.
	// Default: 300 seconds.
	//
	// Experimental.
	RequestTimeout awscdk.Duration `field:"optional" json:"requestTimeout" yaml:"requestTimeout"`
	// A flag that determines whether a match that was created with this configuration must be accepted by the matched players.
	//
	// With this option enabled, matchmaking tickets use the status `REQUIRES_ACCEPTANCE` to indicate when a completed potential match is waiting for player acceptance.
	// Default: Acceptance is not required.
	//
	// Experimental.
	RequireAcceptance *bool `field:"optional" json:"requireAcceptance" yaml:"requireAcceptance"`
}

Properties for a new Gamelift matchmaking configuration.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var matchmakingRuleSet matchmakingRuleSet
var topic topic

matchmakingConfigurationProps := &MatchmakingConfigurationProps{
	MatchmakingConfigurationName: jsii.String("matchmakingConfigurationName"),
	RuleSet: matchmakingRuleSet,

	// the properties below are optional
	AcceptanceTimeout: cdk.Duration_Minutes(jsii.Number(30)),
	CustomEventData: jsii.String("customEventData"),
	Description: jsii.String("description"),
	NotificationTarget: topic,
	RequestTimeout: cdk.Duration_*Minutes(jsii.Number(30)),
	RequireAcceptance: jsii.Boolean(false),
}

Experimental.

type MatchmakingRuleSet

type MatchmakingRuleSet interface {
	MatchmakingRuleSetBase
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The ARN of the ruleSet.
	// Experimental.
	MatchmakingRuleSetArn() *string
	// The unique name of the ruleSet.
	// Experimental.
	MatchmakingRuleSetName() *string
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// 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`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Return the given named metric for this matchmaking ruleSet.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Rule evaluations during matchmaking that failed since the last report.
	//
	// This metric is limited to the top 50 rules.
	// Experimental.
	MetricRuleEvaluationsFailed(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Rule evaluations during the matchmaking process that passed since the last report.
	//
	// This metric is limited to the top 50 rules.
	// Experimental.
	MetricRuleEvaluationsPassed(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
}

Creates a new rule set for FlexMatch matchmaking.

The rule set determines the two key elements of a match: your game's team structure and size, and how to group players together for the best possible match.

For example, a rule set might describe a match like this:

  • Create a match with two teams of five players each, one team is the defenders and the other team the invaders.
  • A team can have novice and experienced players, but the average skill of the two teams must be within 10 points of each other.
  • If no match is made after 30 seconds, gradually relax the skill requirements.

Rule sets must be defined in the same Region as the matchmaking configuration they are used with.

Example:

gamelift.NewMatchmakingRuleSet(this, jsii.String("RuleSet"), &MatchmakingRuleSetProps{
	MatchmakingRuleSetName: jsii.String("my-test-ruleset"),
	Content: gamelift.RuleSetContent_FromJsonFile(path.join(__dirname, jsii.String("my-ruleset"), jsii.String("ruleset.json"))),
})

See: https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-rulesets.html

Experimental.

func NewMatchmakingRuleSet

func NewMatchmakingRuleSet(scope constructs.Construct, id *string, props *MatchmakingRuleSetProps) MatchmakingRuleSet

Experimental.

type MatchmakingRuleSetAttributes

type MatchmakingRuleSetAttributes struct {
	// The ARN of the matchmaking ruleSet.
	//
	// At least one of `matchmakingRuleSetArn` and `matchmakingRuleSetName` must be provided.
	// Default: derived from `matchmakingRuleSetName`.
	//
	// Experimental.
	MatchmakingRuleSetArn *string `field:"optional" json:"matchmakingRuleSetArn" yaml:"matchmakingRuleSetArn"`
	// The unique name of the matchmaking ruleSet.
	//
	// At least one of `ruleSetName` and `matchmakingRuleSetArn`  must be provided.
	// Default: derived from `matchmakingRuleSetArn`.
	//
	// Experimental.
	MatchmakingRuleSetName *string `field:"optional" json:"matchmakingRuleSetName" yaml:"matchmakingRuleSetName"`
}

A full specification of a matchmaking ruleSet that can be used to import it fluently into the CDK application.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"

matchmakingRuleSetAttributes := &MatchmakingRuleSetAttributes{
	MatchmakingRuleSetArn: jsii.String("matchmakingRuleSetArn"),
	MatchmakingRuleSetName: jsii.String("matchmakingRuleSetName"),
}

Experimental.

type MatchmakingRuleSetBase

type MatchmakingRuleSetBase interface {
	awscdk.Resource
	IMatchmakingRuleSet
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The ARN of the ruleSet.
	// Experimental.
	MatchmakingRuleSetArn() *string
	// The unique name of the ruleSet.
	// Experimental.
	MatchmakingRuleSetName() *string
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// 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`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Return the given named metric for this matchmaking ruleSet.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Rule evaluations during matchmaking that failed since the last report.
	//
	// This metric is limited to the top 50 rules.
	// Experimental.
	MetricRuleEvaluationsFailed(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Rule evaluations during the matchmaking process that passed since the last report.
	//
	// This metric is limited to the top 50 rules.
	// Experimental.
	MetricRuleEvaluationsPassed(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
}

Base class for new and imported GameLift matchmaking ruleSet. Experimental.

type MatchmakingRuleSetProps

type MatchmakingRuleSetProps struct {
	// A collection of matchmaking rules.
	// Experimental.
	Content RuleSetContent `field:"required" json:"content" yaml:"content"`
	// A unique identifier for the matchmaking rule set.
	//
	// A matchmaking configuration identifies the rule set it uses by this name value.
	//
	// Note: the rule set name is different from the optional name field in the rule set body.
	// Experimental.
	MatchmakingRuleSetName *string `field:"required" json:"matchmakingRuleSetName" yaml:"matchmakingRuleSetName"`
}

Properties for a new matchmaking ruleSet.

Example:

gamelift.NewMatchmakingRuleSet(this, jsii.String("RuleSet"), &MatchmakingRuleSetProps{
	MatchmakingRuleSetName: jsii.String("my-test-ruleset"),
	Content: gamelift.RuleSetContent_FromJsonFile(path.join(__dirname, jsii.String("my-ruleset"), jsii.String("ruleset.json"))),
})

Experimental.

type OperatingSystem

type OperatingSystem string

The operating system that the game server binaries are built to run on. Experimental.

const (
	// Amazon Linux operating system.
	// Experimental.
	OperatingSystem_AMAZON_LINUX OperatingSystem = "AMAZON_LINUX"
	// Amazon Linux 2 operating system.
	// Experimental.
	OperatingSystem_AMAZON_LINUX_2 OperatingSystem = "AMAZON_LINUX_2"
	// Amazon Linux 2023 operating system.
	// Experimental.
	OperatingSystem_AMAZON_LINUX_2023 OperatingSystem = "AMAZON_LINUX_2023"
	// Windows Server 2012 operating system.
	// Deprecated: If you have active fleets using the Windows Server 2012 operating system,
	// you can continue to create new builds using this OS until October 10, 2023, when Microsoft ends its support.
	// All others must use Windows Server 2016 when creating new Windows-based builds.
	OperatingSystem_WINDOWS_2012 OperatingSystem = "WINDOWS_2012"
	// Windows Server 2016 operating system.
	// Experimental.
	OperatingSystem_WINDOWS_2016 OperatingSystem = "WINDOWS_2016"
)

type Peer

type Peer interface {
}

Peer object factories.

The static methods on this object can be used to create peer objects which represent a connection partner in inbound permission rules.

Use this object if you need to represent connection partners using plain IP addresses.

Example:

var build build

fleet := gamelift.NewBuildFleet(this, jsii.String("Game server fleet"), &BuildFleetProps{
	FleetName: jsii.String("test-fleet"),
	Content: build,
	InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_C4, ec2.InstanceSize_LARGE),
	RuntimeConfiguration: &RuntimeConfiguration{
		ServerProcesses: []serverProcess{
			&serverProcess{
				LaunchPath: jsii.String("/local/game/GameLiftExampleServer.x86_64"),
			},
		},
	},
	IngressRules: []ingressRule{
		&ingressRule{
			Source: gamelift.Peer_AnyIpv4(),
			Port: gamelift.Port_TcpRange(jsii.Number(100), jsii.Number(200)),
		},
	},
})
// Allowing a specific CIDR for port 1111 on UDP Protocol
fleet.AddIngressRule(gamelift.Peer_Ipv4(jsii.String("1.2.3.4/32")), gamelift.Port_Udp(jsii.Number(1111)))

Experimental.

func NewPeer

func NewPeer() Peer

Experimental.

type PlayerLatencyPolicy

type PlayerLatencyPolicy struct {
	// The maximum latency value that is allowed for any player, in milliseconds.
	//
	// All policies must have a value set for this property.
	// Experimental.
	MaximumIndividualPlayerLatency awscdk.Duration `field:"required" json:"maximumIndividualPlayerLatency" yaml:"maximumIndividualPlayerLatency"`
	// The length of time, in seconds, that the policy is enforced while placing a new game session.
	// Default: the policy is enforced until the queue times out.
	//
	// Experimental.
	PolicyDuration awscdk.Duration `field:"optional" json:"policyDuration" yaml:"policyDuration"`
}

The queue setting that determines the highest latency allowed for individual players when placing a game session.

When a latency policy is in force, a game session cannot be placed with any fleet in a Region where a player reports latency higher than the cap.

Latency policies are only enforced when the placement request contains player latency information.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"
import "github.com/aws/aws-cdk-go/awscdk"

playerLatencyPolicy := &PlayerLatencyPolicy{
	MaximumIndividualPlayerLatency: cdk.Duration_Minutes(jsii.Number(30)),

	// the properties below are optional
	PolicyDuration: cdk.Duration_*Minutes(jsii.Number(30)),
}

Experimental.

type Port

type Port interface {
	// Produce the ingress rule JSON for the given connection.
	// Experimental.
	ToJson() interface{}
}

Interface for classes that provide the connection-specification parts of a security group rule.

Example:

var build build

fleet := gamelift.NewBuildFleet(this, jsii.String("Game server fleet"), &BuildFleetProps{
	FleetName: jsii.String("test-fleet"),
	Content: build,
	InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_C4, ec2.InstanceSize_LARGE),
	RuntimeConfiguration: &RuntimeConfiguration{
		ServerProcesses: []serverProcess{
			&serverProcess{
				LaunchPath: jsii.String("/local/game/GameLiftExampleServer.x86_64"),
			},
		},
	},
	IngressRules: []ingressRule{
		&ingressRule{
			Source: gamelift.Peer_AnyIpv4(),
			Port: gamelift.Port_TcpRange(jsii.Number(100), jsii.Number(200)),
		},
	},
})
// Allowing a specific CIDR for port 1111 on UDP Protocol
fleet.AddIngressRule(gamelift.Peer_Ipv4(jsii.String("1.2.3.4/32")), gamelift.Port_Udp(jsii.Number(1111)))

Experimental.

func NewPort

func NewPort(props *PortProps) Port

Experimental.

func Port_AllTcp

func Port_AllTcp() Port

Any TCP traffic. Experimental.

func Port_AllUdp

func Port_AllUdp() Port

Any UDP traffic. Experimental.

func Port_Tcp

func Port_Tcp(port *float64) Port

A single TCP port. Experimental.

func Port_TcpRange

func Port_TcpRange(startPort *float64, endPort *float64) Port

A TCP port range. Experimental.

func Port_Udp

func Port_Udp(port *float64) Port

A single UDP port. Experimental.

func Port_UdpRange

func Port_UdpRange(startPort *float64, endPort *float64) Port

A UDP port range. Experimental.

type PortProps

type PortProps struct {
	// A starting value for a range of allowed port numbers.
	//
	// For fleets using Windows and Linux builds, only ports 1026-60000 are valid.
	// Experimental.
	FromPort *float64 `field:"required" json:"fromPort" yaml:"fromPort"`
	// The protocol for the range.
	// Experimental.
	Protocol Protocol `field:"required" json:"protocol" yaml:"protocol"`
	// 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 Windows and Linux builds, only ports 1026-60000 are valid.
	// Default: the `fromPort` value.
	//
	// Experimental.
	ToPort *float64 `field:"optional" json:"toPort" yaml:"toPort"`
}

Properties to create a port range.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"

portProps := &PortProps{
	FromPort: jsii.Number(123),
	Protocol: gamelift_alpha.Protocol_TCP,

	// the properties below are optional
	ToPort: jsii.Number(123),
}

Experimental.

type PriorityConfiguration

type PriorityConfiguration struct {
	// The prioritization order to use for fleet locations, when the PriorityOrder property includes LOCATION.
	//
	// Locations are identified by AWS Region codes such as `us-west-2.
	//
	// Each location can only be listed once.
	// Experimental.
	LocationOrder *[]*string `field:"required" json:"locationOrder" yaml:"locationOrder"`
	// The recommended sequence to use when prioritizing where to place new game sessions.
	//
	// Each type can only be listed once.
	// Experimental.
	PriorityOrder *[]PriorityType `field:"required" json:"priorityOrder" yaml:"priorityOrder"`
}

Custom prioritization settings for use by a game session queue when placing new game sessions with available game servers.

When defined, this configuration replaces the default FleetIQ prioritization process, which is as follows:

- If player latency data is included in a game session request, destinations and locations are prioritized first based on lowest average latency (1), then on lowest hosting cost (2), then on destination list order (3), and finally on location (alphabetical) (4). This approach ensures that the queue's top priority is to place game sessions where average player latency is lowest, and--if latency is the same--where the hosting cost is less, etc.

- If player latency data is not included, destinations and locations are prioritized first on destination list order (1), and then on location (alphabetical) (2). This approach ensures that the queue's top priority is to place game sessions on the first destination fleet listed. If that fleet has multiple locations, the game session is placed on the first location (when listed alphabetically).

Changing the priority order will affect how game sessions are placed.

Example:

var fleet buildFleet
var topic topic

gamelift.NewGameSessionQueue(this, jsii.String("MyGameSessionQueue"), &GameSessionQueueProps{
	GameSessionQueueName: jsii.String("test-gameSessionQueue"),
	CustomEventData: jsii.String("test-event-data"),
	AllowedLocations: []*string{
		jsii.String("eu-west-1"),
		jsii.String("eu-west-2"),
	},
	Destinations: []iGameSessionQueueDestination{
		fleet,
	},
	NotificationTarget: topic,
	PlayerLatencyPolicies: []playerLatencyPolicy{
		&playerLatencyPolicy{
			MaximumIndividualPlayerLatency: awscdk.Duration_Millis(jsii.Number(100)),
			PolicyDuration: awscdk.Duration_Seconds(jsii.Number(300)),
		},
	},
	PriorityConfiguration: &PriorityConfiguration{
		LocationOrder: []*string{
			jsii.String("eu-west-1"),
			jsii.String("eu-west-2"),
		},
		PriorityOrder: []priorityType{
			gamelift.*priorityType_LATENCY,
			gamelift.*priorityType_COST,
			gamelift.*priorityType_DESTINATION,
			gamelift.*priorityType_LOCATION,
		},
	},
	Timeout: awscdk.Duration_*Seconds(jsii.Number(300)),
})

Experimental.

type PriorityType

type PriorityType string

Priority to condider when placing new game sessions.

Example:

var fleet buildFleet
var topic topic

gamelift.NewGameSessionQueue(this, jsii.String("MyGameSessionQueue"), &GameSessionQueueProps{
	GameSessionQueueName: jsii.String("test-gameSessionQueue"),
	CustomEventData: jsii.String("test-event-data"),
	AllowedLocations: []*string{
		jsii.String("eu-west-1"),
		jsii.String("eu-west-2"),
	},
	Destinations: []iGameSessionQueueDestination{
		fleet,
	},
	NotificationTarget: topic,
	PlayerLatencyPolicies: []playerLatencyPolicy{
		&playerLatencyPolicy{
			MaximumIndividualPlayerLatency: awscdk.Duration_Millis(jsii.Number(100)),
			PolicyDuration: awscdk.Duration_Seconds(jsii.Number(300)),
		},
	},
	PriorityConfiguration: &PriorityConfiguration{
		LocationOrder: []*string{
			jsii.String("eu-west-1"),
			jsii.String("eu-west-2"),
		},
		PriorityOrder: []priorityType{
			gamelift.*priorityType_LATENCY,
			gamelift.*priorityType_COST,
			gamelift.*priorityType_DESTINATION,
			gamelift.*priorityType_LOCATION,
		},
	},
	Timeout: awscdk.Duration_*Seconds(jsii.Number(300)),
})

Experimental.

const (
	// FleetIQ prioritizes locations where the average player latency (provided in each game session request) is lowest.
	// Experimental.
	PriorityType_LATENCY PriorityType = "LATENCY"
	// FleetIQ prioritizes destinations with the lowest current hosting costs.
	//
	// Cost is evaluated based on the location, instance type, and fleet type (Spot or On-Demand) for each destination in the queue.
	// Experimental.
	PriorityType_COST PriorityType = "COST"
	// FleetIQ prioritizes based on the order that destinations are listed in the queue configuration.
	// Experimental.
	PriorityType_DESTINATION PriorityType = "DESTINATION"
	// FleetIQ prioritizes based on the provided order of locations, as defined in `LocationOrder`.
	// Experimental.
	PriorityType_LOCATION PriorityType = "LOCATION"
)

type Protocol

type Protocol string

Protocol for use in Connection Rules.

https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml Experimental.

const (
	// Experimental.
	Protocol_TCP Protocol = "TCP"
	// Experimental.
	Protocol_UDP Protocol = "UDP"
)

type QueuedMatchmakingConfiguration

type QueuedMatchmakingConfiguration interface {
	MatchmakingConfigurationBase
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The ARN of the matchmaking configuration.
	// Experimental.
	MatchmakingConfigurationArn() *string
	// The name of the matchmaking configuration.
	// Experimental.
	MatchmakingConfigurationName() *string
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// The notification target for matchmaking events.
	// Experimental.
	NotificationTarget() awssns.ITopic
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Adds a game session queue destination to the matchmaking configuration.
	// Experimental.
	AddGameSessionQueue(gameSessionQueue IGameSessionQueue)
	// Apply the given removal policy to this resource.
	//
	// 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`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Return the given named metric for this matchmaking configuration.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Matchmaking requests currently being processed or waiting to be processed.
	// Experimental.
	MetricCurrentTickets(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// For matchmaking configurations that require acceptance, the potential matches that were accepted since the last report.
	// Experimental.
	MetricMatchesAccepted(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Potential matches that were created since the last report.
	// Experimental.
	MetricMatchesCreated(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Matches that were successfully placed into a game session since the last report.
	// Experimental.
	MetricMatchesPlaced(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// For matchmaking configurations that require acceptance, the potential matches that were rejected by at least one player since the last report.
	// Experimental.
	MetricMatchesRejected(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Players in matchmaking tickets that were added since the last report.
	// Experimental.
	MetricPlayersStarted(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// For matchmaking requests that were put into a potential match before the last report, the amount of time between ticket creation and potential match creation.
	//
	// Units: seconds.
	// Experimental.
	MetricTimeToMatch(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
}

A FlexMatch matchmaker process does the work of building a game match.

It manages the pool of matchmaking requests received, forms teams for a match, processes and selects players to find the best possible player groups, and initiates the process of placing and starting a game session for the match. This topic describes the key aspects of a matchmaker and how to configure one customized for your game.

Example:

var queue gameSessionQueue
var ruleSet matchmakingRuleSet

gamelift.NewQueuedMatchmakingConfiguration(this, jsii.String("QueuedMatchmakingConfiguration"), &QueuedMatchmakingConfigurationProps{
	MatchmakingConfigurationName: jsii.String("test-queued-config-name"),
	GameSessionQueues: []iGameSessionQueue{
		queue,
	},
	RuleSet: ruleSet,
})

See: https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-configuration.html

Experimental.

func NewQueuedMatchmakingConfiguration

func NewQueuedMatchmakingConfiguration(scope constructs.Construct, id *string, props *QueuedMatchmakingConfigurationProps) QueuedMatchmakingConfiguration

Experimental.

type QueuedMatchmakingConfigurationProps

type QueuedMatchmakingConfigurationProps struct {
	// A unique identifier for the matchmaking configuration.
	//
	// This name is used to identify the configuration associated with a matchmaking request or ticket.
	// Experimental.
	MatchmakingConfigurationName *string `field:"required" json:"matchmakingConfigurationName" yaml:"matchmakingConfigurationName"`
	// A matchmaking rule set to use with this configuration.
	//
	// A matchmaking configuration can only use rule sets that are defined in the same Region.
	// Experimental.
	RuleSet IMatchmakingRuleSet `field:"required" json:"ruleSet" yaml:"ruleSet"`
	// The length of time (in seconds) to wait for players to accept a proposed match, if acceptance is required.
	// Default: 300 seconds.
	//
	// Experimental.
	AcceptanceTimeout awscdk.Duration `field:"optional" json:"acceptanceTimeout" yaml:"acceptanceTimeout"`
	// Information to add to all events related to the matchmaking configuration.
	// Default: no custom data added to events.
	//
	// Experimental.
	CustomEventData *string `field:"optional" json:"customEventData" yaml:"customEventData"`
	// A human-readable description of the matchmaking configuration.
	// Default: no description is provided.
	//
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// An SNS topic ARN that is set up to receive matchmaking notifications.
	// See: https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-notification.html
	//
	// Default: no notification target.
	//
	// Experimental.
	NotificationTarget awssns.ITopic `field:"optional" json:"notificationTarget" yaml:"notificationTarget"`
	// The maximum duration, that a matchmaking ticket can remain in process before timing out.
	//
	// Requests that fail due to timing out can be resubmitted as needed.
	// Default: 300 seconds.
	//
	// Experimental.
	RequestTimeout awscdk.Duration `field:"optional" json:"requestTimeout" yaml:"requestTimeout"`
	// A flag that determines whether a match that was created with this configuration must be accepted by the matched players.
	//
	// With this option enabled, matchmaking tickets use the status `REQUIRES_ACCEPTANCE` to indicate when a completed potential match is waiting for player acceptance.
	// Default: Acceptance is not required.
	//
	// Experimental.
	RequireAcceptance *bool `field:"optional" json:"requireAcceptance" yaml:"requireAcceptance"`
	// Queues are used to start new GameLift-hosted game sessions for matches that are created with this matchmaking configuration.
	//
	// Queues can be located in any Region.
	// Experimental.
	GameSessionQueues *[]IGameSessionQueue `field:"required" json:"gameSessionQueues" yaml:"gameSessionQueues"`
	// The number of player slots in a match to keep open for future players.
	//
	// For example, if the configuration's rule set specifies a match for a single 12-person team, and the additional player count is set to 2, only 10 players are selected for the match.
	// Default: no additional player slots.
	//
	// Experimental.
	AdditionalPlayerCount *float64 `field:"optional" json:"additionalPlayerCount" yaml:"additionalPlayerCount"`
	// A set of custom properties for a game session, formatted as key-value pairs.
	//
	// These properties are passed to a game server process with a request to start a new game session.
	// See: https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession
	//
	// Default: no additional game properties.
	//
	// Experimental.
	GameProperties *[]*GameProperty `field:"optional" json:"gameProperties" yaml:"gameProperties"`
	// A set of custom game session properties, formatted as a single string value.
	//
	// This data is passed to a game server process with a request to start a new game session.
	// See: https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession
	//
	// Default: no additional game session data.
	//
	// Experimental.
	GameSessionData *string `field:"optional" json:"gameSessionData" yaml:"gameSessionData"`
	// The method used to backfill game sessions that are created with this matchmaking configuration.
	//
	// - Choose manual when your game manages backfill requests manually or does not use the match backfill feature.
	// - Otherwise backfill is settled to automatic to have GameLift create a `StartMatchBackfill` request whenever a game session has one or more open slots.
	// See: https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-backfill.html
	//
	// Default: automatic backfill mode.
	//
	// Experimental.
	ManualBackfillMode *bool `field:"optional" json:"manualBackfillMode" yaml:"manualBackfillMode"`
}

Properties for a new queued matchmaking configuration.

Example:

var queue gameSessionQueue
var ruleSet matchmakingRuleSet

gamelift.NewQueuedMatchmakingConfiguration(this, jsii.String("QueuedMatchmakingConfiguration"), &QueuedMatchmakingConfigurationProps{
	MatchmakingConfigurationName: jsii.String("test-queued-config-name"),
	GameSessionQueues: []iGameSessionQueue{
		queue,
	},
	RuleSet: ruleSet,
})

Experimental.

type ResourceCreationLimitPolicy

type ResourceCreationLimitPolicy struct {
	// The maximum number of game sessions that an individual can create during the policy period.
	// Default: no limit on the number of game sessions that an individual can create during the policy period.
	//
	// Experimental.
	NewGameSessionsPerCreator *float64 `field:"optional" json:"newGameSessionsPerCreator" yaml:"newGameSessionsPerCreator"`
	// The time span used in evaluating the resource creation limit policy.
	// Default: no policy period.
	//
	// Experimental.
	PolicyPeriod awscdk.Duration `field:"optional" json:"policyPeriod" yaml:"policyPeriod"`
}

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.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"
import cdk "github.com/aws/aws-cdk-go/awscdk"

resourceCreationLimitPolicy := &ResourceCreationLimitPolicy{
	NewGameSessionsPerCreator: jsii.Number(123),
	PolicyPeriod: cdk.Duration_Minutes(jsii.Number(30)),
}

Experimental.

type RuleSetBodyConfig

type RuleSetBodyConfig struct {
	// Inline ruleSet body.
	// Experimental.
	RuleSetBody *string `field:"required" json:"ruleSetBody" yaml:"ruleSetBody"`
}

Interface to represent output result of a RuleSetContent binding.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"

ruleSetBodyConfig := &RuleSetBodyConfig{
	RuleSetBody: jsii.String("ruleSetBody"),
}

Experimental.

type RuleSetContent

type RuleSetContent interface {
	IRuleSetContent
	// RuleSet body content.
	// Experimental.
	Content() IRuleSetBody
	// Called when the matchmaking ruleSet is initialized to allow this object to bind to the stack and add resources.
	// Experimental.
	Bind(_scope constructs.Construct) *RuleSetBodyConfig
}

The rule set determines the two key elements of a match: your game's team structure and size, and how to group players together for the best possible match.

For example, a rule set might describe a match like this: - Create a match with two teams of five players each, one team is the defenders and the other team the invaders. - A team can have novice and experienced players, but the average skill of the two teams must be within 10 points of each other. - If no match is made after 30 seconds, gradually relax the skill requirements.

Example:

gamelift.NewMatchmakingRuleSet(this, jsii.String("RuleSet"), &MatchmakingRuleSetProps{
	MatchmakingRuleSetName: jsii.String("my-test-ruleset"),
	Content: gamelift.RuleSetContent_FromJsonFile(path.join(__dirname, jsii.String("my-ruleset"), jsii.String("ruleset.json"))),
})

Experimental.

func NewRuleSetContent

func NewRuleSetContent(props *RuleSetContentProps) RuleSetContent

Experimental.

type RuleSetContentProps

type RuleSetContentProps struct {
	// RuleSet body content.
	// Default: use a default empty RuleSet body.
	//
	// Experimental.
	Content IRuleSetBody `field:"optional" json:"content" yaml:"content"`
}

Properties for a new matchmaking ruleSet content.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"

var ruleSetBody iRuleSetBody

ruleSetContentProps := &RuleSetContentProps{
	Content: ruleSetBody,
}

Experimental.

type RuntimeConfiguration

type RuntimeConfiguration struct {
	// A collection of server process configurations that identify what server processes to run on each instance in a fleet.
	// Experimental.
	ServerProcesses *[]*ServerProcess `field:"required" json:"serverProcesses" yaml:"serverProcesses"`
	// The maximum amount of time 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`.
	// Default: by default game session activation timeout is 300 seconds.
	//
	// Experimental.
	GameSessionActivationTimeout awscdk.Duration `field:"optional" json:"gameSessionActivationTimeout" yaml:"gameSessionActivationTimeout"`
	// 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.
	// Default: no limit.
	//
	// Experimental.
	MaxConcurrentGameSessionActivations *float64 `field:"optional" json:"maxConcurrentGameSessionActivations" yaml:"maxConcurrentGameSessionActivations"`
}

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

Example:

var build build

// Server processes can be delcared in a declarative way through the constructor
fleet := gamelift.NewBuildFleet(this, jsii.String("Game server fleet"), &BuildFleetProps{
	FleetName: jsii.String("test-fleet"),
	Content: build,
	InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_C4, ec2.InstanceSize_LARGE),
	RuntimeConfiguration: &RuntimeConfiguration{
		ServerProcesses: []serverProcess{
			&serverProcess{
				LaunchPath: jsii.String("/local/game/GameLiftExampleServer.x86_64"),
				Parameters: jsii.String("-logFile /local/game/logs/myserver1935.log -port 1935"),
				ConcurrentExecutions: jsii.Number(100),
			},
		},
	},
})

See: https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-multiprocess.html

Experimental.

type S3Content

type S3Content interface {
	Content
	// Called when the Build is initialized to allow this object to bind.
	// Experimental.
	Bind(_scope constructs.Construct, role awsiam.IRole) *ContentConfig
}

Game content from an S3 archive.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"
import "github.com/aws/aws-cdk-go/awscdk"

var bucket bucket

s3Content := gamelift_alpha.NewS3Content(bucket, jsii.String("key"), jsii.String("objectVersion"))

Experimental.

func AssetContent_FromBucket

func AssetContent_FromBucket(bucket awss3.IBucket, key *string, objectVersion *string) S3Content

Game content as an S3 object. Experimental.

func Content_FromBucket

func Content_FromBucket(bucket awss3.IBucket, key *string, objectVersion *string) S3Content

Game content as an S3 object. Experimental.

func NewS3Content

func NewS3Content(bucket awss3.IBucket, key *string, objectVersion *string) S3Content

Experimental.

func S3Content_FromBucket

func S3Content_FromBucket(bucket awss3.IBucket, key *string, objectVersion *string) S3Content

Game content as an S3 object. Experimental.

type Script

type Script interface {
	ScriptBase
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The principal this GameLift script is using.
	// Experimental.
	GrantPrincipal() awsiam.IPrincipal
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The IAM role GameLift assumes to acccess server script content.
	// Experimental.
	Role() awsiam.IRole
	// The ARN of the realtime server script.
	// Experimental.
	ScriptArn() *string
	// The Identifier of the realtime server script.
	// Experimental.
	ScriptId() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// 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`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
}

A GameLift script, that is installed and runs on instances in an Amazon GameLift fleet.

It consists of a zip file with all of the components of the realtime game server script.

Example:

var bucket bucket

gamelift.NewScript(this, jsii.String("Script"), &ScriptProps{
	Content: gamelift.Content_FromBucket(bucket, jsii.String("sample-asset-key")),
})

See: https://docs.aws.amazon.com/gamelift/latest/developerguide/realtime-script-uploading.html

Experimental.

func NewScript

func NewScript(scope constructs.Construct, id *string, props *ScriptProps) Script

Experimental.

func Script_FromAsset

func Script_FromAsset(scope constructs.Construct, id *string, path *string, options *awss3assets.AssetOptions) Script

Create a new realtime server script from asset content. Experimental.

func Script_FromBucket

func Script_FromBucket(scope constructs.Construct, id *string, bucket awss3.IBucket, key *string, objectVersion *string) Script

Create a new realtime server script from s3 content. Experimental.

type ScriptAttributes

type ScriptAttributes struct {
	// The ARN of the realtime server script.
	// Experimental.
	ScriptArn *string `field:"required" json:"scriptArn" yaml:"scriptArn"`
	// The IAM role assumed by GameLift to access server script in S3.
	// Default: - undefined.
	//
	// Experimental.
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
}

Represents a Script content defined outside of this stack.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"
import "github.com/aws/aws-cdk-go/awscdk"

var role role

scriptAttributes := &ScriptAttributes{
	ScriptArn: jsii.String("scriptArn"),

	// the properties below are optional
	Role: role,
}

Experimental.

type ScriptBase

type ScriptBase interface {
	awscdk.Resource
	IScript
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The principal to grant permissions to.
	// Experimental.
	GrantPrincipal() awsiam.IPrincipal
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The ARN of the realtime server script.
	// Experimental.
	ScriptArn() *string
	// The Identifier of the realtime server script.
	// Experimental.
	ScriptId() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// 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`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
}

Base class for new and imported GameLift realtime server script. Experimental.

type ScriptProps

type ScriptProps struct {
	// The game content.
	// Experimental.
	Content Content `field:"required" json:"content" yaml:"content"`
	// The IAM role assumed by GameLift to access server script in S3.
	//
	// If providing a custom role, it needs to trust the GameLift service principal (gamelift.amazonaws.com) and be granted sufficient permissions
	// to have Read access to a specific key content into a specific S3 bucket.
	// Below an example of required permission:
	// {
	//  "Version": "2012-10-17",
	//  "Statement": [{
	//        "Effect": "Allow",
	//        "Action": [
	//            "s3:GetObject",
	//            "s3:GetObjectVersion"
	//        ],
	//        "Resource": "arn:aws:s3:::bucket-name/object-name"
	//  }]
	// }.
	// See: https://docs.aws.amazon.com/gamelift/latest/developerguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-access-storage-loc
	//
	// Default: - a role will be created with default permissions.
	//
	// Experimental.
	Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
	// Name of this realtime server script.
	// Default: No name.
	//
	// Experimental.
	ScriptName *string `field:"optional" json:"scriptName" yaml:"scriptName"`
	// Version of this realtime server script.
	// Default: No version.
	//
	// Experimental.
	ScriptVersion *string `field:"optional" json:"scriptVersion" yaml:"scriptVersion"`
}

Properties for a new realtime server script.

Example:

var bucket bucket

gamelift.NewScript(this, jsii.String("Script"), &ScriptProps{
	Content: gamelift.Content_FromBucket(bucket, jsii.String("sample-asset-key")),
})

Experimental.

type ServerProcess

type ServerProcess struct {
	// 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`
	// Experimental.
	LaunchPath *string `field:"required" json:"launchPath" yaml:"launchPath"`
	// The number of server processes using this configuration that run concurrently on each instance.
	//
	// Minimum is `1`.
	// Default: 1.
	//
	// Experimental.
	ConcurrentExecutions *float64 `field:"optional" json:"concurrentExecutions" yaml:"concurrentExecutions"`
	// An optional list of parameters to pass to the server executable or Realtime script on launch.
	// Default: no parameters.
	//
	// Experimental.
	Parameters *string `field:"optional" json:"parameters" yaml:"parameters"`
}

Configuration of a fleet server process.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import gamelift_alpha "github.com/aws/aws-cdk-go/awscdkgameliftalpha"

serverProcess := &ServerProcess{
	LaunchPath: jsii.String("launchPath"),

	// the properties below are optional
	ConcurrentExecutions: jsii.Number(123),
	Parameters: jsii.String("parameters"),
}

Experimental.

type StandaloneMatchmakingConfiguration

type StandaloneMatchmakingConfiguration interface {
	MatchmakingConfigurationBase
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The ARN of the matchmaking configuration.
	// Experimental.
	MatchmakingConfigurationArn() *string
	// The Identifier of the matchmaking configuration.
	// Experimental.
	MatchmakingConfigurationName() *string
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// The notification target for matchmaking events.
	// Experimental.
	NotificationTarget() awssns.ITopic
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// 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`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Return the given named metric for this matchmaking configuration.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Matchmaking requests currently being processed or waiting to be processed.
	// Experimental.
	MetricCurrentTickets(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// For matchmaking configurations that require acceptance, the potential matches that were accepted since the last report.
	// Experimental.
	MetricMatchesAccepted(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Potential matches that were created since the last report.
	// Experimental.
	MetricMatchesCreated(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Matches that were successfully placed into a game session since the last report.
	// Experimental.
	MetricMatchesPlaced(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// For matchmaking configurations that require acceptance, the potential matches that were rejected by at least one player since the last report.
	// Experimental.
	MetricMatchesRejected(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Players in matchmaking tickets that were added since the last report.
	// Experimental.
	MetricPlayersStarted(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// For matchmaking requests that were put into a potential match before the last report, the amount of time between ticket creation and potential match creation.
	//
	// Units: seconds.
	// Experimental.
	MetricTimeToMatch(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
}

A FlexMatch matchmaker process does the work of building a game match.

It manages the pool of matchmaking requests received, forms teams for a match, processes and selects players to find the best possible player groups, and initiates the process of placing and starting a game session for the match. This topic describes the key aspects of a matchmaker and how to configure one customized for your game.

Example:

var ruleSet matchmakingRuleSet

gamelift.NewStandaloneMatchmakingConfiguration(this, jsii.String("StandaloneMatchmaking"), &StandaloneMatchmakingConfigurationProps{
	MatchmakingConfigurationName: jsii.String("test-standalone-config-name"),
	RuleSet: ruleSet,
})

See: https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-configuration.html

Experimental.

func NewStandaloneMatchmakingConfiguration

func NewStandaloneMatchmakingConfiguration(scope constructs.Construct, id *string, props *StandaloneMatchmakingConfigurationProps) StandaloneMatchmakingConfiguration

Experimental.

type StandaloneMatchmakingConfigurationProps

type StandaloneMatchmakingConfigurationProps struct {
	// A unique identifier for the matchmaking configuration.
	//
	// This name is used to identify the configuration associated with a matchmaking request or ticket.
	// Experimental.
	MatchmakingConfigurationName *string `field:"required" json:"matchmakingConfigurationName" yaml:"matchmakingConfigurationName"`
	// A matchmaking rule set to use with this configuration.
	//
	// A matchmaking configuration can only use rule sets that are defined in the same Region.
	// Experimental.
	RuleSet IMatchmakingRuleSet `field:"required" json:"ruleSet" yaml:"ruleSet"`
	// The length of time (in seconds) to wait for players to accept a proposed match, if acceptance is required.
	// Default: 300 seconds.
	//
	// Experimental.
	AcceptanceTimeout awscdk.Duration `field:"optional" json:"acceptanceTimeout" yaml:"acceptanceTimeout"`
	// Information to add to all events related to the matchmaking configuration.
	// Default: no custom data added to events.
	//
	// Experimental.
	CustomEventData *string `field:"optional" json:"customEventData" yaml:"customEventData"`
	// A human-readable description of the matchmaking configuration.
	// Default: no description is provided.
	//
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// An SNS topic ARN that is set up to receive matchmaking notifications.
	// See: https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-notification.html
	//
	// Default: no notification target.
	//
	// Experimental.
	NotificationTarget awssns.ITopic `field:"optional" json:"notificationTarget" yaml:"notificationTarget"`
	// The maximum duration, that a matchmaking ticket can remain in process before timing out.
	//
	// Requests that fail due to timing out can be resubmitted as needed.
	// Default: 300 seconds.
	//
	// Experimental.
	RequestTimeout awscdk.Duration `field:"optional" json:"requestTimeout" yaml:"requestTimeout"`
	// A flag that determines whether a match that was created with this configuration must be accepted by the matched players.
	//
	// With this option enabled, matchmaking tickets use the status `REQUIRES_ACCEPTANCE` to indicate when a completed potential match is waiting for player acceptance.
	// Default: Acceptance is not required.
	//
	// Experimental.
	RequireAcceptance *bool `field:"optional" json:"requireAcceptance" yaml:"requireAcceptance"`
}

Properties for a new standalone matchmaking configuration.

Example:

var ruleSet matchmakingRuleSet

gamelift.NewStandaloneMatchmakingConfiguration(this, jsii.String("StandaloneMatchmaking"), &StandaloneMatchmakingConfigurationProps{
	MatchmakingConfigurationName: jsii.String("test-standalone-config-name"),
	RuleSet: ruleSet,
})

Experimental.

Source Files

Directories

Path Synopsis
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL