/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace GameLift { namespace Model { /** *

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

See Also:

* AWS * API Reference

*/ class ScalingPolicy { public: AWS_GAMELIFT_API ScalingPolicy(); AWS_GAMELIFT_API ScalingPolicy(Aws::Utils::Json::JsonView jsonValue); AWS_GAMELIFT_API ScalingPolicy& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_GAMELIFT_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

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

*/ inline const Aws::String& GetFleetId() const{ return m_fleetId; } /** *

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

*/ inline bool FleetIdHasBeenSet() const { return m_fleetIdHasBeenSet; } /** *

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

*/ inline void SetFleetId(const Aws::String& value) { m_fleetIdHasBeenSet = true; m_fleetId = value; } /** *

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

*/ inline void SetFleetId(Aws::String&& value) { m_fleetIdHasBeenSet = true; m_fleetId = std::move(value); } /** *

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

*/ inline void SetFleetId(const char* value) { m_fleetIdHasBeenSet = true; m_fleetId.assign(value); } /** *

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

*/ inline ScalingPolicy& WithFleetId(const Aws::String& value) { SetFleetId(value); return *this;} /** *

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

*/ inline ScalingPolicy& WithFleetId(Aws::String&& value) { SetFleetId(std::move(value)); return *this;} /** *

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

*/ inline ScalingPolicy& WithFleetId(const char* value) { SetFleetId(value); return *this;} /** *

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.

*/ inline const Aws::String& GetFleetArn() const{ return m_fleetArn; } /** *

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.

*/ inline bool FleetArnHasBeenSet() const { return m_fleetArnHasBeenSet; } /** *

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.

*/ inline void SetFleetArn(const Aws::String& value) { m_fleetArnHasBeenSet = true; m_fleetArn = value; } /** *

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.

*/ inline void SetFleetArn(Aws::String&& value) { m_fleetArnHasBeenSet = true; m_fleetArn = std::move(value); } /** *

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.

*/ inline void SetFleetArn(const char* value) { m_fleetArnHasBeenSet = true; m_fleetArn.assign(value); } /** *

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.

*/ inline ScalingPolicy& WithFleetArn(const Aws::String& value) { SetFleetArn(value); return *this;} /** *

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.

*/ inline ScalingPolicy& WithFleetArn(Aws::String&& value) { SetFleetArn(std::move(value)); return *this;} /** *

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.

*/ inline ScalingPolicy& WithFleetArn(const char* value) { SetFleetArn(value); return *this;} /** *

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

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

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

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

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

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

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

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

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

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

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

*/ inline ScalingPolicy& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

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

*/ inline ScalingPolicy& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

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

*/ inline ScalingPolicy& WithName(const char* value) { SetName(value); return *this;} /** *

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.

*/ inline const ScalingStatusType& GetStatus() const{ return m_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.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

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.

*/ inline void SetStatus(const ScalingStatusType& value) { m_statusHasBeenSet = true; m_status = value; } /** *

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.

*/ inline void SetStatus(ScalingStatusType&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

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.

*/ inline ScalingPolicy& WithStatus(const ScalingStatusType& value) { SetStatus(value); return *this;} /** *

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.

*/ inline ScalingPolicy& WithStatus(ScalingStatusType&& value) { SetStatus(std::move(value)); return *this;} /** *

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

*/ inline int GetScalingAdjustment() const{ return m_scalingAdjustment; } /** *

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

*/ inline bool ScalingAdjustmentHasBeenSet() const { return m_scalingAdjustmentHasBeenSet; } /** *

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

*/ inline void SetScalingAdjustment(int value) { m_scalingAdjustmentHasBeenSet = true; m_scalingAdjustment = value; } /** *

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

*/ inline ScalingPolicy& WithScalingAdjustment(int value) { SetScalingAdjustment(value); return *this;} /** *

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.

    *
*/ inline const ScalingAdjustmentType& GetScalingAdjustmentType() const{ return m_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.

    *
*/ inline bool ScalingAdjustmentTypeHasBeenSet() const { return m_scalingAdjustmentTypeHasBeenSet; } /** *

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.

    *
*/ inline void SetScalingAdjustmentType(const ScalingAdjustmentType& value) { m_scalingAdjustmentTypeHasBeenSet = true; m_scalingAdjustmentType = value; } /** *

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.

    *
*/ inline void SetScalingAdjustmentType(ScalingAdjustmentType&& value) { m_scalingAdjustmentTypeHasBeenSet = true; m_scalingAdjustmentType = std::move(value); } /** *

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.

    *
*/ inline ScalingPolicy& WithScalingAdjustmentType(const ScalingAdjustmentType& value) { SetScalingAdjustmentType(value); return *this;} /** *

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.

    *
*/ inline ScalingPolicy& WithScalingAdjustmentType(ScalingAdjustmentType&& value) { SetScalingAdjustmentType(std::move(value)); return *this;} /** *

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

*/ inline const ComparisonOperatorType& GetComparisonOperator() const{ return m_comparisonOperator; } /** *

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

*/ inline bool ComparisonOperatorHasBeenSet() const { return m_comparisonOperatorHasBeenSet; } /** *

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

*/ inline void SetComparisonOperator(const ComparisonOperatorType& value) { m_comparisonOperatorHasBeenSet = true; m_comparisonOperator = value; } /** *

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

*/ inline void SetComparisonOperator(ComparisonOperatorType&& value) { m_comparisonOperatorHasBeenSet = true; m_comparisonOperator = std::move(value); } /** *

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

*/ inline ScalingPolicy& WithComparisonOperator(const ComparisonOperatorType& value) { SetComparisonOperator(value); return *this;} /** *

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

*/ inline ScalingPolicy& WithComparisonOperator(ComparisonOperatorType&& value) { SetComparisonOperator(std::move(value)); return *this;} /** *

Metric value used to trigger a scaling event.

*/ inline double GetThreshold() const{ return m_threshold; } /** *

Metric value used to trigger a scaling event.

*/ inline bool ThresholdHasBeenSet() const { return m_thresholdHasBeenSet; } /** *

Metric value used to trigger a scaling event.

*/ inline void SetThreshold(double value) { m_thresholdHasBeenSet = true; m_threshold = value; } /** *

Metric value used to trigger a scaling event.

*/ inline ScalingPolicy& WithThreshold(double value) { SetThreshold(value); return *this;} /** *

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

*/ inline int GetEvaluationPeriods() const{ return m_evaluationPeriods; } /** *

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

*/ inline bool EvaluationPeriodsHasBeenSet() const { return m_evaluationPeriodsHasBeenSet; } /** *

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

*/ inline void SetEvaluationPeriods(int value) { m_evaluationPeriodsHasBeenSet = true; m_evaluationPeriods = value; } /** *

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

*/ inline ScalingPolicy& WithEvaluationPeriods(int value) { SetEvaluationPeriods(value); return *this;} /** *

Name of the Amazon GameLift-defined metric that is used to trigger a scaling * adjustment. For detailed descriptions of fleet metrics, see Monitor * Amazon GameLift 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. *

*/ inline const MetricName& GetMetricName() const{ return m_metricName; } /** *

Name of the Amazon GameLift-defined metric that is used to trigger a scaling * adjustment. For detailed descriptions of fleet metrics, see Monitor * Amazon GameLift 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. *

*/ inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; } /** *

Name of the Amazon GameLift-defined metric that is used to trigger a scaling * adjustment. For detailed descriptions of fleet metrics, see Monitor * Amazon GameLift 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. *

*/ inline void SetMetricName(const MetricName& value) { m_metricNameHasBeenSet = true; m_metricName = value; } /** *

Name of the Amazon GameLift-defined metric that is used to trigger a scaling * adjustment. For detailed descriptions of fleet metrics, see Monitor * Amazon GameLift 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. *

*/ inline void SetMetricName(MetricName&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); } /** *

Name of the Amazon GameLift-defined metric that is used to trigger a scaling * adjustment. For detailed descriptions of fleet metrics, see Monitor * Amazon GameLift 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. *

*/ inline ScalingPolicy& WithMetricName(const MetricName& value) { SetMetricName(value); return *this;} /** *

Name of the Amazon GameLift-defined metric that is used to trigger a scaling * adjustment. For detailed descriptions of fleet metrics, see Monitor * Amazon GameLift 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. *

*/ inline ScalingPolicy& WithMetricName(MetricName&& value) { SetMetricName(std::move(value)); return *this;} /** *

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.

*/ inline const PolicyType& GetPolicyType() const{ return m_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.

*/ inline bool PolicyTypeHasBeenSet() const { return m_policyTypeHasBeenSet; } /** *

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.

*/ inline void SetPolicyType(const PolicyType& value) { m_policyTypeHasBeenSet = true; m_policyType = value; } /** *

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.

*/ inline void SetPolicyType(PolicyType&& value) { m_policyTypeHasBeenSet = true; m_policyType = std::move(value); } /** *

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.

*/ inline ScalingPolicy& WithPolicyType(const PolicyType& value) { SetPolicyType(value); return *this;} /** *

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.

*/ inline ScalingPolicy& WithPolicyType(PolicyType&& value) { SetPolicyType(std::move(value)); return *this;} /** *

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

*/ inline const TargetConfiguration& GetTargetConfiguration() const{ return m_targetConfiguration; } /** *

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

*/ inline bool TargetConfigurationHasBeenSet() const { return m_targetConfigurationHasBeenSet; } /** *

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

*/ inline void SetTargetConfiguration(const TargetConfiguration& value) { m_targetConfigurationHasBeenSet = true; m_targetConfiguration = value; } /** *

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

*/ inline void SetTargetConfiguration(TargetConfiguration&& value) { m_targetConfigurationHasBeenSet = true; m_targetConfiguration = std::move(value); } /** *

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

*/ inline ScalingPolicy& WithTargetConfiguration(const TargetConfiguration& value) { SetTargetConfiguration(value); return *this;} /** *

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

*/ inline ScalingPolicy& WithTargetConfiguration(TargetConfiguration&& value) { SetTargetConfiguration(std::move(value)); return *this;} /** *

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.

*/ inline const LocationUpdateStatus& GetUpdateStatus() const{ return m_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.

*/ inline bool UpdateStatusHasBeenSet() const { return m_updateStatusHasBeenSet; } /** *

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.

*/ inline void SetUpdateStatus(const LocationUpdateStatus& value) { m_updateStatusHasBeenSet = true; m_updateStatus = value; } /** *

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.

*/ inline void SetUpdateStatus(LocationUpdateStatus&& value) { m_updateStatusHasBeenSet = true; m_updateStatus = std::move(value); } /** *

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.

*/ inline ScalingPolicy& WithUpdateStatus(const LocationUpdateStatus& value) { SetUpdateStatus(value); return *this;} /** *

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.

*/ inline ScalingPolicy& WithUpdateStatus(LocationUpdateStatus&& value) { SetUpdateStatus(std::move(value)); return *this;} /** *

The fleet location.

*/ inline const Aws::String& GetLocation() const{ return m_location; } /** *

The fleet location.

*/ inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; } /** *

The fleet location.

*/ inline void SetLocation(const Aws::String& value) { m_locationHasBeenSet = true; m_location = value; } /** *

The fleet location.

*/ inline void SetLocation(Aws::String&& value) { m_locationHasBeenSet = true; m_location = std::move(value); } /** *

The fleet location.

*/ inline void SetLocation(const char* value) { m_locationHasBeenSet = true; m_location.assign(value); } /** *

The fleet location.

*/ inline ScalingPolicy& WithLocation(const Aws::String& value) { SetLocation(value); return *this;} /** *

The fleet location.

*/ inline ScalingPolicy& WithLocation(Aws::String&& value) { SetLocation(std::move(value)); return *this;} /** *

The fleet location.

*/ inline ScalingPolicy& WithLocation(const char* value) { SetLocation(value); return *this;} private: Aws::String m_fleetId; bool m_fleetIdHasBeenSet = false; Aws::String m_fleetArn; bool m_fleetArnHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; ScalingStatusType m_status; bool m_statusHasBeenSet = false; int m_scalingAdjustment; bool m_scalingAdjustmentHasBeenSet = false; ScalingAdjustmentType m_scalingAdjustmentType; bool m_scalingAdjustmentTypeHasBeenSet = false; ComparisonOperatorType m_comparisonOperator; bool m_comparisonOperatorHasBeenSet = false; double m_threshold; bool m_thresholdHasBeenSet = false; int m_evaluationPeriods; bool m_evaluationPeriodsHasBeenSet = false; MetricName m_metricName; bool m_metricNameHasBeenSet = false; PolicyType m_policyType; bool m_policyTypeHasBeenSet = false; TargetConfiguration m_targetConfiguration; bool m_targetConfigurationHasBeenSet = false; LocationUpdateStatus m_updateStatus; bool m_updateStatusHasBeenSet = false; Aws::String m_location; bool m_locationHasBeenSet = false; }; } // namespace Model } // namespace GameLift } // namespace Aws