Skip to main content
Resource update commands modify existing resources. You can provide update data through command parameters, a JSON or YAML file with --file or standard input by passing - as the input argument.

Patch vs. full update

An update mode determines what happens to parameters that aren’t specified in the request.
  • A patch update changes only the specified parameters and leaves other parameters unchanged. Patch mode is used by default when you provide update data only through command parameters. Use --patch to explicitly select it:
  • A full update applies the specified values and resets omitted configuration parameters recognized by your installed CLI version to their default values. Configuration parameters that aren’t recognized by that CLI version aren’t reset. Full mode is used by default when you provide data from a file or standard input. Use --full to explicitly select it. Include the configuration parameters that you want to change and all other configuration parameters that you want to keep:
A full update resets all omitted configuration parameters recognized by your installed CLI version to their default values. Make sure the request contains all configuration that you want to keep.
In patch mode, use --clear-mask <field_path> to reset a parameter without changing other parameters. You can also reset a parameter by explicitly assigning the default value for its data type.

Providing update data

You can combine command parameters with either a file or standard input. If the same parameter is specified both as a command parameter and in the file or standard input, the command parameter takes precedence. You can’t use a file and standard input in the same command.

Using command parameters

Provide individual update values as command parameters:
For example:
Available parameters depend on the resource type. See the corresponding update page in the CLI reference, for example, nebius compute instance update.

Using a file

Pass a JSON or YAML request from a file by using --file:
For example, pass a partial YAML request:
--file selects --full mode by default. The example uses --patch because the request is partial.

Using standard input

Pass a JSON or YAML request through standard input and use - as the input argument:
For example, pipe a partial YAML request:
Standard input selects --full mode by default. The example uses --patch because the request is partial.

Examples

Renaming a virtual machine and adding a label

Rename a virtual machine and add the env=testing label without replacing its other labels:
For all available parameters, see nebius compute instance update.

Updating a node group

Test node group update commands on a non-production node group before applying them to production.
For a node group with autoscaling disabled that does not use NVLink, create node-group.yaml to set the number of nodes to three:
Apply the configuration as a patch so that omitted parameters remain unchanged:
Reset a node drain timeout that was set explicitly, without performing a full update:
For all available parameters, see nebius mk8s node-group update.