deleteLifecyclePolicy method

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

Removes an object lifecycle policy from a container. It takes up to 20 minutes for the change to take effect.

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

Parameter containerName : The name of the container that holds the object lifecycle policy.

Implementation

Future<void> deleteLifecyclePolicy({
  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.DeleteLifecyclePolicy'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ContainerName': containerName,
    },
  );
}