Skip to content

Commit

Permalink
Update services based on release-2025-01-14 of AWS Go SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow committed Jan 15, 2025
1 parent b93c624 commit 3ce91dc
Show file tree
Hide file tree
Showing 2 changed files with 160 additions and 104 deletions.
2 changes: 1 addition & 1 deletion .latest-tag-aws-sdk-go
Original file line number Diff line number Diff line change
@@ -1 +1 @@
release-2025-01-13
release-2025-01-14
262 changes: 159 additions & 103 deletions src/aws_gamelift.erl
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,13 @@
%% }
-type describe_game_server_group_input() :: #{binary() => any()}.

%% Example:
%% priority_configuration_override() :: #{
%% <<"LocationOrder">> => list(string()()),
%% <<"PlacementFallbackStrategy">> => list(any())
%% }
-type priority_configuration_override() :: #{binary() => any()}.

%% Example:
%% describe_fleet_location_capacity_output() :: #{
%% <<"FleetCapacity">> => fleet_capacity()
Expand Down Expand Up @@ -1672,7 +1679,8 @@
%% <<"GameSessionQueueName">> := string(),
%% <<"MaximumPlayerSessionCount">> := integer(),
%% <<"PlacementId">> := string(),
%% <<"PlayerLatencies">> => list(player_latency()())
%% <<"PlayerLatencies">> => list(player_latency()()),
%% <<"PriorityConfigurationOverride">> => priority_configuration_override()
%% }
-type start_game_session_placement_input() :: #{binary() => any()}.

Expand Down Expand Up @@ -2924,6 +2932,7 @@
%% <<"PlacementId">> => string(),
%% <<"PlayerLatencies">> => list(player_latency()()),
%% <<"Port">> => integer(),
%% <<"PriorityConfigurationOverride">> => priority_configuration_override(),
%% <<"StartTime">> => non_neg_integer(),
%% <<"Status">> => list(any())
%% }
Expand Down Expand Up @@ -3680,6 +3689,7 @@
unauthorized_exception().

-type start_game_session_placement_errors() ::
unsupported_region_exception() |
not_found_exception() |
invalid_request_exception() |
internal_service_exception() |
Expand Down Expand Up @@ -6597,11 +6607,11 @@ describe_game_session_details(Client, Input, Options)
%% session status.
%% This practice can cause you to exceed your API limit, which results in
%% errors. Instead,
%% you must configure configure an Amazon Simple Notification Service (SNS)
%% topic to receive notifications from
%% FlexMatch or queues. Continuously polling with
%% `DescribeGameSessionPlacement'
%% should only be used for games in development with low game session usage.
%% you must configure an Amazon Simple Notification Service (SNS) topic to
%% receive notifications from FlexMatch or
%% queues. Continuously polling with `DescribeGameSessionPlacement'
%% should only
%% be used for games in development with low game session usage.
-spec describe_game_session_placement(aws_client:aws_client(), describe_game_session_placement_input()) ->
{ok, describe_game_session_placement_output(), tuple()} |
{error, any()} |
Expand Down Expand Up @@ -8261,67 +8271,98 @@ start_fleet_actions(Client, Input, Options)
when is_map(Client), is_map(Input), is_list(Options) ->
request(Client, <<"StartFleetActions">>, Input, Options).

%% @doc Places a request for a new game session in a queue.
%% @doc Makes a request to start a new game session using a game session
%% queue.
%%
%% When processing a placement
%% request, Amazon GameLift searches for available resources on the
%% queue's destinations, scanning
%% each until it finds resources or the placement request times out.
%% When
%% processing a placement request in a queue, Amazon GameLift finds the best
%% possible available
%% resource to host the game session and prompts the resource to start the
%% game session.
%%
%% A game session placement request can also request player sessions. When a
%% new game
%% session is successfully created, Amazon GameLift creates a player session
%% for each player
%% included in the request.
%% Request options
%%
%% When placing a game session, by default Amazon GameLift tries each fleet
%% in the order they are
%% listed in the queue configuration. Ideally, a queue's destinations are
%% listed in
%% preference order.
%% Call this API with the following minimum parameters:
%% GameSessionQueueName,
%% MaximumPlayerSessionCount, and
%% PlacementID. You can also include game session data (data formatted
%% as strings) or game properties (data formatted as key-value pairs) to pass
%% to the new
%% game session.
%%
%% Alternatively, when requesting a game session with players, you can also
%% provide
%% latency data for each player in relevant Regions. Latency data indicates
%% the performance
%% lag a player experiences when connected to a fleet in the Region. Amazon
%% GameLift uses latency
%% data to reorder the list of destinations to place the game session in a
%% Region with
%% minimal lag. If latency data is provided for multiple players, Amazon
%% GameLift calculates each
%% Region's average lag for all players and reorders to get the best game
%% play across all
%% players.
%%
%% To place a new game session request, specify the following:
%%
%% The queue name and a set of game session properties and settings
%%
%% A unique ID (such as a UUID) for the placement. You use this ID to track
%% the
%% status of the placement request
%% You can change how Amazon GameLift chooses a hosting resource for the new
%% game session.
%% Prioritizing resources for game session placements is defined when you
%% configure
%% a game session queue. You can use the default prioritization process or
%% specify
%% a custom process by providing a
%% PriorityConfiguration:
%% https://docs.aws.amazon.com/gamelift/latest/apireference/API_PriorityConfiguration.html
%% when you create or update a queue.
%%
%% Prioritize based on resource cost and location, using the queue's
%% configured priority settings. Call this API with the minimum
%% parameters.
%%
%% Prioritize based on latency. Include a set of values for
%% PlayerLatencies. You can provide latency data
%% with or without player session data. This option instructs Amazon GameLift
%% to
%% reorder the queue's prioritized locations list based on the latency
%% data. If latency data is provided for multiple players, Amazon GameLift
%% calculates each location's average latency for all players and
%% reorders
%% to find the lowest latency across all players. Don't include latency
%% data if you're providing a custom list of locations.
%%
%% Prioritize based on a custom list of locations. If you're using a
%% queue that's configured to prioritize location first (see
%% PriorityConfiguration:
%% https://docs.aws.amazon.com/gamelift/latest/apireference/API_PriorityConfiguration.html
%% for game session queues), use the
%% PriorityConfigurationOverride parameter to
%% substitute a different location list for this placement request. When
%% prioritizing placements by location, Amazon GameLift searches each
%% location in
%% prioritized order to find an available hosting resource for the new game
%% session. You can choose whether to use the override list for the first
%% placement attempt only or for all attempts.
%%
%% You can request new player sessions for a group of players. Include the
%% DesiredPlayerSessions parameter and include at minimum
%% a unique player ID for each. You can also include player-specific data to
%% pass
%% to the new game session.
%%
%% (Optional) A set of player data and a unique player ID for each player
%% that
%% you are joining to the new game session (player data is optional, but if
%% you
%% include it, you must also provide a unique ID for each player)
%%
%% Latency data for all players (if you want to optimize game play for the
%% players)
%%
%% If successful, a new game session placement is created.
%%
%% To track the status of a placement request, call
%% DescribeGameSessionPlacement:
%% https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeGameSessionPlacement.html
%% and check the request's status. If the status
%% is `FULFILLED', a new game session has been created and a game session
%% ARN
%% and Region are referenced. If the placement request times out, you can
%% resubmit the
%% request or retry it with a different queue.
%% Result
%%
%% If successful, this request generates a new game session placement request
%% and adds it
%% to the game session queue for Amazon GameLift to process in turn. You can
%% track the status of
%% individual placement requests by calling DescribeGameSessionPlacement:
%% https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeGameSessionPlacement.html.
%% A new game session is running if the status
%% is `FULFILLED' and the request returns the game session connection
%% information (IP address and port). If you include player session data,
%% Amazon GameLift creates a
%% player session for each player ID in the request.
%%
%% The request results in a `BadRequestException' in the following
%% situations:
%%
%% If the request includes both PlayerLatencies and
%% PriorityConfigurationOverride parameters.
%%
%% If the request includes the PriorityConfigurationOverride
%% parameter and designates a queue doesn't prioritize locations.
%%
%% Amazon GameLift continues to retry each placement request until it reaches
%% the queue's timeout
%% setting. If a request times out, you can resubmit the request to the same
%% queue or try a
%% different queue.
-spec start_game_session_placement(aws_client:aws_client(), start_game_session_placement_input()) ->
{ok, start_game_session_placement_output(), tuple()} |
{error, any()} |
Expand Down Expand Up @@ -8688,54 +8729,69 @@ tag_resource(Client, Input, Options)

%% @doc Ends a game session that's currently in progress.
%%
%% You can use this action to terminate
%% any game session that isn't in `TERMINATED' or `TERMINATING'
%% status. Terminating a game session is the most efficient way to free up a
%% server process
%% when it's hosting a game session that's in a bad state or not
%% ending naturally. You can
%% use this action to terminate a game session that's being hosted on any
%% type of Amazon GameLift
%% fleet compute, including computes for managed EC2, managed container, and
%% Anywhere
%% fleets.
%%
%% There are two potential methods for terminating a game session:
%%
%% With a graceful termination, the Amazon GameLift service prompts the
%% server process to initiate its
%% normal game session shutdown sequence. This sequence is implemented in the
%% game
%% server code and might involve a variety of actions to gracefully end a
%% game
%% session, such as notifying players, and stop the server process.
%%
%% With a forceful termination, the Amazon GameLift service takes immediate
%% action to terminate the game
%% session by stopping the server process. Termination occurs without the
%% normal
%% game session shutdown sequence.
%% Use this action to terminate any
%% game session that isn't in `ERROR' status. Terminating a game
%% session is the
%% most efficient way to free up a server process when it's hosting a
%% game session that's
%% in a bad state or not ending properly. You can use this action to
%% terminate a game
%% session that's being hosted on any type of Amazon GameLift fleet
%% compute, including computes for
%% managed EC2, managed container, and Anywhere fleets. The game server must
%% be integrated
%% with Amazon GameLift server SDK 5.x or greater.
%%
%% Request options
%%
%% Request termination for a single game session. Provide the game session ID
%% and
%% the termination method.
%% and the
%% termination mode. There are two potential methods for terminating a game
%% session:
%%
%% Initiate a graceful termination using the normal game session shutdown
%% sequence. With this mode, the Amazon GameLift service prompts the server
%% process that's
%% hosting the game session by calling the server SDK callback method
%% . The callback implementation is part of
%% the custom game server code. It might involve a variety of actions to
%% gracefully
%% end a game session, such as notifying players, before stopping the server
%% process.
%%
%% Force an immediate game session termination. With this mode, the Amazon
%% GameLift
%% service takes action to stop the server process, which ends the game
%% session
%% without the normal game session shutdown sequence.
%%
%% Results
%%
%% If successful, game session termination is initiated, which includes
%% changing the game
%% session status to `TERMINATING'. As a result of this action, and
%% depending on
%% the implementation of , the server process either
%% becomes available to host a new game session, or it's recycled and a
%% new server process
%% started with availability to host a game session. The game session status
%% is changed to
%% `TERMINATED', with a status reason that indicates the termination
%% method
%% used.
%% If successful, game session termination is initiated. During this
%% activity, the game
%% session status is changed to `TERMINATING'. When completed, the server
%% process that was hosting the game session has been stopped and replaced
%% with a new
%% server process that's ready to host a new game session. The old game
%% session's status is
%% changed to `TERMINATED' with a status reason that indicates the
%% termination
%% method used.
%%
%% Learn more
%%
%% Add Amazon GameLift to your game server:
%% https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html
%%
%% Amazon GameLift server SDK 5 reference guide for
%% (C++:
%% https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-server-sdk5-cpp-initsdk.html)
%% (C#:
%% https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-server-sdk5-csharp-initsdk.html)
%% (Unreal:
%% https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-server-sdk5-unreal-initsdk.html)
%% (Go:
%% https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-server-sdk-go-initsdk.html)
-spec terminate_game_session(aws_client:aws_client(), terminate_game_session_input()) ->
{ok, terminate_game_session_output(), tuple()} |
{error, any()} |
Expand Down

0 comments on commit 3ce91dc

Please sign in to comment.