Skip to content

get_host async

get_host(
    host_arn: HostArn,
    *,
    config_overrides: Optional[AsyncCodeConnectionsClientConfig] = None,
) -> GetHostOutput

Returns the host ARN and details such as status, provider type, endpoint, and, if applicable, the VPC configuration.

Parameters:

  • host_arn (HostArn) –

    The Amazon Resource Name (ARN) of the requested host.

Raises:

Source code in docs_src/capo_codeconnections/_services/async_code_connections.py
async def get_host(
    self,
    host_arn: "capo_codeconnections.types.host_arn.HostArn",
    *,
    config_overrides: Optional[AsyncCodeConnectionsClientConfig] = None,
) -> "capo_codeconnections.types.get_host_output.GetHostOutput":
    """<p>Returns the host ARN and details such as status, provider type, endpoint, and, if applicable, the VPC configuration.</p>

    Args:
        host_arn: <p>The Amazon Resource Name (ARN) of the requested host.</p>

    Raises:
        capo_codeconnections.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource not found. Verify the connection resource ARN and try again.</p>
        capo_codeconnections.errors.resource_unavailable_exception.ResourceUnavailableException: <p>Resource not found. Verify the ARN for the host resource and try again.</p>
        capo_codeconnections.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codeconnections.types.get_host_input.GetHostInput]",
    ) -> AsyncOperationResponse[
        "capo_codeconnections.types.get_host_output.GetHostOutput"
    ]:
        import capo_codeconnections._operations.code_connections_20231201.get_host

        (
            output,
            http_response,
        ) = await capo_codeconnections._operations.code_connections_20231201.get_host.async_get_host(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetHost")
    )
    input_: capo_codeconnections.types.get_host_input.GetHostInput = {
        "host_arn": host_arn
    }

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