Skip to main content

resourcegroups update

This command modifies a dynamic resource group.

Syntax

resourcegroups update  -h

resourcegroups update -n <group_name> [-d <description>] -c <criteria>
-t <group_type> [-u <UUID>] [-v <filter>]

Options

{-h | --help}
Displays the syntax and brief usage information for this command.
{-n | --name}
Specifies the name of the resource group.
{-d | --description}
Specifies the description of the resource group.
{-c | --criteria}
Specifies the criteria (rules) of the resource group, in JSON format.
ParametersRequired / OptionalTypeDescription
criteriaRequired if type is dynamicObject(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.
{
"property": "contact",
"operator": "equals",
"value": "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.
{
"operator": "AND",
"criteria": [{
"property": "contact",
"operator": "equals",
"value": "John@company.com"
},
{
"property": "overallHealthState",
"operator": "equals",
"value": "Critical"
}]
}
 criteriaRequired only for criteria setsArray of objectsNested criteria that defines the members of the dynamic group. Array elements can be a combination of simple criteria or criteria set objects.
 idRequiredStringID of the simple criteria or criteria set object
 operatorRequiredStringOperator

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:
  • AND. Members must satisfy all specified values.
  • OR. Members must satisfy one or more of the specified values.
 parentRequiredStringID of the parent criteria set. This is root when the criteria or criteria set is not nested.
 propertyRequired only for simple criteriaStringInventory property. To obtain a list of properties, use resourcegroups criteriaproperties.
 valueRequired only for simple criteriaStringValue of the property
idRequiredStringID of the simple criteria or criteria set object
operatorRequiredStringOperator

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:
  • AND. Members must satisfy all specified values.
  • OR. Members must satisfy one or more of the specified values.
parentRequiredStringID of the parent criteria set. This is root when the criteria or criteria set is not nested.
propertyRequired only for simple criteriaStringInventory property. To obtain a list of properties, use resourcegroups criteriaproperties.
valueRequired only for simple criteriaStringValue of the property
{-t | --type}
Specifies the type of the resource group. This value is always dynamic.
{-u | --uuid}
Specifies the UUID of the resource group to be modified.
{-v | --view} <filter>
Identifies the view to use for the returned data. If a filter is not specified, the default view is used.

You can also create custom views (see Creating custom views).

Examples

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"}'