ec2.snapshots.createSnapshot a volume
Answers 202; poll the snapshot until `state` is `completed`. A helper machine of the platform attaches the volume and copies its raw blocks in 4 MiB chunks to the zone’s snapshot storage; an encrypted volume is copied as LUKS ciphertext, so the helper never holds its key. Unchanged chunks are stored once, so a second snapshot stores only what changed (`newBytes`). An attached volume is refused with 409 unless `stopInstance` is true: the instance is stopped, the volume copied, reattached and the instance started again (needs `ec2:StopInstances` on it).
Request syntax
POST /ec2/api/volumes/{id}/snapshots
{
"name": "string",
"description": "string",
"stopInstance": "boolean",
"tags": "map of string"
}Path parameters
idRequiredstring
Constraints: /^vol-[0-9a-f]{6,32}$/
Request body
nameOptionalstring
A display name; omitted: none
Constraints: 1-64 chars
descriptionOptionalstring
Free text; omitted: none
Constraints: max 255 chars
stopInstanceOptionalboolean
The volume is attached: stop its instance for the snapshot and start it after
Default:
falsetagsOptionalmap of string
Tags for the new resource, e.g. {"env": "prod", "project": "shop"}. Keys your organization marks required must be present, or the create is refused with the missing keys (GET /tags/api/keys lists them).
Constraints: key=value
Response
202: `data` is the new snapshot (fields as listed), not yet `completed`; poll it for progress.
A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.
Errors
- 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
- 401No credentials, or an access key that is unknown, revoked or expired.
- 403The caller's policies do not allow ec2:CreateSnapshot on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
- 404The resource does not exist in your organization.
Examples
The required parameters only, with example values. Replace id and the other placeholders with your own.
dcloud ec2 snapshots create idcurl -X POST "https://console.platform-development.deutschecloud.app/ec2/api/volumes/id/snapshots" \
-H "Authorization: EWS-ACCESS-KEY $ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{}'Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_ec2_snapshots_create.