Skip to content

delete_outpost

delete_outpost(
    outpost_id: OutpostId, *, config_overrides: Optional[OutpostsClientConfig] = None
) -> DeleteOutpostOutput

Deletes the specified Outpost.

Parameters:

  • outpost_id (OutpostId) –

    The ID or ARN of the Outpost.

Raises:

Source code in docs_src/capo_outposts/_services/outposts.py
def delete_outpost(
    self,
    outpost_id: "capo_outposts.types.outpost_id.OutpostId",
    *,
    config_overrides: Optional[OutpostsClientConfig] = None,
) -> "capo_outposts.types.delete_outpost_output.DeleteOutpostOutput":
    """<p>Deletes the specified Outpost.</p>

    Args:
        outpost_id: <p> The ID or ARN of the 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.
    """

    def _handler(
        req: "OperationRequest[capo_outposts.types.delete_outpost_input.DeleteOutpostInput]",
    ) -> OperationResponse[
        "capo_outposts.types.delete_outpost_output.DeleteOutpostOutput"
    ]:
        import capo_outposts._operations.outposts_olaf_service.delete_outpost

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteOutpost")
    )
    input_: capo_outposts.types.delete_outpost_input.DeleteOutpostInput = {
        "outpost_id": outpost_id
    }

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