deleteLogStream method

Future<void> deleteLogStream({
  1. required String logGroupName,
  2. required String logStreamName,
})

Deletes the specified log stream and permanently deletes all the archived log events associated with the log stream.

May throw InvalidParameterException. May throw ResourceNotFoundException. May throw OperationAbortedException. May throw ServiceUnavailableException.

Parameter logGroupName : The name of the log group.

Parameter logStreamName : The name of the log stream.

Implementation

Future<void> deleteLogStream({
  required String logGroupName,
  required String logStreamName,
}) async {
  ArgumentError.checkNotNull(logGroupName, 'logGroupName');
  _s.validateStringLength(
    'logGroupName',
    logGroupName,
    1,
    512,
    isRequired: true,
  );
  ArgumentError.checkNotNull(logStreamName, 'logStreamName');
  _s.validateStringLength(
    'logStreamName',
    logStreamName,
    1,
    512,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Logs_20140328.DeleteLogStream'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'logGroupName': logGroupName,
      'logStreamName': logStreamName,
    },
  );
}