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.

Revoke a cross-account share of a machine image

POST
/scopes/{scopeId}/compute/images/{imageId}/actions/revoke

Revokes previously granted access to the selected image. The UI evidence (the "Revoke" button on each row of the image detail page shares table) revokes the share grant for one consumer account: the account is removed from the image's shares list and can no longer launch instances from the image; instances already launched by that account are not affected. Validation: the image must exist in the scope and not be soft-deleted (else 404 NOT_FOUND); the image's current state must permit revoke — a PENDING or ERROR image has no active grants and a missing accountId grant maps to 409 CONFLICT; accountId is required in the body and must be a known shared account, else 422 VALIDATION_ERROR; the caller needs contributor/admin/owner rights on the scope (403 FORBIDDEN otherwise). Async & state: Synchronous (200). The share entry is removed atomically and the updated image (with the share absent and updatedAt bumped) is returned; a resource.updated SSE frame is emitted for the image with a patch on shares/updatedAt. No long-running operation is created. Errors: 401 unauthenticated; 403 insufficient role; 404 unknown image; 409 CONFLICT when no matching active share exists or the image state forbids revoke; 412 when the supplied If-Match ETag is stale; 422 missing/invalid accountId; 500 internal failure. Idempotency/Concurrency: Idempotency-Key is optional (recommended); a replay of the same key returns the original 200 result without re-executing. If-Match with the image ETag guards against concurrent share-list mutations (mismatch → 412 PRECONDITION_FAILED).

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.

imageId*string

Identifier of the machine image whose share is being revoked.

Header Parameters

Idempotency-Key?string

Optional; recommended for safe retries. When sent, the same key+body within 24h replays the original result and the same key with a different body is 409 CONFLICT; keys are unique per tenant. When an API token or service-account (bearer) caller omits it, the request is applied once with no replay protection (a retry may apply it again). A console session gets one from the edge.

Formatuuid
If-Match?string

ETag for optimistic concurrency on mutations/deletes; mismatch results in 412.

Request Body

application/json
  1. body

Identifies the cross-account share grant to revoke.

accountId*string

The consumer account whose share grant is revoked.

Response Body

Share revoked; the updated image is returned with the share removed.

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/string/actions/revoke" \  -H "Content-Type: application/json" \  -d '{    "accountId": "string"  }'
{  "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"    }  ]}