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
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).
bearerTokenAuthorizationBearer <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.
scopeId*stringOpaque ownership+authorization scope resolving to tenant + subscription + project.
imageId*stringIdentifier of the machine image whose share is being revoked.
Idempotency-Key?stringOptional; 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.
uuidIf-Match?stringETag for optimistic concurrency on mutations/deletes; mismatch results in 412.
application/json- body
Identifies the cross-account share grant to revoke.
accountId*stringThe consumer account whose share grant is revoked.
Share revoked; the updated image is returned with the share removed.
application/json- response
A machine image (public marketplace or private golden image) in the active scope.
id*stringImage identifier (e.g. img_golden_web).
name*stringUnique DNS-friendly image name (e.g. golden-web-prod).
description*stringos*ImageOs"ubuntu""debian""rhel""rocky""alma""windows""linux"osName*stringHuman-readable OS name (e.g. Red Hat Enterprise Linux).
osVersion*stringOS version label (e.g. 22.04 LTS).
visibility*MachineImageVisibility"Public""Private"sizeGb*numberarch*ImageArch"x86_64""arm64"source*Provenance of a machine image (what it was built from).
status*ImageStatusLifecycle 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.
"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*booleanWhether 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*numberMinimum root disk size hint for launch.
minRamMb*numberMinimum RAM hint for launch.
bootMode*MachineImageBootMode"UEFI""BIOS"createdAt*stringdate-timeupdatedAt*stringdate-timeshares*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" } ]}