PUT /resourceGroups
Use this method to modify resource-group properties, add devices to a specific static group, or change the criteria of a dynamic resource group.
Authentication
Authentication with username and password is required.
Request URL
PUT https://{management_server_IP}/resourceGroups
Query parameters
None
Request body
Attributes | 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 or criteria set 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 | String | Operator For criteria, you can obtain a list of valid operator values for each property using GET /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 GET /resourceGroups/criteriaProperties. | ||
value | Required only for simple criteria | String | Value of the property | ||
description | Optional | String | Description of the resource group | ||
members | Optional | Array of strings | (Static groups only) URIs for all managed devices that are members of this resource group Members are automatically removed from the group if the device is not managed by Lenovo XClarity Administrator. For dynamic groups, the members consist of the managed devices that satisfy the criteria at the time that the GET request is done. | ||
name | Required | String | Unique name of the resource group | ||
type | Optional | String | Type of resource group. This can be one of the following values.
Note The group type cannot be changed. | ||
uuid | Required | String | UUID of the resource group to be modified Note The group UUID cannot be changed. |
{
"description": "Business application VMware clusters",
"members": [
"nodes/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"nodes/BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
],
"name": "e-Commerce Servers",
"type": "static",
"uuid": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
}
{
"criteria": {
"operator": "AND",
"criteria": [{
"property": "overallHealthState",
"operator": "equals",
"value": "Normal"
},
{
"property": "location.location",
"operator": "contains",
"value": "Lab10"
},
{
"property": "location.rack",
"operator": "contains",
"value": "rack1"
},
{
"operator": "OR",
"criteria": [
{
"property": "machineType",
"operator": "contains",
"value": "7X07"
},
{
"property": "machineType",
"operator": "contains",
"value": "7X08"
}]
}]
},
"description": "All ThinkSystem SR530 servers in room 1 in Lab10 that are offline ",
"name": "Offline SR530 servers",
"type": "dynamic",
"uuid": "GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG"
}
Response codes
Code | Description | Comments |
---|---|---|
200 | OK | The request completed successfully. |
400 | Bad Request | A query parameter or request attribute is missing or not valid, or the operation is not supported. A descriptive error message is returned in the response body. |
403 | Forbidden | The orchestrator server was prevented from fulfilling the request. A descriptive error message is returned in the response body. Ensure that you have privileges to perform the request. |
409 | Conflict | There is a conflict with the current state of the resource. A descriptive error message is returned in the response body. |
500 | Internal Server Error | An internal error occurred. A descriptive error message is returned in the response body. |
Response body
Attributes | Type | Description | ||
---|---|---|---|---|
criteria | 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 | Array of objects | Nested criteria or criteria set that defines the members of the dynamic group. Array elements can be a combination of simple criteria or criteria set objects. | ||
id | String | ID of the simple criteria or criteria set object | ||
operator | String | Operator For criteria, you can obtain a list of valid operator values for each property using GET /resourceGroups/criteriaProperties. For criteria sets, this can be one of the following values:
| ||
parent | String | ID of the parent criteria set. This is rootwhen the criteria or criteria set is not nested. | ||
property | String | Inventory property. To obtain a list of properties, use GET /resourceGroups/criteriaProperties. | ||
value | String | Value of the property | ||
description | String | Description of the resource group | ||
healthStatus | String | Status of the device with the highest severity. This can be one of the following values.
| ||
members | Array of strings | URIs for all managed devices that are members of this resource group Members are automatically removed from the group if the device is not managed by Lenovo XClarity Administrator. For dynamic groups, the members consist of the managed devices that satisfy the criteria at the time that the GET request is done. | ||
memberUuids | Array of strings | UUIDs for all managed devices that are members of this resource group | ||
name | String | Unique name of the resource group | ||
query | String | Internal use only. Deprecated This attribute is deprecated and will be removed in a future release. | ||
rsql | String | Internal use only. Deprecated This attribute is deprecated and will be removed in a future release. | ||
type | String | Type of resource group. This can be one of the following values.
| ||
uuid | String | Resource group UUID |
{
"criteria": null,
"description": "Business application VMware clusters",
"healthStatus": "Critical",
"members": [
"nodes/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"nodes/BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
],
"memberUuids":[
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
],
"name": "e-Commerce Servers",
"type": "static",
"uuid": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
}