Skip to content

/AWS1/CL_GMLSCALINGPOLICY

Rule that controls how a fleet is scaled. Scaling policies are uniquely identified by the combination of name and fleet ID.

CONSTRUCTOR

IMPORTING

Optional arguments:

iv_fleetid TYPE /AWS1/GMLFLEETID /AWS1/GMLFLEETID

A unique identifier for the fleet that is associated with this scaling policy.

iv_fleetarn TYPE /AWS1/GMLFLEETARN /AWS1/GMLFLEETARN

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 is arn:aws:gamelift:::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912.

iv_name TYPE /AWS1/GMLNONZEROANDMAXSTRING /AWS1/GMLNONZEROANDMAXSTRING

A descriptive label that is associated with a fleet's scaling policy. Policy names do not need to be unique.

iv_status TYPE /AWS1/GMLSCALINGSTATUSTYPE /AWS1/GMLSCALINGSTATUSTYPE

Current status of the scaling policy. The scaling policy can be in force only when in an ACTIVE status. Scaling policies can be suspended for individual fleets. If the policy is suspended for a fleet, the policy status does not change.

  • ACTIVE -- The scaling policy can be used for auto-scaling a fleet.

  • UPDATE_REQUESTED -- A request to update the scaling policy has been received.

  • UPDATING -- A change is being made to the scaling policy.

  • DELETE_REQUESTED -- A request to delete the scaling policy has been received.

  • DELETING -- The scaling policy is being deleted.

  • DELETED -- The scaling policy has been deleted.

  • ERROR -- An error occurred in creating the policy. It should be removed and recreated.

iv_scalingadjustment TYPE /AWS1/GMLINTEGER /AWS1/GMLINTEGER

Amount of adjustment to make, based on the scaling adjustment type.

iv_scalingadjustmenttype TYPE /AWS1/GMLSCALINGADJUSTMENTTYPE /AWS1/GMLSCALINGADJUSTMENTTYPE

The type of adjustment to make to a fleet's instance count.

  • ChangeInCapacity -- add (or subtract) the scaling adjustment value from the current instance count. Positive values scale up while negative values scale down.

  • ExactCapacity -- set the instance count to the scaling adjustment value.

  • PercentChangeInCapacity -- increase or reduce the current instance count by the scaling adjustment, read as a percentage. Positive values scale up while negative values scale down.

iv_comparisonoperator TYPE /AWS1/GMLCOMPARISONOPTYPE /AWS1/GMLCOMPARISONOPTYPE

Comparison operator to use when measuring a metric against the threshold value.

iv_threshold TYPE /AWS1/RT_DOUBLE_AS_STRING /AWS1/RT_DOUBLE_AS_STRING

Metric value used to trigger a scaling event.

iv_evaluationperiods TYPE /AWS1/GMLPOSITIVEINTEGER /AWS1/GMLPOSITIVEINTEGER

Length of time (in minutes) the metric must be at or beyond the threshold before a scaling event is triggered.

iv_metricname TYPE /AWS1/GMLMETRICNAME /AWS1/GMLMETRICNAME

Name of the Amazon GameLift Servers-defined metric that is used to trigger a scaling adjustment. For detailed descriptions of fleet metrics, see Monitor Amazon GameLift Servers with Amazon CloudWatch.

  • ActivatingGameSessions -- Game sessions in the process of being created.

  • ActiveGameSessions -- Game sessions that are currently running.

  • ActiveInstances -- Fleet instances that are currently running at least one game session.

  • AvailableGameSessions -- Additional game sessions that fleet could host simultaneously, given current capacity.

  • AvailablePlayerSessions -- Empty player slots in currently active game sessions. This includes game sessions that are not currently accepting players. Reserved player slots are not included.

  • CurrentPlayerSessions -- Player slots in active game sessions that are being used by a player or are reserved for a player.

  • IdleInstances -- Active instances that are currently hosting zero game sessions.

  • PercentAvailableGameSessions -- Unused percentage of the total number of game sessions that a fleet could host simultaneously, given current capacity. Use this metric for a target-based scaling policy.

  • PercentIdleInstances -- Percentage of the total number of active instances that are hosting zero game sessions.

  • QueueDepth -- Pending game session placement requests, in any queue, where the current fleet is the top-priority destination.

  • WaitTime -- Current wait time for pending game session placement requests, in any queue, where the current fleet is the top-priority destination.

iv_policytype TYPE /AWS1/GMLPOLICYTYPE /AWS1/GMLPOLICYTYPE

The type of scaling policy to create. For a target-based policy, set the parameter MetricName to 'PercentAvailableGameSessions' and specify a TargetConfiguration. For a rule-based policy set the following parameters: MetricName, ComparisonOperator, Threshold, EvaluationPeriods, ScalingAdjustmentType, and ScalingAdjustment.

io_targetconfiguration TYPE REF TO /AWS1/CL_GMLTARGETCONF /AWS1/CL_GMLTARGETCONF

An object that contains settings for a target-based scaling policy.

iv_updatestatus TYPE /AWS1/GMLLOCATIONUPDATESTATUS /AWS1/GMLLOCATIONUPDATESTATUS

The current status of the fleet's scaling policies in a requested fleet location. The status PENDING_UPDATE indicates that an update was requested for the fleet but has not yet been completed for the location.

iv_location TYPE /AWS1/GMLLOCATIONSTRINGMODEL /AWS1/GMLLOCATIONSTRINGMODEL

The fleet location.


Queryable Attributes

FleetId

A unique identifier for the fleet that is associated with this scaling policy.

Accessible with the following methods

Method Description
GET_FLEETID() Getter for FLEETID, with configurable default
ASK_FLEETID() Getter for FLEETID w/ exceptions if field has no value
HAS_FLEETID() Determine if FLEETID has a value

FleetArn

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 is arn:aws:gamelift:::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912.

Accessible with the following methods

Method Description
GET_FLEETARN() Getter for FLEETARN, with configurable default
ASK_FLEETARN() Getter for FLEETARN w/ exceptions if field has no value
HAS_FLEETARN() Determine if FLEETARN has a value

Name

A descriptive label that is associated with a fleet's scaling policy. Policy names do not need to be unique.

Accessible with the following methods

Method Description
GET_NAME() Getter for NAME, with configurable default
ASK_NAME() Getter for NAME w/ exceptions if field has no value
HAS_NAME() Determine if NAME has a value

Status

Current status of the scaling policy. The scaling policy can be in force only when in an ACTIVE status. Scaling policies can be suspended for individual fleets. If the policy is suspended for a fleet, the policy status does not change.

  • ACTIVE -- The scaling policy can be used for auto-scaling a fleet.

  • UPDATE_REQUESTED -- A request to update the scaling policy has been received.

  • UPDATING -- A change is being made to the scaling policy.

  • DELETE_REQUESTED -- A request to delete the scaling policy has been received.

  • DELETING -- The scaling policy is being deleted.

  • DELETED -- The scaling policy has been deleted.

  • ERROR -- An error occurred in creating the policy. It should be removed and recreated.

Accessible with the following methods

Method Description
GET_STATUS() Getter for STATUS, with configurable default
ASK_STATUS() Getter for STATUS w/ exceptions if field has no value
HAS_STATUS() Determine if STATUS has a value

ScalingAdjustment

Amount of adjustment to make, based on the scaling adjustment type.

Accessible with the following methods

Method Description
GET_SCALINGADJUSTMENT() Getter for SCALINGADJUSTMENT, with configurable default
ASK_SCALINGADJUSTMENT() Getter for SCALINGADJUSTMENT w/ exceptions if field has no v
HAS_SCALINGADJUSTMENT() Determine if SCALINGADJUSTMENT has a value

ScalingAdjustmentType

The type of adjustment to make to a fleet's instance count.

  • ChangeInCapacity -- add (or subtract) the scaling adjustment value from the current instance count. Positive values scale up while negative values scale down.

  • ExactCapacity -- set the instance count to the scaling adjustment value.

  • PercentChangeInCapacity -- increase or reduce the current instance count by the scaling adjustment, read as a percentage. Positive values scale up while negative values scale down.

Accessible with the following methods

Method Description
GET_SCALINGADJUSTMENTTYPE() Getter for SCALINGADJUSTMENTTYPE, with configurable default
ASK_SCALINGADJUSTMENTTYPE() Getter for SCALINGADJUSTMENTTYPE w/ exceptions if field has
HAS_SCALINGADJUSTMENTTYPE() Determine if SCALINGADJUSTMENTTYPE has a value

ComparisonOperator

Comparison operator to use when measuring a metric against the threshold value.

Accessible with the following methods

Method Description
GET_COMPARISONOPERATOR() Getter for COMPARISONOPERATOR, with configurable default
ASK_COMPARISONOPERATOR() Getter for COMPARISONOPERATOR w/ exceptions if field has no
HAS_COMPARISONOPERATOR() Determine if COMPARISONOPERATOR has a value

Threshold

Metric value used to trigger a scaling event.

Accessible with the following methods

Method Description
GET_THRESHOLD() Getter for THRESHOLD, with configurable default
ASK_THRESHOLD() Getter for THRESHOLD w/ exceptions if field has no value
STR_THRESHOLD() String format for THRESHOLD, with configurable default
HAS_THRESHOLD() Determine if THRESHOLD has a value

EvaluationPeriods

Length of time (in minutes) the metric must be at or beyond the threshold before a scaling event is triggered.

Accessible with the following methods

Method Description
GET_EVALUATIONPERIODS() Getter for EVALUATIONPERIODS, with configurable default
ASK_EVALUATIONPERIODS() Getter for EVALUATIONPERIODS w/ exceptions if field has no v
HAS_EVALUATIONPERIODS() Determine if EVALUATIONPERIODS has a value

MetricName

Name of the Amazon GameLift Servers-defined metric that is used to trigger a scaling adjustment. For detailed descriptions of fleet metrics, see Monitor Amazon GameLift Servers with Amazon CloudWatch.

  • ActivatingGameSessions -- Game sessions in the process of being created.

  • ActiveGameSessions -- Game sessions that are currently running.

  • ActiveInstances -- Fleet instances that are currently running at least one game session.

  • AvailableGameSessions -- Additional game sessions that fleet could host simultaneously, given current capacity.

  • AvailablePlayerSessions -- Empty player slots in currently active game sessions. This includes game sessions that are not currently accepting players. Reserved player slots are not included.

  • CurrentPlayerSessions -- Player slots in active game sessions that are being used by a player or are reserved for a player.

  • IdleInstances -- Active instances that are currently hosting zero game sessions.

  • PercentAvailableGameSessions -- Unused percentage of the total number of game sessions that a fleet could host simultaneously, given current capacity. Use this metric for a target-based scaling policy.

  • PercentIdleInstances -- Percentage of the total number of active instances that are hosting zero game sessions.

  • QueueDepth -- Pending game session placement requests, in any queue, where the current fleet is the top-priority destination.

  • WaitTime -- Current wait time for pending game session placement requests, in any queue, where the current fleet is the top-priority destination.

Accessible with the following methods

Method Description
GET_METRICNAME() Getter for METRICNAME, with configurable default
ASK_METRICNAME() Getter for METRICNAME w/ exceptions if field has no value
HAS_METRICNAME() Determine if METRICNAME has a value

PolicyType

The type of scaling policy to create. For a target-based policy, set the parameter MetricName to 'PercentAvailableGameSessions' and specify a TargetConfiguration. For a rule-based policy set the following parameters: MetricName, ComparisonOperator, Threshold, EvaluationPeriods, ScalingAdjustmentType, and ScalingAdjustment.

Accessible with the following methods

Method Description
GET_POLICYTYPE() Getter for POLICYTYPE, with configurable default
ASK_POLICYTYPE() Getter for POLICYTYPE w/ exceptions if field has no value
HAS_POLICYTYPE() Determine if POLICYTYPE has a value

TargetConfiguration

An object that contains settings for a target-based scaling policy.

Accessible with the following methods

Method Description
GET_TARGETCONFIGURATION() Getter for TARGETCONFIGURATION

UpdateStatus

The current status of the fleet's scaling policies in a requested fleet location. The status PENDING_UPDATE indicates that an update was requested for the fleet but has not yet been completed for the location.

Accessible with the following methods

Method Description
GET_UPDATESTATUS() Getter for UPDATESTATUS, with configurable default
ASK_UPDATESTATUS() Getter for UPDATESTATUS w/ exceptions if field has no value
HAS_UPDATESTATUS() Determine if UPDATESTATUS has a value

Location

The fleet location.

Accessible with the following methods

Method Description
GET_LOCATION() Getter for LOCATION, with configurable default
ASK_LOCATION() Getter for LOCATION w/ exceptions if field has no value
HAS_LOCATION() Determine if LOCATION has a value

Public Local Types In This Class

Internal table types, representing arrays and maps of this class, are defined as local types:

TT_SCALINGPOLICYLIST

TYPES TT_SCALINGPOLICYLIST TYPE STANDARD TABLE OF REF TO /AWS1/CL_GMLSCALINGPOLICY WITH DEFAULT KEY
.