Class FleetBase
- All Implemented Interfaces:
IEnvironmentAware,IResource,IFleet,IGameSessionQueueDestination,IGrantable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
- Direct Known Subclasses:
BuildFleet
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.alpha.*;
import software.amazon.awscdk.services.iam.*;
Role role;
IFleet fleetBase = FleetBase.fromFleetAttributes(this, "MyFleetBase", FleetAttributes.builder()
.fleetArn("fleetArn")
.fleetId("fleetId")
.role(role)
.build());
-
Nested Class Summary
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.services.gamelift.alpha.IFleet
IFleet.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFleetBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedFleetBase(software.amazon.jsii.JsiiObjectRef objRef) protectedprotectedFleetBase(software.constructs.Construct scope, String id, ResourceProps props) -
Method Summary
Modifier and TypeMethodDescription(experimental) Defines an alias for this fleet.addAlias(String aliasName, AliasOptions options) (experimental) Defines an alias for this fleet.voidaddInternalLocation(Location location) (experimental) Adds a remote locations to deploy additional instances to and manage as part of the fleet.voidaddLocation(String region) (experimental) Adds a remote locations to deploy additional instances to and manage as part of the fleet.voidaddLocation(String region, Number desiredCapacity) (experimental) Adds a remote locations to deploy additional instances to and manage as part of the fleet.voidaddLocation(String region, Number desiredCapacity, Number minSize) (experimental) Adds a remote locations to deploy additional instances to and manage as part of the fleet.voidaddLocation(String region, Number desiredCapacity, Number minSize, Number maxSize) (experimental) Adds a remote locations to deploy additional instances to and manage as part of the fleet.static IFleetfromFleetAttributes(software.constructs.Construct scope, String id, FleetAttributes attrs) (experimental) Import an existing fleet from its attributes.abstract String(experimental) The ARN of the fleet.abstract String(experimental) The Identifier of the fleet.abstract IPrincipal(experimental) The principal this GameLift fleet is using.(experimental) The ARN to put into the destination field of a game session queue.grant(IGrantable grantee, String... actions) (experimental) Grant thegranteeidentity permissions to performactions.(experimental) Return the given named metric for this fleet.metric(String metricName, MetricOptions props) (experimental) Return the given named metric for this fleet.(experimental) Instances withACTIVEstatus, which means they are running active server processes.(experimental) Instances withACTIVEstatus, which means they are running active server processes.(experimental) Target number of active instances that GameLift is working to maintain in the fleet.(experimental) Target number of active instances that GameLift is working to maintain in the fleet.(experimental) Active instances that are currently hosting zero (0) game sessions.metricIdleInstances(MetricOptions props) (experimental) Active instances that are currently hosting zero (0) game sessions.(experimental) Number of spot instances that have been interrupted.(experimental) Number of spot instances that have been interrupted.(experimental) Maximum number of instances that are allowed for the fleet.metricMaxInstances(MetricOptions props) (experimental) Maximum number of instances that are allowed for the fleet.(experimental) Minimum number of instances allowed for the fleet.metricMinInstances(MetricOptions props) (experimental) Minimum number of instances allowed for the fleet.(experimental) Percentage of all active instances that are idle (calculated as IdleInstances / ActiveInstances).(experimental) Percentage of all active instances that are idle (calculated as IdleInstances / ActiveInstances).protected CfnFleet.LocationCapacityPropertyprotected CfnFleet.LocationCapacityPropertyparseLocationCapacity(LocationCapacity capacity) protected List<CfnFleet.LocationConfigurationProperty> protected CfnFleet.RuntimeConfigurationPropertyprotected voidwarnVpcPeeringAuthorizations(software.constructs.Construct scope) Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods 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.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
FleetBase
protected FleetBase(software.amazon.jsii.JsiiObjectRef objRef) -
FleetBase
protected FleetBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
FleetBase
@Stability(Stable) protected FleetBase(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ResourceProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
FleetBase
@Stability(Stable) protected FleetBase(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Details
-
fromFleetAttributes
@Stability(Experimental) @NotNull public static IFleet fromFleetAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull FleetAttributes attrs) (experimental) Import an existing fleet from its attributes.- Parameters:
scope- This parameter is required.id- This parameter is required.attrs- This parameter is required.
-
addAlias
@Stability(Experimental) @NotNull public Alias addAlias(@NotNull String aliasName, @Nullable AliasOptions options) (experimental) Defines an alias for this fleet.FleetBase fleet; fleet.addAlias("Live"); // Is equivalent to // Is equivalent to Alias.Builder.create(this, "AliasLive") .aliasName("Live") .fleet(fleet) .build();- Parameters:
aliasName- The name of the alias. This parameter is required.options- Alias options.
-
addAlias
(experimental) Defines an alias for this fleet.FleetBase fleet; fleet.addAlias("Live"); // Is equivalent to // Is equivalent to Alias.Builder.create(this, "AliasLive") .aliasName("Live") .fleet(fleet) .build();- Parameters:
aliasName- The name of the alias. This parameter is required.
-
addInternalLocation
(experimental) Adds a remote locations to deploy additional instances to and manage as part of the fleet.- Parameters:
location- The location to add. This parameter is required.
-
addLocation
@Stability(Experimental) public void addLocation(@NotNull String region, @Nullable Number desiredCapacity, @Nullable Number minSize, @Nullable Number maxSize) (experimental) Adds a remote locations to deploy additional instances to and manage as part of the fleet.- Parameters:
region- The AWS region to add. This parameter is required.desiredCapacity-minSize-maxSize-
-
addLocation
@Stability(Experimental) public void addLocation(@NotNull String region, @Nullable Number desiredCapacity, @Nullable Number minSize) (experimental) Adds a remote locations to deploy additional instances to and manage as part of the fleet.- Parameters:
region- The AWS region to add. This parameter is required.desiredCapacity-minSize-
-
addLocation
@Stability(Experimental) public void addLocation(@NotNull String region, @Nullable Number desiredCapacity) (experimental) Adds a remote locations to deploy additional instances to and manage as part of the fleet.- Parameters:
region- The AWS region to add. This parameter is required.desiredCapacity-
-
addLocation
(experimental) Adds a remote locations to deploy additional instances to and manage as part of the fleet.- Parameters:
region- The AWS region to add. This parameter is required.
-
grant
@Stability(Experimental) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull String... actions) (experimental) Grant thegranteeidentity permissions to performactions. -
metric
@Stability(Experimental) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props) (experimental) Return the given named metric for this fleet. -
metric
(experimental) Return the given named metric for this fleet. -
metricActiveInstances
@Stability(Experimental) @NotNull public Metric metricActiveInstances(@Nullable MetricOptions props) (experimental) Instances withACTIVEstatus, which means they are running active server processes.The count includes idle instances and those that are hosting one or more game sessions. This metric measures current total instance capacity.
This metric can be used with automatic scaling.
- Specified by:
metricActiveInstancesin interfaceIFleet- Parameters:
props-
-
metricActiveInstances
(experimental) Instances withACTIVEstatus, which means they are running active server processes.The count includes idle instances and those that are hosting one or more game sessions. This metric measures current total instance capacity.
This metric can be used with automatic scaling.
- Specified by:
metricActiveInstancesin interfaceIFleet
-
metricDesiredInstances
@Stability(Experimental) @NotNull public Metric metricDesiredInstances(@Nullable MetricOptions props) (experimental) Target number of active instances that GameLift is working to maintain in the fleet.With automatic scaling, this value is determined based on the scaling policies currently in force. Without automatic scaling, this value is set manually. This metric is not available when viewing data for fleet metric groups.
- Specified by:
metricDesiredInstancesin interfaceIFleet- Parameters:
props-
-
metricDesiredInstances
(experimental) Target number of active instances that GameLift is working to maintain in the fleet.With automatic scaling, this value is determined based on the scaling policies currently in force. Without automatic scaling, this value is set manually. This metric is not available when viewing data for fleet metric groups.
- Specified by:
metricDesiredInstancesin interfaceIFleet
-
metricIdleInstances
(experimental) Active instances that are currently hosting zero (0) game sessions.This metric measures capacity that is available but unused. This metric can be used with automatic scaling.
- Specified by:
metricIdleInstancesin interfaceIFleet- Parameters:
props-
-
metricIdleInstances
(experimental) Active instances that are currently hosting zero (0) game sessions.This metric measures capacity that is available but unused. This metric can be used with automatic scaling.
- Specified by:
metricIdleInstancesin interfaceIFleet
-
metricInstanceInterruptions
@Stability(Experimental) @NotNull public Metric metricInstanceInterruptions(@Nullable MetricOptions props) (experimental) Number of spot instances that have been interrupted.- Specified by:
metricInstanceInterruptionsin interfaceIFleet- Parameters:
props-
-
metricInstanceInterruptions
(experimental) Number of spot instances that have been interrupted.- Specified by:
metricInstanceInterruptionsin interfaceIFleet
-
metricMaxInstances
(experimental) Maximum number of instances that are allowed for the fleet.A fleet's instance maximum determines the capacity ceiling during manual or automatic scaling up. This metric is not available when viewing data for fleet metric groups.
- Specified by:
metricMaxInstancesin interfaceIFleet- Parameters:
props-
-
metricMaxInstances
(experimental) Maximum number of instances that are allowed for the fleet.A fleet's instance maximum determines the capacity ceiling during manual or automatic scaling up. This metric is not available when viewing data for fleet metric groups.
- Specified by:
metricMaxInstancesin interfaceIFleet
-
metricMinInstances
(experimental) Minimum number of instances allowed for the fleet.A fleet's instance minimum determines the capacity floor during manual or automatic scaling down. This metric is not available when viewing data for fleet metric groups.
- Specified by:
metricMinInstancesin interfaceIFleet- Parameters:
props-
-
metricMinInstances
(experimental) Minimum number of instances allowed for the fleet.A fleet's instance minimum determines the capacity floor during manual or automatic scaling down. This metric is not available when viewing data for fleet metric groups.
- Specified by:
metricMinInstancesin interfaceIFleet
-
metricPercentIdleInstances
@Stability(Experimental) @NotNull public Metric metricPercentIdleInstances(@Nullable MetricOptions props) (experimental) Percentage of all active instances that are idle (calculated as IdleInstances / ActiveInstances).This metric can be used for automatic scaling.
- Specified by:
metricPercentIdleInstancesin interfaceIFleet- Parameters:
props-
-
metricPercentIdleInstances
(experimental) Percentage of all active instances that are idle (calculated as IdleInstances / ActiveInstances).This metric can be used for automatic scaling.
- Specified by:
metricPercentIdleInstancesin interfaceIFleet
-
parseLocationCapacity
@Stability(Experimental) @Nullable protected CfnFleet.LocationCapacityProperty parseLocationCapacity(@Nullable LocationCapacity capacity) - Parameters:
capacity-
-
parseLocationCapacity
@Stability(Experimental) @Nullable protected CfnFleet.LocationCapacityProperty parseLocationCapacity() -
parseLocations
@Stability(Experimental) @Nullable protected List<CfnFleet.LocationConfigurationProperty> parseLocations() -
parseResourceCreationLimitPolicy
@Stability(Experimental) @Nullable protected CfnFleet.ResourceCreationLimitPolicyProperty parseResourceCreationLimitPolicy(@NotNull FleetProps props) - Parameters:
props- This parameter is required.
-
parseRuntimeConfiguration
@Stability(Experimental) @Nullable protected CfnFleet.RuntimeConfigurationProperty parseRuntimeConfiguration(@NotNull FleetProps props) - Parameters:
props- This parameter is required.
-
warnVpcPeeringAuthorizations
@Stability(Experimental) protected void warnVpcPeeringAuthorizations(@NotNull software.constructs.Construct scope) - Parameters:
scope- This parameter is required.
-
getFleetArn
(experimental) The ARN of the fleet.- Specified by:
getFleetArnin interfaceIFleet
-
getFleetId
(experimental) The Identifier of the fleet.- Specified by:
getFleetIdin interfaceIFleet
-
getGrantPrincipal
(experimental) The principal this GameLift fleet is using.- Specified by:
getGrantPrincipalin interfaceIGrantable
-
getResourceArnForDestination
(experimental) The ARN to put into the destination field of a game session queue.- Specified by:
getResourceArnForDestinationin interfaceIGameSessionQueueDestination
-