Prerequisites
- Web console
- CLI
- Go SDK
- Python SDK
- JavaScript SDK
Make sure you are in a group that has at least the
editor role within your tenant or project; for example, the default editors group. You can check this in the Administration → IAM section of the web console.- Install and configure the Nebius AI Cloud CLI.
- Make sure that you or the service account that you use is in a group that has at least the
editorrole within your tenant or project; for example, the defaulteditorsgroup. You can check this in the Administration → IAM section of the web console.
- Install and initialize the Nebius SDK for Go.
- Make sure that you or the service account that you use is in a group that has at least the
editorrole within your tenant or project; for example, the defaulteditorsgroup. You can check this in the Administration → IAM section of the web console.
- Install and initialize the Nebius SDK for Python.
- Make sure that you or the service account that you use is in a group that has at least the
editorrole within your tenant or project; for example, the defaulteditorsgroup. You can check this in the Administration → IAM section of the web console.
- Install and initialize the Nebius SDK for JavaScript.
- Make sure that you or the service account that you use is in a group that has at least the
editorrole within your tenant or project; for example, the defaulteditorsgroup. You can check this in the Administration → IAM section of the web console.
If you are in a group with the
viewer role, you can get the IDs but cannot create any Nebius AI Cloud resources.How to get a network ID
- Web console
- CLI
- Go SDK
- Python SDK
- JavaScript SDK
- In the sidebar, go to
Networking → Virtual Networks.
- To copy the network ID, click the
icon next to the required ID.
-
If you know the name of the network, use the
get-by-namecommand:nebius vpc network get-by-name --name <network_name> -
If you do not know the exact name of the network, use the
listcommand to view a list of available networks:nebius vpc network list
metadata.id parameter of the output.In the code, set
ParentId to the ID of the project that contains the network.-
If you know the name of the network, get it by name. Set
Nameto the network name:namedNetworkService := sdk.Services().VPC().V1(). Network() namedNetwork, err := namedNetworkService.GetByName( ctx, &vpc.GetNetworkByNameRequest{ ParentId: "<project_ID>", Name: "<network_name>", }, ) if err != nil { return err } fmt.Println(namedNetwork) -
If you do not know the exact name of the network, list the available networks:
networksService := sdk.Services().VPC().V1(). Network() networksResponse, err := networksService.List( ctx, &vpc.ListNetworksRequest{ ParentId: "<project_ID>", }, ) if err != nil { return err } fmt.Println(networksResponse)
Metadata.Id. In a list response, each network in Items has its ID in Metadata.Id.In the code, set
parent_id to the ID of the project that contains the network.-
If you know the name of the network, get it by name. Set
nameto the network name:named_network_service = NetworkServiceClient(sdk) named_network = await named_network_service.get_by_name( GetNetworkByNameRequest( parent_id="<project_ID>", name="<network_name>", ), ) print(named_network) -
If you do not know the exact name of the network, list the available networks:
networks_service = NetworkServiceClient(sdk) networks_response = await networks_service.list( ListNetworksRequest( parent_id="<project_ID>", ), ) print(networks_response)
metadata.id. In a list response, each network in items has its ID in metadata.id.In the code, set
parentId to the ID of the project that contains the network.-
If you know the name of the network, get it by name. Set
nameto the network name:const namedNetworkService = new NetworkService(sdk); const namedNetwork = await namedNetworkService.getByName( GetNetworkByNameRequest.create({ parentId: "<project_ID>", name: "<network_name>", }), ).result; console.log(namedNetwork); -
If you do not know the exact name of the network, list the available networks:
const networksService = new NetworkService(sdk); const networksResponse = await networksService.list( ListNetworksRequest.create({ parentId: "<project_ID>", }), ).result; console.log(networksResponse);
metadata.id. In a list response, each network in items has its ID in metadata.id.How to get a subnet ID
- Web console
- CLI
- Go SDK
- Python SDK
- JavaScript SDK
- In the sidebar, go to
Networking → Virtual Networks.
- Switch to the Subnets tab.
- To copy the subnet ID, click the
icon next to the required ID.
-
If you know the name of the subnet, use the
get-by-namecommand:nebius vpc subnet get-by-name --name <subnet_name> -
If you do not know the exact name of the subnet, use the
listcommand to view a list of available subnets:nebius vpc subnet list
metadata.id parameter of the output.In the code, set
ParentId to the ID of the project that contains the subnet.-
If you know the name of the subnet, get it by name. Set
Nameto the subnet name:namedSubnetService := sdk.Services().VPC().V1(). Subnet() namedSubnet, err := namedSubnetService.GetByName( ctx, &vpc.GetSubnetByNameRequest{ ParentId: "<project_ID>", Name: "<subnet_name>", }, ) if err != nil { return err } fmt.Println(namedSubnet) -
If you do not know the exact name of the subnet, list the available subnets:
subnetsService := sdk.Services().VPC().V1(). Subnet() subnetsResponse, err := subnetsService.List( ctx, &vpc.ListSubnetsRequest{ ParentId: "<project_ID>", }, ) if err != nil { return err } fmt.Println(subnetsResponse)
Metadata.Id. In a list response, each subnet in Items has its ID in Metadata.Id.In the code, set
parent_id to the ID of the project that contains the subnet.-
If you know the name of the subnet, get it by name. Set
nameto the subnet name:named_subnet_service = SubnetServiceClient(sdk) named_subnet = await named_subnet_service.get_by_name( GetSubnetByNameRequest( parent_id="<project_ID>", name="<subnet_name>", ), ) print(named_subnet) -
If you do not know the exact name of the subnet, list the available subnets:
subnets_service = SubnetServiceClient(sdk) subnets_response = await subnets_service.list( ListSubnetsRequest( parent_id="<project_ID>", ), ) print(subnets_response)
metadata.id. In a list response, each subnet in items has its ID in metadata.id.In the code, set
parentId to the ID of the project that contains the subnet.-
If you know the name of the subnet, get it by name. Set
nameto the subnet name:const namedSubnetService = new SubnetService(sdk); const namedSubnet = await namedSubnetService.getByName( GetSubnetByNameRequest.create({ parentId: "<project_ID>", name: "<subnet_name>", }), ).result; console.log(namedSubnet); -
If you do not know the exact name of the subnet, list the available subnets:
const subnetsService = new SubnetService(sdk); const subnetsResponse = await subnetsService.list( ListSubnetsRequest.create({ parentId: "<project_ID>", }), ).result; console.log(subnetsResponse);
metadata.id. In a list response, each subnet in items has its ID in metadata.id.