This command modifies a dynamic resource group.
resourcegroups update -h
resourcegroups update -n <group_name> [-d <description>] -c <criteria>
-t <group_type> [-u <UUID>] [-v <filter>]
Parameters | Required / Optional | Type | Description | ||
---|---|---|---|---|---|
criteria | Required if type is dynamic |
Object | (Dynamic groups only) Information about a simple criteria object
or criteria set that select which managed devices are members of the
dynamic group Simple criteria is a query (logical rule) that compares property
values. The following example selects managed devices whose contact
is John@company.com.
A criteria set is the
root of the tree structure that defines how the simple criteria are
logically combined, using Boolean AND and OR relationships. The following
example shows a criteria set that logically combines two simple criteria
with an AND relationship. It selects managed devices whose contact
is John@company.com and are in the Critical state.
|
||
criteria | Required only for criteria sets | Array of objects | Nested criteria that defines the members of the dynamic group. Array elements can be a combination of simple criteria or criteria set objects. | ||
id | Required | String | ID of the simple criteria or criteria set object | ||
operator | Required | String | Operator For criteria, you can obtain a list of valid operator values for each property using resourcegroups criteriaproperties. For criteria sets, this can be
one of the following values:
|
||
parent | Required | String | ID of the parent criteria set. This is rootwhen the criteria or criteria set is not nested. |
||
property | Required only for simple criteria | String | Inventory property. To obtain a list of properties, use resourcegroups criteriaproperties. | ||
value | Required only for simple criteria | String | Value of the property | ||
id | Required | String | ID of the simple criteria or criteria set object | ||
operator | Required | String | Operator For criteria, you can obtain a list of valid operator values for each property using resourcegroups criteriaproperties. For criteria sets, this can be
one of the following values:
|
||
parent | Required | String | ID of the parent criteria set. This is rootwhen the criteria or criteria set is not nested. |
||
property | Required only for simple criteria | String | Inventory property. To obtain a list of properties, use resourcegroups criteriaproperties. | ||
value | Required only for simple criteria | String | Value of the property |
You can also create custom views (see Creating custom views).
The following example returns information about all resource groups.
connect --url https://192.0.2.0 --user ADMIN --noverify
resourcegroups update
The following example returns information about a specific resource group.
connect --url https://192.0.2.0 --user ADMIN --noverify
resourcegroups update -u 5C5AB42D94C6A719BEF2A375 -n R1_GROUP -d GROUP_DESCRIPTION -t dynamic
-c '{"parent": "root", "value": null, "criteria": [{"operator": "contains",
"property": "hostname", "id": "1001", "value": "test"}], "operator": "AND",
"property": null, "id": "root",
"parent": "lxca_customUI_resourceViews_allGroupsPage_editGroupDynamicPage_2"}'