Class CfnFleet
- All Implemented Interfaces:
IInspectable,IFleetRef,IEnvironmentAware,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
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")
.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()
.maxSize(123)
.minSize(123)
// the properties below are optional
.desiredEc2Instances(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")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAmazon GameLift Servers configuration options for your Anywhere fleets.static final classA fluent builder forCfnFleet.static interfaceDetermines whether a TLS/SSL certificate is generated for a fleet.static interfaceA range of IP addresses and port settings that allow inbound traffic to connect to server processes on an instance in a fleet.static interfaceCurrent resource capacity settings for managed EC2 fleets and managed container fleets.static interfaceA remote location where a multi-location fleet can deploy game servers for game hosting.static interfaceA policy that limits the number of game sessions a player can create on the same fleet.static interfaceA collection of server process configurations that describe the set of processes to run on each instance in a fleet.static interfaceRule that controls how a fleet is scaled.static interfaceA set of instructions for launching server processes on each instance in a fleet.static interfaceSettings for a target-based scaling policy.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.gamelift.IFleetRef
IFleetRef.Jsii$Default, IFleetRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnFleet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnFleet(software.amazon.jsii.JsiiObjectRef objRef) CfnFleet(software.constructs.Construct scope, String id, CfnFleetProps props) Create a newAWS::GameLift::Fleet. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForFleet(IFleetRef resource) static IFleetReffromFleetArn(software.constructs.Construct scope, String id, String arn) Creates a new IFleetRef from an ARN.static IFleetReffromFleetId(software.constructs.Construct scope, String id, String fleetId) Creates a new IFleetRef from a fleetId.Amazon GameLift Servers Anywhere configuration options.Current resource capacity settings for managed EC2 fleets and managed container fleets.The Amazon Resource Name ( ARN ) that is assigned to a Amazon GameLift Servers fleet resource and uniquely identifies it.A unique identifier for the fleet.A unique identifier for a build to be deployed on the new fleet.Tag Manager which manages the tags for this resource.Prompts Amazon GameLift Servers to generate a TLS/SSL certificate for the fleet.The type of compute resource used to host your game servers.A description for the fleet.Deprecated.this property has been deprecatedThe IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet.The Amazon GameLift Servers-supported Amazon EC2 instance type to use with managed EC2 fleets.A reference to a Fleet resource.Indicates whether to use On-Demand or Spot instances for this fleet.A unique identifier for an IAM role that manages access to your AWS services.Indicates that fleet instances maintain a shared credentials file for the IAM role defined inInstanceRoleArn.A set of remote locations to deploy additional instances to and manage as a multi-location fleet.Deprecated.this property has been deprecatedDeprecated.this property has been deprecatedThe name of an AWS CloudWatch metric group to add this fleet to.Deprecated.this property has been deprecatedgetName()A descriptive label that is associated with a fleet.The status of termination protection for active game sessions on the fleet.Used when peering your Amazon GameLift Servers fleet with a VPC, the unique identifier for the AWS account that owns the VPC.A unique identifier for a VPC with resources to be accessed by your Amazon GameLift Servers fleet.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.Instructions for how to launch and maintain server processes on instances in the fleet.Rule that controls how a fleet is scaled.The unique identifier for a Realtime configuration script to be deployed on fleet instances.Deprecated.this property has been deprecatedDeprecated.this property has been deprecatedgetTags()An array of key-value pairs to apply to this resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanisCfnFleet(Object x) Checks whether the given object is a CfnFleet.renderProperties(Map<String, Object> props) voidAmazon GameLift Servers Anywhere configuration options.voidAmazon GameLift Servers Anywhere configuration options.voidsetApplyCapacity(String value) Current resource capacity settings for managed EC2 fleets and managed container fleets.voidsetBuildId(String value) A unique identifier for a build to be deployed on the new fleet.voidPrompts Amazon GameLift Servers to generate a TLS/SSL certificate for the fleet.voidPrompts Amazon GameLift Servers to generate a TLS/SSL certificate for the fleet.voidsetComputeType(String value) The type of compute resource used to host your game servers.voidsetDescription(String value) A description for the fleet.voidsetDesiredEc2Instances(Number value) Deprecated.this property has been deprecatedvoidsetEc2InboundPermissions(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.voidThe IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet.voidsetEc2InstanceType(String value) The Amazon GameLift Servers-supported Amazon EC2 instance type to use with managed EC2 fleets.voidsetFleetType(String value) Indicates whether to use On-Demand or Spot instances for this fleet.voidsetInstanceRoleArn(String value) A unique identifier for an IAM role that manages access to your AWS services.voidIndicates that fleet instances maintain a shared credentials file for the IAM role defined inInstanceRoleArn.voidsetLocations(List<Object> value) A set of remote locations to deploy additional instances to and manage as a multi-location fleet.voidsetLocations(IResolvable value) A set of remote locations to deploy additional instances to and manage as a multi-location fleet.voidsetLogPaths(List<String> value) Deprecated.this property has been deprecatedvoidsetMaxSize(Number value) Deprecated.this property has been deprecatedvoidsetMetricGroups(List<String> value) The name of an AWS CloudWatch metric group to add this fleet to.voidsetMinSize(Number value) Deprecated.this property has been deprecatedvoidA descriptive label that is associated with a fleet.voidThe status of termination protection for active game sessions on the fleet.voidsetPeerVpcAwsAccountId(String value) Used when peering your Amazon GameLift Servers fleet with a VPC, the unique identifier for the AWS account that owns the VPC.voidsetPeerVpcId(String value) A unique identifier for a VPC with resources to be accessed by your Amazon GameLift Servers fleet.voidA 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.voidA 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.voidInstructions for how to launch and maintain server processes on instances in the fleet.voidInstructions for how to launch and maintain server processes on instances in the fleet.voidsetScalingPolicies(List<Object> value) Rule that controls how a fleet is scaled.voidsetScalingPolicies(IResolvable value) Rule that controls how a fleet is scaled.voidsetScriptId(String value) The unique identifier for a Realtime configuration script to be deployed on fleet instances.voidsetServerLaunchParameters(String value) Deprecated.this property has been deprecatedvoidsetServerLaunchPath(String value) Deprecated.this property has been deprecatedvoidAn array of key-value pairs to apply to this resource.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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) Create a newAWS::GameLift::Fleet.- 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
-
arnForFleet
- Parameters:
resource- This parameter is required.
-
fromFleetArn
@Stability(Stable) @NotNull public static IFleetRef fromFleetArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String arn) Creates a new IFleetRef from an ARN.- Parameters:
scope- This parameter is required.id- This parameter is required.arn- This parameter is required.
-
fromFleetId
@Stability(Stable) @NotNull public static IFleetRef fromFleetId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String fleetId) Creates a new IFleetRef from a fleetId.- Parameters:
scope- This parameter is required.id- This parameter is required.fleetId- This parameter is required.
-
isCfnFleet
Checks whether the given object is a CfnFleet.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrFleetArn
The Amazon Resource Name ( ARN ) that is assigned to a Amazon GameLift Servers fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format isarn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912. In a GameLift fleet ARN, the resource ID matches theFleetIdvalue. -
getAttrFleetId
A unique identifier for the fleet. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getFleetRef
A reference to a Fleet resource.- Specified by:
getFleetRefin interfaceIFleetRef
-
getName
A descriptive label that is associated with a fleet. -
setName
A descriptive label that is associated with a fleet. -
getAnywhereConfiguration
Amazon GameLift Servers Anywhere configuration options.Returns union: either
IResolvableorCfnFleet.AnywhereConfigurationProperty -
setAnywhereConfiguration
Amazon GameLift Servers Anywhere configuration options. -
setAnywhereConfiguration
@Stability(Stable) public void setAnywhereConfiguration(@Nullable CfnFleet.AnywhereConfigurationProperty value) Amazon GameLift Servers Anywhere configuration options. -
getApplyCapacity
Current resource capacity settings for managed EC2 fleets and managed container fleets. -
setApplyCapacity
Current resource capacity settings for managed EC2 fleets and managed container fleets. -
getBuildId
A unique identifier for a build to be deployed on the new fleet. -
setBuildId
A unique identifier for a build to be deployed on the new fleet. -
getCertificateConfiguration
Prompts Amazon GameLift Servers to generate a TLS/SSL certificate for the fleet.Returns union: either
IResolvableorCfnFleet.CertificateConfigurationProperty -
setCertificateConfiguration
Prompts Amazon GameLift Servers to generate a TLS/SSL certificate for the fleet. -
setCertificateConfiguration
@Stability(Stable) public void setCertificateConfiguration(@Nullable CfnFleet.CertificateConfigurationProperty value) Prompts Amazon GameLift Servers to generate a TLS/SSL certificate for the fleet. -
getComputeType
The type of compute resource used to host your game servers. -
setComputeType
The type of compute resource used to host your game servers. -
getDescription
A description for the fleet. -
setDescription
A description for the fleet. -
getDesiredEc2Instances
Deprecated.this property has been deprecated(deprecated) [DEPRECATED] The number of EC2 instances that you want this fleet to host. -
setDesiredEc2Instances
Deprecated.this property has been deprecated(deprecated) [DEPRECATED] The number of EC2 instances that you want this fleet to host. -
getEc2InboundPermissions
The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnFleet.IpPermissionProperty> -
setEc2InboundPermissions
The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet. -
setEc2InboundPermissions
The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet. -
getEc2InstanceType
The Amazon GameLift Servers-supported Amazon EC2 instance type to use with managed EC2 fleets. -
setEc2InstanceType
The Amazon GameLift Servers-supported Amazon EC2 instance type to use with managed EC2 fleets. -
getFleetType
Indicates whether to use On-Demand or Spot instances for this fleet. -
setFleetType
Indicates whether to use On-Demand or Spot instances for this fleet. -
getInstanceRoleArn
A unique identifier for an IAM role that manages access to your AWS services. -
setInstanceRoleArn
A unique identifier for an IAM role that manages access to your AWS services. -
getInstanceRoleCredentialsProvider
Indicates that fleet instances maintain a shared credentials file for the IAM role defined inInstanceRoleArn. -
setInstanceRoleCredentialsProvider
Indicates that fleet instances maintain a shared credentials file for the IAM role defined inInstanceRoleArn. -
getLocations
A set of remote locations to deploy additional instances to and manage as a multi-location fleet.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnFleet.LocationConfigurationProperty> -
setLocations
A set of remote locations to deploy additional instances to and manage as a multi-location fleet. -
setLocations
A set of remote locations to deploy additional instances to and manage as a multi-location fleet. -
getLogPaths
Deprecated.this property has been deprecated(deprecated) This parameter is no longer used. -
setLogPaths
Deprecated.this property has been deprecated(deprecated) This parameter is no longer used. -
getMaxSize
Deprecated.this property has been deprecated(deprecated) [DEPRECATED] The maximum value that is allowed for the fleet's instance count. -
setMaxSize
Deprecated.this property has been deprecated(deprecated) [DEPRECATED] The maximum value that is allowed for the fleet's instance count. -
getMetricGroups
The name of an AWS CloudWatch metric group to add this fleet to. -
setMetricGroups
The name of an AWS CloudWatch metric group to add this fleet to. -
getMinSize
Deprecated.this property has been deprecated(deprecated) [DEPRECATED] The minimum value allowed for the fleet's instance count. -
setMinSize
Deprecated.this property has been deprecated(deprecated) [DEPRECATED] The minimum value allowed for the fleet's instance count. -
getNewGameSessionProtectionPolicy
The status of termination protection for active game sessions on the fleet. -
setNewGameSessionProtectionPolicy
The status of termination protection for active game sessions on the fleet. -
getPeerVpcAwsAccountId
Used when peering your Amazon GameLift Servers fleet with a VPC, the unique identifier for the AWS account that owns the VPC. -
setPeerVpcAwsAccountId
Used when peering your Amazon GameLift Servers fleet with a VPC, the unique identifier for the AWS account that owns the VPC. -
getPeerVpcId
A unique identifier for a VPC with resources to be accessed by your Amazon GameLift Servers fleet. -
setPeerVpcId
A unique identifier for a VPC with resources to be accessed by your Amazon GameLift Servers fleet. -
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.Returns union: either
IResolvableorCfnFleet.ResourceCreationLimitPolicyProperty -
setResourceCreationLimitPolicy
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
Instructions for how to launch and maintain server processes on instances in the fleet.Returns union: either
IResolvableorCfnFleet.RuntimeConfigurationProperty -
setRuntimeConfiguration
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
Rule that controls how a fleet is scaled.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnFleet.ScalingPolicyProperty> -
setScalingPolicies
Rule that controls how a fleet is scaled. -
setScalingPolicies
Rule that controls how a fleet is scaled. -
getScriptId
The unique identifier for a Realtime configuration script to be deployed on fleet instances. -
setScriptId
The unique identifier for a Realtime configuration script to be deployed on fleet instances. -
getServerLaunchParameters
Deprecated.this property has been deprecated(deprecated) This parameter is no longer used but is retained for backward compatibility. -
setServerLaunchParameters
Deprecated.this property has been deprecated(deprecated) This parameter is no longer used but is retained for backward compatibility. -
getServerLaunchPath
Deprecated.this property has been deprecated(deprecated) This parameter is no longer used. -
setServerLaunchPath
Deprecated.this property has been deprecated(deprecated) This parameter is no longer used. -
getTags
An array of key-value pairs to apply to this resource. -
setTags
An array of key-value pairs to apply to this resource.
-