Creating a Snapshot (Discarded)

Function

This API is used to create a snapshot for a volume.

This API has been discarded. Use the EVS API "Creating an EVS Snapshot (OpenStack Cinder API v2)".

Constraints

A snapshot name cannot be prefixed with autobk_snapshot.

URI

POST /v2.1/{project_id}/os-snapshots

Table 1 describes the parameters in the URI.

Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

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

Request

Table 2 describes the request parameters.

Table 2 Request parameters

Parameter

Mandatory

Type

Description

display_description

No

String

Specifies the snapshot description.

volume_id

Yes

String

Specifies the volume ID.

display_name

No

String

Specifies the name of the EVS snapshot.

The value contains a maximum of 255 bytes.

Note

When creating a backup for an EVS disk through 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_. You are advised to not use autobk_snapshot_ as the name prefix for the snapshots you created. Otherwise, the snapshots cannot be used normally.

force

No

Boolean

Specifies whether a snapshot is to be forcibly created.

If the value is true, a snapshot for the volume in use can be created.

Response

Table 3 describes the response parameters.

Table 3 Response parameters

Parameter

Mandatory

Type

Description

id

Yes

String

Specifies the disk snapshot ID in UUID format.

status

Yes

String

Specifies the volume snapshot status.

displayName

No

String

Specifies the volume snapshot name.

displayDescription

No

String

Specifies the volume snapshot description.

createdAt

Yes

String

Specifies the time when the volume snapshot was created.

volumeId

Yes

String

Specifies the disk ID in UUID format for the snapshot.

size

Yes

Integer

Specifies the volume snapshot size.

Example Request

POST https://{endpoint}/v2.1/d6c277ba8820452e83df36f33c9fa561/os-snapshots
{
    "snapshot": {
        "display_name": "test",
        "display_description": null,
        "volume_id": "ba5730ea-8621-4ae8-b702-ff0ffc12c209"
    }
}

Example Response

{
    "snapshot":
        {
            "createdAt": "2016-05-20T16:54:14.981520",
            "displayDescription": null,
            "id": "b836dc3d-4e10-4ea4-a34c-8f6b0460a583",
            "displayName": "test",
            "size": 1,
            "status": "creating",
            "volumeId": "ba5730ea-8621-4ae8-b702-ff0ffc12c209"
        }
}

Returned Values

See Returned Values for General Requests.