This API works with the following fleet types: EC2, Anywhere, Container
Retrieves all aliases for this Amazon Web Services account. You can filter the result set by alias name and/or routing strategy type. Use the pagination parameters to retrieve results in sequential pages.
Returned aliases are not listed in any particular order.
Related actions
All APIs by task
Parameters:
-
routing_strategy_type
(Optional[RoutingStrategyType], default:
None
)
–
The routing type to filter results on. Use this parameter to retrieve only aliases with a certain routing type. To retrieve all aliases, leave this parameter empty.
Possible routing types include the following:
-
SIMPLE -- The alias resolves to one specific fleet. Use this type when routing to active fleets.
-
TERMINAL -- The alias does not resolve to a fleet but instead can be used to display a message to the user. A terminal alias throws a TerminalRoutingStrategyException with the RoutingStrategy message embedded.
-
name
(Optional[NonEmptyString], default:
None
)
–
A descriptive label that is associated with an alias. Alias names do not need to be unique.
-
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[NonEmptyString], 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.
-
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_aliases(
self,
*,
config_overrides: Optional[AsyncGameLiftClientConfig] = None,
routing_strategy_type: Optional[
"capo_gamelift.types.routing_strategy_type.RoutingStrategyType"
] = None,
name: Optional["capo_gamelift.types.non_empty_string.NonEmptyString"] = None,
limit: Optional["capo_gamelift.types.positive_integer.PositiveInteger"] = None,
next_token: Optional[
"capo_gamelift.types.non_empty_string.NonEmptyString"
] = None,
) -> "capo_gamelift.types.list_aliases_output.ListAliasesOutput":
"""<p> <b>This API works with the following fleet types:</b> EC2, Anywhere, Container</p> <p>Retrieves all aliases for this Amazon Web Services account. You can filter the result set by alias name and/or routing strategy type. Use the pagination parameters to retrieve results in sequential pages.</p> <note> <p>Returned aliases are not listed in any particular order.</p> </note> <p> <b>Related actions</b> </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:
routing_strategy_type: <p>The routing type to filter results on. Use this parameter to retrieve only aliases with a certain routing type. To retrieve all aliases, leave this parameter empty.</p> <p>Possible routing types include the following:</p> <ul> <li> <p> <b>SIMPLE</b> -- The alias resolves to one specific fleet. Use this type when routing to active fleets.</p> </li> <li> <p> <b>TERMINAL</b> -- The alias does not resolve to a fleet but instead can be used to display a message to the user. A terminal alias throws a TerminalRoutingStrategyException with the <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_RoutingStrategy.html">RoutingStrategy</a> message embedded.</p> </li> </ul>
name: <p>A descriptive label that is associated with an alias. Alias names do not need to be unique.</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.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_aliases_input.ListAliasesInput]",
) -> AsyncOperationResponse[
"capo_gamelift.types.list_aliases_output.ListAliasesOutput"
]:
import capo_gamelift._operations.game_lift.list_aliases
(
output,
http_response,
) = await capo_gamelift._operations.game_lift.list_aliases.async_list_aliases(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListAliases")
)
input_: capo_gamelift.types.list_aliases_input.ListAliasesInput = {}
if routing_strategy_type is not None:
input_["routing_strategy_type"] = routing_strategy_type
if name is not None:
input_["name"] = name
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
|