Skip to main content
Instead of using the update command, you can use the edit and edit-by-name commands to make changes with the help of your preferred editor. These commands are available for all resources that support the update command.

Edit a resource by ID

The edit commands are constructed according to the following template:
nebius <service> <resource> edit \
  --id <resource_ID> \
  [--editor '<editor_terminal_name> --wait'] \
  [--format <json|yaml>]
For example, the command for editing a Compute virtual machine is the following:
nebius compute instance edit \
  --id <resource_ID> \
  [--editor '<editor_terminal_name> --wait'] \
  [--format <json|yaml>]
In this command, specify the parameters:
  • --id: Resource ID.
  • --editor (optional): Editor name. It can be any editor installed on your machine, such as nano or emacs. To check which of the popular editors are installed, run the following command:
    which code emacs gedit micro nano subl vi vim
    
    For an editor that opens in a separate window, add the --wait parameter to its name to ensure that the command waits until you close the editor. You can also specify the editor in the EDITOR environment variable, but if both are specified, the --editor parameter has priority. By default, vi editor is used.
  • --format (optional): Data format. Only json and yaml values are accepted. By default, YAML format is used.
The editor you choose opens and shows the current configuration of the resource. Make the changes and save them. When you exit the editor, the Nebius AI Cloud CLI checks if the data is valid and updates the resource if everything is correct.

Edit resource by name and parent ID

If you do not know the ID of the resource, you can use its name and the ID of the parent resource, according to the following template:
nebius <service> <resource> edit-by-name \
  --name <resource_name> \
  --parent-id <parent_ID> \
  [--editor '<editor_terminal_name> --wait'] \
  [--format <json|yaml>]
All parameters in this command are the same as for edit, but instead of --id specify the --name and --parent-id.

Examples

Edit the configuration of a node group in a Managed Service for Kubernetes cluster in VS Code:
nebius mk8s node-group edit \
  --id <node_group_ID> \
  --editor 'code --wait'
Edit the configuration of a Compute disk by its name, in the default vi editor and in JSON format:
nebius compute disk edit-by-name \
  --name <disk_name> \
  --parent-id <project_ID> \
  --format json