Skip to content

update_site_address async

update_site_address(
    site_id: SiteId,
    address_type: AddressType,
    address: Address,
    *,
    config_overrides: Optional[AsyncOutpostsClientConfig] = None,
) -> UpdateSiteAddressOutput

Updates the address of the specified site.

You can't update a site address if there is an order in progress. You must wait for the order to complete or cancel the order.

You can update the operating address before you place an order at the site, or after all Outposts that belong to the site have been deactivated.

Parameters:

  • site_id (SiteId) –

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

  • address_type (AddressType) –

    The type of the address.

  • address (Address) –

    The address for the site.

Raises:

Source code in docs_src/capo_outposts/_services/async_outposts.py
async def update_site_address(
    self,
    site_id: "capo_outposts.types.site_id.SiteId",
    address_type: "capo_outposts.types.address_type.AddressType",
    address: "capo_outposts.types.address.Address",
    *,
    config_overrides: Optional[AsyncOutpostsClientConfig] = None,
) -> "capo_outposts.types.update_site_address_output.UpdateSiteAddressOutput":
    """<p>Updates the address of the specified site.</p> <p>You can't update a site address if there is an order in progress. You must wait for the order to complete or cancel the order.</p> <p>You can update the operating address before you place an order at the site, or after all Outposts that belong to the site have been deactivated.</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. </p>
        address: <p> The address for 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.conflict_exception.ConflictException: <p>Updating or deleting this resource can cause an inconsistent state.</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.update_site_address_input.UpdateSiteAddressInput]",
    ) -> AsyncOperationResponse[
        "capo_outposts.types.update_site_address_output.UpdateSiteAddressOutput"
    ]:
        import capo_outposts._operations.outposts_olaf_service.update_site_address

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

    def _redact_input(
        input_: "capo_outposts.types.update_site_address_input.UpdateSiteAddressInput",
    ) -> dict[str, Any]:
        import capo_outposts.types.update_site_address_input

        return capo_outposts.types.update_site_address_input.redact_sensitive(
            input_
        )

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

        return capo_outposts.types.update_site_address_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateSiteAddress",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_outposts.types.update_site_address_input.UpdateSiteAddressInput = {
        "site_id": site_id,
        "address_type": address_type,
        "address": address,
    }

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