describe_player_sessions
¶
describe_player_sessions(
*,
config_overrides: Optional[GameLiftClientConfig] = None,
game_session_id: Optional[ArnStringModel] = None,
player_id: Optional[PlayerId] = None,
player_session_id: Optional[PlayerSessionId] = None,
player_session_status_filter: Optional[NonZeroAndMaxString] = None,
limit: Optional[PositiveInteger] = None,
next_token: Optional[NonZeroAndMaxString] = None,
) -> DescribePlayerSessionsOutput
This API works with the following fleet types: EC2, Anywhere, Container
Retrieves properties for one or more player sessions.
This action can be used in the following ways:
-
To retrieve a specific player session, provide the player session ID only.
-
To retrieve all player sessions in a game session, provide the game session ID only.
-
To retrieve all player sessions for a specific player, provide a player ID only.
To request player sessions, specify either a player session ID, game session ID, or player ID. You can filter this request by player session status. If you provide a specific PlayerSessionId or PlayerId, Amazon GameLift Servers ignores the filter criteria. Use the pagination parameters to retrieve results as a set of sequential pages.
If successful, a PlayerSession object is returned for each session that matches the request.
Related actions
Parameters:
-
game_session_id(Optional[ArnStringModel], default:None) –An identifier for the game session that is unique across all regions to retrieve player sessions for. The value is always a full ARN in the following format: For Home Region game session -
arn:aws:gamelift:. For Remote Location game session -::gamesession/ / arn:aws:gamelift:.::gamesession/ / / -
player_id(Optional[PlayerId], default:None) –A unique identifier for a player to retrieve player sessions for.
-
player_session_id(Optional[PlayerSessionId], default:None) –A unique identifier for a player session to retrieve.
-
player_session_status_filter(Optional[NonZeroAndMaxString], default:None) –Player session status to filter results on. Note that when a PlayerSessionId or PlayerId is provided in a DescribePlayerSessions request, then the PlayerSessionStatusFilter has no effect on the response.
Possible player session statuses include the following:
-
RESERVED -- The player session request has been received, but the player has not yet connected to the server process and/or been validated.
-
ACTIVE -- The player has been validated by the server process and is currently connected.
-
COMPLETED -- The player connection has been dropped.
-
TIMEDOUT -- A player session request was received, but the player did not connect and/or was not validated within the timeout limit (60 seconds).
-
-
limit(Optional[PositiveInteger], default:None) –The maximum number of results to return. Use this parameter with
NextTokento get results as a set of sequential pages. If a player session ID is specified, this parameter is ignored. -
next_token(Optional[NonZeroAndMaxString], default:None) –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. If a player session ID is specified, this parameter is ignored.
Raises:
-
InternalServiceException–The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.
-
InvalidRequestException–One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.
-
NotFoundException–The requested resource was not found. The resource was either not created yet or deleted.
-
UnauthorizedException–The client failed authentication. Clients should not retry such requests.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_gamelift/_services/game_lift.py
5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 | |