# Instance


<style>
  span[class^="pill-"] {
    color: white;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 0.6em;
    vertical-align: middle;
    margin-right: 12px;
    font-family: sans-serif;
    font-weight: bold;
    display: inline-block;
    line-height: 1;
  }
  span.pill-GET { background-color: #61affe; }
  span.pill-POST { background-color: #49cc90; }
  span.pill-PUT { background-color: #fca130; }
  span.pill-DELETE { background-color: #f93e3e; }
  span.pill-PATCH { background-color: #50e3c2; }
  span[class^="pill-"]:after {
    content: attr(data-label);
    font-size: 0.9rem;
  }
</style>

Instances are the virtual machines at the core of the Exoscale Compute service.

[Read more](https://www.exoscale.com/compute/)

## <span data-label="POST" class="pill-POST"></span>create-instance

Create a Compute instance

```
POST /instance
```

### Request body

Content-Type: `application/json`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `disk-size` | integer | **yes** | Instance disk size in GiB<br/><br/>Min: `10`. Max: `51200`. |
| `instance-type` | [Instance type reference](/reference/api/_schemas/instance-type-ref/) | **yes** | Instance Type |
| `template` | [Template reference](/reference/api/_schemas/template-ref/) | **yes** | Instance Template |
| `anti-affinity-groups` | array of [Anti-affinity group reference](/reference/api/_schemas/anti-affinity-group-ref/) | no | Instance Anti-affinity Groups |
| `application-consistent-snapshot-enabled` | boolean | no | Enable application-consistent snapshot for the instance |
| `auto-start` | boolean | no | Start Instance on creation (default: true) |
| `deploy-target` | [Deploy target reference](/reference/api/_schemas/deploy-target-ref/) | no | Instance Deploy Target |
| `ipv6-enabled` | boolean | no | Enable IPv6. DEPRECATED: use `public-ip-assignments`. |
| `labels` | object | no | Resource labels |
| `name` | string | no | Instance name<br/><br/>Min length: `1`. Max length: `255`. |
| `public-ip-assignment` | string | no | Assign public IP to the Instance<br/><br/>Allowed values: `inet4`, `dual`, `none`. |
| `secureboot-enabled` | boolean | no | Enable secure boot |
| `security-groups` | array of [Security group reference](/reference/api/_schemas/security-group-ref/) | no | Instance Security Groups |
| `ssh-key` | [SSH key reference](/reference/api/_schemas/ssh-key-ref/) | no | Instance SSH Key |
| `ssh-keys` | array of [SSH key reference](/reference/api/_schemas/ssh-key-ref/) | no | Instance SSH Keys |
| `tpm-enabled` | boolean | no | Enable Trusted Platform Module (TPM) |
| `user-data` | string | no | Instance Cloud-init user-data (base64 encoded)<br/><br/>Min length: `1`. Max length: `32768`. |

<details>
<summary>Example</summary>

```json
{
  "anti-affinity-groups": [
    {
      "id": "string"
    }
  ],
  "application-consistent-snapshot-enabled": true,
  "auto-start": true,
  "deploy-target": {
    "id": "string"
  },
  "disk-size": 0,
  "instance-type": {
    "id": "string"
  },
  "ipv6-enabled": true,
  "labels": {},
  "name": "string",
  "public-ip-assignment": "inet4",
  "secureboot-enabled": true,
  "security-groups": [
    {
      "id": "string"
    }
  ],
  "ssh-key": {
    "name": "string"
  },
  "ssh-keys": [
    {
      "name": "string"
    }
  ],
  "template": {
    "id": "string"
  },
  "tpm-enabled": true,
  "user-data": "string"
}
```
</details>


### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `create-instance`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.CreateInstance) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.create_instance) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#createInstance(com.exoscale.sdk.model.CreateInstanceRequest))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api create-instance`

## <span data-label="GET" class="pill-GET"></span>get-instance

Retrieve Compute instance details

```
GET /instance/{id}
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `anti-affinity-groups` | array of [Anti-affinity group reference](/reference/api/_schemas/anti-affinity-group-ref/) | Instance Anti-affinity Groups |
| `application-consistent-snapshot-enabled` | boolean | Indicates if the instance will take application-consistent snapshots |
| `created-at` | string | Instance creation date<br/><br/>ISO 8601 date-time. |
| `deploy-target` | [Deploy target reference](/reference/api/_schemas/deploy-target-ref/) | Instance Deploy Target |
| `disk-encrypted` | boolean | Indicates if the root volume of the instance is encrypted |
| `disk-size` | integer | Instance disk size in GiB<br/><br/>Min: `10`. Max: `51200`. |
| `elastic-ips` | array of [Elastic IP reference](/reference/api/_schemas/elastic-ip-ref/) | Instance Elastic IPs |
| `id` | string | Instance ID<br/><br/>Must be a valid UUID. |
| `instance-type` | [Compute instance type](/reference/api/_schemas/instance-type/) | Instance Type |
| `ipv6-address` | string | Instance IPv6 address |
| `labels` | object | Resource labels |
| `mac-address` | string | Instance MAC address |
| `manager` | [Resource manager](/reference/api/_schemas/manager/) | Instance manager |
| `name` | string | Instance name<br/><br/>Min length: `1`. Max length: `255`. |
| `private-networks` | array of [Private Networks](/reference/api/_schemas/instance/#private-networks) | Instance Private Networks |
| `public-ip` | string | Instance public IPv4 address<br/><br/>Must be a valid IPv4 address. |
| `public-ip-assignment` | string | Instance public IP assignment<br/><br/>Allowed values: `inet4`, `dual`, `none`. |
| `secureboot-enabled` | boolean | Indicates if the instance has secure boot enabled |
| `security-groups` | array of [Security group reference](/reference/api/_schemas/security-group-ref/) | Instance Security Groups |
| `snapshots` | array of [Snapshot reference](/reference/api/_schemas/snapshot-ref/) | Instance Snapshots |
| `ssh-key` | [SSH key](/reference/api/_schemas/ssh-key/) | Instance SSH Key |
| `ssh-keys` | array of [SSH key](/reference/api/_schemas/ssh-key/) | Instance SSH Keys |
| `state` | string | Instance state<br/><br/>Allowed values: `expunging`, `starting`, `destroying`, `running`, `stopping`, `stopped`, `migrating`, `error`, `destroyed`. |
| `template` | [Instance template](/reference/api/_schemas/template/) | Instance Template |
| `tpm-enabled` | boolean | Indicates if the instance has tpm enabled |
| `user-data` | string | Instance Cloud-init user-data (base64 encoded)<br/><br/>Min length: `1`. |

<details>
<summary>Example output</summary>

```json
{
  "anti-affinity-groups": [
    {
      "id": "string"
    }
  ],
  "application-consistent-snapshot-enabled": true,
  "created-at": "2024-01-01T12:00:00Z",
  "deploy-target": {
    "id": "string"
  },
  "disk-encrypted": true,
  "disk-size": 0,
  "elastic-ips": [
    {
      "id": "string"
    }
  ],
  "id": "string",
  "instance-type": {
    "authorized": true,
    "cpus": 0,
    "family": "gpu3",
    "gpus": 0,
    "id": "string",
    "memory": 0,
    "size": "large",
    "zones": [
      "ch-dk-2"
    ]
  },
  "ipv6-address": "string",
  "labels": {},
  "mac-address": "string",
  "manager": {
    "id": "string",
    "type": "sks-nodepool"
  },
  "name": "string",
  "private-networks": [
    {
      "id": "string",
      "mac-address": "string"
    }
  ],
  "public-ip": "string",
  "public-ip-assignment": "inet4",
  "secureboot-enabled": true,
  "security-groups": [
    {
      "id": "string"
    }
  ],
  "snapshots": [
    {
      "id": "string"
    }
  ],
  "ssh-key": {
    "fingerprint": "string",
    "name": "string"
  },
  "ssh-keys": [
    {
      "fingerprint": "string",
      "name": "string"
    }
  ],
  "state": "expunging",
  "template": {
    "application-consistent-snapshot-enabled": true,
    "boot-mode": "legacy",
    "build": "string",
    "checksum": "string",
    "created-at": "2024-01-01T12:00:00Z",
    "default-user": "string",
    "description": "string",
    "family": "string",
    "id": "string",
    "maintainer": "string",
    "name": "string",
    "password-enabled": true,
    "size": 0,
    "ssh-key-enabled": true,
    "url": "string",
    "version": "string",
    "visibility": "private",
    "zones": [
      "ch-dk-2"
    ]
  },
  "tpm-enabled": true,
  "user-data": "string"
}
```
</details>


SDK reference for `get-instance`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.GetInstance) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.get_instance) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#getInstance(java.util.UUID))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api get-instance`

## <span data-label="PUT" class="pill-PUT"></span>reset-instance

Reset a Compute instance to a base/target template

```
PUT /instance/{id}:reset
```

This operation re-installs a Compute instance to a base template. If target template is provided it will be used to recreated instance from. Warning: the operation wipes all data stored on the disk.

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |

### Request body

Content-Type: `application/json`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `disk-size` | integer | no | Instance disk size in GiB<br/><br/>Min: `10`. Max: `51200`. |
| `template` | [Template reference](/reference/api/_schemas/template-ref/) | no | Template to recreate Instance from |

<details>
<summary>Example</summary>

```json
{
  "disk-size": 0,
  "template": {
    "id": "string"
  }
}
```
</details>


### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `reset-instance`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.ResetInstance) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.reset_instance) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#resetInstance(java.util.UUID,com.exoscale.sdk.model.ResetInstanceRequest))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api reset-instance`

## <span data-label="PUT" class="pill-PUT"></span>start-instance

Start a Compute instance

```
PUT /instance/{id}:start
```

This operation starts a virtual machine, potentially using a rescue profile if specified

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |

### Request body

Content-Type: `application/json`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `rescue-profile` | string | no | Boot in Rescue Mode, using named profile (supported: netboot, netboot-efi)<br/><br/>Allowed values: `netboot-efi`, `netboot`. |

<details>
<summary>Example</summary>

```json
{
  "rescue-profile": "netboot-efi"
}
```
</details>


### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `start-instance`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.StartInstance) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.start_instance) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#startInstance(java.util.UUID,com.exoscale.sdk.model.StartInstanceRequest))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api start-instance`

## <span data-label="PUT" class="pill-PUT"></span>scale-instance

Scale a Compute instance to a new Instance Type

```
PUT /instance/{id}:scale
```

This operation changes the Compute instance's type. Note: the new Instance Type must be within the same family (e.g. a standard instance cannot be scaled to gpu2 or storage).

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |

### Request body

Content-Type: `application/json`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `instance-type` | [Instance type reference](/reference/api/_schemas/instance-type-ref/) | **yes** | Instance Type |

<details>
<summary>Example</summary>

```json
{
  "instance-type": {
    "id": "string"
  }
}
```
</details>


### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `scale-instance`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.ScaleInstance) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.scale_instance) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#scaleInstance(java.util.UUID,com.exoscale.sdk.model.ScaleInstanceRequest))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api scale-instance`

## <span data-label="PUT" class="pill-PUT"></span>stop-instance

Stop a Compute instance

```
PUT /instance/{id}:stop
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `stop-instance`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.StopInstance) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.stop_instance) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#stopInstance(java.util.UUID))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api stop-instance`

## <span data-label="PUT" class="pill-PUT"></span>reboot-instance

Reboot a Compute instance

```
PUT /instance/{id}:reboot
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `reboot-instance`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.RebootInstance) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.reboot_instance) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#rebootInstance(java.util.UUID))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api reboot-instance`

## <span data-label="PUT" class="pill-PUT"></span>update-instance

Update a Compute instance

```
PUT /instance/{id}
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |

### Request body

Content-Type: `application/json`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `application-consistent-snapshot-enabled` | boolean | no | Enable/Disable Application Consistent Snapshot for Instance |
| `labels` | object | no | Resource labels |
| `name` | string | no | Instance name<br/><br/>Min length: `1`. Max length: `255`. |
| `public-ip-assignment` | string | no | Assign public IP to the Instance<br/><br/>Allowed values: `inet4`, `dual`, `none`. |
| `user-data` | string | no | Instance Cloud-init user-data (base64 encoded)<br/><br/>Min length: `1`. Max length: `32768`. |

<details>
<summary>Example</summary>

```json
{
  "application-consistent-snapshot-enabled": true,
  "labels": {},
  "name": "string",
  "public-ip-assignment": "inet4",
  "user-data": "string"
}
```
</details>


### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `update-instance`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.UpdateInstance) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.update_instance) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#updateInstance(java.util.UUID,com.exoscale.sdk.model.UpdateInstanceRequest))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api update-instance`

## <span data-label="DELETE" class="pill-DELETE"></span>delete-instance

Delete a Compute instance

```
DELETE /instance/{id}
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `delete-instance`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.DeleteInstance) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.delete_instance) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#deleteInstance(java.util.UUID))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api delete-instance`

## <span data-label="GET" class="pill-GET"></span>reveal-instance-password

Reveal the password used during instance creation or the latest password reset.

```
GET /instance/{id}:password
```

Reveal the password used during instance creation or the latest password reset.
            This is only available for VMs created against templates having the `password-enabled`
            property set to `true`.

            Passwords are transiently stored for at most 24 hours and intended to be retrieved shortly after
            creation or resets.

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `password` | string | Password |

<details>
<summary>Example output</summary>

```json
{
  "password": "string"
}
```
</details>


SDK reference for `reveal-instance-password`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.RevealInstancePassword) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.reveal_instance_password) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#revealInstancePassword(java.util.UUID))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api reveal-instance-password`

## <span data-label="PUT" class="pill-PUT"></span>reset-instance-password

Reset a compute instance password

```
PUT /instance/{id}:reset-password
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `reset-instance-password`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.ResetInstancePassword) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.reset_instance_password) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#resetInstancePassword(java.util.UUID))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api reset-instance-password`

## <span data-label="PUT" class="pill-PUT"></span>remove-instance-protection

Remove instance destruction protection

```
PUT /instance/{id}:remove-protection
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `remove-instance-protection`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.RemoveInstanceProtection) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.remove_instance_protection) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#removeInstanceProtection(java.util.UUID))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api remove-instance-protection`

## <span data-label="PUT" class="pill-PUT"></span>add-instance-protection

Set instance destruction protection

```
PUT /instance/{id}:add-protection
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `add-instance-protection`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.AddInstanceProtection) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.add_instance_protection) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#addInstanceProtection(java.util.UUID))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api add-instance-protection`


---

## Other Operations

## <span data-label="GET" class="pill-GET"></span>get-console-proxy-url

Retrieve signed url valid for 60 seconds to connect via console-proxy websocket to VM VNC console.

```
GET /console/{id}
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `host` | string |  |
| `path` | string |  |
| `url` | string |  |

<details>
<summary>Example output</summary>

```json
{
  "host": "string",
  "path": "string",
  "url": "string"
}
```
</details>


SDK reference for `get-console-proxy-url`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.GetConsoleProxyURL) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.get_console_proxy_url) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#getConsoleProxyUrl(java.util.UUID))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api get-console-proxy-url`

## <span data-label="PUT" class="pill-PUT"></span>resize-instance-disk

Resize a Compute instance disk

```
PUT /instance/{id}:resize-disk
```

This operation resizes a Compute instance's disk volume. Note: the disk can only grow, cannot be shrunk.

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |

### Request body

Content-Type: `application/json`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `disk-size` | integer | **yes** | Instance disk size in GiB<br/><br/>Min: `10`. Max: `51200`. |

<details>
<summary>Example</summary>

```json
{
  "disk-size": 0
}
```
</details>


### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `resize-instance-disk`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.ResizeInstanceDisk) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.resize_instance_disk) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#resizeInstanceDisk(java.util.UUID,com.exoscale.sdk.model.ResizeInstanceDiskRequest))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api resize-instance-disk`

## <span data-label="DELETE" class="pill-DELETE"></span>reset-instance-field

Reset Instance field

```
DELETE /instance/{id}/{field}
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |
| `field` | `path` |  |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `reset-instance-field`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.ResetInstanceField) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.reset_instance_field) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#resetInstanceField(java.util.UUID,java.lang.String))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api reset-instance-field`

## <span data-label="POST" class="pill-POST"></span>revert-instance-to-snapshot

Revert a snapshot for an instance

```
POST /instance/{instance-id}:revert-snapshot
```

This operation reverts the snapshot to the Compute instance volume, restoring stored data as it was at the time of the snapshot.
The Compute instance must be previously stopped.

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `instance-id` | `path` | Must be a valid UUID. |

### Request body

Content-Type: `application/json`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | **yes** | Snapshot ID<br/><br/>Must be a valid UUID. |

<details>
<summary>Example</summary>

```json
{
  "id": "string"
}
```
</details>


### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `revert-instance-to-snapshot`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.RevertInstanceToSnapshot) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.revert_instance_to_snapshot) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#revertInstanceToSnapshot(java.util.UUID,com.exoscale.sdk.model.RevertInstanceToSnapshotRequest))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api revert-instance-to-snapshot`

## <span data-label="GET" class="pill-GET"></span>list-instances

List Compute instances

```
GET /instance
```

### Query parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `manager-id` | `query` | no | Must be a valid UUID. |
| `manager-type` | `query` | no |  |
| `ip-address` | `query` | no |  |
| `labels` | `query` | no |  |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `instances` | array of [Instances](#instances) |  |

<details>
<summary>Example output</summary>

```json
{
  "instances": [
    {
      "created-at": "2024-01-01T12:00:00Z",
      "id": "string",
      "instance-type": {
        "authorized": true,
        "cpus": 0,
        "family": "gpu3",
        "gpus": 0,
        "id": "string",
        "memory": 0,
        "size": "large",
        "zones": [
          "ch-dk-2"
        ]
      },
      "ipv6-address": "string",
      "labels": {},
      "mac-address": "string",
      "manager": {
        "id": "string",
        "type": "sks-nodepool"
      },
      "name": "string",
      "private-networks": [
        {
          "id": "string",
          "mac-address": "string"
        }
      ],
      "public-ip": "string",
      "public-ip-assignment": "inet4",
      "security-groups": [
        {
          "description": "string",
          "external-sources": [
            null
          ],
          "id": "string",
          "name": "string",
          "rules": [
            null
          ]
        }
      ],
      "ssh-key": {
        "fingerprint": "string",
        "name": "string"
      },
      "ssh-keys": [
        {
          "fingerprint": "string",
          "name": "string"
        }
      ],
      "state": "expunging",
      "template": {
        "application-consistent-snapshot-enabled": true,
        "boot-mode": "legacy",
        "build": "string",
        "checksum": "string",
        "created-at": "2024-01-01T12:00:00Z",
        "default-user": "string",
        "description": "string",
        "family": "string",
        "id": "string",
        "maintainer": "string",
        "name": "string",
        "password-enabled": true,
        "size": 0,
        "ssh-key-enabled": true,
        "url": "string",
        "version": "string",
        "visibility": "private",
        "zones": [
          "ch-dk-2"
        ]
      }
    }
  ]
}
```
</details>


### Instances {#instances}

Instance

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `created-at` | string | no | Instance creation date<br/><br/>ISO 8601 date-time. |
| `id` | string | no | Instance ID<br/><br/>Must be a valid UUID. |
| `instance-type` | [Compute instance type](/reference/api/_schemas/instance-type/) | no | Instance Type |
| `ipv6-address` | string | no | Instance IPv6 address |
| `labels` | object | no | Resource labels |
| `mac-address` | string | no | Instance MAC address |
| `manager` | [Resource manager](/reference/api/_schemas/manager/) | no | Instance manager |
| `name` | string | no | Instance name<br/><br/>Min length: `1`. Max length: `255`. |
| `private-networks` | array of [Private Networks](#private-networks) | no | Instance Private Networks |
| `public-ip` | string | no | Instance public IPv4 address<br/><br/>Must be a valid IPv4 address. |
| `public-ip-assignment` | string | no | Instance public IP assignment<br/><br/>Allowed values: `inet4`, `dual`, `none`. |
| `security-groups` | array of [Security Group](/reference/api/_schemas/security-group/) | no | Instance Security Groups |
| `ssh-key` | [SSH key](/reference/api/_schemas/ssh-key/) | no | Instance SSH Key |
| `ssh-keys` | array of [SSH key](/reference/api/_schemas/ssh-key/) | no | Instance SSH Keys |
| `state` | string | no | Instance state<br/><br/>Allowed values: `expunging`, `starting`, `destroying`, `running`, `stopping`, `stopped`, `migrating`, `error`, `destroyed`. |
| `template` | [Instance template](/reference/api/_schemas/template/) | no | Instance Template |

### Private Networks {#private-networks}

Private Network

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | no | Private Network ID<br/><br/>Must be a valid UUID. |
| `mac-address` | string | no | Private Network MAC address |

SDK reference for `list-instances`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.ListInstances) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.list_instances) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#listInstances(java.util.UUID,java.lang.String,java.lang.String,java.lang.String))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api list-instances`

## <span data-label="POST" class="pill-POST"></span>create-snapshot

Create a Snapshot of a Compute instance

```
POST /instance/{id}:create-snapshot
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `create-snapshot`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.CreateSnapshot) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.create_snapshot) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#createSnapshot(java.util.UUID))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api create-snapshot`

## <span data-label="POST" class="pill-POST"></span>enable-tpm

Enable tpm for the instance.

```
POST /instance/{id}:enable-tpm
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `enable-tpm`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.EnableTpm) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.enable_tpm) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#enableTpm(java.util.UUID))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api enable-tpm`


