Application Programming Interface Guide > Built-in Procedures > Procedures Reference > UpdateResourceEnabled
 
UpdateResourceEnabled
Update the enabled state of a DATA_SOURCE resource.
Note: This procedure is different from the web services operation of the same name, which is in the resource tree under /services/webservices/system/admin/resource/operations/.
Location
/lib/resource/
Inputs
path: The path to the DATA_SOURCE resource.
type: The type of the resource (DATA_SOURCE).
enabled: If TRUE, enables the resource; if FALSE, disables the resource.
Outputs
N/A
Exceptions
IllegalArgumentException: If the path is malformed or the type is illegal.
IllegalStateException: If the resource type is not DATA_SOURCE.
NotFoundException: If the resource does not exist.
SecurityException: If the user does not have READ access on all items in the path other than the last one.
SecurityException: If the user does not have WRITE access to the last item in path.