2.10.8 Obtaining Consumer Allocation Information
This API acquires information required for assigning the specified consumer to a monitored resource.
Execution permission
Admin, Modify
API version
v1
Request format
GET http[s]://host:port/Analytics/version/objects/Groups/{id}/actions/updateTargetResource
Request body
Not applicable.
Response body
The structure of the response body and the object attributes are as follows:{ "name":"...", "href":"...", "method":"...", "type":"...", "parameters":[{ "volumeIDs":["...", ...], "vmIDs":["...", ...], "resourceIDs":["...", ...] }, : ] }
Action (Type: Action)
Attribute |
Type |
Description |
---|---|---|
name |
string |
Name of the execute an operation. |
href |
string |
URL of the execute an operation. |
method |
string |
Name of the method. |
type |
string |
Data format of the object. |
parameters |
UpdateTargetResourceParam[] |
A list of UpdateTargetResourceParam objects necessary to execute an operation. For details about UpdateTargetResourceParam, see the table below. |
parameters (Type: UpdateTargetResourceParam)
Attribute |
Type |
Description |
---|---|---|
volumeIDs |
long[] |
Specify IDs for identifying volumes to which the consumer is to be assigned. To assign the consumer to multiple volumes, specify the IDs concurrently. The IDs of monitoring targets to which the consumer has already been assigned also need to be set. "volumeIDs" : [ 81, 87 ] To release the assignment of all the volumes, set the member value to a blank. "volumeIDs" : [ ] |
vmIDs |
long[] |
Specify IDs for identifying virtual machines to which the consumer is to be assigned. To assign the consumer to multiple virtual machines, specify the IDs concurrently. The IDs of monitoring targets to which the consumer has already been assigned also need to be set. " vmIDs " : [ 81, 87 ] To release the assignment of all the virtual machines, set the member value to a blank. " vmIDs " : [ ] |
resourceIDs |
long[] |
Specify IDs for identifying hosts to which the consumer is to be assigned. To assign the consumer to multiple hosts, specify the IDs concurrently. The IDs of monitoring targets to which the consumer has already been assigned also need to be set. " resourceIDs " : [ 81, 87 ] To release the assignment of all the hosts, set the member value to a blank. " resourceIDs " : [ ] |
Status codes
Status code |
Reason phrase |
Description |
---|---|---|
200 |
OK |
Success. |
401 |
Unauthorized |
No login privilege. |
403 |
Forbidden |
No reference privilege. |
404 |
Not Found |
The resource was not found. |
412 |
Precondition Failed |
The server is not available. |
500 |
Internal Server Error |
Server processing error. |
Example code
[Request Header] GET /Analytics/v1/objects/Groups/160/actions/updateTargetResource HTTP/1.1 Host: JP1OAServer:22015 User-Agent: curl/7.63.0 Content-Type: application/json Accept: application/json Authorization: Basic c3lzdGVtOm1hbmFnZXI= Accept-Language: ja [Response Header] HTTP/1.1 200 OK Date: Fri, 06 Sep 2019 09:38:30 GMT Server: Cosminexus HTTP Server Cache-Control: no-cache WWW-Authenticate: HSSO 45d6d29dcde4fdf4ae1d16d8e5587d146bd9aa7f_ZAlDSFUHGHp9UB8WcRQLdA==_V0810 X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff Transfer-Encoding: chunked Content-Type: application/json [Response Body] { "name" : "updateTargetResource", "href" : "http://JP1OAServer:22015/Analytics/v1/objects/Groups/160/actions/updateTargetResource/invoke", "method" : "POST", "type" : "application/json", "parameters" : [ { "volumeIDs" : [ 13642, 13671, 13905, 14001, 14064, 14085, 14093, 14116 ], "vmIDs" : [ 16177, 14381, 15941, 15942, 15943, 15946, 15947, 15951, 15960, ... , 16997 ], "resourceIDs" : [ ] } ] }