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/game_lift.py
| def list_game_server_groups(
self,
*,
config_overrides: Optional[GameLiftClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_gamelift.types.list_game_server_groups_input.ListGameServerGroupsInput]",
) -> OperationResponse[
"capo_gamelift.types.list_game_server_groups_output.ListGameServerGroupsOutput"
]:
import capo_gamelift._operations.game_lift.list_game_server_groups
output, http_response = (
capo_gamelift._operations.game_lift.list_game_server_groups.list_game_server_groups(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|