Class CfnContainerFleetProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnContainerFleetProps>
- Enclosing interface:
CfnContainerFleetProps
CfnContainerFleetProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbillingType(String billingType) Sets the value ofCfnContainerFleetProps.getBillingType()build()Builds the configured instance.deploymentConfiguration(IResolvable deploymentConfiguration) Sets the value ofCfnContainerFleetProps.getDeploymentConfiguration()deploymentConfiguration(CfnContainerFleet.DeploymentConfigurationProperty deploymentConfiguration) Sets the value ofCfnContainerFleetProps.getDeploymentConfiguration()description(String description) Sets the value ofCfnContainerFleetProps.getDescription()fleetRoleArn(String fleetRoleArn) Sets the value ofCfnContainerFleetProps.getFleetRoleArn()gameServerContainerGroupDefinitionName(String gameServerContainerGroupDefinitionName) Sets the value ofCfnContainerFleetProps.getGameServerContainerGroupDefinitionName()gameServerContainerGroupsPerInstance(Number gameServerContainerGroupsPerInstance) Sets the value ofCfnContainerFleetProps.getGameServerContainerGroupsPerInstance()gameSessionCreationLimitPolicy(IResolvable gameSessionCreationLimitPolicy) Sets the value ofCfnContainerFleetProps.getGameSessionCreationLimitPolicy()gameSessionCreationLimitPolicy(CfnContainerFleet.GameSessionCreationLimitPolicyProperty gameSessionCreationLimitPolicy) Sets the value ofCfnContainerFleetProps.getGameSessionCreationLimitPolicy()instanceConnectionPortRange(IResolvable instanceConnectionPortRange) Sets the value ofCfnContainerFleetProps.getInstanceConnectionPortRange()instanceConnectionPortRange(CfnContainerFleet.ConnectionPortRangeProperty instanceConnectionPortRange) Sets the value ofCfnContainerFleetProps.getInstanceConnectionPortRange()instanceInboundPermissions(List<? extends Object> instanceInboundPermissions) Sets the value ofCfnContainerFleetProps.getInstanceInboundPermissions()instanceInboundPermissions(IResolvable instanceInboundPermissions) Sets the value ofCfnContainerFleetProps.getInstanceInboundPermissions()instanceType(String instanceType) Sets the value ofCfnContainerFleetProps.getInstanceType()Sets the value ofCfnContainerFleetProps.getLocations()locations(IResolvable locations) Sets the value ofCfnContainerFleetProps.getLocations()logConfiguration(IResolvable logConfiguration) Sets the value ofCfnContainerFleetProps.getLogConfiguration()logConfiguration(CfnContainerFleet.LogConfigurationProperty logConfiguration) Sets the value ofCfnContainerFleetProps.getLogConfiguration()metricGroups(List<String> metricGroups) Sets the value ofCfnContainerFleetProps.getMetricGroups()newGameSessionProtectionPolicy(String newGameSessionProtectionPolicy) Sets the value ofCfnContainerFleetProps.getNewGameSessionProtectionPolicy()perInstanceContainerGroupDefinitionName(String perInstanceContainerGroupDefinitionName) Sets the value ofCfnContainerFleetProps.getPerInstanceContainerGroupDefinitionName()scalingPolicies(List<? extends Object> scalingPolicies) Sets the value ofCfnContainerFleetProps.getScalingPolicies()scalingPolicies(IResolvable scalingPolicies) Sets the value ofCfnContainerFleetProps.getScalingPolicies()Sets the value ofCfnContainerFleetProps.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
fleetRoleArn
Sets the value ofCfnContainerFleetProps.getFleetRoleArn()- Parameters:
fleetRoleArn- A unique identifier for an AWS IAM role that manages access to your AWS services. This parameter is required. Create a role or look up a role's ARN from the IAM dashboard in the AWS Management Console.- Returns:
this
-
billingType
Sets the value ofCfnContainerFleetProps.getBillingType()- Parameters:
billingType- Indicates whether to use On-Demand instances or Spot instances for this fleet. If empty, the default is ON_DEMAND. Both categories of instances use identical hardware and configurations based on the instance type selected for this fleet.- Returns:
this
-
deploymentConfiguration
@Stability(Stable) public CfnContainerFleetProps.Builder deploymentConfiguration(IResolvable deploymentConfiguration) Sets the value ofCfnContainerFleetProps.getDeploymentConfiguration()- Parameters:
deploymentConfiguration- Provides details about how to drain old tasks and replace them with new updated tasks.- Returns:
this
-
deploymentConfiguration
@Stability(Stable) public CfnContainerFleetProps.Builder deploymentConfiguration(CfnContainerFleet.DeploymentConfigurationProperty deploymentConfiguration) Sets the value ofCfnContainerFleetProps.getDeploymentConfiguration()- Parameters:
deploymentConfiguration- Provides details about how to drain old tasks and replace them with new updated tasks.- Returns:
this
-
description
Sets the value ofCfnContainerFleetProps.getDescription()- Parameters:
description- A human-readable description of a fleet.- Returns:
this
-
gameServerContainerGroupDefinitionName
@Stability(Stable) public CfnContainerFleetProps.Builder gameServerContainerGroupDefinitionName(String gameServerContainerGroupDefinitionName) Sets the value ofCfnContainerFleetProps.getGameServerContainerGroupDefinitionName()- Parameters:
gameServerContainerGroupDefinitionName- The name of the container group definition that will be created per game server. You must specify GAME_SERVER container group. You have the option to also specify one PER_INSTANCE container group.- Returns:
this
-
gameServerContainerGroupsPerInstance
@Stability(Stable) public CfnContainerFleetProps.Builder gameServerContainerGroupsPerInstance(Number gameServerContainerGroupsPerInstance) Sets the value ofCfnContainerFleetProps.getGameServerContainerGroupsPerInstance()- Parameters:
gameServerContainerGroupsPerInstance- The number of desired game server container groups per instance, a number between 1-5000.- Returns:
this
-
gameSessionCreationLimitPolicy
@Stability(Stable) public CfnContainerFleetProps.Builder gameSessionCreationLimitPolicy(IResolvable gameSessionCreationLimitPolicy) Sets the value ofCfnContainerFleetProps.getGameSessionCreationLimitPolicy()- Parameters:
gameSessionCreationLimitPolicy- 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.
- Returns:
this
-
gameSessionCreationLimitPolicy
@Stability(Stable) public CfnContainerFleetProps.Builder gameSessionCreationLimitPolicy(CfnContainerFleet.GameSessionCreationLimitPolicyProperty gameSessionCreationLimitPolicy) Sets the value ofCfnContainerFleetProps.getGameSessionCreationLimitPolicy()- Parameters:
gameSessionCreationLimitPolicy- 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.
- Returns:
this
-
instanceConnectionPortRange
@Stability(Stable) public CfnContainerFleetProps.Builder instanceConnectionPortRange(IResolvable instanceConnectionPortRange) Sets the value ofCfnContainerFleetProps.getInstanceConnectionPortRange()- Parameters:
instanceConnectionPortRange- Defines the range of ports on the instance that allow inbound traffic to connect with containers in a fleet.- Returns:
this
-
instanceConnectionPortRange
@Stability(Stable) public CfnContainerFleetProps.Builder instanceConnectionPortRange(CfnContainerFleet.ConnectionPortRangeProperty instanceConnectionPortRange) Sets the value ofCfnContainerFleetProps.getInstanceConnectionPortRange()- Parameters:
instanceConnectionPortRange- Defines the range of ports on the instance that allow inbound traffic to connect with containers in a fleet.- Returns:
this
-
instanceInboundPermissions
@Stability(Stable) public CfnContainerFleetProps.Builder instanceInboundPermissions(IResolvable instanceInboundPermissions) Sets the value ofCfnContainerFleetProps.getInstanceInboundPermissions()- Parameters:
instanceInboundPermissions- A range of IP addresses and port settings that allow inbound traffic to connect to server processes on an Amazon GameLift server.- Returns:
this
-
instanceInboundPermissions
@Stability(Stable) public CfnContainerFleetProps.Builder instanceInboundPermissions(List<? extends Object> instanceInboundPermissions) Sets the value ofCfnContainerFleetProps.getInstanceInboundPermissions()- Parameters:
instanceInboundPermissions- A range of IP addresses and port settings that allow inbound traffic to connect to server processes on an Amazon GameLift server.- Returns:
this
-
instanceType
Sets the value ofCfnContainerFleetProps.getInstanceType()- Parameters:
instanceType- The name of an EC2 instance type that is supported in Amazon GameLift. A fleet instance type determines the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. Amazon GameLift supports the following EC2 instance types. See Amazon EC2 Instance Types for detailed descriptions.- Returns:
this
-
locations
Sets the value ofCfnContainerFleetProps.getLocations()- Parameters:
locations- the value to be set.- Returns:
this
-
locations
@Stability(Stable) public CfnContainerFleetProps.Builder locations(List<? extends Object> locations) Sets the value ofCfnContainerFleetProps.getLocations()- Parameters:
locations- the value to be set.- Returns:
this
-
logConfiguration
@Stability(Stable) public CfnContainerFleetProps.Builder logConfiguration(IResolvable logConfiguration) Sets the value ofCfnContainerFleetProps.getLogConfiguration()- Parameters:
logConfiguration- A policy the location and provider of logs from the fleet.- Returns:
this
-
logConfiguration
@Stability(Stable) public CfnContainerFleetProps.Builder logConfiguration(CfnContainerFleet.LogConfigurationProperty logConfiguration) Sets the value ofCfnContainerFleetProps.getLogConfiguration()- Parameters:
logConfiguration- A policy the location and provider of logs from the fleet.- Returns:
this
-
metricGroups
Sets the value ofCfnContainerFleetProps.getMetricGroups()- Parameters:
metricGroups- The name of an Amazon CloudWatch metric group. A metric group aggregates the metrics for all fleets in the group. Specify a string containing the metric group name. You can use an existing name or use a new name to create a new metric group. Currently, this parameter can have only one string.- Returns:
this
-
newGameSessionProtectionPolicy
@Stability(Stable) public CfnContainerFleetProps.Builder newGameSessionProtectionPolicy(String newGameSessionProtectionPolicy) Sets the value ofCfnContainerFleetProps.getNewGameSessionProtectionPolicy()- Parameters:
newGameSessionProtectionPolicy- A game session protection policy to apply to all game sessions hosted on instances in this fleet. When protected, active game sessions cannot be terminated during a scale-down event. If this parameter is not set, instances in this fleet default to no protection. You can change a fleet's protection policy to affect future game sessions on the fleet. You can also set protection for individual game sessions.- Returns:
this
-
perInstanceContainerGroupDefinitionName
@Stability(Stable) public CfnContainerFleetProps.Builder perInstanceContainerGroupDefinitionName(String perInstanceContainerGroupDefinitionName) Sets the value ofCfnContainerFleetProps.getPerInstanceContainerGroupDefinitionName()- Parameters:
perInstanceContainerGroupDefinitionName- The name of the container group definition that will be created per instance. This field is optional if you specify GameServerContainerGroupDefinitionName.- Returns:
this
-
scalingPolicies
@Stability(Stable) public CfnContainerFleetProps.Builder scalingPolicies(IResolvable scalingPolicies) Sets the value ofCfnContainerFleetProps.getScalingPolicies()- Parameters:
scalingPolicies- A list of rules that control how a fleet is scaled.- Returns:
this
-
scalingPolicies
@Stability(Stable) public CfnContainerFleetProps.Builder scalingPolicies(List<? extends Object> scalingPolicies) Sets the value ofCfnContainerFleetProps.getScalingPolicies()- Parameters:
scalingPolicies- A list of rules that control how a fleet is scaled.- Returns:
this
-
tags
Sets the value ofCfnContainerFleetProps.getTags()- Parameters:
tags- An array of key-value pairs to apply to this resource.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnContainerFleetProps>- Returns:
- a new instance of
CfnContainerFleetProps - Throws:
NullPointerException- if any required attribute was not provided
-