removeAllResourcePermissions method

Future<void> removeAllResourcePermissions({
  1. required String resourceId,
  2. String? authenticationToken,
})

Removes all the permissions from the specified resource.

May throw UnauthorizedOperationException. May throw UnauthorizedResourceAccessException. May throw FailedDependencyException. May throw ServiceUnavailableException.

Parameter resourceId : The ID of the resource.

Parameter authenticationToken : Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.

Implementation

Future<void> removeAllResourcePermissions({
  required String resourceId,
  String? authenticationToken,
}) async {
  ArgumentError.checkNotNull(resourceId, 'resourceId');
  _s.validateStringLength(
    'resourceId',
    resourceId,
    1,
    128,
    isRequired: true,
  );
  _s.validateStringLength(
    'authenticationToken',
    authenticationToken,
    1,
    8199,
  );
  final headers = <String, String>{
    if (authenticationToken != null)
      'Authentication': authenticationToken.toString(),
  };
  await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/api/v1/resources/${Uri.encodeComponent(resourceId)}/permissions',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
}