Create snapshot 2
Method | URI | Description |
---|---|---|
POST | /v1.1/{tenant_id}/os-snapshots | Creates a snapshot. |
Normal response codes: 200
Request
This table shows the URI parameters for the create snapshot request:
Name | Type | Description |
---|---|---|
{tenant_id} | String | The unique identifier of the project or account. |
This table shows the body parameters for the create snapshot request:
Name | Type | Description |
---|---|---|
display_name | String (Optional) |
A display name for the snapshot. |
display_description | String (Optional) |
A description of the snapshot. |
volume_id | uuid | The source volume for the snapshot. |
force | boolean (Optional) |
If true the operation will snapshot the source volume even if it is attached to a server. If it is false it will only snapshot if the volume is not attached. |
Example. Create snapshot: JSON request
{
"snapshot": {
"display_name": "snap-001",
"display_description": "Daily backup",
"volume_id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
"force": true
}
}
Response
Example. Create snapshot: JSON response
{
"snapshot": {
"id": "3fbbcccf-d058-4502-8844-6feeffdf4cb5",
"displayName": "snap-001",
"displayDescription": "Daily backup",
"volumeId": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
"status": "available",
"size": 30,
"createdAt": "2012-02-29T03:50:07Z"
}
}