Create an 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"
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"
Instance template to launch from. It sets image, cloud_init_user_data, enable_public_ipv4, and firewall; values you set in this request override the template's.
(itmpl_[0-9a-zA-Z_-]{1,21}|ntmpl_[0-9a-zA-Z_-]{1,21})|(sfc:instance_template:[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+){2,2})"itmpl_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.
Required unless you set instance_template; overrides the template's image.
Base64-encoded cloud-init user data. Maximum 64KB. Overrides the template's cloud-init user data.
"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.
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 public IPv4 is enabled, unless instance_template supplies a firewall; forbidden when public IPv4 is disabled.
(frwl_[0-9a-zA-Z_-]{1,21})|(sfc:firewall:[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+){2,2})"frwl_k3R-nX9vLm7Qp2Yw5Jd8F"
Response
Instance created.
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 Base64-encoded cloud-init user data.
"IyEvYmluL2Jhc2gKZWNobyBoZWxsbyB3b3JsZAo="