Skip to content

update_outpost async

update_outpost(
    outpost_id: OutpostId,
    *,
    config_overrides: Optional[AsyncOutpostsClientConfig] = None,
    name: Optional[OutpostName] = None,
    description: Optional[OutpostDescription] = None,
    supported_hardware_type: Optional[SupportedHardwareType] = None,
) -> UpdateOutpostOutput

Updates an Outpost.

Parameters:

Raises:

Source code in docs_src/capo_outposts/_services/async_outposts.py
async def update_outpost(
    self,
    outpost_id: "capo_outposts.types.outpost_id.OutpostId",
    *,
    config_overrides: Optional[AsyncOutpostsClientConfig] = None,
    name: Optional["capo_outposts.types.outpost_name.OutpostName"] = None,
    description: Optional[
        "capo_outposts.types.outpost_description.OutpostDescription"
    ] = None,
    supported_hardware_type: Optional[
        "capo_outposts.types.supported_hardware_type.SupportedHardwareType"
    ] = None,
) -> "capo_outposts.types.update_outpost_output.UpdateOutpostOutput":
    """<p> Updates an Outpost. </p>

    Args:
        outpost_id: <p> The ID or ARN of the Outpost. </p>
        supported_hardware_type: <p> The type of hardware for this Outpost. </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_outpost_input.UpdateOutpostInput]",
    ) -> AsyncOperationResponse[
        "capo_outposts.types.update_outpost_output.UpdateOutpostOutput"
    ]:
        import capo_outposts._operations.outposts_olaf_service.update_outpost

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateOutpost")
    )
    input_: capo_outposts.types.update_outpost_input.UpdateOutpostInput = {
        "outpost_id": outpost_id
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if supported_hardware_type is not None:
        input_["supported_hardware_type"] = supported_hardware_type

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