Class CfnContainerFleet

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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-20T14:04:25.358Z") @Stability(Stable) public class CfnContainerFleet extends CfnResource implements IInspectable, ITaggableV2
The AWS::GameLift::ContainerFleet resource creates an Amazon GameLift (GameLift) container fleet to host game servers.

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.*;
 CfnContainerFleet cfnContainerFleet = CfnContainerFleet.Builder.create(this, "MyCfnContainerFleet")
         .fleetRoleArn("fleetRoleArn")
         // the properties below are optional
         .billingType("billingType")
         .deploymentConfiguration(DeploymentConfigurationProperty.builder()
                 .impairmentStrategy("impairmentStrategy")
                 .minimumHealthyPercentage(123)
                 .protectionStrategy("protectionStrategy")
                 .build())
         .description("description")
         .gameServerContainerGroupDefinitionName("gameServerContainerGroupDefinitionName")
         .gameServerContainerGroupsPerInstance(123)
         .gameSessionCreationLimitPolicy(GameSessionCreationLimitPolicyProperty.builder()
                 .newGameSessionsPerCreator(123)
                 .policyPeriodInMinutes(123)
                 .build())
         .instanceConnectionPortRange(ConnectionPortRangeProperty.builder()
                 .fromPort(123)
                 .toPort(123)
                 .build())
         .instanceInboundPermissions(List.of(IpPermissionProperty.builder()
                 .fromPort(123)
                 .ipRange("ipRange")
                 .protocol("protocol")
                 .toPort(123)
                 .build()))
         .instanceType("instanceType")
         .locations(List.of(LocationConfigurationProperty.builder()
                 .location("location")
                 // the properties below are optional
                 .locationCapacity(LocationCapacityProperty.builder()
                         .desiredEc2Instances(123)
                         .maxSize(123)
                         .minSize(123)
                         .build())
                 .stoppedActions(List.of("stoppedActions"))
                 .build()))
         .logConfiguration(LogConfigurationProperty.builder()
                 .logDestination("logDestination")
                 .s3BucketName("s3BucketName")
                 .build())
         .metricGroups(List.of("metricGroups"))
         .newGameSessionProtectionPolicy("newGameSessionProtectionPolicy")
         .perInstanceContainerGroupDefinitionName("perInstanceContainerGroupDefinitionName")
         .scalingPolicies(List.of(ScalingPolicyProperty.builder()
                 .metricName("metricName")
                 .name("name")
                 // the properties below are optional
                 .comparisonOperator("comparisonOperator")
                 .evaluationPeriods(123)
                 .policyType("policyType")
                 .scalingAdjustment(123)
                 .scalingAdjustmentType("scalingAdjustmentType")
                 .targetConfiguration(TargetConfigurationProperty.builder()
                         .targetValue(123)
                         .build())
                 .threshold(123)
                 .build()))
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .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

    • CfnContainerFleet

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

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

      @Stability(Stable) public CfnContainerFleet(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnContainerFleetProps 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.
    • getAttrCreationTime

      @Stability(Stable) @NotNull public String getAttrCreationTime()
      A time stamp indicating when this data object was created.

      Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

    • getAttrDeploymentDetails

      @Stability(Stable) @NotNull public IResolvable getAttrDeploymentDetails()
      Provides information about the last deployment ID and its status.
    • getAttrFleetArn

      @Stability(Stable) @NotNull public String getAttrFleetArn()
      The Amazon Resource Name (ARN) that is assigned to a Amazon GameLift container fleet resource and uniquely identifies it across all AWS Regions.
    • getAttrFleetId

      @Stability(Stable) @NotNull public String getAttrFleetId()
      Unique fleet ID.
    • getAttrGameServerContainerGroupDefinitionArn

      @Stability(Stable) @NotNull public String getAttrGameServerContainerGroupDefinitionArn()
      The Amazon Resource Name (ARN) of the game server container group definition.

      This field will be empty if GameServerContainerGroupDefinitionName is not specified.

    • getAttrMaximumGameServerContainerGroupsPerInstance

      @Stability(Stable) @NotNull public Number getAttrMaximumGameServerContainerGroupsPerInstance()
      The maximum number of game server container groups per instance, a number between 1-5000.
    • getAttrPerInstanceContainerGroupDefinitionArn

      @Stability(Stable) @NotNull public String getAttrPerInstanceContainerGroupDefinitionArn()
      The Amazon Resource Name (ARN) of the per instance container group definition.

      This field will be empty if PerInstanceContainerGroupDefinitionName is not specified.

    • getAttrStatus

      @Stability(Stable) @NotNull public String getAttrStatus()
      The current status of the container fleet.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

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

      @Stability(Stable) @NotNull public String getFleetRoleArn()
      A unique identifier for an AWS IAM role that manages access to your AWS services.
    • setFleetRoleArn

      @Stability(Stable) public void setFleetRoleArn(@NotNull String value)
      A unique identifier for an AWS IAM role that manages access to your AWS services.
    • getBillingType

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

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

      @Stability(Stable) @Nullable public Object getDeploymentConfiguration()
      Provides details about how to drain old tasks and replace them with new updated tasks.
    • setDeploymentConfiguration

      @Stability(Stable) public void setDeploymentConfiguration(@Nullable IResolvable value)
      Provides details about how to drain old tasks and replace them with new updated tasks.
    • setDeploymentConfiguration

      @Stability(Stable) public void setDeploymentConfiguration(@Nullable CfnContainerFleet.DeploymentConfigurationProperty value)
      Provides details about how to drain old tasks and replace them with new updated tasks.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      A human-readable description of a fleet.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      A human-readable description of a fleet.
    • getGameServerContainerGroupDefinitionName

      @Stability(Stable) @Nullable public String getGameServerContainerGroupDefinitionName()
      The name of the container group definition that will be created per game server.
    • setGameServerContainerGroupDefinitionName

      @Stability(Stable) public void setGameServerContainerGroupDefinitionName(@Nullable String value)
      The name of the container group definition that will be created per game server.
    • getGameServerContainerGroupsPerInstance

      @Stability(Stable) @Nullable public Number getGameServerContainerGroupsPerInstance()
      The number of desired game server container groups per instance, a number between 1-5000.
    • setGameServerContainerGroupsPerInstance

      @Stability(Stable) public void setGameServerContainerGroupsPerInstance(@Nullable Number value)
      The number of desired game server container groups per instance, a number between 1-5000.
    • getGameSessionCreationLimitPolicy

      @Stability(Stable) @Nullable public Object getGameSessionCreationLimitPolicy()
      A policy that limits the number of game sessions a player can create on the same fleet.
    • setGameSessionCreationLimitPolicy

      @Stability(Stable) public void setGameSessionCreationLimitPolicy(@Nullable IResolvable value)
      A policy that limits the number of game sessions a player can create on the same fleet.
    • setGameSessionCreationLimitPolicy

      @Stability(Stable) public void setGameSessionCreationLimitPolicy(@Nullable CfnContainerFleet.GameSessionCreationLimitPolicyProperty value)
      A policy that limits the number of game sessions a player can create on the same fleet.
    • getInstanceConnectionPortRange

      @Stability(Stable) @Nullable public Object getInstanceConnectionPortRange()
      Defines the range of ports on the instance that allow inbound traffic to connect with containers in a fleet.
    • setInstanceConnectionPortRange

      @Stability(Stable) public void setInstanceConnectionPortRange(@Nullable IResolvable value)
      Defines the range of ports on the instance that allow inbound traffic to connect with containers in a fleet.
    • setInstanceConnectionPortRange

      @Stability(Stable) public void setInstanceConnectionPortRange(@Nullable CfnContainerFleet.ConnectionPortRangeProperty value)
      Defines the range of ports on the instance that allow inbound traffic to connect with containers in a fleet.
    • getInstanceInboundPermissions

      @Stability(Stable) @Nullable public Object getInstanceInboundPermissions()
      A range of IP addresses and port settings that allow inbound traffic to connect to server processes on an Amazon GameLift server.
    • setInstanceInboundPermissions

      @Stability(Stable) public void setInstanceInboundPermissions(@Nullable IResolvable value)
      A range of IP addresses and port settings that allow inbound traffic to connect to server processes on an Amazon GameLift server.
    • setInstanceInboundPermissions

      @Stability(Stable) public void setInstanceInboundPermissions(@Nullable List<Object> value)
      A range of IP addresses and port settings that allow inbound traffic to connect to server processes on an Amazon GameLift server.
    • getInstanceType

      @Stability(Stable) @Nullable public String getInstanceType()
      The name of an EC2 instance type that is supported in Amazon GameLift.
    • setInstanceType

      @Stability(Stable) public void setInstanceType(@Nullable String value)
      The name of an EC2 instance type that is supported in Amazon GameLift.
    • getLocations

      @Stability(Stable) @Nullable public Object getLocations()
    • setLocations

      @Stability(Stable) public void setLocations(@Nullable IResolvable value)
    • setLocations

      @Stability(Stable) public void setLocations(@Nullable List<Object> value)
    • getLogConfiguration

      @Stability(Stable) @Nullable public Object getLogConfiguration()
      A policy the location and provider of logs from the fleet.
    • setLogConfiguration

      @Stability(Stable) public void setLogConfiguration(@Nullable IResolvable value)
      A policy the location and provider of logs from the fleet.
    • setLogConfiguration

      @Stability(Stable) public void setLogConfiguration(@Nullable CfnContainerFleet.LogConfigurationProperty value)
      A policy the location and provider of logs from the fleet.
    • getMetricGroups

      @Stability(Stable) @Nullable public List<String> getMetricGroups()
      The name of an Amazon CloudWatch metric group.
    • setMetricGroups

      @Stability(Stable) public void setMetricGroups(@Nullable List<String> value)
      The name of an Amazon CloudWatch metric group.
    • getNewGameSessionProtectionPolicy

      @Stability(Stable) @Nullable public String getNewGameSessionProtectionPolicy()
      A game session protection policy to apply to all game sessions hosted on instances in this fleet.
    • setNewGameSessionProtectionPolicy

      @Stability(Stable) public void setNewGameSessionProtectionPolicy(@Nullable String value)
      A game session protection policy to apply to all game sessions hosted on instances in this fleet.
    • getPerInstanceContainerGroupDefinitionName

      @Stability(Stable) @Nullable public String getPerInstanceContainerGroupDefinitionName()
      The name of the container group definition that will be created per instance.
    • setPerInstanceContainerGroupDefinitionName

      @Stability(Stable) public void setPerInstanceContainerGroupDefinitionName(@Nullable String value)
      The name of the container group definition that will be created per instance.
    • getScalingPolicies

      @Stability(Stable) @Nullable public Object getScalingPolicies()
      A list of rules that control how a fleet is scaled.
    • setScalingPolicies

      @Stability(Stable) public void setScalingPolicies(@Nullable IResolvable value)
      A list of rules that control how a fleet is scaled.
    • setScalingPolicies

      @Stability(Stable) public void setScalingPolicies(@Nullable List<Object> value)
      A list of rules that control how a fleet is scaled.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      An array of key-value pairs to apply to this resource.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      An array of key-value pairs to apply to this resource.