2.6.5 Updating consumer
This API updates the specified consumer.
Execution permission
Admin, Modify
API version
v1
Request format
PUT http[s]://host:port/Analytics/version/objects/Groups/{id}
Request body
The structure of the request body and the object attributes are as follows:Group
{ "name":"...", "gradeKey":"...", "description":"...", "urls":["...", ...], "urlDisplayNames":["...", ...], "templateCreatorType":"...", "vmAutoAssignment":"...", "applicationAssignFollow":"..." }
Group (Type: Group)
Attribute |
Type |
Description |
---|---|---|
name |
string |
Consumer name. Use 128 or fewer characters. |
gradeKey |
string |
ID for identifying grades |
description |
string |
Description of the consumer. Use 1000 or fewer characters. |
urls |
string[] |
URL |
urlDisplayNames |
string[] |
Character string displayed for the URL |
templateCreatorType |
enum |
Change type of the consumer. (For details about the specifiable values, see the table TemplateCreatorType in List of enumerators.) The specifiable values are as follows:
|
vmAutoAssignment |
boolean |
Set true if you assign a virtual machine under the hypervisor that belong to this Group automatically |
applicationAssignFollow |
boolean |
Set true if you assign a application under the resource that belong to this Group automatically |
Response body
The structure of the response body and the object attributes are as follows:Group
{ "instanceID":"...", "name":"...", "status":"...", "gradeKey":"...", "gradeName":"...", "gradeDisplayOrder":"...", "description":"...", "urls":["...", ...], "urlDisplayNames":["...", ...], "templateCreatorType":"...", "vmAutoAssignment":"...", "applicationAssignFollow":"...", "numOfVolumes":"...", "numOfVMs":"...", "numOfHosts":"...", "numOfHypervisors":"...", "numOfApplications":"...", "vmAutoAssignFilters":["...", ...], "hostAutoAssignFilters":["...", ...], "volumeIDs":["...", ...], "vmIDs":["...", ...], "hostIDs":["...", ...], "hypervisorIDs":["...", ...], "applicationIDs":["...", ...] }
Group (Type: Group)
Attribute |
Type |
Description |
---|---|---|
instanceID |
long |
ID for identifying instances |
name |
string |
Consumer name. Use 128 or fewer characters. |
status |
enum |
Status of the consumer. (For details about the specifiable values, see the table NodeStatusType in List of enumerators.) The specifiable values are as follows:
|
gradeKey |
string |
ID for identifying grades |
gradeName |
string |
Grade name |
gradeDisplayOrder |
int |
Priority of the grade |
description |
string |
Description of the consumer. Use 1000 or fewer characters. |
urls |
string[] |
URL |
urlDisplayNames |
string[] |
Character string displayed for the URL |
templateCreatorType |
enum |
Change type of the consumer. (For details about the specifiable values, see the table TemplateCreatorType in List of enumerators.) The specifiable values are as follows:
|
vmAutoAssignment |
boolean |
Set true if you assign a virtual machine under the hypervisor that belong to this Group automatically |
applicationAssignFollow |
boolean |
Set true if you assign a application under the resource that belong to this Group automatically |
numOfVolumes |
int |
Number of volumes to which the consumer is assigned. |
numOfVMs |
int |
Number of virtual machines to which the consumer is assigned. |
numOfHosts |
int |
Number of hosts to which the consumer is assigned. |
numOfHypervisors |
int |
Number of hypervisors to which the consumer is assigned. |
numOfApplications |
int |
Number of applications to which the consumer is assigned. |
vmAutoAssignFilters |
string[] |
Name of the automatic assignment rule set for the virtual machines |
hostAutoAssignFilters |
string[] |
Name of the automatic assignment rule set for the hosts |
volumeIDs |
long[] |
List of IDs identifying volumes allocated to consumers |
vmIDs |
long[] |
List of IDs identifying virtual machines allocated to consumers |
hostIDs |
long[] |
List of IDs identifying hosts allocated to consumers |
hypervisorIDs |
long[] |
List of IDs identifying hypervisors allocated to consumers |
applicationIDs |
long[] |
List of IDs identifying applications allocated to consumers |
Status codes
Status code |
Reason phrase |
Description |
---|---|---|
200 |
OK |
Success. |
400 |
Bad Request |
A format of request body is invalid. |
401 |
Unauthorized |
No login privilege. |
403 |
Forbidden |
No update privilege. |
404 |
Not Found |
The resource was not found. |
409 |
Conflict |
A resource with the same name exists. |
412 |
Precondition Failed |
The server is not available. |
500 |
Internal Server Error |
Server processing error. |
Example code
[Request Header] PUT /Analytics/v1/objects/Groups/10 HTTP/1.1 Authorization: Basic c3lzdGVtOm1hbmFnZXI= User-Agent: curl/7.33.0 Host: localhost:22015 Accept: application/json Content-Type: application/json Accept-Language: ja Content-Length: 376 [Request Body] { "instanceID" : 10, "name" : "Group A", "status" : "Normal", "gradeKey" : "0", "gradeName" : "Platinum", "gradeDisplayOrder" : 0, "description" : "Tel:XXX-YYYYY, User:Administrator", "templateCreatorType" : "User", "numOfVolumes" : 0, "numOfVMs" : 0, "numOfHosts" : 0, "volumeAutoAssignFilters" : [ ], "vmAutoAssignFilters" : [ ], "hostAutoAssignFilters" : [ ] } [Response Header] HTTP/1.1 200 OK Date: Fri, 27 Nov 2015 08:42:47 GMT Server: Cosminexus HTTP Server Cache-Control: no-cache WWW-Authenticate: HSSO f2eae1699945a979e8c7285d8923241d67ed782_WVlGcHsLfg5ffg0I_V0810 X-Frame-Options: SAMEORIGIN Transfer-Encoding: chunked Content-Type: application/json [Response Body] { "instanceID" : 10, "name" : "Group A", "status" : "Normal", "gradeKey" : "0", "gradeName" : "Platinum", "gradeDisplayOrder" : 0, "description" : "Tel:XXX-YYYYY, User:Administrator", "templateCreatorType" : "User", "numOfVolumes" : 0, "numOfVMs" : 0, "numOfHosts" : 0, "volumeAutoAssignFilters" : [ ], "vmAutoAssignFilters" : [ ], "hostAutoAssignFilters" : [ ] }