v1

latestSwagger 2.02026-08-04232286653.5 KB
Instance Templates

Returns details for a single instance template in the project.

get/projects/{project_id}/compute/instance-templates/{instance_template_id}

Path parameters

instance_template_idstring required

ID of the instance template.

project_idstring required

Response

created_atstring required

Creation timestamp of the instance template, in RFC3339 format.

custom_image_namestring

Custom image to use for all VMs created from this instance template.

ib_partition_idstring required
idstring required

ID of the instance template.

image_namestring required

OS Image to use for all VMs created from this instance template.

locationstring required

Location to use for all VMs created from this instance template. May be empty if we do not want to bind this template to a location.

maintenance_policy'manual' | 'stop-vm' | 'unspecified' required

Host maintenance policy controlling how VMs created from this instance template behave during host maintenance: manual, stop-vm, or unspecified.

namestring required

Name of the instance template. (This is not the name of the VMs created from this instance template.)

nvlink_domain_idstring

NVLink domain assigned to all VMs created from this instance template.

placement_policy'spread' | 'unspecified' required

Placement policy controlling how VMs created from this instance template are distributed across hosts: spread or unspecified.

project_idstring required

ID of the project this instance template belongs to.

public_ip_address_typestring required

Public IP address type to use for all VMs created from this instance template. Must either be "static" or "dynamic".

reservation_idstring

Reservation used for all VMs created from this instance template.

shutdown_scriptstring required

Shutdown script to use for all VMs created from this instance template.

ssh_public_keystring required

SSH public key to use for all VMs created from this instance template.

startup_scriptstring required

Startup script to use for all VMs created from this instance template.

subnet_idstring required

SubnetID to use for all VMs created from this instance template. Only used if template has a location.

transport_partition_idstring required

IB or RoCE partition to use for all VMs created from this instance template. Only used for transport-enabled VM types. Empty if template has no location.

typestring required

Product name of the VM type we want to create from this instance template.

Example response

{
  "created_at": "2024-01-01T00:00:00Z",
  "custom_image_name": "ubuntu:20.04",
  "disks": [
    {
      "size": "10GiB",
      "type": "persistent-ssd"
    }
  ],
  "id": "ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab",
  "image_name": "ubuntu:20.04",
  "location": "us-northcentral1-a",
  "name": "my-instance-template",
  "nvlink_domain_id": "550e8400-e29b-41d4-a716-446655440000",
  "project_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
  "public_ip_address_type": "static",
  "reservation_id": "804bf3a2-81f2-4d78-9a9e-dc6a55ed33d8",
  "shutdown_script": "#!/bin/bash\\necho 'goodbye'",
  "ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCspdG97nTS/h4PEPq2QD2RYVK1jxFXLFZuSDMI8Rtxpucl6LDZLOghEYoj13lxKQnGtcsM3Iu68lh+4YgZe7CbI6cc/TxPbeAX2HJTqDh0J7+GAlLBHK9tsepC0QlhIDiazJptOPDZ3cesCBXdxSnzEbhDaqgYOfl393cp1fCeOKRIDWEP3H9CM25dCbWF66sTDziLsojJ9dMnxhgKm9/JkZc5gYncLT/2Ey+VWfV9Fs65mGUrBbQOn3c8S/nEk6WRcYn4PFOnIp0Mz+Chb50iCJrW677pllLnkTGSU+4c0H9J5z4HDG0I+91RoiQ0QsayFTYO1JtSn+THLuq98V+D",
  "startup_script": "#!/bin/bash\\necho 'hello'",
  "subnet_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
  "transport_partition_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
  "type": "a100.2x",
  "virtualization_features": {
    "nested_virtualization": true
  }
}