Create instance template
⚠️ This endpoint is in public preview.
Create a reusable instance template.
Authorizations
Create an API token using sf tokens create or at https://sfcompute.com/account/api-keys.
Body
Workspace to create this template in.
(wksp_[0-9a-zA-Z_-]{1,21})|(sfc:workspace:[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+){1,1})"wksp_k3R-nX9vLm7Qp2Yw5Jd8F"
Machine image to use when starting instances with this template. Accepts name or ID.
(image_[0-9a-zA-Z_-]{1,21}|vmi_[0-9a-zA-Z_-]{1,21})|(sfc:image:[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+){2,2})"image_k3R-nX9vLm7Qp2Yw5Jd8F"
1 - 255[a-zA-Z0-9][a-zA-Z0-9._-]{0,254}"my-resource-name"
Assign a public IPv4 address to instances started with this template.
Firewall to apply to instances started with this template. Accepts name or ID. Required when enable_public_ipv4 is true, and rejected when it is false.
(frwl_[0-9a-zA-Z_-]{1,21})|(sfc:firewall:[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+){2,2})"frwl_k3R-nX9vLm7Qp2Yw5Jd8F"
Metadata tags to attach to this instance template.
Base64-encoded cloud-init user data. Maximum 64KB. Instances created by a generic or spot deployment inherit this data from the referenced template, so bootstrap steps such as worker registration can be configured here.
"IyEvYmluL2Jhc2gKZWNobyBoZWxsbyB3b3JsZAo="
Response
Instance template created.
Accepts the canonical prefix below; additional legacy prefixes are aliased for read compatibility. Writes always emit the canonical form.
itmpl_[0-9a-zA-Z_-]{1,21}"itmpl_k3R-nX9vLm7Qp2Yw5Jd8F"
A resource path for a instance_template resource. Format: sfc:instance_template:::.
sfc:instance_template:([a-zA-Z0-9._-]+:){2}[a-zA-Z0-9._-]+"sfc:instance_template:<account_id>:<workspace>:<name>"
1 - 255[a-zA-Z0-9][a-zA-Z0-9._-]{0,254}"my-resource-name"
1 - 255[a-zA-Z0-9][a-zA-Z0-9._-]{0,254}"my-resource-name"
wksp_[0-9a-zA-Z_-]{1,21}"wksp_k3R-nX9vLm7Qp2Yw5Jd8F"
1 - 255[a-zA-Z0-9][a-zA-Z0-9._-]{0,254}"my-resource-name"
"instance_template"Machine image to use when starting instances with this template.
Whether instances started with this template get a public IPv4 address.
Whether cloud-init user data is configured for this template.
Unix timestamp.
1738972800
Firewall applied to instances started with this template. Present exactly when enable_public_ipv4 is true.
frwl_[0-9a-zA-Z_-]{1,21}"frwl_k3R-nX9vLm7Qp2Yw5Jd8F"
Metadata tags attached to this instance template.
Base64-encoded cloud-init user data.
"IyEvYmluL2Jhc2gKZWNobyBoZWxsbyB3b3JsZAo="