Class BuildFleetProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<BuildFleetProps>
- Enclosing interface:
BuildFleetProps
BuildFleetProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofBuildFleetProps.getContent()
description
(String description) Sets the value ofFleetProps.getDescription()
desiredCapacity
(Number desiredCapacity) Sets the value ofFleetProps.getDesiredCapacity()
Sets the value ofFleetProps.getFleetName()
ingressRules
(List<? extends IngressRule> ingressRules) Sets the value ofBuildFleetProps.getIngressRules()
instanceType
(InstanceType instanceType) Sets the value ofFleetProps.getInstanceType()
Sets the value ofFleetProps.getLocations()
Sets the value ofFleetProps.getMaxSize()
metricGroup
(String metricGroup) Sets the value ofFleetProps.getMetricGroup()
Sets the value ofFleetProps.getMinSize()
Sets the value ofFleetProps.getPeerVpc()
protectNewGameSession
(Boolean protectNewGameSession) Sets the value ofFleetProps.getProtectNewGameSession()
resourceCreationLimitPolicy
(ResourceCreationLimitPolicy resourceCreationLimitPolicy) Sets the value ofFleetProps.getResourceCreationLimitPolicy()
Sets the value ofFleetProps.getRole()
runtimeConfiguration
(RuntimeConfiguration runtimeConfiguration) Sets the value ofFleetProps.getRuntimeConfiguration()
useCertificate
(Boolean useCertificate) Sets the value ofFleetProps.getUseCertificate()
Sets the value ofFleetProps.getUseSpot()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
content
Sets the value ofBuildFleetProps.getContent()
- Parameters:
content
- A build to be deployed on the fleet. This parameter is required. The build must have been successfully uploaded to Amazon GameLift and be in aREADY
status.This fleet setting cannot be changed once the fleet is created.
- Returns:
this
-
ingressRules
@Stability(Experimental) public BuildFleetProps.Builder ingressRules(List<? extends IngressRule> ingressRules) Sets the value ofBuildFleetProps.getIngressRules()
- Parameters:
ingressRules
- 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.- Returns:
this
-
fleetName
Sets the value ofFleetProps.getFleetName()
- Parameters:
fleetName
- A descriptive label that is associated with a fleet. This parameter is required. Fleet names do not need to be unique.- Returns:
this
-
instanceType
Sets the value ofFleetProps.getInstanceType()
- Parameters:
instanceType
- The GameLift-supported Amazon EC2 instance type to use for all fleet instances. This parameter is required. Instance type determines the computing resources that will be used to host your game servers, including CPU, memory, storage, and networking capacity.- Returns:
this
-
runtimeConfiguration
@Stability(Experimental) public BuildFleetProps.Builder runtimeConfiguration(RuntimeConfiguration runtimeConfiguration) Sets the value ofFleetProps.getRuntimeConfiguration()
- Parameters:
runtimeConfiguration
- A collection of server process configurations that describe the set of processes to run on each instance in a fleet. This parameter is required. 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.
- Returns:
this
-
description
Sets the value ofFleetProps.getDescription()
- Parameters:
description
- A human-readable description of the fleet.- Returns:
this
-
desiredCapacity
Sets the value ofFleetProps.getDesiredCapacity()
- Parameters:
desiredCapacity
- 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.- Returns:
this
-
locations
@Stability(Experimental) public BuildFleetProps.Builder locations(List<? extends Location> locations) Sets the value ofFleetProps.getLocations()
- Parameters:
locations
- A set of remote locations to deploy additional instances to and manage as part of the fleet. This parameter can only be used when creating fleets in AWS Regions that support multiple locations. You can add any GameLift-supported AWS Region as a remote location, in the form of an AWS Region code such asus-west-2
. To create a fleet with instances in the home region only, omit this parameter.- Returns:
this
-
maxSize
Sets the value ofFleetProps.getMaxSize()
- Parameters:
maxSize
- The maximum number of instances that are allowed in the specified fleet location.- Returns:
this
-
metricGroup
Sets the value ofFleetProps.getMetricGroup()
- Parameters:
metricGroup
- 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.- Returns:
this
-
minSize
Sets the value ofFleetProps.getMinSize()
- Parameters:
minSize
- The minimum number of instances that are allowed in the specified fleet location.- Returns:
this
-
peerVpc
Sets the value ofFleetProps.getPeerVpc()
- Parameters:
peerVpc
- 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.
- Returns:
this
-
protectNewGameSession
@Stability(Experimental) public BuildFleetProps.Builder protectNewGameSession(Boolean protectNewGameSession) Sets the value ofFleetProps.getProtectNewGameSession()
- Parameters:
protectNewGameSession
- 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.- Returns:
this
-
resourceCreationLimitPolicy
@Stability(Experimental) public BuildFleetProps.Builder resourceCreationLimitPolicy(ResourceCreationLimitPolicy resourceCreationLimitPolicy) Sets the value ofFleetProps.getResourceCreationLimitPolicy()
- Parameters:
resourceCreationLimitPolicy
- 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.- Returns:
this
-
role
Sets the value ofFleetProps.getRole()
- Parameters:
role
- 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.
- Returns:
this
-
useCertificate
Sets the value ofFleetProps.getUseCertificate()
- Parameters:
useCertificate
- 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.
- Returns:
this
-
useSpot
Sets the value ofFleetProps.getUseSpot()
- Parameters:
useSpot
- 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.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<BuildFleetProps>
- Returns:
- a new instance of
BuildFleetProps
- Throws:
NullPointerException
- if any required attribute was not provided
-