Ordering a dedicated public subnet
A dedicated public subnet is a public subnet made up of an IP address range that will be available to your servers in the selected pools.
You can lease a new dedicated public subnet or convert an existing ephemeral public subnet to a dedicated one.
Leasing a new dedicated public subnet
Note
The minimum rent period for a public subnet is one month from the order date.
-
In the management console
, select the folder where you want to reserve a dedicated public subnet. -
Navigate
to BareMetal. -
In the left-hand panel, select
Public addresses and subnets. -
Click Order a public subnet at the top of the page.
-
In the Availability zone field, select the availability zone where the subnet will be available.
-
Under Pool, select one or more pools the subnet will be available in.
You can link a dedicated public subnet with several pools at the same time. You can edit the pool list after the subnet has been created.
-
In the table, select the size of the subnet you want to order.
/28: 16 IP addresses, 14 of which are available for use./29: 8 IP addresses, 6 of which are available for use.
If you need a larger public subnet, contact
support to request it. -
Under General information:
- In the Name field, enter the name of the public subnet.
- Optionally, in the Description field, add a subnet description.
- Optionally, under Labels, click Add label and set labels.
-
Click Order.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating 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.
-
View the description of the command for leasing a new dedicated public subnet:
yc baremetal public-subnet create --help -
Lease a subnet:
yc baremetal public-subnet create \ --hardware-pool-ids <pool_1_ID>,<pool_2_ID>,... \ --prefix-length 29 \ --name <public_subnet_name> \ --description "<public_subnet_description>" \ --labels <key>=<value>Where:
-
--hardware-pool-ids: IDs of the pools where the subnet will be available.You can link a dedicated public subnet with several pools at the same time. You can edit the pool list after the subnet has been created.
-
--prefix-length: Size of the subnet you want to order.You can only order subnets of size
/29(six available IP addresses) and/28(14 available IP addresses). -
--name: Subnet name. The naming requirements are as follows:- Length: between 3 and 63 characters.
- It can only contain lowercase Latin letters, numbers, and hyphens.
- It must start with a letter and cannot end with a hyphen.
-
--description: Subnet description. This is an optional setting. -
--labels: Subnet labels. This is an optional setting.
-
To lease a new dedicated public subnet, use the create REST API method for the PublicSubnet resource or the PublicSubnetService/Create gRPC API call.
Converting an ephemeral public subnet to a dedicated one
Note
You can only convert an ephemeral public subnet to a dedicated public subnet of size /31.
- In the management console
, select the folder containing the ephemeral public subnet you want to convert to a dedicated one. - Navigate
to BareMetal. - In the left-hand panel, select
Public addresses and subnets. - In the list of public subnets that opens, in the ephemeral subnet row, click
and select Make dedicated. -
Under Pool, select one or more pools the subnet will be available in.
You can link a dedicated public subnet with several pools at the same time. You can edit the pool list after the subnet has been created.
-
Under General information:
- In the Name field, enter the name of the public subnet.
- Optionally, in the Description field, add a subnet description.
- Optionally, under Labels, click Add label and set labels.
- Click Order.
-
View the description of the command for transforming an ephemeral public subnet:
yc baremetal public-subnet update --help -
Transform the subnet:
yc baremetal public-subnet update \ --id <ephemeral_public_subnet_ID> \ --type dedicated \ --hardware-pool-ids <pool_1_ID>,<pool_2_ID>,... \ --name <public_subnet_name> \ --description "<public_subnet_description>" \ --labels <key>=<value>Where:
-
--id: ID of the ephemeral public subnet. -
--type: Type to transform the subnet into. -
--hardware-pool-ids: IDs of the pools where the subnet will be available.You can link a dedicated public subnet with several pools at the same time. You can edit the pool list after the subnet has been created.
-
--name: Subnet name. -
--description: Subnet description. This is an optional setting. -
--labels: Subnet labels. This is an optional setting.
-
To convert an ephemeral public subnet to a dedicated one, use the update REST API method for the PublicSubnet resource or the PublicSubnetService/Update gRPC API call.
Updating the pools of a dedicated public subnet
-
In the management console
, select the folder containing the dedicated public subnet in question. -
Navigate
to BareMetal. -
In the left-hand panel, select
Public addresses and subnets. -
Select the public subnet in question.
-
Click
Edit at the top right. -
In the Pool field, select the pools where you need the subnet to be available.
You cannot change the public subnet's availability zone.
-
Click Save changes.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating 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.
-
View the description of the command for updating the public subnet:
yc baremetal public-subnet update --help -
Update the list of pools:
yc baremetal public-subnet update \ --id <public_subnet_ID> \ --hardware-pool-ids <pool_1_ID>,<pool_2_ID>,...Where:
--id: Public subnet ID.--hardware-pool-ids: Full new list of IDs of the pools where the subnet needs to be available.
To update the pool list, use the update REST API method for the PublicSubnet resource or the PublicSubnetService/Update gRPC API call. Provide a new list of IDs in the hardwarePoolIds field and add hardwarePoolIds to the updateMask field.
Examples
Leasing a new dedicated public subnet
Lease a new dedicated public subnet of the /29 size:
yc baremetal public-subnet create \
--hardware-pool-ids ru-central1-m3,ru-central1-m4 \
--prefix-length 29 \
--name demo-public-subnet \
--description "My first public subnet" \
--labels env=test
Result:
id: ly5jmqxxrcsu********
cloud_id: b1gia87mbaom********
folder_id: b1g0ijbfaqsn********
name: demo-public-subnet
description: My first public subnet
zone_id: ru-central1-m
hardware_pool_ids:
- ru-central1-m3
- ru-central1-m4
type: DEDICATED
prefix_length: "29"
cidr: 94.139.248.184/29
gateway_ip: 94.139.248.185
created_at: "2025-06-26T14:11:49.458568Z"
labels:
env: test
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <IAM_token>" \
-d '{
"folderId": "b1g07hj5r6i4********",
"name": "new-public-subnet",
"description": "New public subnet",
"hardwarePoolIds": [
"ru-central1-m3",
"ru-central1-m4"
],
"prefixLength": "29",
"labels": {
"key": "public-subnet"
}
}' \
"https://baremetal.api.cloud.yandex.net/baremetal/v1alpha/publicSubnets"
Where:
-
<IAM_token>: IAM token used for authentication. -
folderId: Folder ID. -
hardwarePoolIds: Pool IDs. -
prefixLength: Size of the subnet you want to order. -
name: Name of the public subnet. The naming requirements are as follows:- Length: between 3 and 63 characters.
- It can only contain lowercase Latin letters, numbers, and hyphens.
- It must start with a letter and cannot end with a hyphen.
-
description: Subnet description. This is an optional parameter. -
labels: Subnet labels. This is an optional parameter.
Result:
{
"done": true,
"metadata": {
"@type": "type.googleapis.com/yandex.cloud.baremetal.v1alpha.CreatePublicSubnetMetadata",
"publicSubnetId": "ly52xefxa2hi********"
},
"response": {
"@type": "type.googleapis.com/yandex.cloud.baremetal.v1alpha.PublicSubnet",
"id": "ly52xefxa2hi********",
"cloudId": "b1gia87mbaom********",
"folderId": "b1g07hj5r6i4********",
"name": "new-public-subnet",
"description": "New public subnet",
"zoneId": "ru-central1-m",
"hardwarePoolIds": [
"ru-central1-m3",
"ru-central1-m4"
],
"type": "EPHEMERAL",
"prefixLength": "29",
"cidr": "10.0.*.*/29",
"dhcpOptions": {
"startIp": "10.0.*.*",
"endIp": "10.0.*.*"
},
"gatewayIp": "10.0.*.*"
"createdAt": "2025-12-14T14:42:58.372557Z"
"labels": {
"env": "test"
},
"id": "ly5hcnsbx3l4********",
"description": "Public subnet create",
"createdAt": "2025-12-14T14:42:58.375290Z",
"createdBy": "ajeb9l33h6mu********",
"modifiedAt": "2025-12-14T14:42:58.375290Z"
}
Follow the status of the operation by the done field.
Transforming an ephemeral public subnet into a dedicated one
Change the public subnet type from ephemeral to dedicated:
yc baremetal public-subnet update \
--id ly5vr6tugxk7******** \
--type dedicated \
--hardware-pool-ids ru-central1-m3,ru-central1-m4 \
--description "Transformed dedicated public subnet"
Result:
id: ly5vr6tugxk7********
cloud_id: b1gia87mbaom********
folder_id: b1g0ijbfaqsn********
name: transformed-public-subnet
description: Transformed dedicated public subnet
zone_id: ru-central1-m
hardware_pool_ids:
- ru-central1-m3
- ru-central1-m4
type: DEDICATED
prefix_length: "29"
cidr: 94.139.248.184/29
gateway_ip: 94.139.248.185
created_at: "2025-06-26T14:11:49.458568Z"
curl -X PATCH \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <IAM_token>" \
-d '{
"updateMask": "type,hardwarePoolIds,name,description",
"type": "DEDICATED",
"hardwarePoolIds": ["ru-central1-m3", "ru-central1-m4"],
"name": "transformed-public-subnet",
"description": "Transformed dedicated public subnet"
}' \
"https://baremetal.api.cloud.yandex.net/baremetal/v1alpha/publicSubnets/<subnet_ID>"
Where:
-
updateMask: List of parameters to update, comma-separated. -
type: New subnet type. TheDEDICATEDvalue for conversion into a dedicated subnet. -
name: Name of the dedicated subnet. The naming requirements are as follows:- Length: between 3 and 63 characters.
- It can only contain lowercase Latin letters, numbers, and hyphens.
- It must start with a letter and cannot end with a hyphen.
-
description: Description of the dedicated subnet. This is an optional parameter.
Result:
{
"done": true,
"metadata": {
"@type": "type.googleapis.com/yandex.cloud.baremetal.v1alpha.CreatePublicSubnetMetadata",
"publicSubnetId": "ly52xefxa2hi********"
},
"response": {
"@type": "type.googleapis.com/yandex.cloud.baremetal.v1alpha.PublicSubnet",
"id": "ly52xefxa2hi********",
"cloudId": "b1gia87mbaom********",
"folderId": "b1g07hj5r6i4********",
"name": "new-public-subnet",
"description": "New public subnet",
"zoneId": "ru-central1-m",
"hardwarePoolIds": [
"ru-central1-m3",
"ru-central1-m4"
],
"type": "DEDICATED",
"prefixLength": "29",
"cidr": "10.0.*.*/29",
"dhcpOptions": {
"startIp": "10.0.*.*",
"endIp": "10.0.*.*"
},
"gatewayIp": "10.0.*.*"
"createdAt": "2025-12-14T14:42:58.372557Z"
"labels": {
"env": "test"
},
"id": "ly5hcnsbx3l4********",
"description": "Public subnet create",
"createdAt": "2025-12-14T14:42:58.375290Z",
"createdBy": "ajeb9l33h6mu********",
"modifiedAt": "2025-12-14T14:42:58.375290Z"
}
Follow the status of the operation by the done field.