Skip to content

get_site_address

get_site_address(
    site_id: SiteId,
    address_type: AddressType,
    *,
    config_overrides: Optional[OutpostsClientConfig] = None,
) -> GetSiteAddressOutput

Gets the site address of the specified site.

Parameters:

  • site_id (SiteId) –

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

  • address_type (AddressType) –

    The type of the address you request.

Raises:

Source code in docs_src/capo_outposts/_services/outposts.py
def get_site_address(
    self,
    site_id: "capo_outposts.types.site_id.SiteId",
    address_type: "capo_outposts.types.address_type.AddressType",
    *,
    config_overrides: Optional[OutpostsClientConfig] = None,
) -> "capo_outposts.types.get_site_address_output.GetSiteAddressOutput":
    """<p> Gets the site address of the specified site. </p>

    Args:
        site_id: <p> The ID or the Amazon Resource Name (ARN) of the site. </p>
        address_type: <p>The type of the address you request. </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.
    """

    def _handler(
        req: "OperationRequest[capo_outposts.types.get_site_address_input.GetSiteAddressInput]",
    ) -> OperationResponse[
        "capo_outposts.types.get_site_address_output.GetSiteAddressOutput"
    ]:
        import capo_outposts._operations.outposts_olaf_service.get_site_address

        output, http_response = (
            capo_outposts._operations.outposts_olaf_service.get_site_address.get_site_address(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_outposts.types.get_site_address_output.GetSiteAddressOutput",
    ) -> dict[str, Any]:
        import capo_outposts.types.get_site_address_output

        return capo_outposts.types.get_site_address_output.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetSiteAddress", redact_output=_redact_output),
    )
    input_: capo_outposts.types.get_site_address_input.GetSiteAddressInput = {
        "site_id": site_id,
        "address_type": address_type,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output