• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. OpenStack Cinder API v3
  5. EVS Snapshot
  6. Updating an EVS Snapshot

Updating an EVS Snapshot

Function

This API is used to update an EVS snapshot.

URI

  • URI format

    PUT /v3/{project_id}/snapshots/{snapshot_id}

  • 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

    snapshot

    map

    Yes

    Specifies the information of the snapshot to be updated. For details, see Parameters in the snapshot field.

  • Parameters in the snapshot field

    Parameter

    Type

    Mandatory

    Description

    name

    String

    No

    Specifies the snapshot name. The value can contain a maximum of 255 bytes.

    NOTE:

    When creating a backup for a disk through Volume Backup Service (VBS), a snapshot will be created and named with prefix autobk_snapshot_. The EVS console has imposed operation restrictions on snapshots with prefix autobk_snapshot_. Therefore, you are advised not to use autobk_snapshot_ as the name prefix for the snapshots you created. Otherwise, the snapshots cannot be used normally.

    description

    String

    No

    Specifies the snapshot description. The value can contain a maximum of 255 bytes.

    display_name

    String

    No

    Specifies also the snapshot name. You can specify either parameter name or display_name. If both parameters are specified, the name value is used. The value can contain a maximum of 255 bytes.

    display_description

    String

    No

    Specifies also the snapshot description. You can specify either parameter description or display_description. The value can contain a maximum of 255 bytes.

  • Example request
    {
        "snapshot": {
            "name": "name_xx3", 
            "description": "hello"
        }
    }

Response

  • Parameters in the snapshot field

    Parameter

    Type

    Description

    id

    string

    Specifies the snapshot ID.

    status

    string

    Specifies the snapshot status. For details, see EVS Snapshot Status.

    name

    string

    Specifies the snapshot name.

    description

    string

    Specifies the snapshot description.

    created_at

    string

    Specifies the time when the snapshot was created.

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

    metadata

    map

    Specifies the snapshot metadata.

    volume_id

    string

    Specifies the ID of the disk to which the snapshot belongs.

    size

    int

    Specifies the snapshot size, in GB.

    updated_at

    string

    Specifies the time when the snapshot was updated.

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

  • Parameters in the error field

    Parameter

    Type

    Description

    message

    string

    Specifies the error message returned when an error occurs.

    code

    string

    Specifies the error code returned when an error occurs.

    For details about the error code, see Error Codes.

  • Example response
    {
        "snapshot": {
            "status": "creating", 
            "description": "Daily backup", 
            "created_at": "2013-02-25T03:56:53.081642", 
            "metadata": { }, 
            "volume_id": "5aa119a8-d25b-45a7-8d1b-88e127885635", 
            "size": 1, 
            "id": "f9faf7df-fdc1-4093-9ef3-5cba06eef995", 
            "name": "snap-001", 
            "updated_at": "2013-02-25T03:56:53.081642"
        }
    }

    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:

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

Returned Values

  • Normal

    200

Error Codes

For details, see Error Codes.