Compute

Preview — pending review

This reference is generated from the platform API contract and is still under review. Operations, fields, and descriptions can change before publication.

Create a machine image from an instance, snapshot, or import URL

POST
/scopes/{scopeId}/compute/images

Creates a new private machine image in the active scope from one of the two sources with a wired provider path: capture of an existing instance (the instance is briefly quiesced during capture), or an existing volume snapshot (Cinder os-volume_upload_image). The caller supplies name, description, operating system, architecture and an optional AES-256 encryption flag; on acceptance the image becomes discoverable in the scoped list in its transitional PENDING state. Validation: name is required, must match ^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$ (3–63 chars, lowercase letters, digits, dots, hyphens) and be unique in the scope — violations map to 422 VALIDATION_ERROR, a duplicate name to 409 CONFLICT; sourceKind is required and the matching source field must be present (sourceInstanceId for instance, sourceSnapshotId for snapshot) else 422; a referenced instance that does not exist or is not accessible in the scope maps to 404 NOT_FOUND, an unknown / out-of-scope sourceSnapshotId to 422 VALIDATION_FAILED; image-storage quota exhaustion maps to 409 QUOTA_EXCEEDED. Async & state: Asynchronous (202). The image is returned immediately in PENDING state and transitions to terminal AVAILABLE on successful build/import or ERROR on failure; each transition is emitted as a resource.updated SSE frame with a patch on status (and sizeGb/updatedAt once the build completes) for the image resource. Errors: 401 unauthenticated; 403 caller lacks contributor/admin/owner on the scope; 404 unknown source instance/snapshot; 409 CONFLICT on duplicate name; 409 QUOTA_EXCEEDED when the image quota is exhausted; 422 invalid body; 500 internal failure. Idempotency/Concurrency: Idempotency-Key is required; replaying the same key returns the originally created image (same id, current state) without provisioning a duplicate.

Authorization

bearerToken
headerAuthorizationBearer <token>

An API token (pc_live_…) or a service-account key (sak_live_…), created in Identity & Access Management and sent as Authorization: Bearer <token>. Requests are rate limited per credential and per tenant: every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset, and a refused request gets 429 RATE_LIMITED with Retry-After.

Path Parameters

scopeId*string

Opaque ownership+authorization scope resolving to tenant + subscription + project.

Header Parameters

Idempotency-Key*string

Required: this operation creates a new resource asynchronously, so a retry without the key would create a second one. Same key+body within 24h replays the original result; the same key with a different body is 409 CONFLICT. Keys are unique per tenant (the same key in two tenants is two different requests). An API token or service-account (bearer) caller MUST send it -- a request without it is refused with 400 IDEMPOTENCY_KEY_REQUIRED (ErrIdempotencyKeyRequired); reuse the same key on every retry of one logical request. A console session gets one from the edge.

Formatuuid

Request Body

application/json
  1. body

Payload of the image creation form.

sourceKind*string

Where the image is built from — instance (capture a running instance) or snapshot (build the image from an existing volume snapshot). See CreateImageInputSourceKind.

Value in"instance""snapshot"
sourceInstanceId?|

Required when sourceKind is instance; the instance to capture (briefly quiesced).

sourceSnapshotId?|

Required when sourceKind is snapshot; an AVAILABLE volume snapshot in the active scope. The image is built by materialising a temporary volume from the snapshot and uploading it to Glance (Cinder os-volume_upload_image); the temporary volume is reaped afterwards.

name*string

Unique, DNS-friendly image name (3–63 chars, lowercase letters, numbers, dots and hyphens).

Match^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$
description?string

What this image contains and what it is for.

Lengthlength <= 255
os*ImageOs
Value in"ubuntu""debian""rhel""rocky""alma""windows""linux"
arch*ImageArch
Value in"x86_64""arm64"
encrypted?boolean

REQUEST encryption at rest for the image. Encryption is a REGION CAPABILITY, not a property this request can grant: the image service (Glance) encrypts nothing, and an image only carries a ciphered payload where the region can build it from an encrypted block volume — i.e. where the image-encryption availability domain is offered. Where it is not, the create is rejected NOT_FOUND ("image encryption at rest is not available in region ") rather than accepted and silently stored in the clear. The value is never persisted or echoed back — the MachineImage.encrypted field on every read is derived from what the provider reports about the image. Defaults false.

Defaultfalse

Response Body

Image creation accepted; the image is returned in its transitional PENDING state.

application/json
  1. response

A machine image (public marketplace or private golden image) in the active scope.

id*string

Image identifier (e.g. img_golden_web).

name*string

Unique DNS-friendly image name (e.g. golden-web-prod).

description*string
os*ImageOs
Value in"ubuntu""debian""rhel""rocky""alma""windows""linux"
osName*string

Human-readable OS name (e.g. Red Hat Enterprise Linux).

osVersion*string

OS version label (e.g. 22.04 LTS).

visibility*MachineImageVisibility
Value in"Public""Private"
sizeGb*number
arch*ImageArch
Value in"x86_64""arm64"
source*

Provenance of a machine image (what it was built from).

status*ImageStatus

Lifecycle status of a machine image. DELETING is the transitional state a tenant-owned captured image enters once its asynchronous delete is accepted; the row disappears from the catalog when the delete Operation succeeds, and returns to its prior status if the delete fails.

Value in"AVAILABLE""PENDING""DEPRECATED""DELETING""ERROR"
statusReason*|

Human-readable, customer-facing reason the last lifecycle command on this resource failed (e.g. "The request could not be completed after repeated attempts. Try again, or contact support if it persists."); never raw provider text. Null while healthy, once a later settle clears it, or when the failure carried no detail. Mirrors Instance.statusReason.

encrypted*boolean

Whether the image is encrypted at rest, DERIVED from the provider's own view of the image — never from the create request. The image service (Glance) performs no encryption of its own; an image is genuinely ciphertext only when it was uploaded from an encrypted block volume, which stamps the encryption key id onto the image. False until the provider confirms that, so this field never asserts a security property the platform did not actually deliver.

kmsKeyId*|

The key the image payload is actually encrypted under, as reported by the provider; null when the image is unencrypted (which is every image on a region that does not offer the image-encryption availability domain).

minDiskGb*number

Minimum root disk size hint for launch.

minRamMb*number

Minimum RAM hint for launch.

bootMode*MachineImageBootMode
Value in"UEFI""BIOS"
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
shares*array<>

Accounts this private image is shared with (Public images have an empty list).

versions*array<>
curl -X POST "https://example.com/scopes/string/compute/images" \  -H "Idempotency-Key: 497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "sourceKind": "instance",    "name": "string",    "os": "ubuntu",    "arch": "x86_64"  }'
{  "id": "string",  "name": "string",  "description": "string",  "os": "ubuntu",  "osName": "string",  "osVersion": "string",  "visibility": "Public",  "sizeGb": 0,  "arch": "x86_64",  "source": {    "kind": "instance",    "ref": "string"  },  "status": "AVAILABLE",  "statusReason": "string",  "encrypted": true,  "kmsKeyId": "string",  "minDiskGb": 0,  "minRamMb": 0,  "bootMode": "UEFI",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "shares": [    {      "accountId": "string",      "accountName": "string",      "sharedAt": "2019-08-24T14:15:22Z"    }  ],  "versions": [    {      "version": "string",      "createdAt": "2019-08-24T14:15:22Z",      "sizeGb": 0,      "isLatest": true,      "note": "string"    }  ]}