batchRevokePermissions method

Future<BatchRevokePermissionsResponse> batchRevokePermissions({
  1. required List<BatchPermissionsRequestEntry> entries,
  2. String? catalogId,
})

Batch operation to revoke permissions from the principal.

May throw InvalidInputException. May throw OperationTimeoutException.

Parameter entries : A list of up to 20 entries for resource permissions to be revoked by batch operation to the principal.

Parameter catalogId : The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

Implementation

Future<BatchRevokePermissionsResponse> batchRevokePermissions({
  required List<BatchPermissionsRequestEntry> entries,
  String? catalogId,
}) async {
  ArgumentError.checkNotNull(entries, 'entries');
  _s.validateStringLength(
    'catalogId',
    catalogId,
    1,
    255,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSLakeFormation.BatchRevokePermissions'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Entries': entries,
      if (catalogId != null) 'CatalogId': catalogId,
    },
  );

  return BatchRevokePermissionsResponse.fromJson(jsonResponse.body);
}