Class BuildFleetProps
(experimental) Properties for a new Gamelift build fleet.
Inheritance
Namespace: Amazon.CDK.AWS.GameLift.Alpha
Assembly: Amazon.CDK.AWS.GameLift.Alpha.dll
Syntax (csharp)
public class BuildFleetProps : Object, IBuildFleetProps, IFleetProps
Syntax (vb)
Public Class BuildFleetProps
Inherits Object
Implements IBuildFleetProps, IFleetProps
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
Build build;
// Server processes can be delcared in a declarative way through the constructor
var fleet = new BuildFleet(this, "Game server fleet", new BuildFleetProps {
FleetName = "test-fleet",
Content = build,
InstanceType = InstanceType.Of(InstanceClass.C4, InstanceSize.LARGE),
RuntimeConfiguration = new RuntimeConfiguration {
ServerProcesses = new [] { new ServerProcess {
LaunchPath = "/local/game/GameLiftExampleServer.x86_64",
Parameters = "-logFile /local/game/logs/myserver1935.log -port 1935",
ConcurrentExecutions = 100
} }
}
});
Synopsis
Constructors
BuildFleetProps() |
Properties
Content | (experimental) A build to be deployed on the fleet. |
Description | (experimental) A human-readable description of the fleet. |
DesiredCapacity | (experimental) The number of EC2 instances that you want this fleet to host. |
FleetName | (experimental) A descriptive label that is associated with a fleet. |
IngressRules | (experimental) The allowed IP address ranges and port settings that allow inbound traffic to access game sessions on this fleet. |
InstanceType | (experimental) The GameLift-supported Amazon EC2 instance type to use for all fleet instances. |
Locations | (experimental) A set of remote locations to deploy additional instances to and manage as part of the fleet. |
MaxSize | (experimental) The maximum number of instances that are allowed in the specified fleet location. |
MetricGroup | (experimental) The name of an AWS CloudWatch metric group to add this fleet to. |
MinSize | (experimental) The minimum number of instances that are allowed in the specified fleet location. |
PeerVpc | (experimental) A VPC peering connection between your GameLift-hosted game servers and your other non-GameLift resources. |
ProtectNewGameSession | (experimental) The status of termination protection for active game sessions on the fleet. |
ResourceCreationLimitPolicy | (experimental) 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. |
Role | (experimental) The IAM role assumed by GameLift fleet instances to access AWS ressources. |
RuntimeConfiguration | (experimental) A collection of server process configurations that describe the set of processes to run on each instance in a fleet. |
UseCertificate | (experimental) Prompts GameLift to generate a TLS/SSL certificate for the fleet. |
UseSpot | (experimental) Indicates whether to use On-Demand or Spot instances for this fleet. By default, fleet use on demand capacity. |
Constructors
BuildFleetProps()
public BuildFleetProps()
Properties
Content
(experimental) A build to be deployed on the fleet.
public IBuild Content { get; set; }
Property Value
Remarks
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.
Stability: Experimental
Description
(experimental) A human-readable description of the fleet.
public string Description { get; set; }
Property Value
System.String
Remarks
Default: no description is provided
Stability: Experimental
DesiredCapacity
(experimental) The number of EC2 instances that you want this fleet to host.
public Nullable<double> DesiredCapacity { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
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
Stability: Experimental
FleetName
(experimental) A descriptive label that is associated with a fleet.
public string FleetName { get; set; }
Property Value
System.String
Remarks
Fleet names do not need to be unique.
Stability: Experimental
IngressRules
(experimental) The allowed IP address ranges and port settings that allow inbound traffic to access game sessions on this fleet.
public IIngressRule[] IngressRules { get; set; }
Property Value
Remarks
This property must be set before players can connect to game sessions.
Default: no inbound traffic allowed
Stability: Experimental
InstanceType
(experimental) The GameLift-supported Amazon EC2 instance type to use for all fleet instances.
public InstanceType InstanceType { get; set; }
Property Value
Remarks
Instance type determines the computing resources that will be used to host your game servers, including CPU, memory, storage, and networking capacity.
Stability: Experimental
See: http://aws.amazon.com/ec2/instance-types/ for detailed descriptions of Amazon EC2 instance types.
Locations
(experimental) A set of remote locations to deploy additional instances to and manage as part of the fleet.
public ILocation[] Locations { get; set; }
Property Value
Remarks
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
Stability: Experimental
MaxSize
(experimental) The maximum number of instances that are allowed in the specified fleet location.
public Nullable<double> MaxSize { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Default: the default is 1
Stability: Experimental
MetricGroup
(experimental) The name of an AWS CloudWatch metric group to add this fleet to.
public string MetricGroup { get; set; }
Property Value
System.String
Remarks
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
Stability: Experimental
MinSize
(experimental) The minimum number of instances that are allowed in the specified fleet location.
public Nullable<double> MinSize { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Default: the default is 0
Stability: Experimental
PeerVpc
(experimental) A VPC peering connection between your GameLift-hosted game servers and your other non-GameLift resources.
public IVpc PeerVpc { get; set; }
Property Value
Remarks
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.
Default: no vpc peering
Stability: Experimental
See: https://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html
ProtectNewGameSession
(experimental) The status of termination protection for active game sessions on the fleet.
public Nullable<bool> ProtectNewGameSession { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
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.
Stability: Experimental
ResourceCreationLimitPolicy
(experimental) 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.
public IResourceCreationLimitPolicy ResourceCreationLimitPolicy { get; set; }
Property Value
Remarks
Default: No resource creation limit policy
Stability: Experimental
Role
(experimental) The IAM role assumed by GameLift fleet instances to access AWS ressources.
public IRole Role { get; set; }
Property Value
Remarks
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.
Default: - a role will be created with default trust to Gamelift service principal.
Stability: Experimental
See: https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-resources.html
RuntimeConfiguration
(experimental) A collection of server process configurations that describe the set of processes to run on each instance in a fleet.
public IRuntimeConfiguration RuntimeConfiguration { get; set; }
Property Value
Remarks
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.
Stability: Experimental
See: https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-multiprocess.html
UseCertificate
(experimental) Prompts GameLift to generate a TLS/SSL certificate for the fleet.
public Nullable<bool> UseCertificate { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
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
Stability: Experimental
UseSpot
(experimental) Indicates whether to use On-Demand or Spot instances for this fleet. By default, fleet use on demand capacity.
public Nullable<bool> UseSpot { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
This property cannot be changed after the fleet is created.
Default: Gamelift fleet use on demand capacity
Stability: Experimental