@Generated(value="software.amazon.awssdk:codegen") public class PutScalingPolicyRequest extends GameLiftRequest implements ToCopyableBuilder<PutScalingPolicyRequest.Builder,PutScalingPolicyRequest>
Represents the input for a request action.
Modifier and Type | Class and Description |
---|---|
static interface |
PutScalingPolicyRequest.Builder |
Modifier and Type | Method and Description |
---|---|
static PutScalingPolicyRequest.Builder |
builder() |
ComparisonOperatorType |
comparisonOperator()
Comparison operator to use when measuring the metric against the threshold value.
|
String |
comparisonOperatorString()
Comparison operator to use when measuring the metric against the threshold value.
|
boolean |
equals(Object obj) |
Integer |
evaluationPeriods()
Length of time (in minutes) the metric must be at or beyond the threshold before a scaling event is triggered.
|
String |
fleetId()
Unique identifier for a fleet to apply this policy to.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz)
Used to retrieve the value of a field from any class that extends
SdkRequest . |
int |
hashCode() |
MetricName |
metricName()
Name of the Amazon GameLift-defined metric that is used to trigger an adjustment.
|
String |
metricNameString()
Name of the Amazon GameLift-defined metric that is used to trigger an adjustment.
|
String |
name()
Descriptive label that is associated with a scaling policy.
|
Integer |
scalingAdjustment()
Amount of adjustment to make, based on the scaling adjustment type.
|
ScalingAdjustmentType |
scalingAdjustmentType()
Type of adjustment to make to a fleet's instance count (see FleetCapacity):
|
String |
scalingAdjustmentTypeString()
Type of adjustment to make to a fleet's instance count (see FleetCapacity):
|
static Class<? extends PutScalingPolicyRequest.Builder> |
serializableBuilderClass() |
Double |
threshold()
Metric value used to trigger a scaling event.
|
PutScalingPolicyRequest.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
requestOverrideConfig
copy
public String name()
Descriptive label that is associated with a scaling policy. Policy names do not need to be unique. A fleet can have only one scaling policy with the same name.
public String fleetId()
Unique identifier for a fleet to apply this policy to.
public Integer scalingAdjustment()
Amount of adjustment to make, based on the scaling adjustment type.
public ScalingAdjustmentType scalingAdjustmentType()
Type of adjustment to make to a fleet's instance count (see FleetCapacity):
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; for example, a value of "-10" scales the fleet down by 10%.
If the service returns an enum value that is not available in the current SDK version,
scalingAdjustmentType
will return ScalingAdjustmentType.UNKNOWN_TO_SDK_VERSION
. The raw value
returned by the service is available from scalingAdjustmentTypeString()
.
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; for example, a value of "-10" scales the fleet down by 10%.
ScalingAdjustmentType
public String scalingAdjustmentTypeString()
Type of adjustment to make to a fleet's instance count (see FleetCapacity):
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; for example, a value of "-10" scales the fleet down by 10%.
If the service returns an enum value that is not available in the current SDK version,
scalingAdjustmentType
will return ScalingAdjustmentType.UNKNOWN_TO_SDK_VERSION
. The raw value
returned by the service is available from scalingAdjustmentTypeString()
.
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; for example, a value of "-10" scales the fleet down by 10%.
ScalingAdjustmentType
public Double threshold()
Metric value used to trigger a scaling event.
public ComparisonOperatorType comparisonOperator()
Comparison operator to use when measuring the metric against the threshold value.
If the service returns an enum value that is not available in the current SDK version,
comparisonOperator
will return ComparisonOperatorType.UNKNOWN_TO_SDK_VERSION
. The raw value
returned by the service is available from comparisonOperatorString()
.
ComparisonOperatorType
public String comparisonOperatorString()
Comparison operator to use when measuring the metric against the threshold value.
If the service returns an enum value that is not available in the current SDK version,
comparisonOperator
will return ComparisonOperatorType.UNKNOWN_TO_SDK_VERSION
. The raw value
returned by the service is available from comparisonOperatorString()
.
ComparisonOperatorType
public Integer evaluationPeriods()
Length of time (in minutes) the metric must be at or beyond the threshold before a scaling event is triggered.
public MetricName metricName()
Name of the Amazon GameLift-defined metric that is used to trigger an adjustment.
ActivatingGameSessions -- number of game sessions in the process of being created (game session status =
ACTIVATING
).
ActiveGameSessions -- number of game sessions currently running (game session status = ACTIVE
).
CurrentPlayerSessions -- number of active or reserved player sessions (player session status =
ACTIVE
or RESERVED
).
AvailablePlayerSessions -- number of player session slots currently available in active game sessions
across the fleet, calculated by subtracting a game session's current player session count from its maximum player
session count. This number includes game sessions that are not currently accepting players (game session
PlayerSessionCreationPolicy
= DENY_ALL
).
ActiveInstances -- number of instances currently running a game session.
IdleInstances -- number of instances not currently running a game session.
If the service returns an enum value that is not available in the current SDK version, metricName
will
return MetricName.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
metricNameString()
.
ActivatingGameSessions -- number of game sessions in the process of being created (game session
status = ACTIVATING
).
ActiveGameSessions -- number of game sessions currently running (game session status =
ACTIVE
).
CurrentPlayerSessions -- number of active or reserved player sessions (player session status =
ACTIVE
or RESERVED
).
AvailablePlayerSessions -- number of player session slots currently available in active game
sessions across the fleet, calculated by subtracting a game session's current player session count from
its maximum player session count. This number includes game sessions that are not currently accepting
players (game session PlayerSessionCreationPolicy
= DENY_ALL
).
ActiveInstances -- number of instances currently running a game session.
IdleInstances -- number of instances not currently running a game session.
MetricName
public String metricNameString()
Name of the Amazon GameLift-defined metric that is used to trigger an adjustment.
ActivatingGameSessions -- number of game sessions in the process of being created (game session status =
ACTIVATING
).
ActiveGameSessions -- number of game sessions currently running (game session status = ACTIVE
).
CurrentPlayerSessions -- number of active or reserved player sessions (player session status =
ACTIVE
or RESERVED
).
AvailablePlayerSessions -- number of player session slots currently available in active game sessions
across the fleet, calculated by subtracting a game session's current player session count from its maximum player
session count. This number includes game sessions that are not currently accepting players (game session
PlayerSessionCreationPolicy
= DENY_ALL
).
ActiveInstances -- number of instances currently running a game session.
IdleInstances -- number of instances not currently running a game session.
If the service returns an enum value that is not available in the current SDK version, metricName
will
return MetricName.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
metricNameString()
.
ActivatingGameSessions -- number of game sessions in the process of being created (game session
status = ACTIVATING
).
ActiveGameSessions -- number of game sessions currently running (game session status =
ACTIVE
).
CurrentPlayerSessions -- number of active or reserved player sessions (player session status =
ACTIVE
or RESERVED
).
AvailablePlayerSessions -- number of player session slots currently available in active game
sessions across the fleet, calculated by subtracting a game session's current player session count from
its maximum player session count. This number includes game sessions that are not currently accepting
players (game session PlayerSessionCreationPolicy
= DENY_ALL
).
ActiveInstances -- number of instances currently running a game session.
IdleInstances -- number of instances not currently running a game session.
MetricName
public PutScalingPolicyRequest.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<PutScalingPolicyRequest.Builder,PutScalingPolicyRequest>
toBuilder
in class GameLiftRequest
public static PutScalingPolicyRequest.Builder builder()
public static Class<? extends PutScalingPolicyRequest.Builder> serializableBuilderClass()
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
SdkRequest
SdkRequest
. The field name
specified should match the member name from the corresponding service-2.json model specified in the
codegen-resources folder for a given service. The class specifies what class to cast the returned value to.
If the returned value is also a modeled class, the SdkRequest.getValueForField(String, Class)
method will
again be available.getValueForField
in class SdkRequest
fieldName
- The name of the member to be retrieved.clazz
- The class to cast the returned object to.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.