• Elastic Volume Service

evs
  1. Help Center
  2. Elastic Volume Service
  3. API Reference
  4. API v3
  5. EVS Snapshot
  6. Rolling Back a Snapshot to an EVS Disk

Rolling Back a Snapshot to an EVS Disk

Function

This API is used to roll back a snapshot to an EVS disk.

Constraints

  • When you roll back a snapshot to an EVS disk, you can only roll back the snapshot to the source EVS disk. Rollback to a specified disk is not supported.
  • You can roll back an EVS disk from a snapshot only when the disk is in the available or error_rollbacking state.

URI

  • URI format

    POST /v3/{project_id}/os-vendor-snapshots/{snapshot_id}/rollback

  • Parameter description

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID.

    snapshot_id

    Yes

    Specifies the snapshot ID.

Request

  • Parameter description

    Parameter

    Type

    Mandatory

    Description

    rollback

    map

    Yes

    Specifies the snapshot rollback information.

    volume_id

    string

    No

    Specifies the UUID of the EVS disk to be rolled back.

    name

    string

    No

    Specifies the name of the EVS disk to be rolled back. The value can contain a maximum of 255 bytes.

    NOTE:

    Parameter name cannot be used independently. When name is going to be used, volume_id must also be specified.

  • Example request
    {
        "rollback": {
            "name": "test-001",
            "volume_id": "5aa119a8-d25b-45a7-8d1b-88e127885635"
        }
    }

Response

  • Parameter description

    Parameter

    Type

    Description

    rollback

    map

    Specifies the snapshot rollback information.

    volume_id

    string

    Specifies the UUID of the target EVS disk in a snapshot rollback.

  • Example response
    {
        "rollback": {
            "volume_id": "5aa119a8-d25b-45a7-8d1b-88e127885635"
        }
    }

    or

    {
        "error": {
            "message": "XXXX", 
            "code": "XXX"
        }
    }

    In the preceding example, error indicates a general error, for example, badRequest or itemNotFound. An example is provided as follows:

    {
        "badRequest": {
            "message": "XXXX", 
            "code": "XXX"
        }
    }

Returned Values

  • Normal

    202

Error Codes

For details, see Error Codes.