> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nebius.com/llms.txt
> Use this file to discover all available pages before exploring further.

# nebius compute instance update

## Name

`nebius compute instance update`

Updates an existing VM instance with new configuration parameters.

## Synopsis

```
nebius compute instance update [id]
  --boot-disk-attach-mode
  --boot-disk-device-id
  --boot-disk-existing-disk-id
  --boot-disk-managed-disk-forbid-deletion
  --boot-disk-managed-disk-labels
  --boot-disk-managed-disk-name
  --boot-disk-managed-disk-size-bytes
  --boot-disk-managed-disk-size-gibibytes
  --boot-disk-managed-disk-size-kibibytes
  --boot-disk-managed-disk-size-mebibytes
  --cloud-init-user-data
  --filesystems
  --follows-spot-price
  --hostname
  --id
  --labels
  --labels-add
  --labels-remove
  --local-disks-passthrough-group-requested
  --name
  --network-interfaces
  --nvl-instance-group-id
  --on-demand
  --parent-id
  --reservation-policy-policy
  --reservation-policy-reservation-ids
  --resource-version
  --resources-preset
  --secondary-disks
  --spot-pricing-policy-id
  --stopped
  --async
  --clear-mask
  --diff
  --full
  --patch
```

## Examples

**Attach a secondary disk**

```
nebius compute instance update <VM_ID> \
  --patch \
  --secondary-disks "$(cat secondary_disk.json)"
```

**Assign a dynamic public IP address**

```
nebius compute instance update \
  --id <VM_ID> \
  --network-interfaces "[{\"public_ip_address\": {} }]"
```

**Set a VM reservation policy**

```
nebius compute instance update \
  ... \
  --reservation-policy-policy <auto|forbid|strict> \
  --reservation-policy-reservation-ids <reservations>
```

## Positional Arguments

`id`

Identifier for the resource, unique for its resource type.

## Options

`--boot-disk-attach-mode` (string)

A value must be one of:

<ul>
  <li>
    `unspecified`
  </li>

  <li>
    `read_only`
  </li>

  <li>
    `read_write`
  </li>
</ul>

`--boot-disk-device-id` (string)

Specifies the user-defined device identifier.\

Use `/dev/disk/by-id/virtio-{device_id}` as the device path in a mount command.

`--boot-disk-existing-disk-id` (string)

Mutually exclusive with: `--boot-disk-managed-disk-... flags group`.

`--boot-disk-managed-disk-forbid-deletion` (bool)

Prevents deletion whilst set.

Mutually exclusive with: `--boot-disk-existing-disk-id`.

`--boot-disk-managed-disk-labels` (string->string)

Labels associated with disk resource.

Mutually exclusive with: `--boot-disk-existing-disk-id`.

`--boot-disk-managed-disk-name` (string)

Name of a dependent disk.\

Use it to convert an ExistingDisk to a dependent disk.\

Changing the name will replace the disk and cause data loss.

Mutually exclusive with: `--boot-disk-existing-disk-id`.

`--boot-disk-managed-disk-size-bytes` (int64)

Mutually exclusive with: `--boot-disk-existing-disk-id`, `--boot-disk-managed-disk-size-gibibytes`, `--boot-disk-managed-disk-size-kibibytes`, `--boot-disk-managed-disk-size-mebibytes`.

`--boot-disk-managed-disk-size-gibibytes` (int64)

Mutually exclusive with: `--boot-disk-existing-disk-id`, `--boot-disk-managed-disk-size-bytes`, `--boot-disk-managed-disk-size-kibibytes`, `--boot-disk-managed-disk-size-mebibytes`.

`--boot-disk-managed-disk-size-kibibytes` (int64)

Mutually exclusive with: `--boot-disk-existing-disk-id`, `--boot-disk-managed-disk-size-bytes`, `--boot-disk-managed-disk-size-gibibytes`, `--boot-disk-managed-disk-size-mebibytes`.

`--boot-disk-managed-disk-size-mebibytes` (int64)

Mutually exclusive with: `--boot-disk-existing-disk-id`, `--boot-disk-managed-disk-size-bytes`, `--boot-disk-managed-disk-size-gibibytes`, `--boot-disk-managed-disk-size-kibibytes`.

`--cloud-init-user-data` (string)

Data in cloud-init format for customizing instance initialization.\

For details, see [https://docs.nebius.com/compute/virtual-machines/manage#user-data](https://docs.nebius.com/compute/virtual-machines/manage.md#user-data).

`--filesystems` (json)

List of Shared Filesystems attached to the instance.

(structure)

**attach\_mode** -> (string)*\[required]*

A value must be one of:

<ul>
  <li>
    `"unspecified"`
  </li>

  <li>
    `"read_only"`
  </li>

  <li>
    `"read_write"`
  </li>
</ul>

**existing\_filesystem** -> (structure)

**id** -> (string)*\[required]*

**mount\_tag** -> (string)*\[required]*

Specifies the user-defined identifier, allowing to use it as a device in mount command.

JSON Schema:

```json theme={null}
[{                                                     
  "attach_mode": "unspecified"|"read_only"|"read_write",
  "existing_filesystem": {
    "id": ""              
  },
  "mount_tag": ""                                      
}]
```

`--follows-spot-price` (bool)

The preemptible VM accepts the current spot price.

Mutually exclusive with: `--on-demand`, `--spot-pricing-policy-id`.

`--hostname` (string)

Instance's hostname. Used to generate default DNS record in format `<hostname>.<network_id>.compute.internal.`\

or `<instance_id>.<network_id>.compute.internal.` if hostname is not specified.

`--id` (string)

Identifier for the resource, unique for its resource type.

`--labels` (string->string)

Labels associated with the resource.

`--labels-add` (string->string)

Add values to Labels associated with the resource.

`--labels-remove` (string array)

Remove values from Labels associated with the resource.

`--local-disks-passthrough-group-requested` (bool)

Passthrough local disks from the underlying host.\


Devices are expected to appear in the guest as NVMe devices (nvme0, nvme1, ...),\

but the exact number depends on the preset.\

Enabled only when this field is explicitly set.

`--name` (string)

Human-readable name for the resource.

`--network-interfaces` (json)

List of network interfaces attached to the instance.

(structure)

**aliases** -> (structure)

Assign ranges of IP addresses as aliases.

**allocation\_id** -> (string)*\[required]*

ID of allocation.

**public\_ip\_address** -> (structure)*\[meaningful\_empty\_value]*

Public IPv4 address associated with the interface.

**allocation\_id** -> (string)

Allocation identifier if it was created before.

**static** -> (bool)

If false - Allocation will be created/deleted during NetworkInterface.Allocate/NetworkInterface.Deallocate\

If true  - Allocation will be created/deleted during NetworkInterface.Create/NetworkInterface.Delete\

False by default.

**security\_groups** -> (structure)

Security groups associated with the network interface.\

If an empty list is provided, the default security group for the network will be used.\

Effective security groups can be seen in the status.

**id** -> (string)

Security group identifier.

JSON Schema:

```json theme={null}
[{                      
  "aliases": [{         
    "allocation_id": "" 
  }],
  "public_ip_address": {
    "allocation_id": "",
    "static": false     
  },
  "security_groups": [{
    "id": ""           
  }]
}]
```

`--nvl-instance-group-id` (string)

NVLink Instance Group ID associated with the VM.

`--on-demand` (bool)

A regular, non-preemptible VM.

Mutually exclusive with: `--follows-spot-price`, `--spot-pricing-policy-id`.

`--parent-id` (string)

Identifier of the parent resource to which the resource belongs.

`--reservation-policy-policy` (string)

A value must be one of:

<ul>
  <li>
    `auto`
  </li>

  <li>
    `forbid`
  </li>

  <li>
    `strict`
  </li>
</ul>

`--reservation-policy-reservation-ids` (string array)

Capacity block groups, order matters.

`--resource-version` (int64)

Version of the resource for safe concurrent modifications and consistent reads.\

Positive and monotonically increases on each resource spec change (but *not* on each change of the\

resource's container(s) or status).\

Service allows zero value or current.

`--resources-preset` (string)

`--secondary-disks` (json)

List of additional data disks attached to the instance beyond the boot disk.

(structure)

**attach\_mode** -> (string)*\[required]*

A value must be one of:

<ul>
  <li>
    `"unspecified"`
  </li>

  <li>
    `"read_only"`
  </li>

  <li>
    `"read_write"`
  </li>
</ul>

**device\_id** -> (string)

Specifies the user-defined device identifier.\

Use `/dev/disk/by-id/virtio-{device_id}` as the device path in a mount command.

**existing\_disk** -> (structure)

Attach an existing disk.\


Lifecycle:\


* The disk is preserved when the instance is deleted (it will be detached).\


Switching to a managed disk:\


* To delete the disk together with the instance, switch to ManagedDisk in the instance spec.\

* For the switch, `ManagedDisk.name` MUST match the current disk `name`\

  (see DiskService.Get for the disk referenced by `ExistingDisk.id`).\

* When converting an ExistingDisk to a ManagedDisk, you must provide `ManagedDisk.name` and `ManagedDisk.spec`\

  exactly as they are currently defined in the disk resource.\

  Obtain the current values via `DiskService.Get` and copy them verbatim.\

  If `ManagedDisk.spec` differs from the current disk spec, the instance update will fail.

Mutually exclusive with: *managed\_disk*.

**id** -> (string)*\[required]*

**managed\_disk** -> (structure)

Attach a managed disk.\


Lifecycle:\


* The disk is deleted when the instance is deleted.\


Semantics:\


* Specifying a ManagedDisk expresses an intent to have that managed disk attached.\

* If this intent cannot be satisfied, the entire operation fails.\

* You can check the intent status in `instance.status.disk_attachments`.\


Updates and matching:\


* Managed disks can be updated only via instance spec updates. Updates via DiskService are not allowed.\

* During updates, disks are matched by `name`.\


Renaming and data loss:\


* Changing the disk `name` triggers disk replacement (create a new disk and delete the old one),\

  which causes data loss.\

* To rename a managed disk safely:\

  1. switch it to ExistingDisk in the instance spec, and\

  2. update/rename it via DiskService.\


Conflicts:\


* Instance create/update fails if there is already a disk with the same `name`.\

  as requested by any ManagedDisk.\


Finding the disk ID:\


* The disk ID is available in `instance.status.disk_attachments` after it is created.\

  Use `DiskAttachmentStatus.name` to find the desired disk which matches `name`.\


Switching to an existing (non-managed) disk:\


* To preserve the disk after instance deletion, switch it to ExistingDisk in the instance spec,\

  use the disk ID from `instance.status.disk_attachments`.\


Deletion protection:\


* Switching ExistingDisk to ManagedDisk fails if `Disk.spec.deletion_protection` is enabled.\

* Deleting an instance that has a ManagedDisk fails if `Disk.spec.deletion_protection` is enabled.

Mutually exclusive with: *existing\_disk*.

**labels** -> (map)*\[map]*

Labels associated with disk resource.

**key** -> (string)

**value** -> (string)

**name** -> (string)*\[required]*

Name of a dependent disk.\

Use it to convert an ExistingDisk to a dependent disk.\

Changing the name will replace the disk and cause data loss.

**spec** -> (structure)*\[required]*

Specification of a dependent disk to be created.

**forbid\_deletion** -> (bool)

Prevents deletion whilst set.

**size\_bytes** -> (int64)

Mutually exclusive with: *size\_gibibytes*, *size\_kibibytes*, *size\_mebibytes*.

**size\_gibibytes** -> (int64)

Mutually exclusive with: *size\_bytes*, *size\_kibibytes*, *size\_mebibytes*.

**size\_kibibytes** -> (int64)

Mutually exclusive with: *size\_bytes*, *size\_gibibytes*, *size\_mebibytes*.

**size\_mebibytes** -> (int64)

Mutually exclusive with: *size\_bytes*, *size\_gibibytes*, *size\_kibibytes*.

JSON Schema:

```json theme={null}
[{                                                     
  "attach_mode": "unspecified"|"read_only"|"read_write",
  "device_id": "",                                     
  "existing_disk": {
    "id": ""        
  }
}]
```

`--spot-pricing-policy-id` (string)

PricingPolicy ID used as the maximum agreed price for the preemptible VM.

Mutually exclusive with: `--follows-spot-price`, `--on-demand`.

`--stopped` (bool)

Indicates whether the instance should be stopped.

`--async` (bool)

If set, returns operation id. Otherwise, waits for the operation to complete and returns its resource.

`--clear-mask` (string array)

Reset-mask field paths to clear in patch mode. Can be repeated.

`--diff` (bool)

Show diff of resource before committing update.

`--full` (bool)

Update full resource state. Automatically set to true if the --file or argument provided.

`--patch` (bool)

Update only specified fields.

## Global Options

`-h, --help` (bool)

Show this message.

`-p, --profile` (string)

Set a profile for interacting with the cloud.

`--format` (string)

Output format. Supported values: yaml|json|jsonpath|table|text.

`-f, --file` (string)

Input file. For 'update' commands automatically set --full=true.

`-c, --config` (string)

Provide path to config file.

`--debug` (bool)

Write debug logs to stderr. Commands save debug logs in the config directory under logs/, except help and shell completion.

`-I, --impersonate-service-account-id` (string)

Impersonate into the service account and use its token for a command.

`--color` (bool)

Enable colored output.

`--no-browser` (bool)

Do not open browser automatically on auth.

`--insecure` (bool)

Disable transport security.

`--auth-timeout` (duration: 2h30m10s)

Set the timeout for the request including authentication process, default is 15m0s.

`--per-retry-timeout` (duration: 2h30m10s)

Set the timeout for each retry attempt, default is 20s.

`--retries` (uint)

Set the number of retry attempts, 1 is disable retries, default is 3.

`--timeout` (duration: 2h30m10s)

Set the timeout for the main request, default is 1m0s.

`--no-check-update` (bool)

Suppress check for updates.

`--no-progress` (bool)

Suppress progress indicators and spinners.

**Input argument JSON Schema**

> [tab] Full
>
> ```json theme={null}
> {              
>   "metadata": {               
>     "id": string,              // [identifier]
>                                // Identifier for the resource, unique for its resource type.
>     "labels": {                // [map]
>                                // Labels associated with the resource.
>       string: string                  
>     },
>     "name": string,            // Human-readable name for the resource.
>     "parent_id": string,       // [required]
>                                // Identifier of the parent resource to which the resource belongs.
>     "resource_version": int64  // Version of the resource for safe concurrent modifications and consistent reads.
>                                // Positive and monotonically increases on each resource spec change (but *not* on each change of the
>                                // resource's container(s) or status).
>                                // Service allows zero value or current.
>   },
>   "spec": {                         
>     "boot_disk": {         // [required]
>                            // Specified boot disk attached to the instance.
>       "attach_mode": enum( // [required]
>         "UNSPECIFIED",    
>         "READ_ONLY",      
>         "READ_WRITE"      
>       ),
>       "device_id": string, // Specifies the user-defined device identifier.
>                            // Use `/dev/disk/by-id/virtio-{device_id}` as the device path in a mount command.
>       "existing_disk": { // Cannot be set together with: managed_disk
>                          // Attach an existing disk.
>                          // 
>                          // Lifecycle:
>                          // - The disk is preserved when the instance is deleted (it will be detached).
>                          // 
>                          // Switching to a managed disk:
>                          // - To delete the disk together with the instance, switch to ManagedDisk in the instance spec.
>                          // - For the switch, `ManagedDisk.name` MUST match the current disk `name`
>                          //   (see DiskService.Get for the disk referenced by `ExistingDisk.id`).
>                          // - When converting an ExistingDisk to a ManagedDisk, you must provide `ManagedDisk.name` and `ManagedDisk.spec`
>                          //   exactly as they are currently defined in the disk resource.
>                          //   Obtain the current values via `DiskService.Get` and copy them verbatim.
>                          //   If `ManagedDisk.spec` differs from the current disk spec, the instance update will fail.
>         "id": string     // [required]
>       },
>       "managed_disk": { // Cannot be set together with: existing_disk
>                         // Attach a managed disk.
>                         // 
>                         // Lifecycle:
>                         // - The disk is deleted when the instance is deleted.
>                         // 
>                         // Semantics:
>                         // - Specifying a ManagedDisk expresses an intent to have that managed disk attached.
>                         // - If this intent cannot be satisfied, the entire operation fails.
>                         // - You can check the intent status in `instance.status.disk_attachments`.
>                         // 
>                         // Updates and matching:
>                         // - Managed disks can be updated only via instance spec updates. Updates via DiskService are not allowed.
>                         // - During updates, disks are matched by `name`.
>                         // 
>                         // Renaming and data loss:
>                         // - Changing the disk `name` triggers disk replacement (create a new disk and delete the old one),
>                         //   which causes data loss.
>                         // - To rename a managed disk safely:
>                         //   1) switch it to ExistingDisk in the instance spec, and
>                         //   2) update/rename it via DiskService.
>                         // 
>                         // Conflicts:
>                         // - Instance create/update fails if there is already a disk with the same `name`.
>                         //   as requested by any ManagedDisk.
>                         // 
>                         // Finding the disk ID:
>                         // - The disk ID is available in `instance.status.disk_attachments` after it is created.
>                         //   Use `DiskAttachmentStatus.name` to find the desired disk which matches `name`.
>                         // 
>                         // Switching to an existing (non-managed) disk:
>                         // - To preserve the disk after instance deletion, switch it to ExistingDisk in the instance spec,
>                         //   use the disk ID from `instance.status.disk_attachments`.
>                         // 
>                         // Deletion protection:
>                         // - Switching ExistingDisk to ManagedDisk fails if `Disk.spec.deletion_protection` is enabled.
>                         // - Deleting an instance that has a ManagedDisk fails if `Disk.spec.deletion_protection` is enabled.
>         "labels": {        // [map]
>                            // Labels associated with disk resource.
>           string: string          
>         },
>         "name": string, // [required]
>                         // Name of a dependent disk.
>                         // Use it to convert an ExistingDisk to a dependent disk.
>                         // Changing the name will replace the disk and cause data loss.
>         "spec": {                  // [required]
>                                    // Specification of a dependent disk to be created.
>           "forbid_deletion": bool, // Prevents deletion whilst set.
>           "size_bytes": int64,     // Cannot be set together with: size_kibibytes, size_mebibytes, size_gibibytes
>           "size_gibibytes": int64, // Cannot be set together with: size_bytes, size_kibibytes, size_mebibytes
>           "size_kibibytes": int64, // Cannot be set together with: size_bytes, size_mebibytes, size_gibibytes
>           "size_mebibytes": int64  // Cannot be set together with: size_bytes, size_kibibytes, size_gibibytes
>         }
>       }
>     },
>     "cloud_init_user_data": string,  // [sensitive]
>                                      // Data in cloud-init format for customizing instance initialization.
>                                      // For details, see https://docs.nebius.com/compute/virtual-machines/manage#user-data.
>     "filesystems": [{          // List of Shared Filesystems attached to the instance.
>       "attach_mode": enum( // [required]
>         "UNSPECIFIED",    
>         "READ_ONLY",      
>         "READ_WRITE"      
>       ),
>       "existing_filesystem": {
>         "id": string           // [required]
>       },
>       "mount_tag": string      // [required]
>                                // Specifies the user-defined identifier, allowing to use it as a device in mount command.
>     }],
>     "follows_spot_price": { // [meaningful_empty_value]
>                             // Cannot be set together with: on_demand, spot_pricing_policy
>                             // The preemptible VM accepts the current spot price.
>     },
>     "hostname": string,              // Instance's hostname. Used to generate default DNS record in format `<hostname>.<network_id>.compute.internal.`
>                                      // or `<instance_id>.<network_id>.compute.internal.` if hostname is not specified.
>     "local_disks": {         // Local disks are meaningfully different from regular (remote) disks:
>                              // they are provided by the underlying host and are tied to a particular VM run.
>                              // Local disk data is not preserved across Stop-Start initiated via Compute API.
>                              // Local disks are not provided by default. To get them, explicitly request them via this field.
>                              // Availability depends on the selected platform, preset and region.
>                              // Changing this field will result in disks change and content loss, but only after stop and start the instance.
>       "passthrough_group": { // Requests passthrough local disks from the host.
>                              // Topology of the provided disks is preserved during stop and start
>                              // for every instance of a specific platform and preset in the region.
>         "requested": bool    // Passthrough local disks from the underlying host.
>                              // 
>                              // Devices are expected to appear in the guest as NVMe devices (nvme0, nvme1, ...),
>                              // but the exact number depends on the preset.
>                              // Enabled only when this field is explicitly set.
>       }
>     },
>     "network_interfaces": [{ // [required]
>                              // List of network interfaces attached to the instance.
>       "aliases": [{              // Assign ranges of IP addresses as aliases.
>         "allocation_id": string  // [required]
>                                  // ID of allocation.
>       }],
>       "public_ip_address": {     // [meaningful_empty_value]
>                                  // Public IPv4 address associated with the interface.
>         "allocation_id": string, // Allocation identifier if it was created before.
>         "static": bool           // If false - Allocation will be created/deleted during NetworkInterface.Allocate/NetworkInterface.Deallocate
>                                  // If true  - Allocation will be created/deleted during NetworkInterface.Create/NetworkInterface.Delete
>                                  // False by default.
>       },
>       "security_groups": [{ // Security groups associated with the network interface.
>                             // If an empty list is provided, the default security group for the network will be used.
>                             // Effective security groups can be seen in the status.
>         "id": string        // Security group identifier.
>       }]
>     }],
>     "nvl_instance_group_id": string, // NVLink Instance Group ID associated with the VM.
>     "on_demand": { // [meaningful_empty_value]
>                    // Cannot be set together with: follows_spot_price, spot_pricing_policy
>                    // A regular, non-preemptible VM.
>     },
>     "preemptible": { // Set this field to create a preemptible VM, or omit it to create a regular VM.
>                      // For details, see https://docs.nebius.com/compute/virtual-machines/preemptible
>                      // A preemptible VM cannot be converted to a regular VM or vice versa. Once set, this field cannot be removed; if the
>                      // VM was created without it, the field cannot be added later.
>     },
>     "reservation_policy": {       
>       "policy": enum(
>         "AUTO",       // 1) Will try to launch instance in any reservation_ids if provided.
>                       // 2) Will try to launch instance in any of the available capacity block.
>                       // 3) Will try to launch instance in PAYG if 1 & 2 are not satisfied.
>         "FORBID",     // The instance is launched only using on-demand (PAYG) capacity.
>                       // No attempt is made to find or use a Capacity Block.
>                       // It's an error to provide reservation_ids with policy = FORBID.
>         "STRICT"      // 1) Will try to launch the instance in Capacity Blocks from reservation_ids if provided.
>                       // 2) If reservation_ids are not provided will try to launch instance in suitable & available Capacity Block.
>                       // 3) Fail otherwise.
>       ),
>       "reservation_ids": [string]  // Capacity block groups, order matters.
>     },
>     "resources": {      // [required]
>                         // Specification of compute resources allocated to the instance.
>                         // For details, see https://docs.nebius.com/compute/virtual-machines/types.
>       "preset": string 
>     },
>     "secondary_disks": [{  // List of additional data disks attached to the instance beyond the boot disk.
>       "attach_mode": enum( // [required]
>         "UNSPECIFIED",    
>         "READ_ONLY",      
>         "READ_WRITE"      
>       ),
>       "device_id": string, // Specifies the user-defined device identifier.
>                            // Use `/dev/disk/by-id/virtio-{device_id}` as the device path in a mount command.
>       "existing_disk": { // Cannot be set together with: managed_disk
>                          // Attach an existing disk.
>                          // 
>                          // Lifecycle:
>                          // - The disk is preserved when the instance is deleted (it will be detached).
>                          // 
>                          // Switching to a managed disk:
>                          // - To delete the disk together with the instance, switch to ManagedDisk in the instance spec.
>                          // - For the switch, `ManagedDisk.name` MUST match the current disk `name`
>                          //   (see DiskService.Get for the disk referenced by `ExistingDisk.id`).
>                          // - When converting an ExistingDisk to a ManagedDisk, you must provide `ManagedDisk.name` and `ManagedDisk.spec`
>                          //   exactly as they are currently defined in the disk resource.
>                          //   Obtain the current values via `DiskService.Get` and copy them verbatim.
>                          //   If `ManagedDisk.spec` differs from the current disk spec, the instance update will fail.
>         "id": string     // [required]
>       },
>       "managed_disk": { // Cannot be set together with: existing_disk
>                         // Attach a managed disk.
>                         // 
>                         // Lifecycle:
>                         // - The disk is deleted when the instance is deleted.
>                         // 
>                         // Semantics:
>                         // - Specifying a ManagedDisk expresses an intent to have that managed disk attached.
>                         // - If this intent cannot be satisfied, the entire operation fails.
>                         // - You can check the intent status in `instance.status.disk_attachments`.
>                         // 
>                         // Updates and matching:
>                         // - Managed disks can be updated only via instance spec updates. Updates via DiskService are not allowed.
>                         // - During updates, disks are matched by `name`.
>                         // 
>                         // Renaming and data loss:
>                         // - Changing the disk `name` triggers disk replacement (create a new disk and delete the old one),
>                         //   which causes data loss.
>                         // - To rename a managed disk safely:
>                         //   1) switch it to ExistingDisk in the instance spec, and
>                         //   2) update/rename it via DiskService.
>                         // 
>                         // Conflicts:
>                         // - Instance create/update fails if there is already a disk with the same `name`.
>                         //   as requested by any ManagedDisk.
>                         // 
>                         // Finding the disk ID:
>                         // - The disk ID is available in `instance.status.disk_attachments` after it is created.
>                         //   Use `DiskAttachmentStatus.name` to find the desired disk which matches `name`.
>                         // 
>                         // Switching to an existing (non-managed) disk:
>                         // - To preserve the disk after instance deletion, switch it to ExistingDisk in the instance spec,
>                         //   use the disk ID from `instance.status.disk_attachments`.
>                         // 
>                         // Deletion protection:
>                         // - Switching ExistingDisk to ManagedDisk fails if `Disk.spec.deletion_protection` is enabled.
>                         // - Deleting an instance that has a ManagedDisk fails if `Disk.spec.deletion_protection` is enabled.
>         "labels": {        // [map]
>                            // Labels associated with disk resource.
>           string: string          
>         },
>         "name": string, // [required]
>                         // Name of a dependent disk.
>                         // Use it to convert an ExistingDisk to a dependent disk.
>                         // Changing the name will replace the disk and cause data loss.
>         "spec": {                  // [required]
>                                    // Specification of a dependent disk to be created.
>           "forbid_deletion": bool, // Prevents deletion whilst set.
>           "size_bytes": int64,     // Cannot be set together with: size_kibibytes, size_mebibytes, size_gibibytes
>           "size_gibibytes": int64, // Cannot be set together with: size_bytes, size_kibibytes, size_mebibytes
>           "size_kibibytes": int64, // Cannot be set together with: size_bytes, size_mebibytes, size_gibibytes
>           "size_mebibytes": int64  // Cannot be set together with: size_bytes, size_kibibytes, size_gibibytes
>         }
>       }
>     }],
>     "spot_pricing_policy": { // Cannot be set together with: on_demand, follows_spot_price
>                              // The preemptible VM accepts the current spot price unless it exceeds the maximum price specified by the selected
>                              // pricing policy. When the spot price exceeds that maximum price, the VM is preempted.
>       "id": string           // [required]
>                              // PricingPolicy ID used as the maximum agreed price for the preemptible VM.
>     },
>     "stopped": bool                  // Indicates whether the instance should be stopped.
>   }
> }
> ```

> [tab] CopyPaste Friendly
>
> ```json theme={null}
> nebius compute instance update '
> {              
>   "metadata": {           
>     "id": "",             
>     "labels": {           
>       "": ""                  
>     },
>     "name": "",           
>     "parent_id": "",      
>     "resource_version": 0 
>   },
>   "spec": {                     
>     "boot_disk": {                                         
>       "attach_mode": "unspecified"|"read_only"|"read_write",
>       "device_id": "",                                     
>       "existing_disk": {
>         "id": ""        
>       }
>     },
>     "cloud_init_user_data": "", 
>     "filesystems": [{                                      
>       "attach_mode": "unspecified"|"read_only"|"read_write",
>       "existing_filesystem": {
>         "id": ""              
>       },
>       "mount_tag": ""                                      
>     }],
>     "follows_spot_price": {
>     },
>     "hostname": "",             
>     "local_disks": {        
>       "passthrough_group": {
>         "requested": false  
>       }
>     },
>     "network_interfaces": [{
>       "aliases": [{         
>         "allocation_id": "" 
>       }],
>       "public_ip_address": {
>         "allocation_id": "",
>         "static": false     
>       },
>       "security_groups": [{
>         "id": ""           
>       }]
>     }],
>     "nvl_instance_group_id": "",
>     "preemptible": {
>     },
>     "reservation_policy": {             
>       "policy": "auto"|"forbid"|"strict",
>       "reservation_ids": [""]           
>     },
>     "resources": { 
>       "preset": "" 
>     },
>     "secondary_disks": [{                                  
>       "attach_mode": "unspecified"|"read_only"|"read_write",
>       "device_id": "",                                     
>       "existing_disk": {
>         "id": ""        
>       }
>     }],
>     "stopped": false            
>   }
> }
> '
> ```

*Auto generated on 23-Nov-2026*
