lockRule method

Future<LockRuleResponse> lockRule({
  1. required String identifier,
  2. required LockConfiguration lockConfiguration,
})

Locks a Region-level retention rule. A locked retention rule can't be modified or deleted.

May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter identifier : The unique ID of the retention rule.

Parameter lockConfiguration : Information about the retention rule lock configuration.

Implementation

Future<LockRuleResponse> lockRule({
  required String identifier,
  required LockConfiguration lockConfiguration,
}) async {
  final $payload = <String, dynamic>{
    'LockConfiguration': lockConfiguration,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri: '/rules/${Uri.encodeComponent(identifier)}/lock',
    exceptionFnMap: _exceptionFns,
  );
  return LockRuleResponse.fromJson(response);
}