Skip to content

get_route async

get_route(
    environment_identifier: EnvironmentId,
    application_identifier: ApplicationId,
    route_identifier: RouteId,
    *,
    config_overrides: Optional[AsyncMigrationHubRefactorSpacesClientConfig] = None,
) -> GetRouteResponse

Gets an Amazon Web Services Migration Hub Refactor Spaces route.

Parameters:

  • environment_identifier (EnvironmentId) –

    The ID of the environment.

  • application_identifier (ApplicationId) –

    The ID of the application.

  • route_identifier (RouteId) –

    The ID of the route.

Raises:

Source code in docs_src/capo_migration_hub_refactor_spaces/_services/async_migration_hub_refactor_spaces.py
async def get_route(
    self,
    environment_identifier: "capo_migration_hub_refactor_spaces.types.environment_id.EnvironmentId",
    application_identifier: "capo_migration_hub_refactor_spaces.types.application_id.ApplicationId",
    route_identifier: "capo_migration_hub_refactor_spaces.types.route_id.RouteId",
    *,
    config_overrides: Optional[AsyncMigrationHubRefactorSpacesClientConfig] = None,
) -> "capo_migration_hub_refactor_spaces.types.get_route_response.GetRouteResponse":
    """<p>Gets an Amazon Web Services Migration Hub Refactor Spaces route.</p>

    Args:
        environment_identifier: <p>The ID of the environment.</p>
        application_identifier: <p>The ID of the application. </p>
        route_identifier: <p>The ID of the route.</p>

    Raises:
        capo_migration_hub_refactor_spaces.errors.access_denied_exception.AccessDeniedException: <p>The user does not have sufficient access to perform this action. </p>
        capo_migration_hub_refactor_spaces.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred while processing the request.</p>
        capo_migration_hub_refactor_spaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource that does not exist. </p>
        capo_migration_hub_refactor_spaces.errors.throttling_exception.ThrottlingException: <p>Request was denied because the request was throttled. </p>
        capo_migration_hub_refactor_spaces.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by an Amazon Web Service. </p>
        capo_migration_hub_refactor_spaces.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_migration_hub_refactor_spaces.types.get_route_request.GetRouteRequest]",
    ) -> AsyncOperationResponse[
        "capo_migration_hub_refactor_spaces.types.get_route_response.GetRouteResponse"
    ]:
        import capo_migration_hub_refactor_spaces._operations.refactor_spaces.get_route

        (
            output,
            http_response,
        ) = await capo_migration_hub_refactor_spaces._operations.refactor_spaces.get_route.async_get_route(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_migration_hub_refactor_spaces.types.get_route_response.GetRouteResponse",
    ) -> dict[str, Any]:
        import capo_migration_hub_refactor_spaces.types.get_route_response

        return capo_migration_hub_refactor_spaces.types.get_route_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetRoute", redact_output=_redact_output)
    )
    input_: capo_migration_hub_refactor_spaces.types.get_route_request.GetRouteRequest = {
        "environment_identifier": environment_identifier,
        "application_identifier": application_identifier,
        "route_identifier": route_identifier,
    }

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