Skip to content

get_site async

get_site(
    site_id: SiteId, *, config_overrides: Optional[AsyncOutpostsClientConfig] = None
) -> GetSiteOutput

Gets information about the specified Outpost site.

Parameters:

  • site_id (SiteId) –

    The ID or the Amazon Resource Name (ARN) of the site.

Raises:

Source code in docs_src/capo_outposts/_services/async_outposts.py
async def get_site(
    self,
    site_id: "capo_outposts.types.site_id.SiteId",
    *,
    config_overrides: Optional[AsyncOutpostsClientConfig] = None,
) -> "capo_outposts.types.get_site_output.GetSiteOutput":
    """<p>Gets information about the specified Outpost site.</p>

    Args:
        site_id: <p> The ID or the Amazon Resource Name (ARN) of the site. </p>

    Raises:
        capo_outposts.errors.access_denied_exception.AccessDeniedException: <p>You do not have permission to perform this operation.</p>
        capo_outposts.errors.internal_server_exception.InternalServerException: <p>An internal error has occurred.</p>
        capo_outposts.errors.not_found_exception.NotFoundException: <p>The specified request is not valid.</p>
        capo_outposts.errors.validation_exception.ValidationException: <p>A parameter is not valid.</p>
        capo_outposts.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_outposts.types.get_site_input.GetSiteInput]",
    ) -> AsyncOperationResponse[
        "capo_outposts.types.get_site_output.GetSiteOutput"
    ]:
        import capo_outposts._operations.outposts_olaf_service.get_site

        (
            output,
            http_response,
        ) = await capo_outposts._operations.outposts_olaf_service.get_site.async_get_site(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetSite")
    )
    input_: capo_outposts.types.get_site_input.GetSiteInput = {"site_id": site_id}

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