Signature

global static void unshareResources(
  List<Types.UnshareResourceInput> unshareResourceInputs,
  String library,
  String runAs
)
Parameters
ParameterDescription
unshareResourceInputs requiredList of Types.UnshareResourceInput entries — one per resource to unshare from the community.
library
String
requiredType of library (for example, sharepoint). You can get this value from the Content Library.
runAs
String
optionalEmail Id of the user on whose behalf the function should run. To run the action as the automation user, supply integrationUser.

Return Type

void

Example

List<cldfs.Types.UnshareResourceInput> unshareResourceInputs = new List<cldfs.Types.UnshareResourceInput> {
    new cldfs.Types.UnshareResourceInput(
        '01KEHAKUXVID7NMSLZINGKUXGQ3SIT75CM',
        'file',
        '001dL00000Wonj3QAB'
    )
};
cldfs.Client.unshareResources(unshareResourceInputs, 'sharepoint', 'integrationUser');
Method nameThis page is titled Remove from Community, but the underlying Apex method is Client.unshareResources(), invoked as cldfs.Client.unshareResources(...).