Skip to content

delete_delivery

delete_delivery(
    id: DeliveryId, *, config_overrides: Optional[CloudWatchLogsClientConfig] = None
) -> None

Deletes a delivery. A delivery is a connection between a logical delivery source and a logical delivery destination. Deleting a delivery only deletes the connection between the delivery source and delivery destination. It does not delete the delivery destination or the delivery source.

Parameters:

Raises:

Source code in docs_src/capo_cloudwatch_logs/_services/cloud_watch_logs.py
def delete_delivery(
    self,
    id: "capo_cloudwatch_logs.types.delivery_id.DeliveryId",
    *,
    config_overrides: Optional[CloudWatchLogsClientConfig] = None,
) -> None:
    """<p>Deletes a <i>delivery</i>. A delivery is a connection between a logical <i>delivery source</i> and a logical <i>delivery destination</i>. Deleting a delivery only deletes the connection between the delivery source and delivery destination. It does not delete the delivery destination or the delivery source.</p>

    Args:
        id: <p>The unique ID of the delivery to delete. You can find the ID of a delivery with the <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeDeliveries.html">DescribeDeliveries</a> operation.</p>

    Raises:
        capo_cloudwatch_logs.errors.conflict_exception.ConflictException: <p>This operation attempted to create a resource that already exists.</p>
        capo_cloudwatch_logs.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
        capo_cloudwatch_logs.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>This request exceeds a service quota.</p>
        capo_cloudwatch_logs.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service cannot complete the request.</p>
        capo_cloudwatch_logs.errors.throttling_exception.ThrottlingException: <p>The request was throttled because of quota limits.</p>
        capo_cloudwatch_logs.errors.validation_exception.ValidationException: <p>One of the parameters for the request is not valid.</p>
        capo_cloudwatch_logs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_cloudwatch_logs.types.delete_delivery_request.DeleteDeliveryRequest]",
    ) -> OperationResponse[None]:
        import capo_cloudwatch_logs._operations.logs_20140328.delete_delivery

        output, http_response = (
            capo_cloudwatch_logs._operations.logs_20140328.delete_delivery.delete_delivery(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteDelivery")
    )
    input_: capo_cloudwatch_logs.types.delete_delivery_request.DeleteDeliveryRequest = {
        "id": id
    }

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