updateDeliveryConfiguration method

Future<void> updateDeliveryConfiguration({
  1. required String id,
  2. String? fieldDelimiter,
  3. List<String>? recordFields,
  4. S3DeliveryConfiguration? s3DeliveryConfiguration,
})

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.

May throw AccessDeniedException. May throw ConflictException. May throw ResourceNotFoundException. May throw ServiceUnavailableException. May throw ThrottlingException. May throw ValidationException.

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

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

Parameter recordFields : 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.

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

Implementation

Future<void> updateDeliveryConfiguration({
  required String id,
  String? fieldDelimiter,
  List<String>? recordFields,
  S3DeliveryConfiguration? s3DeliveryConfiguration,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Logs_20140328.UpdateDeliveryConfiguration'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'id': id,
      if (fieldDelimiter != null) 'fieldDelimiter': fieldDelimiter,
      if (recordFields != null) 'recordFields': recordFields,
      if (s3DeliveryConfiguration != null)
        's3DeliveryConfiguration': s3DeliveryConfiguration,
    },
  );
}