Volumes Actions

Attach Volume to a Server

Attaches a Volume to a Server. Works only if the Server is in the same Location as the Volume.

HetznerCloudClient hetznerCloudClient = new HetznerCloudClient("ApiKey");

long volumeId = 100051962;
long serverId = 38911232;

Action action = await hetznerCloudClient.VolumeAction.Attach(volumeId, serverId);

Detach Volume

Detaches a Volume from the Server it’s attached to. You may attach it to a Server again at a later time.

HetznerCloudClient hetznerCloudClient = new HetznerCloudClient("ApiKey");

long volumeId = 100051962;

Action action = await hetznerCloudClient.VolumeAction.Detach(volumeId);

Resize Volume

Changes the size of a Volume. Note that downsizing a Volume is not possible.

Change Volume Protection

Changes the protection configuration of a Volume.

Get all Actions for a Volume

Returns all Action objects for a Volume.

Get an Action for a Volume

Returns a specific Action for a Volume.

Get all Actions

Returns all Action objects.

Get an Action

Returns a specific Action.

Last updated

Was this helpful?