Adds a new subnet object to the Network. If you do not specify an ip_range for the subnet we will automatically pick the first available /24 range for you if possible.
Deletes a single subnet entry from a Network. You cannot delete subnets which still have Servers attached. If you have Servers attached you first need to detach all Servers that use IPs from this subnet before you can delete the subnet.
HetznerCloudClient hetznerCloudClient = new HetznerCloudClient("ApiKey");
long networkId = 3553797;
string ipRange = "192.168.32.0/20";
Action action = await hetznerCloudClient.NetworkAction.DeleteSubnetFromNetwork(networkId, ipRange);
Change NetworkProtection
Changes the protection configuration of a Network.
HetznerCloudClient hetznerCloudClient = new HetznerCloudClient("ApiKey");
long networkId = 100051962;
List<Action> list = await hetznerCloudClient.NetworkAction.GetAllActions(networkId);
Get an Action for a Network
Returns a specific Action for a Network.
HetznerCloudClient hetznerCloudClient = new HetznerCloudClient("ApiKey");
long networkId = 100051962;
long actionId = 1236866267;
Action action = await hetznerCloudClient.NetworkAction.GetAction(networkId, actionId);
Get all Actions
Returns all Action objects.
HetznerCloudClient hetznerCloudClient = new HetznerCloudClient("ApiKey");
List<Action> list = await hetznerCloudClient.NetworkAction.GetAllActions();
Get an Action
Returns a specific Action.
HetznerCloudClient hetznerCloudClient = new HetznerCloudClient("ApiKey");
long actionId = 1236866267;
Action action = await hetznerCloudClient.NetworkAction.GetAction(actionId);