This feature is in public preview.
Create a subnet
Create subnets to allow instances to communicate with each other. A subnet lives in one availability zone, identified by its region and availability zone. Instances attached to the subnet must be in that same zone. In the console, open Networks and select Create Network. While launching an instance, you can also select Create network under Network. With the CLI, pass the workspace, a name, the region, the availability zone, and a CIDR (Classless Inter-Domain Routing) block.POST request to /preview/v2/subnets.
cidr block must fall within one of the private address ranges, be a /28 or larger, and have no host bits set (for example, 10.1.0.0/16).
10.1.0.0/24 subnet, the first instance receives 10.1.0.4. The /28 minimum leaves room for these reserved addresses. Each subnet supports up to 64 live instances.
List subnets
List subnets with aGET request. Pass workspace to scope the list to one workspace; omit it to list every workspace where you can list subnets.
Get subnet details
Fetch a subnet by ID or resource path. Subnet names are unique within a workspace, so the resource path identifies the subnet.Attach instances to a subnet
Specify the subnet when you create an instance. Pass its ID or resource path in the optionalsubnet field of the create request. See Instances for the other creation fields. You cannot attach, detach, or move a running instance to another subnet.
In the console, choose a pool and SKU, then select the subnet from the Network menu. With the CLI, pass --subnet.
--private-ip option, or the API’s private_ip field. An address stays reserved until the instance’s host confirms teardown, so a terminated instance can hold its address for a short time after it stops.