Skip to content

describe_matchmaking async

describe_matchmaking(
    *,
    config_overrides: Optional[AsyncGameLiftClientConfig] = None,
    ticket_ids: Optional[MatchmakingIdList] = None,
) -> DescribeMatchmakingOutput

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

Retrieves one or more matchmaking tickets. Use this operation to retrieve ticket information, including--after a successful match is made--connection information for the resulting new game session.

To request matchmaking tickets, provide a list of up to 10 ticket IDs. If the request is successful, a ticket object is returned for each requested ID that currently exists.

This operation is not designed to be continually called to track matchmaking ticket status. This practice can cause you to exceed your API limit, which results in errors. Instead, as a best practice, set up an Amazon Simple Notification Service to receive notifications, and provide the topic ARN in the matchmaking configuration.

Learn more

Add FlexMatch to a game client

Set Up FlexMatch event notification

Parameters:

  • ticket_ids (Optional[MatchmakingIdList], default: None ) –

    A unique identifier for a matchmaking ticket. You can include up to 10 ID values.

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.

  • 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_matchmaking(
    self,
    *,
    config_overrides: Optional[AsyncGameLiftClientConfig] = None,
    ticket_ids: Optional[
        "capo_gamelift.types.matchmaking_id_list.MatchmakingIdList"
    ] = None,
) -> "capo_gamelift.types.describe_matchmaking_output.DescribeMatchmakingOutput":
    """<p> <b>This API works with the following fleet types:</b> EC2, Anywhere, Container</p> <p>Retrieves one or more matchmaking tickets. Use this operation to retrieve ticket information, including--after a successful match is made--connection information for the resulting new game session. </p> <p>To request matchmaking tickets, provide a list of up to 10 ticket IDs. If the request is successful, a ticket object is returned for each requested ID that currently exists.</p> <p>This operation is not designed to be continually called to track matchmaking ticket status. This practice can cause you to exceed your API limit, which results in errors. Instead, as a best practice, set up an Amazon Simple Notification Service to receive notifications, and provide the topic ARN in the matchmaking configuration.</p> <p></p> <p> <b>Learn more</b> </p> <p> <a href="https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-client.html"> Add FlexMatch to a game client</a> </p> <p> <a href="https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-notification.html"> Set Up FlexMatch event notification</a> </p>

    Args:
        ticket_ids: <p>A unique identifier for a matchmaking ticket. You can include up to 10 ID values. </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.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_matchmaking_input.DescribeMatchmakingInput]",
    ) -> AsyncOperationResponse[
        "capo_gamelift.types.describe_matchmaking_output.DescribeMatchmakingOutput"
    ]:
        import capo_gamelift._operations.game_lift.describe_matchmaking

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

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

        return capo_gamelift.types.describe_matchmaking_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("DescribeMatchmaking", redact_output=_redact_output),
    )
    input_: capo_gamelift.types.describe_matchmaking_input.DescribeMatchmakingInput = {}
    if ticket_ids is not None:
        input_["ticket_ids"] = ticket_ids

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