[Yandex Cloud documentation](../../index.md) > [Yandex Virtual Private Cloud](../index.md) > [Step-by-step guides](index.md) > IP address > Converting a dynamic public IP address to static

# Converting a dynamic public IP address to static

You can convert a dynamic [public IP address](../concepts/address.md#public-addresses) to static. Static public IP addresses are reserved and remain attached to respective resources when VMs and network load balancers are stopped.

{% note info %}

Make sure to check out our [pricing policy](../pricing.md#prices-public-ip) for inactive static public IP addresses.

{% endnote %}

{% list tabs group=instructions %}

- Management console {#console}

   1. In the [management console](https://console.yandex.cloud), select the folder containing the address.
   1. Navigate to **Virtual Private Cloud**.
   1. In the left-hand panel, select ![image](../../_assets/console-icons/map-pin.svg) **Public IP addresses**.
   1. Click ![image](../../_assets/console-icons/ellipsis.svg) in the row with the IP address and select **Make static**.
   1. In the window that opens, click **Change**.

- CLI {#cli}

   If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../cli/quickstart.md#install).

   The folder used by default is the one specified when [creating](../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

   1. See the description of the CLI commands for updating the address attributes:

      ```bash
      yc vpc address update --help
      ```

   1. Get a list of addresses in the default folder:

      ```bash
      yc vpc address list
      ```

      Result:

      ```text
      +----------------------+------+---------------+----------+------+
      |          ID          | NAME |    ADDRESS    | RESERVED | USED |
      +----------------------+------+---------------+----------+------+
      | e2l46k8conff******** |      | 84.201.177.41 | false    | true |
      +----------------------+------+---------------+----------+------+
      ```

      The `false` value of the `reserved` parameter for the IP address with the `e2l46k8conff********` ID shows that this address is dynamic.

   1. Convert it to static by using the `--reserved=true` parameter and the address ID:

      ```bash
      yc vpc address update --reserved=true e2l46k8conff********
      ```

      Result:

      ```text
      id: e2l46k8conff********
      folder_id: b1g7gvsi89m3********
      created_at: "2021-01-14T09:36:46Z"
      external_ipv4_address:
        address: 84.201.177.41
        zone_id: ru-central1-a
        requirements: {}
      reserved: true
      used: true
      ```

      Now that the `reserved` parameter is `true`, the IP address is static.

- API {#api}

  To change the type of a public IP address from dynamic to static, use the [update](../api-ref/Address/update.md) REST API method for the [Address](../api-ref/Address/index.md) resource or the [AddressService/Update](../api-ref/grpc/Address/update.md) gRPC API call, and provide the following in the request:

  * ID of the IP address you want to convert to static in the `addressId` parameter.

    To get the address ID, use the [list](../api-ref/Address/list.md) REST API method for the [Address](../api-ref/Address/index.md) resource or the [AddressService/List](../api-ref/grpc/Address/list.md) gRPC API call and provide the folder ID in the `folderId` request parameter.

    To learn how to find out the folder ID, see [Getting the folder ID](../../resource-manager/operations/folder/get-id.md).

  * `true` in the `reserved` parameter.
  * Name of the `reserved` parameter in the `updateMask` parameter.

  {% note warning %}
  
  The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the `updateMask` parameter as a single comma-separated string.
  
  {% endnote %}

{% endlist %}

The number of static public IP addresses is [limited](../concepts/limits.md#vpc-quotas). If the number allowed by the quota is not enough for you, contact [support](https://center.yandex.cloud/support) to have your quota increased.

#### See also {#see-also}

* [Assigning a public IP address to a VM](../../compute/operations/vm-control/vm-attach-public-ip.md)
* [Making a VM public IP address static](../../compute/operations/vm-control/vm-set-static-ip.md)
* [Adding another network interface to a virtual machine](../../compute/operations/vm-control/attach-network-interface.md)