4.2. deleteresource

The deleteresource tool allows to delete a resource within a given context.

4.2.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

4.2.2. Extra parameters when authentication is enabled

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

4.2.3. Return value

0 on success

>0 on failure

4.2.4. Mandatory parameters

contextid {adminuser adminpass} (name or resourceid)

4.2.5. Command output

On success:

resource <resourceid> in context <contextid> deleted

On failure:

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

4.2.6. Example

root@oxhe~# /opt/open-xchange/sbin/deleteresource -c 123 -i 6

resource 6 in context 123 deleted