1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreateGameSession`](crate::operation::create_game_session::builders::CreateGameSessionFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`fleet_id(impl Into<String>)`](crate::operation::create_game_session::builders::CreateGameSessionFluentBuilder::fleet_id) / [`set_fleet_id(Option<String>)`](crate::operation::create_game_session::builders::CreateGameSessionFluentBuilder::set_fleet_id):<br>required: **false**<br><p>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.</p><br>
    ///   - [`alias_id(impl Into<String>)`](crate::operation::create_game_session::builders::CreateGameSessionFluentBuilder::alias_id) / [`set_alias_id(Option<String>)`](crate::operation::create_game_session::builders::CreateGameSessionFluentBuilder::set_alias_id):<br>required: **false**<br><p>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.</p><br>
    ///   - [`maximum_player_session_count(i32)`](crate::operation::create_game_session::builders::CreateGameSessionFluentBuilder::maximum_player_session_count) / [`set_maximum_player_session_count(Option<i32>)`](crate::operation::create_game_session::builders::CreateGameSessionFluentBuilder::set_maximum_player_session_count):<br>required: **true**<br><p>The maximum number of players that can be connected simultaneously to the game session.</p><br>
    ///   - [`name(impl Into<String>)`](crate::operation::create_game_session::builders::CreateGameSessionFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_game_session::builders::CreateGameSessionFluentBuilder::set_name):<br>required: **false**<br><p>A descriptive label that is associated with a game session. Session names do not need to be unique.</p><br>
    ///   - [`game_properties(GameProperty)`](crate::operation::create_game_session::builders::CreateGameSessionFluentBuilder::game_properties) / [`set_game_properties(Option<Vec::<GameProperty>>)`](crate::operation::create_game_session::builders::CreateGameSessionFluentBuilder::set_game_properties):<br>required: **false**<br><p>A set of key-value pairs that can store custom data in a game session. For example: <code>{"Key": "difficulty", "Value": "novice"}</code>. For an example, see <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-client-api.html#game-properties-create">Create a game session with custom properties</a>.</p><br>
    ///   - [`creator_id(impl Into<String>)`](crate::operation::create_game_session::builders::CreateGameSessionFluentBuilder::creator_id) / [`set_creator_id(Option<String>)`](crate::operation::create_game_session::builders::CreateGameSessionFluentBuilder::set_creator_id):<br>required: **false**<br><p>A unique identifier for a player or entity creating the game session.</p> <p>If you add a resource creation limit policy to a fleet, the <code>CreateGameSession</code> operation requires a <code>CreatorId</code>. Amazon GameLift limits the number of game session creation requests with the same <code>CreatorId</code> in a specified time period.</p> <p>If you your fleet doesn't have a resource creation limit policy and you provide a <code>CreatorId</code> in your <code>CreateGameSession</code> requests, Amazon GameLift limits requests to one request per <code>CreatorId</code> per second.</p> <p>To not limit <code>CreateGameSession</code> requests with the same <code>CreatorId</code>, don't provide a <code>CreatorId</code> in your <code>CreateGameSession</code> request.</p><br>
    ///   - [`game_session_id(impl Into<String>)`](crate::operation::create_game_session::builders::CreateGameSessionFluentBuilder::game_session_id) / [`set_game_session_id(Option<String>)`](crate::operation::create_game_session::builders::CreateGameSessionFluentBuilder::set_game_session_id):<br>required: **false**<br><p><i>This parameter is deprecated. Use <code>IdempotencyToken</code> instead.</i></p> <p>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.</p><br>
    ///   - [`idempotency_token(impl Into<String>)`](crate::operation::create_game_session::builders::CreateGameSessionFluentBuilder::idempotency_token) / [`set_idempotency_token(Option<String>)`](crate::operation::create_game_session::builders::CreateGameSessionFluentBuilder::set_idempotency_token):<br>required: **false**<br><p>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 <code>GameSession</code> 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: <code>arn:aws:gamelift:<region>    ::gamesession/    <fleet id>     /     <custom id string or idempotency token></custom>    </fleet>   </region></code>. 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.</p><br>
    ///   - [`game_session_data(impl Into<String>)`](crate::operation::create_game_session::builders::CreateGameSessionFluentBuilder::game_session_data) / [`set_game_session_data(Option<String>)`](crate::operation::create_game_session::builders::CreateGameSessionFluentBuilder::set_game_session_data):<br>required: **false**<br><p>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 <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession">Start a Game Session</a>).</p><br>
    ///   - [`location(impl Into<String>)`](crate::operation::create_game_session::builders::CreateGameSessionFluentBuilder::location) / [`set_location(Option<String>)`](crate::operation::create_game_session::builders::CreateGameSessionFluentBuilder::set_location):<br>required: **false**<br><p>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 <code>us-west-2</code>. When using an Anywhere fleet, this parameter is required and must be set to the Anywhere fleet's custom location.</p><br>
    /// - On success, responds with [`CreateGameSessionOutput`](crate::operation::create_game_session::CreateGameSessionOutput) with field(s):
    ///   - [`game_session(Option<GameSession>)`](crate::operation::create_game_session::CreateGameSessionOutput::game_session): <p>Object that describes the newly created game session record.</p>
    /// - On failure, responds with [`SdkError<CreateGameSessionError>`](crate::operation::create_game_session::CreateGameSessionError)
    pub fn create_game_session(&self) -> crate::operation::create_game_session::builders::CreateGameSessionFluentBuilder {
        crate::operation::create_game_session::builders::CreateGameSessionFluentBuilder::new(self.handle.clone())
    }
}