updateRealtimeLogConfig2020_05_31 method

Future<UpdateRealtimeLogConfigResult> updateRealtimeLogConfig2020_05_31({
  1. String? arn,
  2. List<EndPoint>? endPoints,
  3. List<String>? fields,
  4. String? name,
  5. int? samplingRate,
})

Updates a real-time log configuration.

When you update a real-time log configuration, all the parameters are updated with the values provided in the request. You cannot update some parameters independent of others. To update a real-time log configuration:

  1. Call GetRealtimeLogConfig to get the current real-time log configuration.
  2. Locally modify the parameters in the real-time log configuration that you want to update.
  3. Call this API (UpdateRealtimeLogConfig) by providing the entire real-time log configuration, including the parameters that you modified and those that you didn’t.
You cannot update a real-time log configuration’s Name or ARN.

May throw NoSuchRealtimeLogConfig. May throw InvalidArgument. May throw AccessDenied.

Parameter arn : The Amazon Resource Name (ARN) for this real-time log configuration.

Parameter endPoints : Contains information about the Amazon Kinesis data stream where you are sending real-time log data.

Parameter fields : A list of fields to include in each real-time log record.

For more information about fields, see Real-time log configuration fields in the Amazon CloudFront Developer Guide.

Parameter name : The name for this real-time log configuration.

Parameter samplingRate : The sampling rate for this real-time log configuration. The sampling rate determines the percentage of viewer requests that are represented in the real-time log data. You must provide an integer between 1 and 100, inclusive.

Implementation

Future<UpdateRealtimeLogConfigResult> updateRealtimeLogConfig2020_05_31({
  String? arn,
  List<EndPoint>? endPoints,
  List<String>? fields,
  String? name,
  int? samplingRate,
}) async {
  final $result = await _protocol.send(
    method: 'PUT',
    requestUri: '/2020-05-31/realtime-log-config/',
    payload: UpdateRealtimeLogConfigRequest(
            arn: arn,
            endPoints: endPoints,
            fields: fields,
            name: name,
            samplingRate: samplingRate)
        .toXml(
      'UpdateRealtimeLogConfigRequest',
      attributes: [
        _s.XmlAttribute(_s.XmlName('xmlns'),
            'http://cloudfront.amazonaws.com/doc/2020-05-31/'),
      ],
    ),
    exceptionFnMap: _exceptionFns,
  );
  return UpdateRealtimeLogConfigResult.fromXml($result.body);
}