yc compute instance update
Статья создана
Обновлена 24 июля 2025 г.
Update the specified virtual machine instance
Command Usage
Syntax:
yc compute instance update <INSTANCE-NAME>|<INSTANCE-ID> [Flags...] [Global Flags...]
Flags
| Flag | Description |
|---|---|
--id |
stringInstance id. |
--name |
stringInstance name. |
--async |
Display information about the operation in progress, without waiting for the operation to complete. |
--new-name |
stringA new name of the instance. |
--description |
stringSpecifies a textual description of the instance. |
--labels |
key=value[,key=value...]A list of label KEY=VALUE pairs to add. For example, to add two labels named 'foo' and 'bar', both with the value 'baz', use '--labels foo=baz,bar=baz'. |
--metadata |
key=value[,key=value...]Metadata to be made available to the guest operating system running on the instance. See for details https://yandex.cloud/ru/docs/compute/concepts/vm-metadata |
--metadata-options |
PROPERTY=VALUE[,PROPERTY=VALUE...]Options set the access mode to instance's metadata. Possible property names:
|
--metadata-from-file |
key=value[,key=value...]Same as --metadata except that the value for the entry will be read from a local file. |
--memory |
byteSizeSpecifies how much memory instance should have in GB. You can also use M and T suffixes to specify smaller or greater size respectively. |
--cores |
intSpecifies how many CPU cores instance should have. |
--core-fraction |
intIf provided, specifies baseline performance for a core in percent. |
--gpus |
intSpecifies how many GPUs instance should have. |
--platform |
stringSpecifies platform for the instance. |
--network-settings |
PROPERTY=VALUE[,PROPERTY=VALUE...]Network settings for the instance. Possible property names:
|
--serial-port-settings |
PROPERTY=VALUE[,PROPERTY=VALUE...]Serial port settings for the instance. Possible property names:
|
--preemptible |
Specifies whether instance preemptible or not |
--maintenance-policy |
stringBehaviour on maintenance events. Values: 'restart', 'migrate' |
--maintenance-grace-period |
durationTime between notification via metadata service and maintenance. |
--placement-group-id |
stringPlacement group to add the instance to (use an empty string to remove the instance from placement group). |
--placement-group-name |
stringPlacement group to add the instance to (use an empty string to remove the instance from placement group). |
--placement-group-partition |
intSpecifies placement group partition for the instance. |
--host-group-id |
stringHost group to place the instance to (to clear affinity rules use --no-host-affinity-rules). |
--host-group-name |
stringHost group to place the instance to (to clear affinity rules use --no-host-affinity-rules). |
--host-id |
stringHost to place the instance to (to remove all affinity rules use --no-host-affinity-rules). |
--no-host-affinity-rules |
Clear host affinity rules |
--reserved-instance-pool-id |
stringLink instance to specified reserved instance pool. |
--reserved-instance-pool-name |
stringLink instance to specified reserved instance pool. |
--service-account-id |
stringService account, which token can be obtained inside VM from metadata service. |
--service-account-name |
stringService account, which token can be obtained inside VM from metadata service. |
Global Flags
| Flag | Description |
|---|---|
--profile |
stringSet the custom configuration file. |
--debug |
Debug logging. |
--debug-grpc |
Debug gRPC logging. Very verbose, used for debugging connection problems. |
--no-user-output |
Disable printing user intended output to stderr. |
--retry |
intEnable gRPC retries. By default, retries are enabled with maximum 5 attempts. Pass 0 to disable retries. Pass any negative value for infinite retries. Even infinite retries are capped with 2 minutes timeout. |
--cloud-id |
stringSet the ID of the cloud to use. |
--folder-id |
stringSet the ID of the folder to use. |
--folder-name |
stringSet the name of the folder to use (will be resolved to id). |
--endpoint |
stringSet the Cloud API endpoint (host:port). |
--token |
stringSet the OAuth token to use. |
--impersonate-service-account-id |
stringSet the ID of the service account to impersonate. |
--no-browser |
Disable opening browser for authentication. |
--format |
stringSet the output format: text (default), yaml, json, json-rest. |
--jq |
stringQuery to select values from the response using jq syntax |
-h,--help |
Display help for the command. |
Examples
- Добавить виртуальную машину в группу размещения
- Исключить виртуальную машину из группы размещения
- Привязать существующую ВМ к пулу
- Подключиться к серийной консоли
- Подключиться к серийной консоли
- Включите нужный способ авторизации
- К существующей ВМ
- Отключить доступ по OS Login
- К существующей ВМ
- Измените тип политики обслуживания для ВМ
- Изменить конфигурацию vCPU и RAM
- Включить доступ по OS Login
- Сменить тип ВМ
- Настроить параметры сервиса метаданных ВМ
- Включить доступ по OS Login