Create Custom Group

Create Custom Group
Create a new custom group definition

See different request examples with Metric Key, Property Key, Relationship and Resource Name Condition.

Request
URI
POST
https://{api_host}/suite-api/api/resources/groups
COPY
Request Body

The custom group definition

custom-group of type(s) application/json
Required

Show optional properties

{
    "membershipDefinition": {},
    "resourceKey": {
        "adapterKindKey": "string",
        "name": "string",
        "resourceKindKey": "string"
    }
}
"{\n  \"resourceKey\" : {\n    \"name\" : \"Sample Custom Group with Metric Key Condition\",\n    \"adapterKindKey\" : \"Container\",\n    \"resourceKindKey\" : \"Environment\"\n  },\n  \"autoResolveMembership\" : true,\n  \"membershipDefinition\" : {\n    \"includedResources\" : [ ],\n    \"excludedResources\" : [ ],\n    \"custom-group-properties\" : [ ],\n    \"rules\" : [ {\n      \"resourceKindKey\" : {\n        \"resourceKind\" : \"VirtualMachine\",\n        \"adapterKind\" : \"VMWARE\"\n      },\n      \"statConditionRules\" : [ {\n        \"key\" : \"cpu|usage_average\",\n        \"doubleValue\" : 80.0,\n        \"compareOperator\" : \"GT\"\n      } ],\n      \"propertyConditionRules\" : [ {\n        \"key\" : \"config|hardware|numCpu\",\n        \"doubleValue\" : 4.0,\n        \"compareOperator\" : \"LT\"\n      } ],\n      \"resourceNameConditionRules\" : [ {\n        \"name\" : \"VSAN\",\n        \"compareOperator\" : \"NOT_CONTAINS\"\n      } ],\n      \"relationshipConditionRules\" : [ {\n        \"relation\" : \"CHILD\",\n        \"name\" : \"SampleStorage\",\n        \"compareOperator\" : \"CONTAINS\",\n        \"travesalSpecId\" : \"vSphere Storage-VMWARE-vSphere World\"\n      } ],\n      \"resourceTagConditionRules\" : [ {\n        \"category\" : \"VMFolder\",\n        \"compareOperator\" : \"NOT_CONTAINS\",\n        \"stringValue\" : \"TestVMFolder\"\n      } ]\n    } ]\n  }\n}"
boolean
autoResolveMembership
Optional

Automatically update membership

string As uuid As uuid
id
Optional

Identifier of custom group

array of object
links
Optional

Represents a HTTP 'link' element.
It is implicit that all the link tags support http 'GET' method.

object
membershipDefinition
Required

Custom group membership definition

string As uuid As uuid
policy
Optional

Policy identifier

object
resourceKey
Required

Represents a composite key for uniquely identifying a Resource.

Authentication
This operation uses the following authentication methods.
Responses
201

The newly created custom group

Returns custom-group of type(s) application/json
"No Custom Example is Available"
boolean
autoResolveMembership
Optional

Automatically update membership

string As uuid As uuid
id
Optional

Identifier of custom group

array of object
links
Optional

Represents a HTTP 'link' element.
It is implicit that all the link tags support http 'GET' method.

object
membershipDefinition
Required

Custom group membership definition

string As uuid As uuid
policy
Optional

Policy identifier

object
resourceKey
Required

Represents a composite key for uniquely identifying a Resource.


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"membershipDefinition":"object","resourceKey":"object"}' https://{api_host}/suite-api/api/resources/groups