Detaching a public IP address from a VM
Written by
Updated at February 26, 2024
If you previously attached a public IP address to a VM, you can detach it.
Management console
CLI
API
- In the management console
, select the folder the VM belongs to. - Select Compute Cloud.
- Select the VM.
- Under Network interface, in the top-right corner, click
- In the window that opens, click Delete.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To detach a public IP address from a VM, run the following CLI command:
yc compute instance remove-one-to-one-nat
--id=<instance_ID>
--network-interface-index=<instance_network_interface_index>
Where:
--id
: VM ID. You can get a list of instance IDs in a folder using theyc compute instance list
CLI command.--network-interface-index
: VM network interface index. The default value is0
.
For more information about the yc compute instance remove-one-to-one-nat
command, see the CLI reference.
Use the removeOneToOneNat REST API method for the Instance resource or the InstanceService/RemoveOneToOneNat gRPC API call.