Skip to content

list_game_server_groups async

list_game_server_groups(
    *,
    config_overrides: Optional[AsyncGameLiftClientConfig] = None,
    limit: Optional[PositiveInteger] = None,
    next_token: Optional[NonZeroAndMaxString] = None,
) -> ListGameServerGroupsOutput

This API works with the following fleet types: EC2 (FleetIQ)

Lists game server groups.

Parameters:

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.

  • 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/async_game_lift.py
async def list_game_server_groups(
    self,
    *,
    config_overrides: Optional[AsyncGameLiftClientConfig] = 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.list_game_server_groups_output.ListGameServerGroupsOutput"
):
    """<p> <b>This API works with the following fleet types:</b> EC2 (FleetIQ)</p> <p>Lists game server groups.</p>

    Args:
        limit: <p>The game server groups' limit.</p>
        next_token: <p>Specify the pagination token from a previous request to retrieve the next page of results.</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.unauthorized_exception.UnauthorizedException: <p>The client failed authentication. Clients should not retry such requests.</p>
        capo_gamelift.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_gamelift.types.list_game_server_groups_input.ListGameServerGroupsInput]",
    ) -> AsyncOperationResponse[
        "capo_gamelift.types.list_game_server_groups_output.ListGameServerGroupsOutput"
    ]:
        import capo_gamelift._operations.game_lift.list_game_server_groups

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListGameServerGroups")
    )
    input_: capo_gamelift.types.list_game_server_groups_input.ListGameServerGroupsInput = {}
    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