java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-06T23:25:10.580Z") @Stability(Stable) public class CfnFleet extends CfnResource implements IInspectable
The AWS::GameLift::Fleet resource creates an Amazon GameLift (GameLift) fleet to host custom game server or Realtime Servers.

A fleet is a set of EC2 instances, configured with instructions to run game servers on each instance.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.gamelift.*;
 CfnFleet cfnFleet = CfnFleet.Builder.create(this, "MyCfnFleet")
         .name("name")
         // the properties below are optional
         .anywhereConfiguration(AnywhereConfigurationProperty.builder()
                 .cost("cost")
                 .build())
         .applyCapacity("applyCapacity")
         .buildId("buildId")
         .certificateConfiguration(CertificateConfigurationProperty.builder()
                 .certificateType("certificateType")
                 .build())
         .computeType("computeType")
         .containerGroupsConfiguration(ContainerGroupsConfigurationProperty.builder()
                 .connectionPortRange(ConnectionPortRangeProperty.builder()
                         .fromPort(123)
                         .toPort(123)
                         .build())
                 .containerGroupDefinitionNames(List.of("containerGroupDefinitionNames"))
                 // the properties below are optional
                 .containerGroupsPerInstance(ContainerGroupsPerInstanceProperty.builder()
                         .desiredReplicaContainerGroupsPerInstance(123)
                         .maxReplicaContainerGroupsPerInstance(123)
                         .build())
                 .build())
         .description("description")
         .desiredEc2Instances(123)
         .ec2InboundPermissions(List.of(IpPermissionProperty.builder()
                 .fromPort(123)
                 .ipRange("ipRange")
                 .protocol("protocol")
                 .toPort(123)
                 .build()))
         .ec2InstanceType("ec2InstanceType")
         .fleetType("fleetType")
         .instanceRoleArn("instanceRoleArn")
         .instanceRoleCredentialsProvider("instanceRoleCredentialsProvider")
         .locations(List.of(LocationConfigurationProperty.builder()
                 .location("location")
                 // the properties below are optional
                 .locationCapacity(LocationCapacityProperty.builder()
                         .desiredEc2Instances(123)
                         .maxSize(123)
                         .minSize(123)
                         .build())
                 .build()))
         .logPaths(List.of("logPaths"))
         .maxSize(123)
         .metricGroups(List.of("metricGroups"))
         .minSize(123)
         .newGameSessionProtectionPolicy("newGameSessionProtectionPolicy")
         .peerVpcAwsAccountId("peerVpcAwsAccountId")
         .peerVpcId("peerVpcId")
         .resourceCreationLimitPolicy(ResourceCreationLimitPolicyProperty.builder()
                 .newGameSessionsPerCreator(123)
                 .policyPeriodInMinutes(123)
                 .build())
         .runtimeConfiguration(RuntimeConfigurationProperty.builder()
                 .gameSessionActivationTimeoutSeconds(123)
                 .maxConcurrentGameSessionActivations(123)
                 .serverProcesses(List.of(ServerProcessProperty.builder()
                         .concurrentExecutions(123)
                         .launchPath("launchPath")
                         // the properties below are optional
                         .parameters("parameters")
                         .build()))
                 .build())
         .scalingPolicies(List.of(ScalingPolicyProperty.builder()
                 .metricName("metricName")
                 .name("name")
                 // the properties below are optional
                 .comparisonOperator("comparisonOperator")
                 .evaluationPeriods(123)
                 .location("location")
                 .policyType("policyType")
                 .scalingAdjustment(123)
                 .scalingAdjustmentType("scalingAdjustmentType")
                 .status("status")
                 .targetConfiguration(TargetConfigurationProperty.builder()
                         .targetValue(123)
                         .build())
                 .threshold(123)
                 .updateStatus("updateStatus")
                 .build()))
         .scriptId("scriptId")
         .serverLaunchParameters("serverLaunchParameters")
         .serverLaunchPath("serverLaunchPath")
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnFleet

      protected CfnFleet(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnFleet

      protected CfnFleet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnFleet

      @Stability(Stable) public CfnFleet(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnFleetProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrContainerGroupsConfigurationContainerGroupsPerInstanceMaxReplicaContainerGroupsPerInstance

      @Stability(Stable) @NotNull public Number getAttrContainerGroupsConfigurationContainerGroupsPerInstanceMaxReplicaContainerGroupsPerInstance()
      The maximum possible number of replica container groups that each fleet instance can have.
    • getAttrFleetId

      @Stability(Stable) @NotNull public String getAttrFleetId()
      A unique identifier for the fleet.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getName

      @Stability(Stable) @NotNull public String getName()
      A descriptive label that is associated with a fleet.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      A descriptive label that is associated with a fleet.
    • getAnywhereConfiguration

      @Stability(Stable) @Nullable public Object getAnywhereConfiguration()
      Amazon GameLift Anywhere configuration options.
    • setAnywhereConfiguration

      @Stability(Stable) public void setAnywhereConfiguration(@Nullable IResolvable value)
      Amazon GameLift Anywhere configuration options.
    • setAnywhereConfiguration

      @Stability(Stable) public void setAnywhereConfiguration(@Nullable CfnFleet.AnywhereConfigurationProperty value)
      Amazon GameLift Anywhere configuration options.
    • getApplyCapacity

      @Stability(Stable) @Nullable public String getApplyCapacity()
      Current resource capacity settings for managed EC2 fleets and container fleets.
    • setApplyCapacity

      @Stability(Stable) public void setApplyCapacity(@Nullable String value)
      Current resource capacity settings for managed EC2 fleets and container fleets.
    • getBuildId

      @Stability(Stable) @Nullable public String getBuildId()
      A unique identifier for a build to be deployed on the new fleet.
    • setBuildId

      @Stability(Stable) public void setBuildId(@Nullable String value)
      A unique identifier for a build to be deployed on the new fleet.
    • getCertificateConfiguration

      @Stability(Stable) @Nullable public Object getCertificateConfiguration()
      Prompts Amazon GameLift to generate a TLS/SSL certificate for the fleet.
    • setCertificateConfiguration

      @Stability(Stable) public void setCertificateConfiguration(@Nullable IResolvable value)
      Prompts Amazon GameLift to generate a TLS/SSL certificate for the fleet.
    • setCertificateConfiguration

      @Stability(Stable) public void setCertificateConfiguration(@Nullable CfnFleet.CertificateConfigurationProperty value)
      Prompts Amazon GameLift to generate a TLS/SSL certificate for the fleet.
    • getComputeType

      @Stability(Stable) @Nullable public String getComputeType()
      The type of compute resource used to host your game servers.
    • setComputeType

      @Stability(Stable) public void setComputeType(@Nullable String value)
      The type of compute resource used to host your game servers.
    • getContainerGroupsConfiguration

      @Stability(Stable) @Nullable public Object getContainerGroupsConfiguration()
      This data type is used with the Amazon GameLift containers feature, which is currently in public preview..
    • setContainerGroupsConfiguration

      @Stability(Stable) public void setContainerGroupsConfiguration(@Nullable IResolvable value)
      This data type is used with the Amazon GameLift containers feature, which is currently in public preview..
    • setContainerGroupsConfiguration

      @Stability(Stable) public void setContainerGroupsConfiguration(@Nullable CfnFleet.ContainerGroupsConfigurationProperty value)
      This data type is used with the Amazon GameLift containers feature, which is currently in public preview..
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      A description for the fleet.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      A description for the fleet.
    • getDesiredEc2Instances

      @Stability(Stable) @Nullable public Number getDesiredEc2Instances()
      The number of EC2 instances that you want this fleet to host.
    • setDesiredEc2Instances

      @Stability(Stable) public void setDesiredEc2Instances(@Nullable Number value)
      The number of EC2 instances that you want this fleet to host.
    • getEc2InboundPermissions

      @Stability(Stable) @Nullable public Object getEc2InboundPermissions()
      The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet.
    • setEc2InboundPermissions

      @Stability(Stable) public void setEc2InboundPermissions(@Nullable IResolvable value)
      The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet.
    • setEc2InboundPermissions

      @Stability(Stable) public void setEc2InboundPermissions(@Nullable List<Object> value)
      The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet.
    • getEc2InstanceType

      @Stability(Stable) @Nullable public String getEc2InstanceType()
      The Amazon GameLift-supported Amazon EC2 instance type to use with EC2 and container fleets.
    • setEc2InstanceType

      @Stability(Stable) public void setEc2InstanceType(@Nullable String value)
      The Amazon GameLift-supported Amazon EC2 instance type to use with EC2 and container fleets.
    • getFleetType

      @Stability(Stable) @Nullable public String getFleetType()
      Indicates whether to use On-Demand or Spot instances for this fleet.
    • setFleetType

      @Stability(Stable) public void setFleetType(@Nullable String value)
      Indicates whether to use On-Demand or Spot instances for this fleet.
    • getInstanceRoleArn

      @Stability(Stable) @Nullable public String getInstanceRoleArn()
      A unique identifier for an IAM role with access permissions to other AWS services.
    • setInstanceRoleArn

      @Stability(Stable) public void setInstanceRoleArn(@Nullable String value)
      A unique identifier for an IAM role with access permissions to other AWS services.
    • getInstanceRoleCredentialsProvider

      @Stability(Stable) @Nullable public String getInstanceRoleCredentialsProvider()
      Indicates that fleet instances maintain a shared credentials file for the IAM role defined in InstanceRoleArn .
    • setInstanceRoleCredentialsProvider

      @Stability(Stable) public void setInstanceRoleCredentialsProvider(@Nullable String value)
      Indicates that fleet instances maintain a shared credentials file for the IAM role defined in InstanceRoleArn .
    • getLocations

      @Stability(Stable) @Nullable public Object getLocations()
      A set of remote locations to deploy additional instances to and manage as a multi-location fleet.
    • setLocations

      @Stability(Stable) public void setLocations(@Nullable IResolvable value)
      A set of remote locations to deploy additional instances to and manage as a multi-location fleet.
    • setLocations

      @Stability(Stable) public void setLocations(@Nullable List<Object> value)
      A set of remote locations to deploy additional instances to and manage as a multi-location fleet.
    • getLogPaths

      @Stability(Deprecated) @Deprecated @Nullable public List<String> getLogPaths()
      Deprecated.
      this property has been deprecated
      (deprecated) This parameter is no longer used.

    • setLogPaths

      @Stability(Deprecated) @Deprecated public void setLogPaths(@Nullable List<String> value)
      Deprecated.
      this property has been deprecated
      (deprecated) This parameter is no longer used.

    • getMaxSize

      @Stability(Stable) @Nullable public Number getMaxSize()
      The maximum number of instances that are allowed in the specified fleet location.
    • setMaxSize

      @Stability(Stable) public void setMaxSize(@Nullable Number value)
      The maximum number of instances that are allowed in the specified fleet location.
    • getMetricGroups

      @Stability(Stable) @Nullable public List<String> getMetricGroups()
      The name of an AWS CloudWatch metric group to add this fleet to.
    • setMetricGroups

      @Stability(Stable) public void setMetricGroups(@Nullable List<String> value)
      The name of an AWS CloudWatch metric group to add this fleet to.
    • getMinSize

      @Stability(Stable) @Nullable public Number getMinSize()
      The minimum number of instances that are allowed in the specified fleet location.
    • setMinSize

      @Stability(Stable) public void setMinSize(@Nullable Number value)
      The minimum number of instances that are allowed in the specified fleet location.
    • getNewGameSessionProtectionPolicy

      @Stability(Stable) @Nullable public String getNewGameSessionProtectionPolicy()
      The status of termination protection for active game sessions on the fleet.
    • setNewGameSessionProtectionPolicy

      @Stability(Stable) public void setNewGameSessionProtectionPolicy(@Nullable String value)
      The status of termination protection for active game sessions on the fleet.
    • getPeerVpcAwsAccountId

      @Stability(Stable) @Nullable public String getPeerVpcAwsAccountId()
      Used when peering your Amazon GameLift fleet with a VPC, the unique identifier for the AWS account that owns the VPC.
    • setPeerVpcAwsAccountId

      @Stability(Stable) public void setPeerVpcAwsAccountId(@Nullable String value)
      Used when peering your Amazon GameLift fleet with a VPC, the unique identifier for the AWS account that owns the VPC.
    • getPeerVpcId

      @Stability(Stable) @Nullable public String getPeerVpcId()
      A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet.
    • setPeerVpcId

      @Stability(Stable) public void setPeerVpcId(@Nullable String value)
      A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet.
    • getResourceCreationLimitPolicy

      @Stability(Stable) @Nullable public Object getResourceCreationLimitPolicy()
      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.
    • setResourceCreationLimitPolicy

      @Stability(Stable) public void setResourceCreationLimitPolicy(@Nullable IResolvable value)
      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.
    • setResourceCreationLimitPolicy

      @Stability(Stable) public void setResourceCreationLimitPolicy(@Nullable CfnFleet.ResourceCreationLimitPolicyProperty value)
      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.
    • getRuntimeConfiguration

      @Stability(Stable) @Nullable public Object getRuntimeConfiguration()
      Instructions for how to launch and maintain server processes on instances in the fleet.
    • setRuntimeConfiguration

      @Stability(Stable) public void setRuntimeConfiguration(@Nullable IResolvable value)
      Instructions for how to launch and maintain server processes on instances in the fleet.
    • setRuntimeConfiguration

      @Stability(Stable) public void setRuntimeConfiguration(@Nullable CfnFleet.RuntimeConfigurationProperty value)
      Instructions for how to launch and maintain server processes on instances in the fleet.
    • getScalingPolicies

      @Stability(Stable) @Nullable public Object getScalingPolicies()
      Rule that controls how a fleet is scaled.
    • setScalingPolicies

      @Stability(Stable) public void setScalingPolicies(@Nullable IResolvable value)
      Rule that controls how a fleet is scaled.
    • setScalingPolicies

      @Stability(Stable) public void setScalingPolicies(@Nullable List<Object> value)
      Rule that controls how a fleet is scaled.
    • getScriptId

      @Stability(Stable) @Nullable public String getScriptId()
      The unique identifier for a Realtime configuration script to be deployed on fleet instances.
    • setScriptId

      @Stability(Stable) public void setScriptId(@Nullable String value)
      The unique identifier for a Realtime configuration script to be deployed on fleet instances.
    • getServerLaunchParameters

      @Stability(Deprecated) @Deprecated @Nullable public String getServerLaunchParameters()
      Deprecated.
      this property has been deprecated
      (deprecated) This parameter is no longer used but is retained for backward compatibility.

    • setServerLaunchParameters

      @Stability(Deprecated) @Deprecated public void setServerLaunchParameters(@Nullable String value)
      Deprecated.
      this property has been deprecated
      (deprecated) This parameter is no longer used but is retained for backward compatibility.

    • getServerLaunchPath

      @Stability(Deprecated) @Deprecated @Nullable public String getServerLaunchPath()
      Deprecated.
      this property has been deprecated
      (deprecated) This parameter is no longer used.

    • setServerLaunchPath

      @Stability(Deprecated) @Deprecated public void setServerLaunchPath(@Nullable String value)
      Deprecated.
      this property has been deprecated
      (deprecated) This parameter is no longer used.