Create Volume

Overview

Creates a volume

Pre/Post Conditions

  • virtual_storage status must be 'available'

Classification

  • Create

Synchronous / Asynchronous

  • Asynchronous

Request

HTTP Request Method

  • POST

HTTP Request Path

{api_endpoint}/v1.0/{tenant_id}/volumes

HTTP Request Header

Format

X-Auth-Token: <token>

HTTP Request Body

Request Parameter

Request Parameter
Parameter Request Type Type Description Required or Optional Note  
name plain String Name of volume Required Must be unique by tenant  
description plain String Description of volume Optional    
size plain Integer Size of volume in Gigabyte Required    
availability_zone plain String Availability zone Optional availability_zone='zonename-groupname'.  
virtual_storage_id plain String virtual_storage ID (UUID) Required    
iops_per_gb plain String Provisioned IOPS/GB for volume Optional Available for piops_iscsi_na volume_type  
initiator_iqns plain Array of String List of initiator IQN who can access to this volume Optional Available for piops_iscsi_na volume_type  
throughput plain String Throughput value reserved for the volume Optional Available for pre_nfs_na volume_type.  
encrypt plain Boolean Whether the volume is encrypted or not. True if omitted. Optional    

Response

HTTP Response Header

Response Code

Response Codes
Code Description Error? Note
202 Accepted No Returned in case of success
400 Bad Request Yes  
401 Unauthorized Yes  
409 Tenant is busy Yes Returned if one of creation/update/deletion/restore request is already on-going
500 Internal Server Error Yes  

HTTP Response Body

Response Parameter

Response Parameters
Parameter Type Description Note
api_error_message String Error message in API error case.  
id String Volume's ID (UUID)  
status String Volume status  
name String Name of the volume Must be unique by tenant
description String Description of the volume  
size Integer The size of volume in gigabyte  
iops_per_gb String The provisioned IOPS/GB for volume Available for piops_iscsi_na volume_type
initiator_iqns Array of String Array of initiator IQN who can access to this volume Available for piops_iscsi_na volume_type
initiator_secret String Initiator's secret (password) for CHAP auth of iSCSI This field is currently null and reserved for future use.Available for piops_iscsi_na volume_type
target_secret String Target's secret (password) for CHAP auth of iSCSI This field is currently null and reserved for future use.Available for piops_iscsi_na volume_type
throughput String Throughput value reserved for the volume Available for pre_nfs_na volume_type.
snapshot_ids Array of String Array of Snapshot IDs taken from this volume  
target_ips Array of IPv4 addresses Array of IPv4 addresses of the volume.  
metadata String One or more metadata key and value pairs to associate with the volume. lun_id displays LUN ID of iSCSI volume.Available for piops_iscsi_na volume_type
virtual_storage_id String ID (UUID) of virtual_storage which accommodates this volume  
availability_zone String An availability_zone in which the volume belongs to availability_zone=zone-group
created_at DateTime Timestamp of volume creation complete  
updated_at DateTime Timestamp of volume update complete  
error_message String Error message for the volume  
percent_snapshot_reserve_used Integer Usage of available snapshot capacity in percent Available for piops_iscsi_na volume_type.
smb_properties SMB Properties SMB properties for the virtual storage and its volumes Available for standard_smb_na volume_type.
export_rules List of String Allow list for volumes.Clients from CIDRs listed here can access to volumes Available for pre_nfs_na/standard_nfs_na/standard_smb_na volume_type.
encrypt Boolean Volume is encrypted if encrypt=true else volume is not encrypted.

Sample API Request and Response

Block Storage (volume_type=piops_iscsi_na)

Sample API Request

curl -s -i -H 'Accept:application/json' -H 'Content-Type:application/json' -H 'X-Auth-Token:86dbf35fa591400da1640048ed093129' -X POST https://storage-jp1.ecl.api.ntt.com/v1.0/ec9316a82873441799af53d9dd538132/volumes -d '{"volume": {"virtual_storage_id": "985d5c89-cdde-404f-b8e8-92ce5a63e55e", "name": "volume01", "size": 100}}'

Sample API Response

HTTP/1.1 202 Accepted
Date: Thu, 3 Oct 2016 04:59:13 GMT
Content-Type: application/json
Content-Length: 104
Connection: keep-alive
Set-Cookie:
TS0183560f=01cce65ce128601861395335dd182427413def44343cffdb05cf2bc235112eece0b3dbb0a0;
Path=/

{
  "api_error_message": "",
    "volume": {
        "availability_zone": "zone1-groupa",
        "created_at": "null",
        "description": "",
        "error_message": "",
        "id": "1978b14d-632a-441f-a718-3e29669a91c5",
        "initiator_iqns": [],
        "initiator_secret": "null",
        "iops_per_gb": "2",
        "metadata": {"lun_id": "null"},
        "name": "volume01",
        "size": 100,
        "snapshot_ids": [],
        "status": "creating",
        "target_ips": [],
        "target_secret": "null",
        "virtual_storage_id": "985d5c89-cdde-404f-b8e8-92ce5a63e55e",
        "percentage_snapshot_reserve_used": 0,
        "encrypt": true
    }
}

File Storage Premium (volume_type=pre_nfs_na)

Sample API Request

$ cat ./pre-nfs01.json
{
        "volume": {
                "name": "pre-nfs-vol01",
                "description": "pre-nfs-vol01",
                "size": 256,
                "virtual_storage_id": "94514162-bcf3-4d3a-a142-a5a173054e27"
        }
}
$ curl -s -i -h 'content-type: application/json' -h 'accept: application/json' -h 'x-auth-token: 7f300d881444442f9a9ae72a1f91b090' -x post -d @./pre-nfs01.json https://storage-jp1-ecl.api.ntt.com/v1.0/49dec55d78d446dabfe6ecd8858133f4/volumes

Sample API Response

HTTP/1.1 202 Accepted
Date: Thu, 08 Sep 2022 05:10:42 GMT
Content-Type: application/json
Content-Length: 394
Connection: keep-alive
ECL-Transaction-ID: 78fcfc17-55f2-44bd-bd0d-daaa00c24bf4
Set-Cookie: TS0183560f=01cce65ce18fe23a7acd61a80b696deb4304b08497e7ca778cdba1b61bcafa83471e54c7eaf217d1ea24096ef339b6007d1af493eb; Path=/

{
    "api_error_message": "",
    "volume": {
        "availability_zone": "zone1-groupa",
        "created_at": null,
        "description": "pre-nfs-vol01",
        "error_message": "",
        "export_rules": [
            "0.0.0.0/0"
        ],
        "id": "f2fa519e-cd31-46aa-b594-f8390fb1bd7f",
        "name": "pre-nfs-vol01",
        "size": 256,
        "snapshot_ids": [],
        "status": "creating",
        "target_ips": [],
        "throughput": "50",
        "updated_at": null,
        "virtual_storage_id": "94514162-bcf3-4d3a-a142-a5a173054e27",
        "encrypt": false
    }
}

File Storage Standard NFS (volume_type=standard_nfs_na)

Sample API Request

$ cat ./stdnfs01.json
{
        "volume": {
                "name": "stdnfs01",
                "description": "stdnfs01",
                "size": 1024,
                "virtual_storage_id": "18125408-f741-48d4-8b6a-1a880f0cb5b9"
        }
}
$ curl -s -i -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'X-Auth-Token: 7f300d881444442f9a9ae72a1f91b090' -X POST -d @./stdnfs01.json https://storage-jp1-ecl.api.ntt.com/v1.0/49dec55d78d446dabfe6ecd8858133f4/volumes

Sample API Response

HTTP/1.1 202 Accepted
Date: Thu, 08 Sep 2022 05:15:31 GMT
Content-Type: application/json
Content-Length: 367
Connection: keep-alive
ECL-Transaction-ID: 4d27b4ac-3b8f-49e1-bb40-a54dd527f0ea
Set-Cookie: TS0183560f=01cce65ce105f98fbb54423cc5b5827281e5ed5402779d3a516294a07f8a07b70afa883c863612af5828e3c346131e4c9e9ce1c018; Path=/

{
    "api_error_message": "",
    "volume": {
        "availability_zone": "zone1-groupb",
        "created_at": null,
        "description": "stdnfs01",
        "error_message": "",
        "export_rules": [
            "0.0.0.0/0"
        ],
        "id": "9a4afb52-fc61-4014-ba09-8580fc81e820",
        "name": "stdnfs01",
        "size": 1024,
        "snapshot_ids": [],
        "status": "creating",
        "target_ips": [],
        "updated_at": null,
        "virtual_storage_id": "18125408-f741-48d4-8b6a-1a880f0cb5b9",
        "encrypt": true
    }
}

File Storage Standard SMB (volume_type=standard_smb_na)

Sample API Request

$ cat ./stdsmb01.json
{
        "volume": {
                "name": "stdsmb01",
                "description": "stdsmb01",
                "size": 1024,
                "virtual_storage_id": "ea2d35d9-b740-4720-890e-8a2bda56075f"
        }
}
$ curl -s -i -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'X-Auth-Token: 7f300d881444442f9a9ae72a1f91b090' -X POST -d @./stdsmb01.json https://storage-jp1-ecl.api.ntt.com/v1.0/49dec55d78d446dabfe6ecd8858133f4/volumes

Sample API Response

HTTP/1.1 202 Accepted
Date: Thu, 08 Sep 2022 05:18:38 GMT
Content-Type: application/json
Content-Length: 414
Connection: keep-alive
ECL-Transaction-ID: fa87d234-1f93-46f8-8ce5-6147cff1b11d
Set-Cookie: TS0183560f=01cce65ce1c57fef85d8ae663ccd89a94bd115c5bc282fe9133cab05d0e47a4f51723bd1c2a2a83151132e0167be08c8e3174217af; Path=/

{
    "api_error_message": "",
    "volume": {
        "availability_zone": "zone1-groupb",
        "created_at": null,
        "description": "stdsmb01",
        "error_message": "",
        "export_rules": [
            "0.0.0.0/0"
        ],
        "id": "4e7a1567-414d-409c-9b40-abad35e3c366",
        "name": "stdsmb01",
        "size": 1024,
        "smb_properties": {
            "users": [],
            "workgroup": null
        },
        "snapshot_ids": [],
        "status": "creating",
        "target_ips": [],
        "updated_at": null,
        "virtual_storage_id": "ea2d35d9-b740-4720-890e-8a2bda56075f",
        "encrypt": true
    }
}