This API works with the following fleet types: EC2, Anywhere, Container
Attempts to retrieve a fleet ID that is associated with an alias. Specify a unique alias identifier.
If the alias has a SIMPLE routing strategy, Amazon GameLift Servers returns a fleet ID. If the alias has a TERMINAL routing strategy, the result is a TerminalRoutingStrategyException.
Related actions
All APIs by task
Parameters:
-
alias_id
(Optional[AliasIdOrArn], default:
None
)
–
The unique identifier of the alias that you want to retrieve a fleet ID for. You can use either the alias ID or ARN 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.
-
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 resolve_alias(
self,
*,
config_overrides: Optional[AsyncGameLiftClientConfig] = None,
alias_id: Optional["capo_gamelift.types.alias_id_or_arn.AliasIdOrArn"] = None,
) -> "capo_gamelift.types.resolve_alias_output.ResolveAliasOutput":
"""<p> <b>This API works with the following fleet types:</b> EC2, Anywhere, Container</p> <p>Attempts to retrieve a fleet ID that is associated with an alias. Specify a unique alias identifier.</p> <p>If the alias has a <code>SIMPLE</code> routing strategy, Amazon GameLift Servers returns a fleet ID. If the alias has a <code>TERMINAL</code> routing strategy, the result is a <code>TerminalRoutingStrategyException</code>.</p> <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:
alias_id: <p>The unique identifier of the alias that you want to retrieve a fleet ID for. You can use either the alias ID or ARN 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.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_gamelift.types.resolve_alias_input.ResolveAliasInput]",
) -> AsyncOperationResponse[
"capo_gamelift.types.resolve_alias_output.ResolveAliasOutput"
]:
import capo_gamelift._operations.game_lift.resolve_alias
(
output,
http_response,
) = await capo_gamelift._operations.game_lift.resolve_alias.async_resolve_alias(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ResolveAlias")
)
input_: capo_gamelift.types.resolve_alias_input.ResolveAliasInput = {}
if alias_id is not None:
input_["alias_id"] = alias_id
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|