The following request creates a volume with the specified capacity and nickname.
Execution permission
Storage Administrator (Provisioning)
Request line
POST base-URL/simple/v1/objects/volumes
Request message
- Body
-
The following is an example of creating a volume, in the pool with ID 63, with a capacity of 100 MiB, and the nickname REST_API_100MVolume, for which deduplication and compression are enabled:
{ "capacity": 100, "number": 1, "nicknameParam": { "baseName": "REST_API_100MVolume" }, "savingSetting": "DEDUPLICATION_AND_COMPRESSION", "poolId": 63 }
Attribute
Type
Description
capacity
long
(Required) Capacity of the volume to create (MiB)
Specify a value in the range from 47 through 268435456.
number
int
(Optional) Number of volumes to create
Specify a value in the range from 1 through 1000.
If this attribute is omitted, a single volume is created.
nicknameParam
object
Information about the nickname to assign to the new volume:
- (Required) baseName
(string)
The nickname can contain up to 32 characters.
You can use alphanumeric characters (0 through 9, A through Z, a through z), space characters, and the following symbols:
Exclamation mark (!), hash mark (#), dollar sign ($), percent sign (%), ampersand (&), single quotation mark ('), left parenthesis ((), right parenthesis ()), plus sign (+), comma (,), hyphen (-), period (.), forward slash (/), colon (:), equal sign (=), at sign (@), left square bracket ([), back slash (\), right square bracket (]), caret (^), underscore (_), grave accent mark (`), left curly bracket ({), right curly bracket (}), tilde (~)
This attribute is case-sensitive.
You can use a space character between characters, but you cannot use it at the beginning or end of the nickname.
- (Optional)
startNumber (int)
Specify the lowest serial number to add after the nickname as an integer in the range from 0 to 65279.
- (Optional)
numberOfDigits (int)
Specify the number of digits in the serial number to add after the nickname as an integer in the range from 1 to 5.
If you specify this attribute, you must also specify startNumber. If you specify startNumber but omit this attribute, 1 is assumed.
Example: If you specify AAA for baseName, 1 for startNumber, and 3 for numberOfDigits, and specify 100 for number, indicating the number of volumes to create, nicknames from AAA001 through AAA100 are assigned to the volumes.
Specify the values so that the sum of the number of characters specified for baseName, and the number of digits in the number generated from the values specified for startNumber and numberOfDigits, is not more than 32.
savingSetting
string
(Optional) Settings for the capacity saving (deduplication and compression)
Specify the following values:
- DEDUPLICATION_AND_COMPRESSION:
Deduplication and
compression is enabled.
Compression is enabled when you enable deduplication.
- COMPRESSION: Compression is enabled.
- DISABLE: No settings are specified.
If this attribute is omitted, DISABLE is considered.
poolId
int
(Required) Specify the ID of the pool in which the volumes are created as a value in the range from 0 through 127.
- (Required) baseName
(string)
Response message
- Body
-
Attribute
Type
Description
statusResource
string
URL used to obtain the execution results of the create volume request
Note:Execute the API function for obtaining information about the status of the API function that performs asynchronous processing. For details, see Getting status information about an API function that performs asynchronous processing.
Status codes
See HTTP status codes.
Coding example
curl -v -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization:Session b74777a3f9f04ea8bd8f09847fac48d3" -X POST --data-binary @./InputParameters.json https://192.0.2.100/ConfigurationManager/simple/v1/objects/volumes