4.4. changeresource

The changeresource tool allows to change a resource within a given context.

4.4.1. Parameters

-h,--helpPrints a help text
--environmentShow info about commandline environment
--nonlRemove all newlines (\n) from output
-c,--contextid <integer>The id of the context
-i,--resourceid <integer>Id of this resource
-n,--name <string>The resource name
-d,--displayname <string>The resource display name
-a,--available <true/false>Toggle resource availability
-D,--description <string>Description of this resource
-e,--email <string>Email of this resource

4.4.2. Extra parameters when authentication is enabled

-A,--adminuser <string>Context Admin user name
-P,--adminpass <string>Context Admin password

4.4.3. Return value

0 on success

>0 on failure

4.4.4. Mandatory parameters

contextid {adminuser adminpass} (resourceid or name ) and at least one attribute to change

4.4.5. Command output

On success:

resource <resourceid> in context <contextid> changed

On failure:

resource <resourceid> in context <contextid> could not be changed: <reason from server>

4.4.6. Example

root@oxhe~# /opt/open-xchange/sbin/changeresource -c 123 -i 6 -D "old Laptop"

resource 6 in context 123 changed