Skip to content

describe_game_session_details async

describe_game_session_details(
    *,
    config_overrides: Optional[AsyncGameLiftClientConfig] = None,
    fleet_id: Optional[FleetIdOrArn] = None,
    game_session_id: Optional[ArnStringModel] = None,
    alias_id: Optional[AliasIdOrArn] = None,
    location: Optional[LocationStringModel] = None,
    status_filter: Optional[NonZeroAndMaxString] = None,
    limit: Optional[PositiveInteger] = None,
    next_token: Optional[NonZeroAndMaxString] = None,
) -> DescribeGameSessionDetailsOutput

This API works with the following fleet types: EC2, Anywhere, Container

Retrieves additional game session properties, including the game session protection policy in force, for 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

Find a game session

All APIs by task

Parameters:

  • fleet_id (Optional[FleetIdOrArn], default: None ) –

    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.

  • game_session_id (Optional[ArnStringModel], default: None ) –

    An identifier for the game session that is unique across all regions to retrieve. The value is always a full ARN in the following format: For Home Region game session - arn:aws:gamelift:::gamesession//. For Remote Location game session - arn:aws:gamelift:::gamesession///.

  • alias_id (Optional[AliasIdOrArn], default: None ) –

    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.

  • location (Optional[LocationStringModel], default: None ) –

    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 us-west-2.

  • status_filter (Optional[NonZeroAndMaxString], default: None ) –

    Game session status to filter results on. Possible game session statuses include ACTIVE, TERMINATED, ACTIVATING and TERMINATING (the last two are transitory).

  • limit (Optional[PositiveInteger], default: None ) –

    The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

  • 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.

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.

  • TerminalRoutingStrategyException –

    The service is unable to resolve the routing for a particular alias because it has a terminal RoutingStrategy associated with it. The message returned in this exception is the message defined in the routing strategy itself. Such requests should only be retried if the routing strategy for the specified alias is modified.

  • UnauthorizedException –

    The client failed authentication. Clients should not retry such requests.

  • UnsupportedRegionException –

    The requested operation is not supported in the Region specified.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_gamelift/_services/async_game_lift.py
async def describe_game_session_details(
    self,
    *,
    config_overrides: Optional[AsyncGameLiftClientConfig] = None,
    fleet_id: Optional["capo_gamelift.types.fleet_id_or_arn.FleetIdOrArn"] = None,
    game_session_id: Optional[
        "capo_gamelift.types.arn_string_model.ArnStringModel"
    ] = None,
    alias_id: Optional["capo_gamelift.types.alias_id_or_arn.AliasIdOrArn"] = None,
    location: Optional[
        "capo_gamelift.types.location_string_model.LocationStringModel"
    ] = None,
    status_filter: Optional[
        "capo_gamelift.types.non_zero_and_max_string.NonZeroAndMaxString"
    ] = None,
    limit: Optional["capo_gamelift.types.positive_integer.PositiveInteger"] = None,
    next_token: Optional[
        "capo_gamelift.types.non_zero_and_max_string.NonZeroAndMaxString"
    ] = None,
) -> "capo_gamelift.types.describe_game_session_details_output.DescribeGameSessionDetailsOutput":
    """<p> <b>This API works with the following fleet types:</b> EC2, Anywhere, Container</p> <p>Retrieves additional game session properties, including the game session protection policy in force, for a set of one or more game sessions in a specific fleet location. You can optionally filter the results by current game session status.</p> <p>This operation can be used in the following ways: </p> <ul> <li> <p>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.</p> </li> <li> <p>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.</p> </li> <li> <p>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.</p> </li> </ul> <p>Use the pagination parameters to retrieve results as a set of sequential pages. </p> <p>If successful, a <code>GameSessionDetail</code> object is returned for each game session that matches the request.</p> <p> <b>Learn more</b> </p> <p> <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-client-api.html#gamelift-sdk-client-api-find">Find a game session</a> </p> <p> <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-awssdk.html#reference-awssdk-resources-fleets">All APIs by task</a> </p>

    Args:
        fleet_id: <p>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.</p>
        game_session_id: <p>An identifier for the game session that is unique across all regions to retrieve. The value is always a full ARN in the following format: For Home Region game session - <code>arn:aws:gamelift:<home_region>::gamesession/<fleet ID>/<ID string></code>. For Remote Location game session - <code>arn:aws:gamelift:<home_region>::gamesession/<fleet ID>/<location>/<ID string></code>.</p>
        alias_id: <p>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.</p>
        location: <p>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 <code>us-west-2</code>. </p>
        status_filter: <p>Game session status to filter results on. Possible game session statuses include <code>ACTIVE</code>, <code>TERMINATED</code>, <code>ACTIVATING</code> and <code>TERMINATING</code> (the last two are transitory). </p>
        limit: <p>The maximum number of results to return. Use this parameter with <code>NextToken</code> to get results as a set of sequential pages.</p>
        next_token: <p>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.</p>

    Raises:
        capo_gamelift.errors.internal_service_exception.InternalServiceException: <p>The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.</p>
        capo_gamelift.errors.invalid_request_exception.InvalidRequestException: <p>One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.</p>
        capo_gamelift.errors.not_found_exception.NotFoundException: <p>The requested resource was not found. The resource was either not created yet or deleted.</p>
        capo_gamelift.errors.terminal_routing_strategy_exception.TerminalRoutingStrategyException: <p>The service is unable to resolve the routing for a particular alias because it has a terminal <code>RoutingStrategy</code> associated with it. The message returned in this exception is the message defined in the routing strategy itself. Such requests should only be retried if the routing strategy for the specified alias is modified. </p>
        capo_gamelift.errors.unauthorized_exception.UnauthorizedException: <p>The client failed authentication. Clients should not retry such requests.</p>
        capo_gamelift.errors.unsupported_region_exception.UnsupportedRegionException: <p>The requested operation is not supported in the Region specified.</p>
        capo_gamelift.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_gamelift.types.describe_game_session_details_input.DescribeGameSessionDetailsInput]",
    ) -> AsyncOperationResponse[
        "capo_gamelift.types.describe_game_session_details_output.DescribeGameSessionDetailsOutput"
    ]:
        import capo_gamelift._operations.game_lift.describe_game_session_details

        (
            output,
            http_response,
        ) = await capo_gamelift._operations.game_lift.describe_game_session_details.async_describe_game_session_details(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_gamelift.types.describe_game_session_details_output.DescribeGameSessionDetailsOutput",
    ) -> dict[str, Any]:
        import capo_gamelift.types.describe_game_session_details_output

        return capo_gamelift.types.describe_game_session_details_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "DescribeGameSessionDetails", redact_output=_redact_output
        ),
    )
    input_: capo_gamelift.types.describe_game_session_details_input.DescribeGameSessionDetailsInput = {}
    if fleet_id is not None:
        input_["fleet_id"] = fleet_id
    if game_session_id is not None:
        input_["game_session_id"] = game_session_id
    if alias_id is not None:
        input_["alias_id"] = alias_id
    if location is not None:
        input_["location"] = location
    if status_filter is not None:
        input_["status_filter"] = status_filter
    if limit is not None:
        input_["limit"] = limit
    if next_token is not None:
        input_["next_token"] = next_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output