Updated on 2024-03-26 GMT+08:00

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.

    For details about how to obtain the project ID, see Obtaining a Project ID.

    snapshot_id

    Yes

    Specifies the snapshot ID.

Request

  • Request parameters

    Parameter

    Type

    Mandatory

    Description

    snapshot

    Object

    Yes

    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

    The snapshot name, which can contain a maximum of 255 bytes.

    NOTE:

    When a disk backup is created, a snapshot will also be created and named with the autobk_snapshot_ prefix. Operations cannot be performed on such snapshots. Therefore, you are advised not to use autobk_snapshot_ as the prefix of snapshot names to avoid any inconvenience.

    description

    String

    No

    The snapshot description, which can contain a maximum of 255 bytes.

  • Example request
    {
        "snapshot": {
            "name": "snap-001", 
            "description": "Daily backup"
        }
    }

Response

  • Parameters in the snapshot field

    Parameter

    Type

    Description

    id

    String

    The snapshot ID.

    status

    String

    The snapshot status. For details, see EVS Snapshot Status.

    name

    String

    The snapshot name.

    description

    String

    The snapshot description.

    created_at

    String

    The time when the snapshot was created.

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

    metadata

    Object

    The snapshot metadata.

    volume_id

    String

    The ID of the snapshot's source disk.

    size

    Integer

    The snapshot size, in GB.

    updated_at

    String

    The time when the snapshot was updated.

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

    os-extended-snapshot-attributes:progress

    String

    The reserved field.

    os-extended-snapshot-attributes:project_id

    String

    The reserved field.

  • Parameters in the error field

    Parameter

    Type

    Description

    message

    String

    The error message returned if an error occurs.

    code

    String

    The error code returned if an error occurs.

    For details about the error code, see Error Codes.

  • Example response
    {
        "snapshot": {
            "status": "available", 
            "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"
        }
    }

Status Codes

  • Normal

    200

Error Codes

For details, see Error Codes.