Create instance
⚠️ This endpoint is in public preview.
Create an instance.
Authorizations
Create an API token using sf tokens create or at https://sfcompute.com/dashboard/tokens.
Body
A resource path like 'sfc:pool:acme:prod:my-pool' or an ID. Resource paths are human-readable but not stable - they change when resources are renamed or moved. IDs are stable and permanent.
(pool_[0-9a-zA-Z_-]{1,21})|(sfc:pool:[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+){2,2})"pool_k3R-nX9vLm7Qp2Yw5Jd8F"
Machine image to boot from: an image ID, a resource path (follows the latest active version of the name), or a resource path pinned to one version with an @<version> suffix (e.g. sfc:image:sfcompute:public:ubuntu-22.04@2). Pins may launch a deprecated version; revoked versions never launch.
Instance SKU this instance will run on. The instance is pinned to the SKU's underlying hardware pool at create time — it will not land on any other SKU. See GET /preview/v2/instance_skus to enumerate the SKUs visible to your account.
isku_[0-9a-zA-Z_-]{1,21}"isku_k3R-nX9vLm7Qp2Yw5Jd8F"
1 - 255[a-zA-Z0-9][a-zA-Z0-9._-]{0,254}"my-resource-name"
Base64-encoded cloud-init user data. Maximum 64KB.
"IyEvYmluL2Jhc2gKZWNobyBoZWxsbyB3b3JsZAo="
InfiniBand partition to join: an ibpart_ id, a resource path, or a partition name. Whichever form you use, the partition must belong to the pool's workspace and sit in the SKU's region and availability zone. A bare name is resolved within the pool's workspace, where partition names are unique; an id or a resource path resolves account-wide and is then checked against that workspace. Available to accounts enrolled in the InfiniBand preview.
Whether to assign a public IPv4 address to this instance. When false (the default), only SSH (TCP port 22) is open on the instance and no other ports accept inbound traffic. When true, the chosen instance_sku must advertise the SKU property public_ipv4 with value "yes".
Firewall to attach to this instance's public IP, e.g. sfc:firewall:acme:prod:default to use the workspace's auto-managed default firewall.
Required when enable_public_ipv4 = true; forbidden otherwise.
(frwl_[0-9a-zA-Z_-]{1,21})|(sfc:firewall:[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+){2,2})"frwl_k3R-nX9vLm7Qp2Yw5Jd8F"
Optional metadata tags for this instance.
Instance priority. Omit to default to normal.
yield, normal, preferred, critical Response
Instance created.
Accepts the canonical prefix below; additional legacy prefixes are aliased for read compatibility. Writes always emit the canonical form.
inst_[0-9a-zA-Z_-]{1,21}"inst_k3R-nX9vLm7Qp2Yw5Jd8F"
A resource path for a instance resource. Format: sfc:instance:::.
sfc:instance:([a-zA-Z0-9._-]+:){2}[a-zA-Z0-9._-]+"sfc:instance:<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"awaiting_allocation when waiting for compute allocation on its capacity, running once assigned and the physical machine is running (still takes time for the image to be downloaded and booted), terminated when stopped by the user or after running out of allocation, failed on hardware fault.
Values are not exhaustive across API versions. Clients should tolerate new statuses.
awaiting_allocation, running, terminated, failed Instance SKU this instance is pinned to.
Deprecated — use pool. The pool this instance is utilizing.
A pool referenced by id and name.
Unix timestamp.
1738972800
Unix timestamp (seconds) when the instance was last updated.
1738972800
Image this instance was launched from.
Whether cloud-init user data is configured for this instance.
Deployment or spot deployment managing this instance, if any.
- Option 1
- Option 2
Base64-encoded cloud-init user data.
"IyEvYmluL2Jhc2gKZWNobyBoZWxsbyB3b3JsZAo="
Subnet this instance is placed in, if any. Instances without a subnet use an ephemeral subnet (isolated, no east-west traffic with other VMs).
snet_[0-9a-zA-Z_-]{1,21}"snet_k3R-nX9vLm7Qp2Yw5Jd8F"
Private IPv4 address assigned to this instance within its subnet, if any.
Whether this instance requires a public IPv4 address. When false, only SSH (TCP port 22) is open on the instance and no other ports accept inbound traffic.
Public IPv4 address assigned to this instance. Present only when enable_public_ipv4 = true; omitted otherwise.
Firewall attached to this instance's public IP. Omitted when the instance has enable_public_ipv4 = false.
frwl_[0-9a-zA-Z_-]{1,21}"frwl_k3R-nX9vLm7Qp2Yw5Jd8F"
InfiniBand partition this instance is a member of, if any. Set at create time and fixed for the instance's lifetime.
ibpart_[0-9a-zA-Z_-]{1,21}"ibpart_k3R-nX9vLm7Qp2Yw5Jd8F"
Metadata tags attached to this instance.
Deprecated. Always returned as null.
1738972800
Instance priority. Lower-priority instances are terminated first when the capacity's quota drops below the running-instance count.
yield, normal, preferred, critical