Networks is a private networks feature. These Networks are optional and they coexist with the public network that every Server has by default.
They allow Servers to talk to each other over a dedicated network interface using private IP addresses not available publicly.
The IP addresses are allocated and managed via the API, they must conform to RFC1918 standard. IPs and network interfaces defined under Networks do not provide public internet connectivity, you will need to use the already existing public network interface for that.
Each network has a user selected ip_range which defines all available IP addresses which can be used for Subnets within the Network.
To assign individual IPs to Servers you will need to create Network Subnets, described below.
Currently Networks support IPv4 only.
Get all Networks
Gets all existing networks that you have available.
HetznerCloudClient hetznerCloudClient =newHetznerCloudClient("apiKey");List<Network> list =awaithetznerCloudClient.Network.Get();
Deletes a network. If there are Servers attached they will be detached in the background.
HetznerCloudClient hetznerCloudClient =newHetznerCloudClient("ApiKey");// Get oneNetwork network =awaithetznerCloudClient.Network.Get(3550103);// You can delete it by passing the object as a parameterawaithetznerCloudClient.Network.Delete(network);// You can also delete it by passing the ID as a parameter.awaithetznerCloudClient.Network.Delete(3550103);