• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. OpenStack Cinder API v2
  5. EVS Disk Transfer
  6. Creating a Disk Transfer

Creating a Disk Transfer

Function

This API is used to create a disk transfer. After the transfer has been created, a transfer ID and an authentication key are returned.

After a disk transfer is created, the disk status changes from available to awaiting-transfer. Once the disk transfer is accepted, the disk status changes to available again.

URI

  • URI format

    POST /v2/{project_id}/os-volume-transfer

  • Parameter description

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID.

Constraints

A disk transfer can be created only when the disk status is available. The detailed constraints are as follows:

  • Encrypted EVS disks cannot be transferred.
  • EVS disks with backups and snapshots available cannot be transferred.
  • EVS disks associated with backup policies cannot be transferred.
  • EVS disks used as system disks cannot be transferred.
  • EVS disks in EVS replication pairs cannot be transferred.
NOTE:

If the disk transfer is created using one of the unsupported disks, error code 400 will be returned.

Request

  • Parameter description

    Parameter

    Type

    Mandatory

    Description

    transfer

    map<string, string>

    Yes

    Specifies the disk transfer marker. For details, see Parameters in the transfer field.

  • Parameters in the transfer field

    Parameter

    Type

    Mandatory

    Description

    volume_id

    String

    Yes

    Specifies the disk ID.

    name

    String

    No

    Specifies the name of the disk transfer. Excluding the start and end spaces, the name can contain 1 to 255 bytes.

  • Example request
    {
        "transfer": {
            "volume_id": "c86b9af4-151d-4ead-b62c-5fb967af0e37", 
            "name": "first volume"
        }
    }

Response

  • Parameter description

    Parameter

    Type

    Description

    transfer

    map<string, object>

    Specifies the disk transfer information. For details, see Parameters in the transfer field.

  • Parameters in the transfer field

    Parameter

    Type

    Description

    auth_key

    String

    Specifies the authentication key of the disk transfer.

    links

    List< Dict >

    Specifies the links of the disk transfer.

    created_at

    String

    Specifies the time when the disk transfer was created.

    Time format: UTC YYYY-MM-DDTHH:MM:SS

    volume_id

    String

    Specifies the disk ID.

    id

    String

    Specifies the disk transfer ID.

    name

    String

    Specifies the name of the disk transfer.

  • Example response
    {
        "transfer": {
            "id": "1a7059f5-8ed7-45b7-8d05-2811e5d09f24", 
            "created_at": "2015-02-25T03:56:53.081642", 
            "name": "first volume", 
            "volume_id": "c86b9af4-151d-4ead-b62c-5fb967af0e37", 
            "auth_key": "9266c59563c84664", 
            "links": [
                {
                    "href": "https://localhost/v2/firstproject/os-volume-transfer/3", 
                    "rel": "self"
                }, 
                {
                    "href": "https://localhost/firstproject/os-volume-transfer/3", 
                    "rel": "bookmark"
                }
            ]
        }
    }

Returned Values

  • Normal

    202

Error Codes

For details, see Error Codes.