stopAccessLogging method

Future<void> stopAccessLogging({
  1. required String containerName,
})

Stops access logging on the specified container. When you stop access logging on a container, MediaStore stops sending access logs to Amazon CloudWatch Logs. These access logs are not saved and are not retrievable.

May throw ContainerInUseException. May throw ContainerNotFoundException. May throw InternalServerError.

Parameter containerName : The name of the container that you want to stop access logging on.

Implementation

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