Skip to content

update_delivery_configuration

update_delivery_configuration(
    id: DeliveryId,
    *,
    config_overrides: Optional[CloudWatchLogsClientConfig] = None,
    record_fields: Optional[RecordFields] = None,
    field_delimiter: Optional[FieldDelimiter] = None,
    s3_delivery_configuration: Optional[S3DeliveryConfiguration] = None,
) -> UpdateDeliveryConfigurationResponse

Use this operation to update the configuration of a delivery to change either the S3 path pattern or the format of the delivered logs. You can't use this operation to change the source or destination of the delivery.

Parameters:

  • id (DeliveryId) –

    The ID of the delivery to be updated by this request.

  • record_fields (Optional[RecordFields], default: None ) –

    The list of record fields to be delivered to the destination, in order. If the delivery's log source has mandatory fields, they must be included in this list.

  • field_delimiter (Optional[FieldDelimiter], default: None ) –

    The field delimiter to use between record fields when the final output format of a delivery is in Plain, W3C, or Raw format.

  • s3_delivery_configuration (Optional[S3DeliveryConfiguration], default: None ) –

    This structure contains parameters that are valid only when the delivery's delivery destination is an S3 bucket.

Raises:

Source code in docs_src/capo_cloudwatch_logs/_services/cloud_watch_logs.py
def update_delivery_configuration(
    self,
    id: "capo_cloudwatch_logs.types.delivery_id.DeliveryId",
    *,
    config_overrides: Optional[CloudWatchLogsClientConfig] = None,
    record_fields: Optional[
        "capo_cloudwatch_logs.types.record_fields.RecordFields"
    ] = None,
    field_delimiter: Optional[
        "capo_cloudwatch_logs.types.field_delimiter.FieldDelimiter"
    ] = None,
    s3_delivery_configuration: Optional[
        "capo_cloudwatch_logs.types.s3_delivery_configuration.S3DeliveryConfiguration"
    ] = None,
) -> "capo_cloudwatch_logs.types.update_delivery_configuration_response.UpdateDeliveryConfigurationResponse":
    """<p>Use this operation to update the configuration of a <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_Delivery.html">delivery</a> to change either the S3 path pattern or the format of the delivered logs. You can't use this operation to change the source or destination of the delivery.</p>

    Args:
        id: <p>The ID of the delivery to be updated by this request.</p>
        record_fields: <p>The list of record fields to be delivered to the destination, in order. If the delivery's log source has mandatory fields, they must be included in this list.</p>
        field_delimiter: <p>The field delimiter to use between record fields when the final output format of a delivery is in <code>Plain</code>, <code>W3C</code>, or <code>Raw</code> format.</p>
        s3_delivery_configuration: <p>This structure contains parameters that are valid only when the delivery's delivery destination is an S3 bucket.</p>

    Raises:
        capo_cloudwatch_logs.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient permissions to perform this action.</p>
        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_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.update_delivery_configuration_request.UpdateDeliveryConfigurationRequest]",
    ) -> OperationResponse[
        "capo_cloudwatch_logs.types.update_delivery_configuration_response.UpdateDeliveryConfigurationResponse"
    ]:
        import capo_cloudwatch_logs._operations.logs_20140328.update_delivery_configuration

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateDeliveryConfiguration")
    )
    input_: capo_cloudwatch_logs.types.update_delivery_configuration_request.UpdateDeliveryConfigurationRequest = {
        "id": id
    }
    if record_fields is not None:
        input_["record_fields"] = record_fields
    if field_delimiter is not None:
        input_["field_delimiter"] = field_delimiter
    if s3_delivery_configuration is not None:
        input_["s3_delivery_configuration"] = s3_delivery_configuration

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