Adding a resource to a resource group

REST API Reference Guide for Virtual Storage Platform 5000, Virtual Storage Platform E Series, and Virtual Storage Platform G/F Series

Version
93-07-0x
90-09-0x
88-08-10
Audience
anonymous
Part Number
MK-98RD9014-17
The following request adding resources to resource groups.
Note:

If you locked any resources of the target storage system by using the REST API, you will not be able to use this API function. In such cases, unlock the resources before running the API function.

Execution permission

Security Administrator (View & Modify)

Request line

POST base-URL/v1/objects/resource-groups/object-ID/actions/add-resource/invoke

Request message

Object ID

Specify the value of resourceGroupId that was obtained by the processing to get information about resource groups.

Attribute

Type

Description

resourceGroupId

int

(Required) Resource group ID

Specify a decimal (base 10) number in the range from 1 to 1023.

Query parameters

None.

Body

The following coding example shows how to specify an LDEV number:

{
  "parameters": {
    "ldevIds": [
      2,
      3
    ],
    "parityGroupIds": [
      "1-1",
      "1-2"
    ],
    "externalParityGroupIds": [
      "1-5",
      "1-6"
    ],
    "portIds": [
      "CL1-A",
      "CL1-B"
    ],
    "hostGroupIds": [
      "CL1-A,4",
      "CL1-A,5",
      "CL1-A,6"
    ]
  }
}

The following coding example shows how to specify a range of LDEV numbers:

{
  "parameters": {
    "startLdevId": 2,
    "endLdevId": 5,
    "parityGroupIds": [
      "1-1",
      "1-2"
    ],
    "externalParityGroupIds": [
      "1-5",
      "1-6"
    ],
    "portIds": [
      "CL1-A",
      "CL1-B"
    ],
    "hostGroupIds": [
      "CL1-A,4",
      "CL1-A,5",
      "CL1-A,6"
    ]
  }
}

Attribute

Type

Description

parityGroupIds

string[]

(Optional) Parity group number

externalParityGroupIds

string[]

(Optional) External parity group number

portIds

string[]

(Optional) Port number

hostGroupIds

string[]

(Optional) Object ID of the host group or iSCSI target

Specify the value of hostGroupId that was obtained by the processing to get information about host groups or iSCSI targets.

ldevIds

int[]

(Optional) LDEV number

Specify a value in the range from 0 to 65279. If you specify this attribute, you cannot specify the startLdevId attribute or the endLdevId attribute.

startLdevId

int

(Optional) First LDEV number

When specifying a range of LDEVs, specify a value in the range from 0 to 65278. If you specify this attribute, you must also specify the endLdevId attribute. If you specify the ldevId attribute, you cannot specify this attribute.

endLdevId

int

(Optional) Last LDEV number

When specifying a range of LDEVs, specify a value in the range from 1 to 65279. If you specify this attribute, you must also specify the startLdevId attribute. If you specify the ldevId attribute, you cannot specify this attribute.

Response message

Body

A job object is returned. For details on attributes other than affectedResources, see the description on job objects.

Attribute

Description

affectedResources

URL of the resource group to which resources are added

Action template

GET base-URL/v1/objects/resource-groups/object-ID/actions/add-resource

Status codes

For details on the status codes of the request for this operation, see the description on HTTP status codes.

Coding example

To get an action template:

curl -v -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization:Session d7b673af189048468c5af9bcf3bbbb6f" -X GET https://192.0.2.100/ConfigurationManager/v1/objects/resource-groups/4/actions/add-resource

To run the request after getting an action template:

curl -v -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization:Session d7b673af189048468c5af9bcf3bbbb6f" --data-binary @./InputParameters.json -X POST https://192.0.2.100/ConfigurationManager/v1/objects/resource-groups/4/actions/add-resource/invoke