- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DescribeGameSessionDetailsCommand
Retrieves additional game session properties, including the game session protection policy in force, a set of one or more game sessions in a specific fleet location. You can optionally filter the results by current game session status.
This operation can be used in the following ways:
-
To retrieve details for all game sessions that are currently running on all locations in a fleet, provide a fleet or alias ID, with an optional status filter. This approach returns details from the fleet's home Region and all remote locations.
-
To retrieve details for all game sessions that are currently running on a specific fleet location, provide a fleet or alias ID and a location name, with optional status filter. The location can be the fleet's home Region or any remote location.
-
To retrieve details for a specific game session, provide the game session ID. This approach looks for the game session ID in all fleets that reside in the Amazon Web Services Region defined in the request.
Use the pagination parameters to retrieve results as a set of sequential pages.
If successful, a GameSessionDetail
object is returned for each game session that matches the request.
Learn more
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { GameLiftClient, DescribeGameSessionDetailsCommand } from "@aws-sdk/client-gamelift"; // ES Modules import
// const { GameLiftClient, DescribeGameSessionDetailsCommand } = require("@aws-sdk/client-gamelift"); // CommonJS import
const client = new GameLiftClient(config);
const input = { // DescribeGameSessionDetailsInput
FleetId: "STRING_VALUE",
GameSessionId: "STRING_VALUE",
AliasId: "STRING_VALUE",
Location: "STRING_VALUE",
StatusFilter: "STRING_VALUE",
Limit: Number("int"),
NextToken: "STRING_VALUE",
};
const command = new DescribeGameSessionDetailsCommand(input);
const response = await client.send(command);
// { // DescribeGameSessionDetailsOutput
// GameSessionDetails: [ // GameSessionDetailList
// { // GameSessionDetail
// GameSession: { // GameSession
// GameSessionId: "STRING_VALUE",
// Name: "STRING_VALUE",
// FleetId: "STRING_VALUE",
// FleetArn: "STRING_VALUE",
// CreationTime: new Date("TIMESTAMP"),
// TerminationTime: new Date("TIMESTAMP"),
// CurrentPlayerSessionCount: Number("int"),
// MaximumPlayerSessionCount: Number("int"),
// Status: "ACTIVE" || "ACTIVATING" || "TERMINATED" || "TERMINATING" || "ERROR",
// StatusReason: "INTERRUPTED" || "TRIGGERED_ON_PROCESS_TERMINATE" || "FORCE_TERMINATED",
// GameProperties: [ // GamePropertyList
// { // GameProperty
// Key: "STRING_VALUE", // required
// Value: "STRING_VALUE", // required
// },
// ],
// IpAddress: "STRING_VALUE",
// DnsName: "STRING_VALUE",
// Port: Number("int"),
// PlayerSessionCreationPolicy: "ACCEPT_ALL" || "DENY_ALL",
// CreatorId: "STRING_VALUE",
// GameSessionData: "STRING_VALUE",
// MatchmakerData: "STRING_VALUE",
// Location: "STRING_VALUE",
// },
// ProtectionPolicy: "NoProtection" || "FullProtection",
// },
// ],
// NextToken: "STRING_VALUE",
// };
DescribeGameSessionDetailsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
AliasId | string | undefined | A unique identifier for the alias associated with the fleet to retrieve all game sessions for. You can use either the alias ID or ARN value. |
FleetId | string | undefined | A unique identifier for the fleet to retrieve all game sessions active on the fleet. You can use either the fleet ID or ARN value. |
GameSessionId | string | undefined | A unique identifier for the game session to retrieve. |
Limit | number | undefined | The maximum number of results to return. Use this parameter with |
Location | string | undefined | A fleet location to get game session details for. You can specify a fleet's home Region or a remote location. Use the Amazon Web Services Region code format, such as |
NextToken | string | undefined | A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value. |
StatusFilter | string | undefined | Game session status to filter results on. Possible game session statuses include |
DescribeGameSessionDetailsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
GameSessionDetails | GameSessionDetail[] | undefined | A collection of properties for each game session that matches the request. |
NextToken | string | undefined | A token that indicates where to resume retrieving results on the next call to this operation. If no token is returned, these results represent the end of the list. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServiceException | server | The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period. |
InvalidRequestException | client | One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying. |
NotFoundException | client | The requested resources was not found. The resource was either not created yet or deleted. |
TerminalRoutingStrategyException | client | The service is unable to resolve the routing for a particular alias because it has a terminal |
UnauthorizedException | client | The client failed authentication. Clients should not retry such requests. |
UnsupportedRegionException | client | The requested operation is not supported in the Region specified. |
GameLiftServiceException | Base exception class for all service exceptions from GameLift service. |