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.
Export the instance configuration as a deployment template
Generates a downloadable infrastructure-as-code template for the instance configuration
("Download template" on the instance creation wizard review step). The template captures the
UI-visible provisioning inputs — name, region, availability zone, image, architecture,
authentication settings (never secret material), OS disk type/size, encryption, network bindings
(VNet/subnet/public IP/NSG), accelerated networking, managed identity, boot diagnostics,
monitoring, backup, auto-shutdown schedule, and user data — so the deployment can be repeated.
Read-only with respect to the instance: no resource state is mutated.
Validation: instance must exist and be visible in the active scope → 404 NOT_FOUND; format
(when provided) must be one of [json, yaml] → 422 VALIDATION_FAILED.
Errors: 401 UNAUTHENTICATED; 403 FORBIDDEN when the caller lacks read access to the scope;
404 NOT_FOUND for an unknown instanceId; 422 VALIDATION_FAILED for an unsupported format;
500 INTERNAL.
Async & state: Synchronous (200) returning the rendered template document inline; no state
change and no SSE frames.
Idempotency/Concurrency: This operation does not use Idempotency-Key; it may be omitted
and a sent one is ignored. Generation is deterministic for a given instance revision: repeated
calls return the same content, with a fresh generatedAt each time. No If-Match applies.
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.
instanceId*stringIdentifier of the compute instance.
application/json- body
Options for the instance template export; defaults to JSON when omitted.
format?string"json""json""yaml"Rendered deployment template for the instance configuration.
application/json- response
Rendered deployment template for an instance configuration ("Download template"). Secrets are excluded.
instanceId*stringformat*InstanceTemplateFormat"json""yaml"content*stringThe rendered template document as a string in the requested format.
generatedAt*stringISO-8601 timestamp of when the template was rendered.
curl -X POST "https://example.com/scopes/string/compute/instances/string/exports" \ -H "Content-Type: application/json" \ -d '{}'{ "instanceId": "string", "format": "json", "content": "string", "generatedAt": "string"}