Skip to content

Create a launch template with its version 1.

POST
/v1/projects/{projectId}/asg/launch-templates
Code sample: Shell / cURL
curl --request POST \
--url https://stratum.example.com/v1/projects/example/asg/launch-templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "description": "example", "tags": { "additionalProperty": "example" }, "version": { "description": "example", "imageId": "example", "instanceType": "example", "subnetIdStrategy": "static", "subnetId": "example", "securityGroupIds": [ "example" ], "floatingIpPool": "example", "rootVolumeSizeBytes": 1, "rootStorageClass": "example", "placementGroupName": "example", "keyPairName": "example", "userData": "example", "iamInstanceProfileId": "example", "metadataOptions": { "httpEndpoint": "enabled", "httpTokens": "optional", "httpPutResponseHopLimit": 1, "instanceMetadataTags": "enabled" }, "blockDeviceMappings": [ { "deviceIndex": 1, "sizeBytes": 1, "deleteOnTermination": true } ], "agentEnabled": true, "tagsAtLaunch": { "additionalProperty": "example" } } }'

The template and its first version are created in one transaction; $LATEST and $DEFAULT both point at version 1. Every reference in the version (image, instance type, subnet, security groups, key pair, placement group, instance profile, storage class) is validated against the owning service: an absent or inactive one is 400 VALIDATION_FAILED. The name is unique per project (409). Counted against asg.launch_templates.count (429). Cedar-gated on asg:CreateLaunchTemplate.

projectId
required
string
/^p-[a-z0-9-]+$/
Media typeapplication/json
object
name
required

Unique per project.

string
/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/
description
string
<= 1024 characters
tags
object
key
additional properties
string
version
required

The launch blueprint one version freezes (amended 2026-09-15). Every field maps onto the Compute instance create request; at 2.0 a version describes one NIC (security groups + optional floating-IP pool) and the root volume. Every reference is validated at create against the service that owns it, so a group never discovers a bad blueprint at launch.

object
description
string
<= 1024 characters
imageId
required

An active image visible to the project.

string
instanceType
required

Instance type name (m1.medium), as Compute takes it.

string
subnetIdStrategy

static launches into subnetId; inherited lets the group pick a subnet by AZ balance. Defaults to static when subnetId is given, else inherited.

string
Allowed values: static inherited
subnetId

Required with static; forbidden with inherited.

string
securityGroupIds
Array<string>
floatingIpPool

Allocate a floating IP from this pool at launch.

string
rootVolumeSizeBytes

0 = the image’s size.

integer format: int64
rootStorageClass

Storage class (by name) for each instance’s root volume; omitted = the image’s own class. Must be one of the image’s launchableStorageClasses: checked when the version is saved, 409 IMAGE_POOL_MISMATCH otherwise.

string
placementGroupName

placement group — the only spread mechanism inside one AZ.

string
keyPairName
string
userData

Raw cloud-config / Ignition (NOT base64). Returned on describe; the audit trail carries only its SHA-256.

string
<= 65536 characters
iamInstanceProfileId

An active instance profile in the same project.

string
metadataOptions

Per-instance AWS-shape IMDS options. Returned on the Instance and settable at launch (CreateInstanceRequest) or via the modify-metadata-options action. httpEndpoint is enforced: when disabled the whole IMDS surface (including the Stratum SSH-CA agent plane) is off for the instance. httpTokens + httpPutResponseHopLimit are recorded for AWS parity only — Stratum’s IMDS always requires a session token (effectively IMDSv2-only), so optional does not relax that in v1. Omitted fields default to enabled / required / 1.

object
httpEndpoint

Whether IMDS is reachable for the instance. Default enabled.

string
Allowed values: enabled disabled
httpTokens

IMDSv2 token requirement (recorded; Stratum is always v2). Default required.

string
Allowed values: optional required
httpPutResponseHopLimit

Recorded for AWS parity. Default 1.

integer
>= 1 <= 64
instanceMetadataTags

When enabled the guest can read its own tags at /latest/meta-data/tags/instance/. Default disabled; the image builder enables it on a build instance.

string
Allowed values: enabled disabled
blockDeviceMappings

Per-device overrides for a multi-volume image; every data device the image carries is launched (cloned from its snapshot and attached before first boot) whether or not it is named here. 400 for a device the image does not have or a size below the snapshot’s.

Array<object>

A per-device override for one of the data devices a multi-volume image carries. deviceIndex must be one the image has (>= 1; device 0 is the root, sized by rootVolumeSizeBytes); sizeBytes must be at or above the snapshot’s; absent fields keep the image’s values. Devices not named are launched as the image mapped them.

object
deviceIndex
required
integer
>= 1
sizeBytes
integer format: int64
deleteOnTermination
boolean
agentEnabled

false launches without the instance agent; the group’s instance health mode then rides lifecycle state alone.

boolean
default: true
tagsAtLaunch

Tags stamped on every launched instance (reserved prefixes refused).

object
key
additional properties
string

Created — the template with its version 1 embedded.

Media typeapplication/json
object
id
required

lt-…

string
arn
required

arn:stratum:asg:<region>:<projectId>:launch-template/<id>

string
projectId
required
string
name
required
string
description
string
latestVersionId
required

What $LATEST resolves to; moves on every new version.

string
defaultVersionId
required

What $DEFAULT resolves to; moves only by set-default-version.

string
tags
required
object
key
additional properties
string
createdBy
required
string
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
version
required
object
description
string
<= 1024 characters
imageId
required

An active image visible to the project.

string
instanceType
required

Instance type name (m1.medium), as Compute takes it.

string
subnetIdStrategy

static launches into subnetId; inherited lets the group pick a subnet by AZ balance. Defaults to static when subnetId is given, else inherited.

string
Allowed values: static inherited
subnetId

Required with static; forbidden with inherited.

string
securityGroupIds
Array<string>
floatingIpPool

Allocate a floating IP from this pool at launch.

string
rootVolumeSizeBytes

0 = the image’s size.

integer format: int64
rootStorageClass

Storage class (by name) for each instance’s root volume; omitted = the image’s own class. Must be one of the image’s launchableStorageClasses: checked when the version is saved, 409 IMAGE_POOL_MISMATCH otherwise.

string
placementGroupName

placement group — the only spread mechanism inside one AZ.

string
keyPairName
string
userData

Raw cloud-config / Ignition (NOT base64). Returned on describe; the audit trail carries only its SHA-256.

string
<= 65536 characters
iamInstanceProfileId

An active instance profile in the same project.

string
metadataOptions

Per-instance AWS-shape IMDS options. Returned on the Instance and settable at launch (CreateInstanceRequest) or via the modify-metadata-options action. httpEndpoint is enforced: when disabled the whole IMDS surface (including the Stratum SSH-CA agent plane) is off for the instance. httpTokens + httpPutResponseHopLimit are recorded for AWS parity only — Stratum’s IMDS always requires a session token (effectively IMDSv2-only), so optional does not relax that in v1. Omitted fields default to enabled / required / 1.

object
httpEndpoint

Whether IMDS is reachable for the instance. Default enabled.

string
Allowed values: enabled disabled
httpTokens

IMDSv2 token requirement (recorded; Stratum is always v2). Default required.

string
Allowed values: optional required
httpPutResponseHopLimit

Recorded for AWS parity. Default 1.

integer
>= 1 <= 64
instanceMetadataTags

When enabled the guest can read its own tags at /latest/meta-data/tags/instance/. Default disabled; the image builder enables it on a build instance.

string
Allowed values: enabled disabled
blockDeviceMappings

Per-device overrides for a multi-volume image; every data device the image carries is launched (cloned from its snapshot and attached before first boot) whether or not it is named here. 400 for a device the image does not have or a size below the snapshot’s.

Array<object>

A per-device override for one of the data devices a multi-volume image carries. deviceIndex must be one the image has (>= 1; device 0 is the root, sized by rootVolumeSizeBytes); sizeBytes must be at or above the snapshot’s; absent fields keep the image’s values. Devices not named are launched as the image mapped them.

object
deviceIndex
required
integer
>= 1
sizeBytes
integer format: int64
deleteOnTermination
boolean
agentEnabled
required

false launches without the instance agent; the group’s instance health mode then rides lifecycle state alone.

boolean
default: true
tagsAtLaunch

Tags stamped on every launched instance (reserved prefixes refused).

object
key
additional properties
string
id
required

ltv-…

string
templateId
required
string
versionNumber
required

Monotonic from 1; immutable.

integer
userDataSha256
string
createdBy
required
string
createdAt
required
string format: date-time

Example

{
"version": {
"subnetIdStrategy": "static",
"metadataOptions": {
"httpEndpoint": "enabled",
"httpTokens": "optional",
"instanceMetadataTags": "enabled"
},
"agentEnabled": true
}
}

Bad request.

Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
>= 400 <= 599
detail
string
instance
string format: uri-reference
requestId
required
string
code
required
string
issues

The findings of a rejected IAM policy document (custom and resource policies).

Array<object>

One finding of a rejected IAM policy document. A rejection lists every finding, so the author fixes the document in one round trip.

object
code
required

The finding, e.g. INVALID_DOCUMENT, UNKNOWN_ACTION, ACTION_NOT_APPLICABLE.

string
statement
required

Index of the statement at fault; -1 for the document as a whole.

integer
>= -1
detail
required
string
action

The offending action, where one is at fault (ACTION_NOT_APPLICABLE).

string
errors

Field errors, for codes that carry them: each problem at its field (see FieldError). Documented on the responses that set it, e.g. approveNodeJoin’s INVALID_INPUT and JOIN_APPROVAL_REFUSED. Absent otherwise.

Array<object>

One field’s problem, the stage-2 installer API’s shape. field is the field’s path, message what is wrong with it.

object
field
required

The field’s path, e.g. links[0].interface, disks[1].confirm, mgmt.address or role; empty for the whole request.

string
message
required
string
details

Structured facts about the refusal, for codes that carry them. The shape is fixed per code and documented on the response that answers it, e.g. IMAGE_POOL_MISMATCH (see ImagePoolMismatchDetails) and IMAGE_IN_USE. Absent for codes that carry none.

object
key
additional properties
any

Example

{
"issues": [
{
"code": "ACTION_NOT_APPLICABLE",
"action": "compute:CreateVpc"
}
]
}

Authenticated but not authorized.

Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
>= 400 <= 599
detail
string
instance
string format: uri-reference
requestId
required
string
code
required
string
issues

The findings of a rejected IAM policy document (custom and resource policies).

Array<object>

One finding of a rejected IAM policy document. A rejection lists every finding, so the author fixes the document in one round trip.

object
code
required

The finding, e.g. INVALID_DOCUMENT, UNKNOWN_ACTION, ACTION_NOT_APPLICABLE.

string
statement
required

Index of the statement at fault; -1 for the document as a whole.

integer
>= -1
detail
required
string
action

The offending action, where one is at fault (ACTION_NOT_APPLICABLE).

string
errors

Field errors, for codes that carry them: each problem at its field (see FieldError). Documented on the responses that set it, e.g. approveNodeJoin’s INVALID_INPUT and JOIN_APPROVAL_REFUSED. Absent otherwise.

Array<object>

One field’s problem, the stage-2 installer API’s shape. field is the field’s path, message what is wrong with it.

object
field
required

The field’s path, e.g. links[0].interface, disks[1].confirm, mgmt.address or role; empty for the whole request.

string
message
required
string
details

Structured facts about the refusal, for codes that carry them. The shape is fixed per code and documented on the response that answers it, e.g. IMAGE_POOL_MISMATCH (see ImagePoolMismatchDetails) and IMAGE_IN_USE. Absent for codes that carry none.

object
key
additional properties
any

Example

{
"issues": [
{
"code": "ACTION_NOT_APPLICABLE",
"action": "compute:CreateVpc"
}
]
}

IMAGE_POOL_MISMATCH — rootStorageClass cannot hold a clone of the image: it is not one of the image’s launchableStorageClasses, so every launch from this version would be refused with the same code. Nothing is saved. details is an ImagePoolMismatchDetails. IMAGE_DISABLED — the image is disabled. CONFLICT — the name is taken in this project.

Media typeapplication/problem+json

A 409 on a route that can answer IMAGE_POOL_MISMATCH: a Problem whose details, for that code, is an ImagePoolMismatchDetails. The route’s other conflict codes carry no details.

object
type
required
string format: uri
title
required
string
status
required
integer
>= 400 <= 599
detail
string
instance
string format: uri-reference
requestId
required
string
code
required
string
issues

The findings of a rejected IAM policy document (custom and resource policies).

Array<object>

One finding of a rejected IAM policy document. A rejection lists every finding, so the author fixes the document in one round trip.

object
code
required

The finding, e.g. INVALID_DOCUMENT, UNKNOWN_ACTION, ACTION_NOT_APPLICABLE.

string
statement
required

Index of the statement at fault; -1 for the document as a whole.

integer
>= -1
detail
required
string
action

The offending action, where one is at fault (ACTION_NOT_APPLICABLE).

string
errors

Field errors, for codes that carry them: each problem at its field (see FieldError). Documented on the responses that set it, e.g. approveNodeJoin’s INVALID_INPUT and JOIN_APPROVAL_REFUSED. Absent otherwise.

Array<object>

One field’s problem, the stage-2 installer API’s shape. field is the field’s path, message what is wrong with it.

object
field
required

The field’s path, e.g. links[0].interface, disks[1].confirm, mgmt.address or role; empty for the whole request.

string
message
required
string
details

Structured facts about the refusal, for codes that carry them. The shape is fixed per code and documented on the response that answers it, e.g. IMAGE_POOL_MISMATCH (see ImagePoolMismatchDetails) and IMAGE_IN_USE. Absent for codes that carry none.

object
key
additional properties
any
details

details of a 409 IMAGE_POOL_MISMATCH problem, the same on POST /v1/projects/{projectId}/compute/instances and the image create-volume action: the storage class asked for cannot hold a clone of the image.

object
imageId
string
imageDriver

The storage driver the image is stored on.

string
imagePools

The pools the image’s base lives in.

Array<string>
storageClass

The storage class asked for, by name.

string
storageClassDriver

The driver that class puts volumes on.

string
storageClassPool

The pool that class puts volumes in.

string
storageClasses

The classes, by name, that can launch the image (equal to the image’s launchableStorageClasses). Omitting the class always can.

Array<string>

Example

{
"issues": [
{
"code": "ACTION_NOT_APPLICABLE",
"action": "compute:CreateVpc"
}
]
}

Request rate limit exceeded. The API-boundary throttle caps request throughput per principal and per project; code is RATE_LIMITED (distinct from the quota engine’s QUOTA_EXCEEDED). The Retry-After header carries the seconds to wait. Applies to any authenticated endpoint — it is enforced by middleware, not per-path.

Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
>= 400 <= 599
detail
string
instance
string format: uri-reference
requestId
required
string
code
required
string
issues

The findings of a rejected IAM policy document (custom and resource policies).

Array<object>

One finding of a rejected IAM policy document. A rejection lists every finding, so the author fixes the document in one round trip.

object
code
required

The finding, e.g. INVALID_DOCUMENT, UNKNOWN_ACTION, ACTION_NOT_APPLICABLE.

string
statement
required

Index of the statement at fault; -1 for the document as a whole.

integer
>= -1
detail
required
string
action

The offending action, where one is at fault (ACTION_NOT_APPLICABLE).

string
errors

Field errors, for codes that carry them: each problem at its field (see FieldError). Documented on the responses that set it, e.g. approveNodeJoin’s INVALID_INPUT and JOIN_APPROVAL_REFUSED. Absent otherwise.

Array<object>

One field’s problem, the stage-2 installer API’s shape. field is the field’s path, message what is wrong with it.

object
field
required

The field’s path, e.g. links[0].interface, disks[1].confirm, mgmt.address or role; empty for the whole request.

string
message
required
string
details

Structured facts about the refusal, for codes that carry them. The shape is fixed per code and documented on the response that answers it, e.g. IMAGE_POOL_MISMATCH (see ImagePoolMismatchDetails) and IMAGE_IN_USE. Absent for codes that carry none.

object
key
additional properties
any

Example

{
"issues": [
{
"code": "ACTION_NOT_APPLICABLE",
"action": "compute:CreateVpc"
}
]
}
Retry-After
integer

Seconds to wait before retrying.

Upstream temporarily unavailable (driver / scheduler / dependency).

Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
>= 400 <= 599
detail
string
instance
string format: uri-reference
requestId
required
string
code
required
string
issues

The findings of a rejected IAM policy document (custom and resource policies).

Array<object>

One finding of a rejected IAM policy document. A rejection lists every finding, so the author fixes the document in one round trip.

object
code
required

The finding, e.g. INVALID_DOCUMENT, UNKNOWN_ACTION, ACTION_NOT_APPLICABLE.

string
statement
required

Index of the statement at fault; -1 for the document as a whole.

integer
>= -1
detail
required
string
action

The offending action, where one is at fault (ACTION_NOT_APPLICABLE).

string
errors

Field errors, for codes that carry them: each problem at its field (see FieldError). Documented on the responses that set it, e.g. approveNodeJoin’s INVALID_INPUT and JOIN_APPROVAL_REFUSED. Absent otherwise.

Array<object>

One field’s problem, the stage-2 installer API’s shape. field is the field’s path, message what is wrong with it.

object
field
required

The field’s path, e.g. links[0].interface, disks[1].confirm, mgmt.address or role; empty for the whole request.

string
message
required
string
details

Structured facts about the refusal, for codes that carry them. The shape is fixed per code and documented on the response that answers it, e.g. IMAGE_POOL_MISMATCH (see ImagePoolMismatchDetails) and IMAGE_IN_USE. Absent for codes that carry none.

object
key
additional properties
any

Example

{
"issues": [
{
"code": "ACTION_NOT_APPLICABLE",
"action": "compute:CreateVpc"
}
]
}