deleteresource

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

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

Extra parameters when authentication is enabled

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

Return value

0 on success

>0 on failure

Mandatory parameters

contextid {adminuser adminpass} (name or resourceid)

Command output

On success:

resource <resourceid> in context <contextid> deleted

On failure:

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

Example

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

resource 6 in context 123 deleted