Run on resource script
A run on resource script runs directly on the target resource that is managed by the connector.
A sample run on resource script for a connector that connects to DS over REST is provided in
- Input variables
The following variables are available to a run on resource script:
A handler to the connector’s configuration object.
A handler to the Operation Options.
An OperationType that corresponds to the action (
arguments (Map)of the script (can be
A logger instance for the connector.
Any object that is returned by the script.
import groovyx.net.http.RESTClient import org.apache.http.client.HttpClient import org.forgerock.openicf.connectors.scriptedrest.ScriptedRESTConfiguration import org.forgerock.openicf.connectors.groovy.OperationType import org.identityconnectors.common.logging.Log import org.identityconnectors.framework.common.objects.OperationOptions def operation = operation as OperationType def configuration = configuration as ScriptedRESTConfiguration def httpClient = connection as HttpClient def connection = customizedConnection as RESTClient def log = log as Log def options = options as OperationOptions def scriptArguments = scriptArguments as Map def scriptLanguage = scriptLanguage as String def scriptText = scriptText as String