deleteAccessControlRule method

Future<void> deleteAccessControlRule({
  1. required String name,
  2. required String organizationId,
})

Deletes an access control rule for the specified WorkMail organization.

May throw OrganizationNotFoundException. May throw OrganizationStateException.

Parameter name : The name of the access control rule.

Parameter organizationId : The identifier for the organization.

Implementation

Future<void> deleteAccessControlRule({
  required String name,
  required String organizationId,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    1,
    64,
    isRequired: true,
  );
  ArgumentError.checkNotNull(organizationId, 'organizationId');
  _s.validateStringLength(
    'organizationId',
    organizationId,
    34,
    34,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'WorkMailService.DeleteAccessControlRule'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Name': name,
      'OrganizationId': organizationId,
    },
  );
}