/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the gamelift-2015-10-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.GameLift.Model { /// /// Rule that controls how a fleet is scaled. Scaling policies are uniquely identified /// by the combination of name and fleet ID. /// public partial class ScalingPolicy { private ComparisonOperatorType _comparisonOperator; private int? _evaluationPeriods; private string _fleetArn; private string _fleetId; private string _location; private MetricName _metricName; private string _name; private PolicyType _policyType; private int? _scalingAdjustment; private ScalingAdjustmentType _scalingAdjustmentType; private ScalingStatusType _status; private TargetConfiguration _targetConfiguration; private double? _threshold; private LocationUpdateStatus _updateStatus; /// /// Gets and sets the property ComparisonOperator. /// /// Comparison operator to use when measuring a metric against the threshold value. /// /// public ComparisonOperatorType ComparisonOperator { get { return this._comparisonOperator; } set { this._comparisonOperator = value; } } // Check to see if ComparisonOperator property is set internal bool IsSetComparisonOperator() { return this._comparisonOperator != null; } /// /// Gets and sets the property EvaluationPeriods. /// /// Length of time (in minutes) the metric must be at or beyond the threshold before a /// scaling event is triggered. /// /// [AWSProperty(Min=1)] public int EvaluationPeriods { get { return this._evaluationPeriods.GetValueOrDefault(); } set { this._evaluationPeriods = value; } } // Check to see if EvaluationPeriods property is set internal bool IsSetEvaluationPeriods() { return this._evaluationPeriods.HasValue; } /// /// Gets and sets the property 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. /// /// public string FleetArn { get { return this._fleetArn; } set { this._fleetArn = value; } } // Check to see if FleetArn property is set internal bool IsSetFleetArn() { return this._fleetArn != null; } /// /// Gets and sets the property FleetId. /// /// A unique identifier for the fleet that is associated with this scaling policy. /// /// public string FleetId { get { return this._fleetId; } set { this._fleetId = value; } } // Check to see if FleetId property is set internal bool IsSetFleetId() { return this._fleetId != null; } /// /// Gets and sets the property Location. /// /// The fleet location. /// /// [AWSProperty(Min=1, Max=64)] public string Location { get { return this._location; } set { this._location = value; } } // Check to see if Location property is set internal bool IsSetLocation() { return this._location != null; } /// /// Gets and sets the property 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. /// /// /// public MetricName MetricName { get { return this._metricName; } set { this._metricName = value; } } // Check to see if MetricName property is set internal bool IsSetMetricName() { return this._metricName != null; } /// /// Gets and sets the property Name. /// /// A descriptive label that is associated with a fleet's scaling policy. Policy names /// do not need to be unique. /// /// [AWSProperty(Min=1, Max=1024)] public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// /// Gets and sets the property 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. /// /// public PolicyType PolicyType { get { return this._policyType; } set { this._policyType = value; } } // Check to see if PolicyType property is set internal bool IsSetPolicyType() { return this._policyType != null; } /// /// Gets and sets the property ScalingAdjustment. /// /// Amount of adjustment to make, based on the scaling adjustment type. /// /// public int ScalingAdjustment { get { return this._scalingAdjustment.GetValueOrDefault(); } set { this._scalingAdjustment = value; } } // Check to see if ScalingAdjustment property is set internal bool IsSetScalingAdjustment() { return this._scalingAdjustment.HasValue; } /// /// Gets and sets the property ScalingAdjustmentType. /// /// The type of adjustment to make to a fleet's instance count. /// /// /// public ScalingAdjustmentType ScalingAdjustmentType { get { return this._scalingAdjustmentType; } set { this._scalingAdjustmentType = value; } } // Check to see if ScalingAdjustmentType property is set internal bool IsSetScalingAdjustmentType() { return this._scalingAdjustmentType != null; } /// /// Gets and sets the property 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. /// /// /// public ScalingStatusType Status { get { return this._status; } set { this._status = value; } } // Check to see if Status property is set internal bool IsSetStatus() { return this._status != null; } /// /// Gets and sets the property TargetConfiguration. /// /// An object that contains settings for a target-based scaling policy. /// /// public TargetConfiguration TargetConfiguration { get { return this._targetConfiguration; } set { this._targetConfiguration = value; } } // Check to see if TargetConfiguration property is set internal bool IsSetTargetConfiguration() { return this._targetConfiguration != null; } /// /// Gets and sets the property Threshold. /// /// Metric value used to trigger a scaling event. /// /// public double Threshold { get { return this._threshold.GetValueOrDefault(); } set { this._threshold = value; } } // Check to see if Threshold property is set internal bool IsSetThreshold() { return this._threshold.HasValue; } /// /// Gets and sets the property 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. /// /// public LocationUpdateStatus UpdateStatus { get { return this._updateStatus; } set { this._updateStatus = value; } } // Check to see if UpdateStatus property is set internal bool IsSetUpdateStatus() { return this._updateStatus != null; } } }