UNPKG

@pnp/cli-microsoft365

Version:

Manage Microsoft 365 and SharePoint Framework projects on any platform

28 lines 983 B
import { odata } from '../../../../utils/odata.js'; import GraphCommand from '../../../base/GraphCommand.js'; import commands from '../../commands.js'; class PurviewRetentionEventListCommand extends GraphCommand { get name() { return commands.RETENTIONEVENT_LIST; } get description() { return 'Get a list of retention events'; } defaultProperties() { return ['id', 'displayName', 'eventTriggerDateTime']; } async commandAction(logger) { try { if (this.verbose) { await logger.logToStderr('Retrieving Purview retention events'); } const items = await odata.getAllItems(`${this.resource}/v1.0/security/triggers/retentionEvents`); await logger.log(items); } catch (err) { this.handleRejectedODataJsonPromise(err); } } } export default new PurviewRetentionEventListCommand(); //# sourceMappingURL=retentionevent-list.js.map