/*
* 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
{
///
/// This data type is used with the Amazon GameLift FleetIQ and game server groups.
///
///
///
///
/// Properties that describe a game server group resource. A game server group manages
/// certain properties related to a corresponding Amazon EC2 Auto Scaling group.
///
///
///
/// A game server group is created by a successful call to CreateGameServerGroup
/// and deleted by calling DeleteGameServerGroup
. Game server group activity
/// can be temporarily suspended and resumed by calling SuspendGameServerGroup
/// and ResumeGameServerGroup
, respectively.
///
///
public partial class GameServerGroup
{
private string _autoScalingGroupArn;
private BalancingStrategy _balancingStrategy;
private DateTime? _creationTime;
private string _gameServerGroupArn;
private string _gameServerGroupName;
private GameServerProtectionPolicy _gameServerProtectionPolicy;
private List _instanceDefinitions = new List();
private DateTime? _lastUpdatedTime;
private string _roleArn;
private GameServerGroupStatus _status;
private string _statusReason;
private List _suspendedActions = new List();
///
/// Gets and sets the property AutoScalingGroupArn.
///
/// A generated unique ID for the Amazon EC2 Auto Scaling group that is associated with
/// this game server group.
///
///
[AWSProperty(Min=0, Max=256)]
public string AutoScalingGroupArn
{
get { return this._autoScalingGroupArn; }
set { this._autoScalingGroupArn = value; }
}
// Check to see if AutoScalingGroupArn property is set
internal bool IsSetAutoScalingGroupArn()
{
return this._autoScalingGroupArn != null;
}
///
/// Gets and sets the property BalancingStrategy.
///
/// Indicates how Amazon GameLift FleetIQ balances the use of Spot Instances and On-Demand
/// Instances in the game server group. Method options include the following:
///
/// -
///
///
SPOT_ONLY
- Only Spot Instances are used in the game server group. If
/// Spot Instances are unavailable or not viable for game hosting, the game server group
/// provides no hosting capacity until Spot Instances can again be used. Until then, no
/// new instances are started, and the existing nonviable Spot Instances are terminated
/// (after current gameplay ends) and are not replaced.
///
/// -
///
///
SPOT_PREFERRED
- (default value) Spot Instances are used whenever available
/// in the game server group. If Spot Instances are unavailable, the game server group
/// continues to provide hosting capacity by falling back to On-Demand Instances. Existing
/// nonviable Spot Instances are terminated (after current gameplay ends) and are replaced
/// with new On-Demand Instances.
///
/// -
///
///
ON_DEMAND_ONLY
- Only On-Demand Instances are used in the game server
/// group. No Spot Instances are used, even when available, while this balancing strategy
/// is in force.
///
///
///
public BalancingStrategy BalancingStrategy
{
get { return this._balancingStrategy; }
set { this._balancingStrategy = value; }
}
// Check to see if BalancingStrategy property is set
internal bool IsSetBalancingStrategy()
{
return this._balancingStrategy != null;
}
///
/// Gets and sets the property CreationTime.
///
/// A time stamp indicating when this data object was created. Format is a number expressed
/// in Unix time as milliseconds (for example "1469498468.057"
).
///
///
public DateTime CreationTime
{
get { return this._creationTime.GetValueOrDefault(); }
set { this._creationTime = value; }
}
// Check to see if CreationTime property is set
internal bool IsSetCreationTime()
{
return this._creationTime.HasValue;
}
///
/// Gets and sets the property GameServerGroupArn.
///
/// A generated unique ID for the game server group.
///
///
[AWSProperty(Min=1, Max=256)]
public string GameServerGroupArn
{
get { return this._gameServerGroupArn; }
set { this._gameServerGroupArn = value; }
}
// Check to see if GameServerGroupArn property is set
internal bool IsSetGameServerGroupArn()
{
return this._gameServerGroupArn != null;
}
///
/// Gets and sets the property GameServerGroupName.
///
/// A developer-defined identifier for the game server group. The name is unique for each
/// Region in each Amazon Web Services account.
///
///
[AWSProperty(Min=1, Max=128)]
public string GameServerGroupName
{
get { return this._gameServerGroupName; }
set { this._gameServerGroupName = value; }
}
// Check to see if GameServerGroupName property is set
internal bool IsSetGameServerGroupName()
{
return this._gameServerGroupName != null;
}
///
/// Gets and sets the property GameServerProtectionPolicy.
///
/// A flag that indicates whether instances in the game server group are protected from
/// early termination. Unprotected instances that have active game servers running might
/// be terminated during a scale-down event, causing players to be dropped from the game.
/// Protected instances cannot be terminated while there are active game servers running
/// except in the event of a forced game server group deletion (see ). An exception to
/// this is with Spot Instances, which can be terminated by Amazon Web Services regardless
/// of protection status.
///
///
public GameServerProtectionPolicy GameServerProtectionPolicy
{
get { return this._gameServerProtectionPolicy; }
set { this._gameServerProtectionPolicy = value; }
}
// Check to see if GameServerProtectionPolicy property is set
internal bool IsSetGameServerProtectionPolicy()
{
return this._gameServerProtectionPolicy != null;
}
///
/// Gets and sets the property InstanceDefinitions.
///
/// The set of Amazon EC2 instance types that Amazon GameLift FleetIQ can use when balancing
/// and automatically scaling instances in the corresponding Auto Scaling group.
///
///
[AWSProperty(Min=2, Max=20)]
public List InstanceDefinitions
{
get { return this._instanceDefinitions; }
set { this._instanceDefinitions = value; }
}
// Check to see if InstanceDefinitions property is set
internal bool IsSetInstanceDefinitions()
{
return this._instanceDefinitions != null && this._instanceDefinitions.Count > 0;
}
///
/// Gets and sets the property LastUpdatedTime.
///
/// A timestamp that indicates when this game server group was last updated.
///
///
public DateTime LastUpdatedTime
{
get { return this._lastUpdatedTime.GetValueOrDefault(); }
set { this._lastUpdatedTime = value; }
}
// Check to see if LastUpdatedTime property is set
internal bool IsSetLastUpdatedTime()
{
return this._lastUpdatedTime.HasValue;
}
///
/// Gets and sets the property RoleArn.
///
/// The Amazon Resource Name (ARN)
/// for an IAM role that allows Amazon GameLift to access your Amazon EC2 Auto Scaling
/// groups.
///
///
[AWSProperty(Min=1, Max=256)]
public string RoleArn
{
get { return this._roleArn; }
set { this._roleArn = value; }
}
// Check to see if RoleArn property is set
internal bool IsSetRoleArn()
{
return this._roleArn != null;
}
///
/// Gets and sets the property Status.
///
/// The current status of the game server group. Possible statuses include:
///
/// -
///
///
NEW
- Amazon GameLift FleetIQ has validated the CreateGameServerGroup()
/// request.
///
/// -
///
///
ACTIVATING
- Amazon GameLift FleetIQ is setting up a game server group,
/// which includes creating an Auto Scaling group in your Amazon Web Services account.
///
///
/// -
///
///
ACTIVE
- The game server group has been successfully created.
///
/// -
///
///
DELETE_SCHEDULED
- A request to delete the game server group has been
/// received.
///
/// -
///
///
DELETING
- Amazon GameLift FleetIQ has received a valid DeleteGameServerGroup()
/// request and is processing it. Amazon GameLift FleetIQ must first complete and release
/// hosts before it deletes the Auto Scaling group and the game server group.
///
/// -
///
///
DELETED
- The game server group has been successfully deleted.
///
/// -
///
///
ERROR
- The asynchronous processes of activating or deleting a game
/// server group has failed, resulting in an error state.
///
///
///
public GameServerGroupStatus 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 StatusReason.
///
/// Additional information about the current game server group status. This information
/// might provide additional insight on groups that are in ERROR
status.
///
///
[AWSProperty(Min=1, Max=1024)]
public string StatusReason
{
get { return this._statusReason; }
set { this._statusReason = value; }
}
// Check to see if StatusReason property is set
internal bool IsSetStatusReason()
{
return this._statusReason != null;
}
///
/// Gets and sets the property SuspendedActions.
///
/// A list of activities that are currently suspended for this game server group. If this
/// property is empty, all activities are occurring.
///
///
[AWSProperty(Min=1, Max=1)]
public List SuspendedActions
{
get { return this._suspendedActions; }
set { this._suspendedActions = value; }
}
// Check to see if SuspendedActions property is set
internal bool IsSetSuspendedActions()
{
return this._suspendedActions != null && this._suspendedActions.Count > 0;
}
}
}