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="2025-01-04T09:06:23.068Z") @Stability(Stable) public class CfnContainerFleet extends CfnResource implements IInspectable, ITaggableV2
Describes an Amazon GameLift managed container fleet.

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 fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 . In a GameLift fleet ARN, the resource ID matches the FleetId value.
    • getAttrFleetId

      @Stability(Stable) @NotNull public String getAttrFleetId()
      A unique identifier for the container fleet to retrieve.
    • getAttrGameServerContainerGroupDefinitionArn

      @Stability(Stable) @NotNull public String getAttrGameServerContainerGroupDefinitionArn()
      The Amazon Resource Name ( ARN ) that is assigned to the fleet's game server container group. The ARN value also identifies the specific container group definition version in use.
    • getAttrMaximumGameServerContainerGroupsPerInstance

      @Stability(Stable) @NotNull public Number getAttrMaximumGameServerContainerGroupsPerInstance()
      The calculated maximum number of game server container group that can be deployed on each fleet instance.

      The calculation depends on the resource needs of the container group and the CPU and memory resources of the fleet's instance type.

    • getAttrPerInstanceContainerGroupDefinitionArn

      @Stability(Stable) @NotNull public String getAttrPerInstanceContainerGroupDefinitionArn()
      The Amazon Resource Name ( ARN ) that is assigned to the fleet's per-instance container group. The ARN value also identifies the specific container group definition version in use.
    • getAttrStatus

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

      • PENDING -- A new container fleet has been requested.
      • CREATING -- A new container fleet resource is being created.
      • CREATED -- A new container fleet resource has been created. No fleet instances have been deployed.
      • ACTIVATING -- New container fleet instances are being deployed.
      • ACTIVE -- The container fleet has been deployed and is ready to host game sessions.
      • UPDATING -- Updates to the container fleet is being updated. A deployment is in progress.
    • 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()
      The unique identifier for an AWS Identity and Access Management (IAM) role with permissions to run your containers on resources that are managed by Amazon GameLift.
    • setFleetRoleArn

      @Stability(Stable) public void setFleetRoleArn(@NotNull String value)
      The unique identifier for an AWS Identity and Access Management (IAM) role with permissions to run your containers on resources that are managed by Amazon GameLift.
    • getBillingType

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

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

      @Stability(Stable) @Nullable public Object getDeploymentConfiguration()
      Set of rules for processing a deployment for a container fleet update.
    • setDeploymentConfiguration

      @Stability(Stable) public void setDeploymentConfiguration(@Nullable IResolvable value)
      Set of rules for processing a deployment for a container fleet update.
    • setDeploymentConfiguration

      @Stability(Stable) public void setDeploymentConfiguration(@Nullable CfnContainerFleet.DeploymentConfigurationProperty value)
      Set of rules for processing a deployment for a container fleet update.
    • getDescription

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

      @Stability(Stable) public void setDescription(@Nullable String value)
      A meaningful description of the container fleet.
    • getGameServerContainerGroupDefinitionName

      @Stability(Stable) @Nullable public String getGameServerContainerGroupDefinitionName()
      The name of the fleet's game server container group definition, which describes how to deploy containers with your game server build and support software onto each fleet instance.
    • setGameServerContainerGroupDefinitionName

      @Stability(Stable) public void setGameServerContainerGroupDefinitionName(@Nullable String value)
      The name of the fleet's game server container group definition, which describes how to deploy containers with your game server build and support software onto each fleet instance.
    • getGameServerContainerGroupsPerInstance

      @Stability(Stable) @Nullable public Number getGameServerContainerGroupsPerInstance()
      The number of times to replicate the game server container group on each fleet instance.
    • setGameServerContainerGroupsPerInstance

      @Stability(Stable) public void setGameServerContainerGroupsPerInstance(@Nullable Number value)
      The number of times to replicate the game server container group on each fleet instance.
    • getGameSessionCreationLimitPolicy

      @Stability(Stable) @Nullable public Object getGameSessionCreationLimitPolicy()
      A policy that limits the number of game sessions that each individual player can create on instances in this fleet.
    • setGameSessionCreationLimitPolicy

      @Stability(Stable) public void setGameSessionCreationLimitPolicy(@Nullable IResolvable value)
      A policy that limits the number of game sessions that each individual player can create on instances in this fleet.
    • setGameSessionCreationLimitPolicy

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

      @Stability(Stable) @Nullable public Object getInstanceConnectionPortRange()
      The set of port numbers to open on each instance in a container fleet.
    • setInstanceConnectionPortRange

      @Stability(Stable) public void setInstanceConnectionPortRange(@Nullable IResolvable value)
      The set of port numbers to open on each instance in a container fleet.
    • setInstanceConnectionPortRange

      @Stability(Stable) public void setInstanceConnectionPortRange(@Nullable CfnContainerFleet.ConnectionPortRangeProperty value)
      The set of port numbers to open on each instance in a container fleet.
    • getInstanceInboundPermissions

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

      @Stability(Stable) public void setInstanceInboundPermissions(@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.
    • setInstanceInboundPermissions

      @Stability(Stable) public void setInstanceInboundPermissions(@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.
    • getInstanceType

      @Stability(Stable) @Nullable public String getInstanceType()
      The Amazon EC2 instance type to use for all instances in the fleet.
    • setInstanceType

      @Stability(Stable) public void setInstanceType(@Nullable String value)
      The Amazon EC2 instance type to use for all instances in the fleet.
    • 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()
      The method that is used to collect container logs for the fleet.
    • setLogConfiguration

      @Stability(Stable) public void setLogConfiguration(@Nullable IResolvable value)
      The method that is used to collect container logs for the fleet.
    • setLogConfiguration

      @Stability(Stable) public void setLogConfiguration(@Nullable CfnContainerFleet.LogConfigurationProperty value)
      The method that is used to collect container logs for the fleet.
    • 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.
    • getNewGameSessionProtectionPolicy

      @Stability(Stable) @Nullable public String getNewGameSessionProtectionPolicy()
      Determines whether Amazon GameLift can shut down game sessions on the fleet that are actively running and hosting players.
    • setNewGameSessionProtectionPolicy

      @Stability(Stable) public void setNewGameSessionProtectionPolicy(@Nullable String value)
      Determines whether Amazon GameLift can shut down game sessions on the fleet that are actively running and hosting players.
    • getPerInstanceContainerGroupDefinitionName

      @Stability(Stable) @Nullable public String getPerInstanceContainerGroupDefinitionName()
      The name of the fleet's per-instance container group definition.
    • setPerInstanceContainerGroupDefinitionName

      @Stability(Stable) public void setPerInstanceContainerGroupDefinitionName(@Nullable String value)
      The name of the fleet's per-instance container group definition.
    • 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.