/*
* 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
{
///
/// Container for the parameters to the CreateGameSession operation.
/// Creates a multiplayer game session for players in a specific fleet location. This
/// operation prompts an available server process to start a game session and retrieves
/// connection information for the new game session. As an alternative, consider using
/// the Amazon GameLift game session placement feature with StartGameSessionPlacement
/// , which uses FleetIQ algorithms and queues to optimize the placement process.
///
///
///
/// When creating a game session, you specify exactly where you want to place it and provide
/// a set of game session configuration settings. The fleet must be in ACTIVE
/// status before a game session can be created in it.
///
///
///
/// This operation can be used in the following ways:
///
/// -
///
/// To create a game session on an instance in a fleet's home Region, provide a fleet
/// or alias ID along with your game session configuration.
///
///
-
///
/// To create a game session on an instance in a fleet's remote location, provide a fleet
/// or alias ID and a location name, along with your game session configuration.
///
///
///
/// If successful, a workflow is initiated to start a new game session. A GameSession
/// object is returned containing the game session configuration and status. When the
/// status is ACTIVE
, game session connection information is provided and
/// player sessions can be created for the game session. By default, newly created game
/// sessions are open to new players. You can restrict new player access by using UpdateGameSession
/// to change the game session's player session creation policy.
///
///
///
/// Game session logs are retained for all active game sessions for 14 days. To access
/// the logs, call GetGameSessionLogUrl
/// to download the log files.
///
///
///
/// Available in Amazon GameLift Local.
///
///
///
/// Learn more
///
///
///
/// Start
/// a game session
///
///
///
/// All
/// APIs by task
///
///
public partial class CreateGameSessionRequest : AmazonGameLiftRequest
{
private string _aliasId;
private string _creatorId;
private string _fleetId;
private List _gameProperties = new List();
private string _gameSessionData;
private string _gameSessionId;
private string _idempotencyToken;
private string _location;
private int? _maximumPlayerSessionCount;
private string _name;
///
/// Gets and sets the property AliasId.
///
/// A unique identifier for the alias associated with the fleet to create a game session
/// in. You can use either the alias ID or ARN value. Each request must reference either
/// a fleet ID or alias ID, but not both.
///
///
public string AliasId
{
get { return this._aliasId; }
set { this._aliasId = value; }
}
// Check to see if AliasId property is set
internal bool IsSetAliasId()
{
return this._aliasId != null;
}
///
/// Gets and sets the property CreatorId.
///
/// A unique identifier for a player or entity creating the game session.
///
///
///
/// If you add a resource creation limit policy to a fleet, the CreateGameSession
/// operation requires a CreatorId
. Amazon GameLift limits the number of
/// game session creation requests with the same CreatorId
in a specified
/// time period.
///
///
///
/// If you your fleet doesn't have a resource creation limit policy and you provide a
/// CreatorId
in your CreateGameSession
requests, Amazon GameLift
/// limits requests to one request per CreatorId
per second.
///
///
///
/// To not limit CreateGameSession
requests with the same CreatorId
,
/// don't provide a CreatorId
in your CreateGameSession
request.
///
///
[AWSProperty(Min=1, Max=1024)]
public string CreatorId
{
get { return this._creatorId; }
set { this._creatorId = value; }
}
// Check to see if CreatorId property is set
internal bool IsSetCreatorId()
{
return this._creatorId != null;
}
///
/// Gets and sets the property FleetId.
///
/// A unique identifier for the fleet to create a game session in. You can use either
/// the fleet ID or ARN value. Each request must reference either a fleet ID or alias
/// ID, but not both.
///
///
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 GameProperties.
///
/// A set of custom properties for a game session, formatted as key:value pairs. These
/// properties are passed to a game server process with a request to start a new game
/// session (see Start
/// a Game Session).
///
///
[AWSProperty(Max=16)]
public List GameProperties
{
get { return this._gameProperties; }
set { this._gameProperties = value; }
}
// Check to see if GameProperties property is set
internal bool IsSetGameProperties()
{
return this._gameProperties != null && this._gameProperties.Count > 0;
}
///
/// Gets and sets the property GameSessionData.
///
/// A set of custom game session properties, formatted as a single string value. This
/// data is passed to a game server process with a request to start a new game session
/// (see Start
/// a Game Session).
///
///
[AWSProperty(Min=1, Max=262144)]
public string GameSessionData
{
get { return this._gameSessionData; }
set { this._gameSessionData = value; }
}
// Check to see if GameSessionData property is set
internal bool IsSetGameSessionData()
{
return this._gameSessionData != null;
}
///
/// Gets and sets the property GameSessionId.
///
/// This parameter is deprecated. Use IdempotencyToken
instead.
///
///
///
/// Custom string that uniquely identifies a request for a new game session. Maximum token
/// length is 48 characters. If provided, this string is included in the new game session's
/// ID.
///
///
[AWSProperty(Min=1, Max=48)]
public string GameSessionId
{
get { return this._gameSessionId; }
set { this._gameSessionId = value; }
}
// Check to see if GameSessionId property is set
internal bool IsSetGameSessionId()
{
return this._gameSessionId != null;
}
///
/// Gets and sets the property IdempotencyToken.
///
/// Custom string that uniquely identifies the new game session request. This is useful
/// for ensuring that game session requests with the same idempotency token are processed
/// only once. Subsequent requests with the same string return the original GameSession
/// object, with an updated status. Maximum token length is 48 characters. If provided,
/// this string is included in the new game session's ID. A game session ARN has the following
/// format: arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom
/// ID string or idempotency token>
. Idempotency tokens remain in use for 30
/// days after a game session has ended; game session objects are retained for this time
/// period and then deleted.
///
///
[AWSProperty(Min=1, Max=48)]
public string IdempotencyToken
{
get { return this._idempotencyToken; }
set { this._idempotencyToken = value; }
}
// Check to see if IdempotencyToken property is set
internal bool IsSetIdempotencyToken()
{
return this._idempotencyToken != null;
}
///
/// Gets and sets the property Location.
///
/// A fleet's remote location to place the new game session in. If this parameter is not
/// set, the new game session is placed in the fleet's home Region. Specify a remote location
/// with an Amazon Web Services Region code such as us-west-2
.
///
///
[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 MaximumPlayerSessionCount.
///
/// The maximum number of players that can be connected simultaneously to the game session.
///
///
[AWSProperty(Required=true, Min=0)]
public int MaximumPlayerSessionCount
{
get { return this._maximumPlayerSessionCount.GetValueOrDefault(); }
set { this._maximumPlayerSessionCount = value; }
}
// Check to see if MaximumPlayerSessionCount property is set
internal bool IsSetMaximumPlayerSessionCount()
{
return this._maximumPlayerSessionCount.HasValue;
}
///
/// Gets and sets the property Name.
///
/// A descriptive label that is associated with a game session. Session 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;
}
}
}