# Volumes

## List volumes

> List all the volumes within the data center.

```json
{"openapi":"3.0.3","info":{"title":"CLOUD API","version":"6.0"},"tags":[{"name":"Volumes"}],"servers":[{"url":"https://api.ionos.com/cloudapi/v6"}],"security":[{"BasicAuthentication":[]},{"TokenAuthentication":[]}],"components":{"securitySchemes":{"BasicAuthentication":{"type":"http","description":"You will need to base64 encode the string containing your credentials. <div style=\"padding: 15px; border: 1px solid #d1ecf1; background-color: #d1ecf1; color: #0c5460; margin-bottom: 15px;\">\n  <strong>Note:</strong><br/><br/>\n  <ul><li><b>Basic Authentication</b> is supported only when <b>2-Factor \n  Authentication</b> is not configured.</li>\n  <li>Users with <b>2-Factor \n  Authentication</b> activated must generate new 2FA-secured tokens in the DCD using [Token Manager](https://docs.ionos.com/cloud/set-up-ionos-cloud/management/identity-access-management/token-manager). \n  These tokens do not inherit the <b>2FA-secured</b> property by default.</li><li>Token deletion is only possible using the <b>Token Manager</b>.</li>\n</div> Separate your username and password with a colon, i.e., username:password and send it as 'Authorization' request header. More details: https://en.wikipedia.org/wiki/Basic_access_authentication","scheme":"basic"},"TokenAuthentication":{"type":"apiKey","description":"Please provide header value as 'Bearer <token>' and don't forget to add 'Bearer' HTTP Authorization Scheme before the token.","name":"Authorization","in":"header"}},"schemas":{"Volumes":{"type":"object","properties":{"id":{"type":"string","description":"The resource's unique identifier.","readOnly":true},"type":{"type":"string","description":"The type of object that has been created.","allOf":[{"$ref":"#/components/schemas/Type"}]},"href":{"type":"string","description":"URL to the object representation (absolute path).","format":"uri","readOnly":true},"items":{"type":"array","description":"Array of items in the collection.","readOnly":true,"items":{"$ref":"#/components/schemas/Volume"}},"offset":{"$ref":"#/components/schemas/PaginationOffsetOptional"},"limit":{"$ref":"#/components/schemas/PaginationLimitOptional"},"_links":{"$ref":"#/components/schemas/PaginationLinks"}}},"Type":{"type":"string","enum":["datacenter","server","volume","nic","loadbalancer","location","firewall-rule","flow-log","image","snapshot","lan","ipblock","pcc","contract","user","group","collection","resource","request","request-status","s3key","backupunit","label","k8s","nodepool","template","networkloadbalancer","forwarding-rule","natgateway","natgateway-rule","node","applicationloadbalancer","target-group","security-group","gpu"]},"Volume":{"required":["properties"],"type":"object","properties":{"id":{"type":"string","description":"The resource's unique identifier.","readOnly":true},"type":{"type":"string","description":"The type of object that has been created.","allOf":[{"$ref":"#/components/schemas/Type"}]},"href":{"type":"string","description":"The URL to the object representation (absolute path).","format":"uri","readOnly":true},"metadata":{"$ref":"#/components/schemas/DatacenterElementMetadata"},"properties":{"$ref":"#/components/schemas/VolumeProperties"}}},"DatacenterElementMetadata":{"type":"object","properties":{"etag":{"type":"string","description":"Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11  Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter.","readOnly":true},"createdDate":{"type":"string","description":"The last time the resource was created.","format":"date-time","readOnly":true},"createdBy":{"type":"string","description":"The user who created the resource.","readOnly":true},"createdByUserId":{"type":"string","description":"The unique ID of the user who created the resource.","readOnly":true},"lastModifiedDate":{"type":"string","description":"The last time the resource was modified.","format":"date-time","readOnly":true},"lastModifiedBy":{"type":"string","description":"The user who last modified the resource.","readOnly":true},"lastModifiedByUserId":{"type":"string","description":"The unique ID of the user who last modified the resource.","readOnly":true},"state":{"type":"string","description":"State of the resource. *AVAILABLE* There are no pending modification requests for this item; *BUSY* There is at least one modification request pending and all following requests will be queued; *INACTIVE* Resource has been de-provisioned; *DEPLOYING* Resource state DEPLOYING - relevant for Kubernetes cluster/nodepool; *ACTIVE* Resource state ACTIVE - relevant for Kubernetes cluster/nodepool; *FAILED* Resource state FAILED - relevant for Kubernetes cluster/nodepool; *SUSPENDED* Resource state SUSPENDED - relevant for Kubernetes cluster/nodepool; *FAILED_SUSPENDED* Resource state FAILED_SUSPENDED - relevant for Kubernetes cluster; *UPDATING* Resource state UPDATING - relevant for Kubernetes cluster/nodepool; *FAILED_UPDATING* Resource state FAILED_UPDATING - relevant for Kubernetes cluster/nodepool; *DESTROYING* Resource state DESTROYING - relevant for Kubernetes cluster; *FAILED_DESTROYING* Resource state FAILED_DESTROYING - relevant for Kubernetes cluster/nodepool; *TERMINATED* Resource state TERMINATED - relevant for Kubernetes cluster/nodepool; *HIBERNATING* Resource state HIBERNATING - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool; *MAINTENANCE* Resource state MAINTENANCE - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool.","readOnly":true,"enum":["AVAILABLE","INACTIVE","BUSY","DEPLOYING","ACTIVE","FAILED","SUSPENDED","FAILED_SUSPENDED","UPDATING","FAILED_UPDATING","DESTROYING","FAILED_DESTROYING","TERMINATED","HIBERNATING","FAILED_HIBERNATING","MAINTENANCE","FAILED_MAINTENANCE","UNKNOWN"]}}},"VolumeProperties":{"required":["size"],"type":"object","properties":{"name":{"type":"string","description":"The name of the  resource."},"type":{"type":"string","description":"Hardware type of the volume. DAS (Direct Attached Storage) could be used only in a composite call with a Cube server.","enum":["HDD","SSD","SSD Standard","SSD Premium","DAS","ISO"]},"size":{"type":"number","description":"The size of the volume in GB."},"availabilityZone":{"type":"string","description":"The availability zone in which the volume should be provisioned. The storage volume will be provisioned on as few physical storage devices as possible, but this cannot be guaranteed upfront. This is uavailable for DAS (Direct Attached Storage), and subject to availability for SSD.","enum":["AUTO","ZONE_1","ZONE_2","ZONE_3"]},"image":{"type":"string","description":"Image or snapshot ID to be used as template for this volume. MSSQL Enterprise Images can be used only if the feature toggle for MSSQL Enterprise is enabled on the contract."},"imagePassword":{"type":"string","description":"Initial password to be set for installed OS. Works with public images only. Not modifiable, forbidden in update requests. Password rules allows all characters from a-z, A-Z, 0-9."},"sshKeys":{"type":"array","description":"Public SSH keys are set on the image as authorized keys for appropriate SSH login to the instance using the corresponding private key. This field may only be set in creation requests. When reading, it always returns null. SSH keys are only supported if a public Linux image is used for the volume creation.","items":{"type":"string"}},"bus":{"type":"string","description":"The bus type for this volume; default is VIRTIO.","enum":["VIRTIO","IDE","UNKNOWN"]},"licenceType":{"type":"string","description":"OS type for this volume."},"applicationType":{"$ref":"#/components/schemas/ApplicationType"},"cpuHotPlug":{"type":"boolean","description":"Hot-plug capable CPU (no reboot required)."},"ramHotPlug":{"type":"boolean","description":"Hot-plug capable RAM (no reboot required)."},"nicHotPlug":{"type":"boolean","description":"Hot-plug capable NIC (no reboot required)."},"nicHotUnplug":{"type":"boolean","description":"Hot-unplug capable NIC (no reboot required)."},"discVirtioHotPlug":{"type":"boolean","description":"Hot-plug capable Virt-IO drive (no reboot required)."},"discVirtioHotUnplug":{"type":"boolean","description":"Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs."},"exposeSerial":{"$ref":"#/components/schemas/ExposeSerial"},"requireLegacyBios":{"$ref":"#/components/schemas/RequireLegacyBios"},"deviceNumber":{"type":"integer","description":"The Logical Unit Number of the storage volume. Null for volumes, not mounted to a VM.","format":"int64","readOnly":true},"pciSlot":{"type":"integer","description":"The PCI slot number of the storage volume. Null for volumes, not mounted to a VM.","format":"int32","readOnly":true},"backupunitId":{"type":"string","format":"uuid","description":"The ID of the backup unit that the user has access to. The property is immutable and is only allowed to be set on creation of a new a volume. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property."},"userData":{"type":"string","description":"The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on creation of a new a volume. It is mandatory to provide either 'public image' or 'imageAlias' that has cloud-init compatibility in conjunction with this property."},"bootServer":{"type":"string","description":"The UUID of the attached server.","readOnly":true},"bootOrder":{"type":"string","description":"Determines whether the volume will be used as a boot volume. Set to `NONE`, the volume will not be used as boot volume. Set to `PRIMARY`, the volume will be used as boot volume and all other volumes must be set to `NONE`. Set to `AUTO` or `null` requires all volumes to be set to `AUTO` or `null`; this will use the legacy behavior, which is to use the volume as a boot volume only if there are no other volumes or cdrom devices.","nullable":true,"default":"AUTO","enum":["AUTO","NONE","PRIMARY"]}}},"ApplicationType":{"type":"string","description":"The type of application that is hosted on this resource.  Only public images can have an Application type different than UNKNOWN."},"ExposeSerial":{"type":"boolean","description":"If set to `true` will expose the serial id of the disk attached to the server. If set to `false` will not expose the serial id. Some operating systems or software solutions require the serial id to be exposed to work properly. Exposing the serial  can influence licensed software (e.g. Windows) behavior","default":false},"RequireLegacyBios":{"type":"boolean","description":"Indicates if the image requires the legacy BIOS for compatibility or specific needs.","default":true},"PaginationOffsetOptional":{"type":"number","description":"The offset (if specified in the request)."},"PaginationLimitOptional":{"type":"number","description":"The limit (if specified in the request)."},"PaginationLinks":{"type":"object","properties":{"prev":{"type":"string","description":"URL (with offset and limit parameters) of the previous page; only present if offset is greater than 0.","format":"uri","readOnly":true},"self":{"type":"string","description":"URL (with offset and limit parameters) of the current page.","format":"uri","readOnly":true},"next":{"type":"string","description":"URL (with offset and limit parameters) of the next page; only present if offset + limit is less than the total number of elements.","format":"uri","readOnly":true}}},"Error":{"type":"object","properties":{"httpStatus":{"type":"integer","description":"HTTP status code of the operation.","format":"int32","readOnly":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ErrorMessage"}}}},"ErrorMessage":{"type":"object","properties":{"errorCode":{"type":"string","description":"Application internal error code.","readOnly":true},"message":{"type":"string","description":"A human-readable message.","readOnly":true}}}}},"paths":{"/datacenters/{datacenterId}/volumes":{"get":{"tags":["Volumes"],"summary":"List volumes","description":"List all the volumes within the data center.","operationId":"datacentersVolumesGet","parameters":[{"name":"datacenterId","in":"path","description":"The unique ID of the data center.","required":true,"schema":{"type":"string"}},{"name":"pretty","in":"query","description":"Controls whether the response is pretty-printed (with indentations and new lines).","schema":{"type":"boolean","default":true}},{"name":"depth","in":"query","description":"Controls the detail depth of the response objects. \nGET /datacenters/[ID]\n\t- depth=0: Only direct properties are included; children (servers and other elements) are not included.\n\t- depth=1: Direct properties and children references are included.\n\t- depth=2: Direct properties and children properties are included.\n\t- depth=3: Direct properties and children properties and children's children are included.\n\t- depth=... and so on","schema":{"maximum":10,"minimum":0,"type":"integer","format":"int32","default":0}},{"name":"X-Contract-Number","in":"header","description":"Users with multiple contracts must provide the contract number, for which all API requests are to be executed.","schema":{"type":"integer","format":"int32"}},{"name":"offset","in":"query","description":"The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination).","schema":{"minimum":0,"type":"integer","format":"int32","default":0}},{"name":"limit","in":"query","description":"The maximum number of elements to return (use together with offset for pagination).","schema":{"maximum":10000,"minimum":1,"type":"integer","format":"int32","default":1000}}],"responses":{"200":{"description":"Successful operation","headers":{"X-RateLimit-Remaining":{"description":"The number of requests that can still be made without triggering a failure response.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Limit":{"description":"The average number of requests per minute allowed.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Burst":{"description":"The maximum number of concurrent API requests allowed.","schema":{"type":"integer","format":"int32"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Volumes"}}}},"default":{"description":"Any erroneous status code: 400 (parse error), 401 (auth error), 402 (trial access), 403 (insufficient privileges), 404 (not found), 405 (unsupported HTTP method), 415 (unsupported content type, 422 (validation error), 429 (request rate limit exceeded), 500 (server error), or 503 (maintenance).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Create a Volume

> Creates a storage volume within the specified data center. The volume will not be attached! Attaching volumes is described in the Servers section.

```json
{"openapi":"3.0.3","info":{"title":"CLOUD API","version":"6.0"},"tags":[{"name":"Volumes"}],"servers":[{"url":"https://api.ionos.com/cloudapi/v6"}],"security":[{"BasicAuthentication":[]},{"TokenAuthentication":[]}],"components":{"securitySchemes":{"BasicAuthentication":{"type":"http","description":"You will need to base64 encode the string containing your credentials. <div style=\"padding: 15px; border: 1px solid #d1ecf1; background-color: #d1ecf1; color: #0c5460; margin-bottom: 15px;\">\n  <strong>Note:</strong><br/><br/>\n  <ul><li><b>Basic Authentication</b> is supported only when <b>2-Factor \n  Authentication</b> is not configured.</li>\n  <li>Users with <b>2-Factor \n  Authentication</b> activated must generate new 2FA-secured tokens in the DCD using [Token Manager](https://docs.ionos.com/cloud/set-up-ionos-cloud/management/identity-access-management/token-manager). \n  These tokens do not inherit the <b>2FA-secured</b> property by default.</li><li>Token deletion is only possible using the <b>Token Manager</b>.</li>\n</div> Separate your username and password with a colon, i.e., username:password and send it as 'Authorization' request header. More details: https://en.wikipedia.org/wiki/Basic_access_authentication","scheme":"basic"},"TokenAuthentication":{"type":"apiKey","description":"Please provide header value as 'Bearer <token>' and don't forget to add 'Bearer' HTTP Authorization Scheme before the token.","name":"Authorization","in":"header"}},"schemas":{"VolumePropertiesPost":{"required":["properties"],"type":"object","properties":{"properties":{"allOf":[{"$ref":"#/components/schemas/VolumeProperties"},{"$ref":"#/components/schemas/ImageAlias"}]}}},"VolumeProperties":{"required":["size"],"type":"object","properties":{"name":{"type":"string","description":"The name of the  resource."},"type":{"type":"string","description":"Hardware type of the volume. DAS (Direct Attached Storage) could be used only in a composite call with a Cube server.","enum":["HDD","SSD","SSD Standard","SSD Premium","DAS","ISO"]},"size":{"type":"number","description":"The size of the volume in GB."},"availabilityZone":{"type":"string","description":"The availability zone in which the volume should be provisioned. The storage volume will be provisioned on as few physical storage devices as possible, but this cannot be guaranteed upfront. This is uavailable for DAS (Direct Attached Storage), and subject to availability for SSD.","enum":["AUTO","ZONE_1","ZONE_2","ZONE_3"]},"image":{"type":"string","description":"Image or snapshot ID to be used as template for this volume. MSSQL Enterprise Images can be used only if the feature toggle for MSSQL Enterprise is enabled on the contract."},"imagePassword":{"type":"string","description":"Initial password to be set for installed OS. Works with public images only. Not modifiable, forbidden in update requests. Password rules allows all characters from a-z, A-Z, 0-9."},"sshKeys":{"type":"array","description":"Public SSH keys are set on the image as authorized keys for appropriate SSH login to the instance using the corresponding private key. This field may only be set in creation requests. When reading, it always returns null. SSH keys are only supported if a public Linux image is used for the volume creation.","items":{"type":"string"}},"bus":{"type":"string","description":"The bus type for this volume; default is VIRTIO.","enum":["VIRTIO","IDE","UNKNOWN"]},"licenceType":{"type":"string","description":"OS type for this volume."},"applicationType":{"$ref":"#/components/schemas/ApplicationType"},"cpuHotPlug":{"type":"boolean","description":"Hot-plug capable CPU (no reboot required)."},"ramHotPlug":{"type":"boolean","description":"Hot-plug capable RAM (no reboot required)."},"nicHotPlug":{"type":"boolean","description":"Hot-plug capable NIC (no reboot required)."},"nicHotUnplug":{"type":"boolean","description":"Hot-unplug capable NIC (no reboot required)."},"discVirtioHotPlug":{"type":"boolean","description":"Hot-plug capable Virt-IO drive (no reboot required)."},"discVirtioHotUnplug":{"type":"boolean","description":"Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs."},"exposeSerial":{"$ref":"#/components/schemas/ExposeSerial"},"requireLegacyBios":{"$ref":"#/components/schemas/RequireLegacyBios"},"deviceNumber":{"type":"integer","description":"The Logical Unit Number of the storage volume. Null for volumes, not mounted to a VM.","format":"int64","readOnly":true},"pciSlot":{"type":"integer","description":"The PCI slot number of the storage volume. Null for volumes, not mounted to a VM.","format":"int32","readOnly":true},"backupunitId":{"type":"string","format":"uuid","description":"The ID of the backup unit that the user has access to. The property is immutable and is only allowed to be set on creation of a new a volume. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property."},"userData":{"type":"string","description":"The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on creation of a new a volume. It is mandatory to provide either 'public image' or 'imageAlias' that has cloud-init compatibility in conjunction with this property."},"bootServer":{"type":"string","description":"The UUID of the attached server.","readOnly":true},"bootOrder":{"type":"string","description":"Determines whether the volume will be used as a boot volume. Set to `NONE`, the volume will not be used as boot volume. Set to `PRIMARY`, the volume will be used as boot volume and all other volumes must be set to `NONE`. Set to `AUTO` or `null` requires all volumes to be set to `AUTO` or `null`; this will use the legacy behavior, which is to use the volume as a boot volume only if there are no other volumes or cdrom devices.","nullable":true,"default":"AUTO","enum":["AUTO","NONE","PRIMARY"]}}},"ApplicationType":{"type":"string","description":"The type of application that is hosted on this resource.  Only public images can have an Application type different than UNKNOWN."},"ExposeSerial":{"type":"boolean","description":"If set to `true` will expose the serial id of the disk attached to the server. If set to `false` will not expose the serial id. Some operating systems or software solutions require the serial id to be exposed to work properly. Exposing the serial  can influence licensed software (e.g. Windows) behavior","default":false},"RequireLegacyBios":{"type":"boolean","description":"Indicates if the image requires the legacy BIOS for compatibility or specific needs.","default":true},"ImageAlias":{"type":"object","properties":{"imageAlias":{"type":"string","description":"Image alias of an image to be used as template for this volume. MSSQL Enterprise Images can be used only if the feature toggle for MSSQL Enterprise is enabled on the contract."}}},"Volume":{"required":["properties"],"type":"object","properties":{"id":{"type":"string","description":"The resource's unique identifier.","readOnly":true},"type":{"type":"string","description":"The type of object that has been created.","allOf":[{"$ref":"#/components/schemas/Type"}]},"href":{"type":"string","description":"The URL to the object representation (absolute path).","format":"uri","readOnly":true},"metadata":{"$ref":"#/components/schemas/DatacenterElementMetadata"},"properties":{"$ref":"#/components/schemas/VolumeProperties"}}},"Type":{"type":"string","enum":["datacenter","server","volume","nic","loadbalancer","location","firewall-rule","flow-log","image","snapshot","lan","ipblock","pcc","contract","user","group","collection","resource","request","request-status","s3key","backupunit","label","k8s","nodepool","template","networkloadbalancer","forwarding-rule","natgateway","natgateway-rule","node","applicationloadbalancer","target-group","security-group","gpu"]},"DatacenterElementMetadata":{"type":"object","properties":{"etag":{"type":"string","description":"Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11  Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter.","readOnly":true},"createdDate":{"type":"string","description":"The last time the resource was created.","format":"date-time","readOnly":true},"createdBy":{"type":"string","description":"The user who created the resource.","readOnly":true},"createdByUserId":{"type":"string","description":"The unique ID of the user who created the resource.","readOnly":true},"lastModifiedDate":{"type":"string","description":"The last time the resource was modified.","format":"date-time","readOnly":true},"lastModifiedBy":{"type":"string","description":"The user who last modified the resource.","readOnly":true},"lastModifiedByUserId":{"type":"string","description":"The unique ID of the user who last modified the resource.","readOnly":true},"state":{"type":"string","description":"State of the resource. *AVAILABLE* There are no pending modification requests for this item; *BUSY* There is at least one modification request pending and all following requests will be queued; *INACTIVE* Resource has been de-provisioned; *DEPLOYING* Resource state DEPLOYING - relevant for Kubernetes cluster/nodepool; *ACTIVE* Resource state ACTIVE - relevant for Kubernetes cluster/nodepool; *FAILED* Resource state FAILED - relevant for Kubernetes cluster/nodepool; *SUSPENDED* Resource state SUSPENDED - relevant for Kubernetes cluster/nodepool; *FAILED_SUSPENDED* Resource state FAILED_SUSPENDED - relevant for Kubernetes cluster; *UPDATING* Resource state UPDATING - relevant for Kubernetes cluster/nodepool; *FAILED_UPDATING* Resource state FAILED_UPDATING - relevant for Kubernetes cluster/nodepool; *DESTROYING* Resource state DESTROYING - relevant for Kubernetes cluster; *FAILED_DESTROYING* Resource state FAILED_DESTROYING - relevant for Kubernetes cluster/nodepool; *TERMINATED* Resource state TERMINATED - relevant for Kubernetes cluster/nodepool; *HIBERNATING* Resource state HIBERNATING - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool; *MAINTENANCE* Resource state MAINTENANCE - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool.","readOnly":true,"enum":["AVAILABLE","INACTIVE","BUSY","DEPLOYING","ACTIVE","FAILED","SUSPENDED","FAILED_SUSPENDED","UPDATING","FAILED_UPDATING","DESTROYING","FAILED_DESTROYING","TERMINATED","HIBERNATING","FAILED_HIBERNATING","MAINTENANCE","FAILED_MAINTENANCE","UNKNOWN"]}}},"Error":{"type":"object","properties":{"httpStatus":{"type":"integer","description":"HTTP status code of the operation.","format":"int32","readOnly":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ErrorMessage"}}}},"ErrorMessage":{"type":"object","properties":{"errorCode":{"type":"string","description":"Application internal error code.","readOnly":true},"message":{"type":"string","description":"A human-readable message.","readOnly":true}}}}},"paths":{"/datacenters/{datacenterId}/volumes":{"post":{"tags":["Volumes"],"summary":"Create a Volume","description":"Creates a storage volume within the specified data center. The volume will not be attached! Attaching volumes is described in the Servers section.","operationId":"datacentersVolumesPost","parameters":[{"name":"datacenterId","in":"path","description":"The unique ID of the data center.","required":true,"schema":{"type":"string"}},{"name":"pretty","in":"query","description":"Controls whether the response is pretty-printed (with indentations and new lines).","schema":{"type":"boolean","default":true}},{"name":"depth","in":"query","description":"Controls the detail depth of the response objects. \nGET /datacenters/[ID]\n\t- depth=0: Only direct properties are included; children (servers and other elements) are not included.\n\t- depth=1: Direct properties and children references are included.\n\t- depth=2: Direct properties and children properties are included.\n\t- depth=3: Direct properties and children properties and children's children are included.\n\t- depth=... and so on","schema":{"maximum":10,"minimum":0,"type":"integer","format":"int32","default":0}},{"name":"X-Contract-Number","in":"header","description":"Users with multiple contracts must provide the contract number, for which all API requests are to be executed.","schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"The volume to create.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VolumePropertiesPost"}}},"required":true},"responses":{"202":{"description":"Successful operation","headers":{"X-RateLimit-Remaining":{"description":"The number of requests that can still be made without triggering a failure response.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Limit":{"description":"The average number of requests per minute allowed.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Burst":{"description":"The maximum number of concurrent API requests allowed.","schema":{"type":"integer","format":"int32"}},"Location":{"description":"Callback URL to poll async operation status.","schema":{"pattern":"https://[apiBaseUri]/requests/[requestId]/status","type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Volume"}}}},"default":{"description":"Any erroneous status code: 400 (parse error), 401 (auth error), 402 (trial access), 403 (insufficient privileges), 404 (not found), 405 (unsupported HTTP method), 415 (unsupported content type, 422 (validation error), 429 (request rate limit exceeded), 500 (server error), or 503 (maintenance).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Retrieve volumes

> Retrieve the properties of the specified volume within the data center.

```json
{"openapi":"3.0.3","info":{"title":"CLOUD API","version":"6.0"},"tags":[{"name":"Volumes"}],"servers":[{"url":"https://api.ionos.com/cloudapi/v6"}],"security":[{"BasicAuthentication":[]},{"TokenAuthentication":[]}],"components":{"securitySchemes":{"BasicAuthentication":{"type":"http","description":"You will need to base64 encode the string containing your credentials. <div style=\"padding: 15px; border: 1px solid #d1ecf1; background-color: #d1ecf1; color: #0c5460; margin-bottom: 15px;\">\n  <strong>Note:</strong><br/><br/>\n  <ul><li><b>Basic Authentication</b> is supported only when <b>2-Factor \n  Authentication</b> is not configured.</li>\n  <li>Users with <b>2-Factor \n  Authentication</b> activated must generate new 2FA-secured tokens in the DCD using [Token Manager](https://docs.ionos.com/cloud/set-up-ionos-cloud/management/identity-access-management/token-manager). \n  These tokens do not inherit the <b>2FA-secured</b> property by default.</li><li>Token deletion is only possible using the <b>Token Manager</b>.</li>\n</div> Separate your username and password with a colon, i.e., username:password and send it as 'Authorization' request header. More details: https://en.wikipedia.org/wiki/Basic_access_authentication","scheme":"basic"},"TokenAuthentication":{"type":"apiKey","description":"Please provide header value as 'Bearer <token>' and don't forget to add 'Bearer' HTTP Authorization Scheme before the token.","name":"Authorization","in":"header"}},"schemas":{"Volume":{"required":["properties"],"type":"object","properties":{"id":{"type":"string","description":"The resource's unique identifier.","readOnly":true},"type":{"type":"string","description":"The type of object that has been created.","allOf":[{"$ref":"#/components/schemas/Type"}]},"href":{"type":"string","description":"The URL to the object representation (absolute path).","format":"uri","readOnly":true},"metadata":{"$ref":"#/components/schemas/DatacenterElementMetadata"},"properties":{"$ref":"#/components/schemas/VolumeProperties"}}},"Type":{"type":"string","enum":["datacenter","server","volume","nic","loadbalancer","location","firewall-rule","flow-log","image","snapshot","lan","ipblock","pcc","contract","user","group","collection","resource","request","request-status","s3key","backupunit","label","k8s","nodepool","template","networkloadbalancer","forwarding-rule","natgateway","natgateway-rule","node","applicationloadbalancer","target-group","security-group","gpu"]},"DatacenterElementMetadata":{"type":"object","properties":{"etag":{"type":"string","description":"Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11  Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter.","readOnly":true},"createdDate":{"type":"string","description":"The last time the resource was created.","format":"date-time","readOnly":true},"createdBy":{"type":"string","description":"The user who created the resource.","readOnly":true},"createdByUserId":{"type":"string","description":"The unique ID of the user who created the resource.","readOnly":true},"lastModifiedDate":{"type":"string","description":"The last time the resource was modified.","format":"date-time","readOnly":true},"lastModifiedBy":{"type":"string","description":"The user who last modified the resource.","readOnly":true},"lastModifiedByUserId":{"type":"string","description":"The unique ID of the user who last modified the resource.","readOnly":true},"state":{"type":"string","description":"State of the resource. *AVAILABLE* There are no pending modification requests for this item; *BUSY* There is at least one modification request pending and all following requests will be queued; *INACTIVE* Resource has been de-provisioned; *DEPLOYING* Resource state DEPLOYING - relevant for Kubernetes cluster/nodepool; *ACTIVE* Resource state ACTIVE - relevant for Kubernetes cluster/nodepool; *FAILED* Resource state FAILED - relevant for Kubernetes cluster/nodepool; *SUSPENDED* Resource state SUSPENDED - relevant for Kubernetes cluster/nodepool; *FAILED_SUSPENDED* Resource state FAILED_SUSPENDED - relevant for Kubernetes cluster; *UPDATING* Resource state UPDATING - relevant for Kubernetes cluster/nodepool; *FAILED_UPDATING* Resource state FAILED_UPDATING - relevant for Kubernetes cluster/nodepool; *DESTROYING* Resource state DESTROYING - relevant for Kubernetes cluster; *FAILED_DESTROYING* Resource state FAILED_DESTROYING - relevant for Kubernetes cluster/nodepool; *TERMINATED* Resource state TERMINATED - relevant for Kubernetes cluster/nodepool; *HIBERNATING* Resource state HIBERNATING - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool; *MAINTENANCE* Resource state MAINTENANCE - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool.","readOnly":true,"enum":["AVAILABLE","INACTIVE","BUSY","DEPLOYING","ACTIVE","FAILED","SUSPENDED","FAILED_SUSPENDED","UPDATING","FAILED_UPDATING","DESTROYING","FAILED_DESTROYING","TERMINATED","HIBERNATING","FAILED_HIBERNATING","MAINTENANCE","FAILED_MAINTENANCE","UNKNOWN"]}}},"VolumeProperties":{"required":["size"],"type":"object","properties":{"name":{"type":"string","description":"The name of the  resource."},"type":{"type":"string","description":"Hardware type of the volume. DAS (Direct Attached Storage) could be used only in a composite call with a Cube server.","enum":["HDD","SSD","SSD Standard","SSD Premium","DAS","ISO"]},"size":{"type":"number","description":"The size of the volume in GB."},"availabilityZone":{"type":"string","description":"The availability zone in which the volume should be provisioned. The storage volume will be provisioned on as few physical storage devices as possible, but this cannot be guaranteed upfront. This is uavailable for DAS (Direct Attached Storage), and subject to availability for SSD.","enum":["AUTO","ZONE_1","ZONE_2","ZONE_3"]},"image":{"type":"string","description":"Image or snapshot ID to be used as template for this volume. MSSQL Enterprise Images can be used only if the feature toggle for MSSQL Enterprise is enabled on the contract."},"imagePassword":{"type":"string","description":"Initial password to be set for installed OS. Works with public images only. Not modifiable, forbidden in update requests. Password rules allows all characters from a-z, A-Z, 0-9."},"sshKeys":{"type":"array","description":"Public SSH keys are set on the image as authorized keys for appropriate SSH login to the instance using the corresponding private key. This field may only be set in creation requests. When reading, it always returns null. SSH keys are only supported if a public Linux image is used for the volume creation.","items":{"type":"string"}},"bus":{"type":"string","description":"The bus type for this volume; default is VIRTIO.","enum":["VIRTIO","IDE","UNKNOWN"]},"licenceType":{"type":"string","description":"OS type for this volume."},"applicationType":{"$ref":"#/components/schemas/ApplicationType"},"cpuHotPlug":{"type":"boolean","description":"Hot-plug capable CPU (no reboot required)."},"ramHotPlug":{"type":"boolean","description":"Hot-plug capable RAM (no reboot required)."},"nicHotPlug":{"type":"boolean","description":"Hot-plug capable NIC (no reboot required)."},"nicHotUnplug":{"type":"boolean","description":"Hot-unplug capable NIC (no reboot required)."},"discVirtioHotPlug":{"type":"boolean","description":"Hot-plug capable Virt-IO drive (no reboot required)."},"discVirtioHotUnplug":{"type":"boolean","description":"Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs."},"exposeSerial":{"$ref":"#/components/schemas/ExposeSerial"},"requireLegacyBios":{"$ref":"#/components/schemas/RequireLegacyBios"},"deviceNumber":{"type":"integer","description":"The Logical Unit Number of the storage volume. Null for volumes, not mounted to a VM.","format":"int64","readOnly":true},"pciSlot":{"type":"integer","description":"The PCI slot number of the storage volume. Null for volumes, not mounted to a VM.","format":"int32","readOnly":true},"backupunitId":{"type":"string","format":"uuid","description":"The ID of the backup unit that the user has access to. The property is immutable and is only allowed to be set on creation of a new a volume. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property."},"userData":{"type":"string","description":"The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on creation of a new a volume. It is mandatory to provide either 'public image' or 'imageAlias' that has cloud-init compatibility in conjunction with this property."},"bootServer":{"type":"string","description":"The UUID of the attached server.","readOnly":true},"bootOrder":{"type":"string","description":"Determines whether the volume will be used as a boot volume. Set to `NONE`, the volume will not be used as boot volume. Set to `PRIMARY`, the volume will be used as boot volume and all other volumes must be set to `NONE`. Set to `AUTO` or `null` requires all volumes to be set to `AUTO` or `null`; this will use the legacy behavior, which is to use the volume as a boot volume only if there are no other volumes or cdrom devices.","nullable":true,"default":"AUTO","enum":["AUTO","NONE","PRIMARY"]}}},"ApplicationType":{"type":"string","description":"The type of application that is hosted on this resource.  Only public images can have an Application type different than UNKNOWN."},"ExposeSerial":{"type":"boolean","description":"If set to `true` will expose the serial id of the disk attached to the server. If set to `false` will not expose the serial id. Some operating systems or software solutions require the serial id to be exposed to work properly. Exposing the serial  can influence licensed software (e.g. Windows) behavior","default":false},"RequireLegacyBios":{"type":"boolean","description":"Indicates if the image requires the legacy BIOS for compatibility or specific needs.","default":true},"Error":{"type":"object","properties":{"httpStatus":{"type":"integer","description":"HTTP status code of the operation.","format":"int32","readOnly":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ErrorMessage"}}}},"ErrorMessage":{"type":"object","properties":{"errorCode":{"type":"string","description":"Application internal error code.","readOnly":true},"message":{"type":"string","description":"A human-readable message.","readOnly":true}}}}},"paths":{"/datacenters/{datacenterId}/volumes/{volumeId}":{"get":{"tags":["Volumes"],"summary":"Retrieve volumes","description":"Retrieve the properties of the specified volume within the data center.","operationId":"datacentersVolumesFindById","parameters":[{"name":"datacenterId","in":"path","description":"The unique ID of the data center.","required":true,"schema":{"type":"string"}},{"name":"volumeId","in":"path","description":"The unique ID of the volume.","required":true,"schema":{"type":"string"}},{"name":"pretty","in":"query","description":"Controls whether the response is pretty-printed (with indentations and new lines).","schema":{"type":"boolean","default":true}},{"name":"depth","in":"query","description":"Controls the detail depth of the response objects. \nGET /datacenters/[ID]\n\t- depth=0: Only direct properties are included; children (servers and other elements) are not included.\n\t- depth=1: Direct properties and children references are included.\n\t- depth=2: Direct properties and children properties are included.\n\t- depth=3: Direct properties and children properties and children's children are included.\n\t- depth=... and so on","schema":{"maximum":10,"minimum":0,"type":"integer","format":"int32","default":0}},{"name":"X-Contract-Number","in":"header","description":"Users with multiple contracts must provide the contract number, for which all API requests are to be executed.","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Successful operation","headers":{"X-RateLimit-Remaining":{"description":"The number of requests that can still be made without triggering a failure response.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Limit":{"description":"The average number of requests per minute allowed.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Burst":{"description":"The maximum number of concurrent API requests allowed.","schema":{"type":"integer","format":"int32"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Volume"}}}},"default":{"description":"Any erroneous status code: 400 (parse error), 401 (auth error), 402 (trial access), 403 (insufficient privileges), 404 (not found), 405 (unsupported HTTP method), 415 (unsupported content type, 422 (validation error), 429 (request rate limit exceeded), 500 (server error), or 503 (maintenance).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Modify a Volume by ID

> Modifies the properties of the specified volume within the data center.

```json
{"openapi":"3.0.3","info":{"title":"CLOUD API","version":"6.0"},"tags":[{"name":"Volumes"}],"servers":[{"url":"https://api.ionos.com/cloudapi/v6"}],"security":[{"BasicAuthentication":[]},{"TokenAuthentication":[]}],"components":{"securitySchemes":{"BasicAuthentication":{"type":"http","description":"You will need to base64 encode the string containing your credentials. <div style=\"padding: 15px; border: 1px solid #d1ecf1; background-color: #d1ecf1; color: #0c5460; margin-bottom: 15px;\">\n  <strong>Note:</strong><br/><br/>\n  <ul><li><b>Basic Authentication</b> is supported only when <b>2-Factor \n  Authentication</b> is not configured.</li>\n  <li>Users with <b>2-Factor \n  Authentication</b> activated must generate new 2FA-secured tokens in the DCD using [Token Manager](https://docs.ionos.com/cloud/set-up-ionos-cloud/management/identity-access-management/token-manager). \n  These tokens do not inherit the <b>2FA-secured</b> property by default.</li><li>Token deletion is only possible using the <b>Token Manager</b>.</li>\n</div> Separate your username and password with a colon, i.e., username:password and send it as 'Authorization' request header. More details: https://en.wikipedia.org/wiki/Basic_access_authentication","scheme":"basic"},"TokenAuthentication":{"type":"apiKey","description":"Please provide header value as 'Bearer <token>' and don't forget to add 'Bearer' HTTP Authorization Scheme before the token.","name":"Authorization","in":"header"}},"schemas":{"VolumePropertiesPost":{"required":["properties"],"type":"object","properties":{"properties":{"allOf":[{"$ref":"#/components/schemas/VolumeProperties"},{"$ref":"#/components/schemas/ImageAlias"}]}}},"VolumeProperties":{"required":["size"],"type":"object","properties":{"name":{"type":"string","description":"The name of the  resource."},"type":{"type":"string","description":"Hardware type of the volume. DAS (Direct Attached Storage) could be used only in a composite call with a Cube server.","enum":["HDD","SSD","SSD Standard","SSD Premium","DAS","ISO"]},"size":{"type":"number","description":"The size of the volume in GB."},"availabilityZone":{"type":"string","description":"The availability zone in which the volume should be provisioned. The storage volume will be provisioned on as few physical storage devices as possible, but this cannot be guaranteed upfront. This is uavailable for DAS (Direct Attached Storage), and subject to availability for SSD.","enum":["AUTO","ZONE_1","ZONE_2","ZONE_3"]},"image":{"type":"string","description":"Image or snapshot ID to be used as template for this volume. MSSQL Enterprise Images can be used only if the feature toggle for MSSQL Enterprise is enabled on the contract."},"imagePassword":{"type":"string","description":"Initial password to be set for installed OS. Works with public images only. Not modifiable, forbidden in update requests. Password rules allows all characters from a-z, A-Z, 0-9."},"sshKeys":{"type":"array","description":"Public SSH keys are set on the image as authorized keys for appropriate SSH login to the instance using the corresponding private key. This field may only be set in creation requests. When reading, it always returns null. SSH keys are only supported if a public Linux image is used for the volume creation.","items":{"type":"string"}},"bus":{"type":"string","description":"The bus type for this volume; default is VIRTIO.","enum":["VIRTIO","IDE","UNKNOWN"]},"licenceType":{"type":"string","description":"OS type for this volume."},"applicationType":{"$ref":"#/components/schemas/ApplicationType"},"cpuHotPlug":{"type":"boolean","description":"Hot-plug capable CPU (no reboot required)."},"ramHotPlug":{"type":"boolean","description":"Hot-plug capable RAM (no reboot required)."},"nicHotPlug":{"type":"boolean","description":"Hot-plug capable NIC (no reboot required)."},"nicHotUnplug":{"type":"boolean","description":"Hot-unplug capable NIC (no reboot required)."},"discVirtioHotPlug":{"type":"boolean","description":"Hot-plug capable Virt-IO drive (no reboot required)."},"discVirtioHotUnplug":{"type":"boolean","description":"Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs."},"exposeSerial":{"$ref":"#/components/schemas/ExposeSerial"},"requireLegacyBios":{"$ref":"#/components/schemas/RequireLegacyBios"},"deviceNumber":{"type":"integer","description":"The Logical Unit Number of the storage volume. Null for volumes, not mounted to a VM.","format":"int64","readOnly":true},"pciSlot":{"type":"integer","description":"The PCI slot number of the storage volume. Null for volumes, not mounted to a VM.","format":"int32","readOnly":true},"backupunitId":{"type":"string","format":"uuid","description":"The ID of the backup unit that the user has access to. The property is immutable and is only allowed to be set on creation of a new a volume. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property."},"userData":{"type":"string","description":"The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on creation of a new a volume. It is mandatory to provide either 'public image' or 'imageAlias' that has cloud-init compatibility in conjunction with this property."},"bootServer":{"type":"string","description":"The UUID of the attached server.","readOnly":true},"bootOrder":{"type":"string","description":"Determines whether the volume will be used as a boot volume. Set to `NONE`, the volume will not be used as boot volume. Set to `PRIMARY`, the volume will be used as boot volume and all other volumes must be set to `NONE`. Set to `AUTO` or `null` requires all volumes to be set to `AUTO` or `null`; this will use the legacy behavior, which is to use the volume as a boot volume only if there are no other volumes or cdrom devices.","nullable":true,"default":"AUTO","enum":["AUTO","NONE","PRIMARY"]}}},"ApplicationType":{"type":"string","description":"The type of application that is hosted on this resource.  Only public images can have an Application type different than UNKNOWN."},"ExposeSerial":{"type":"boolean","description":"If set to `true` will expose the serial id of the disk attached to the server. If set to `false` will not expose the serial id. Some operating systems or software solutions require the serial id to be exposed to work properly. Exposing the serial  can influence licensed software (e.g. Windows) behavior","default":false},"RequireLegacyBios":{"type":"boolean","description":"Indicates if the image requires the legacy BIOS for compatibility or specific needs.","default":true},"ImageAlias":{"type":"object","properties":{"imageAlias":{"type":"string","description":"Image alias of an image to be used as template for this volume. MSSQL Enterprise Images can be used only if the feature toggle for MSSQL Enterprise is enabled on the contract."}}},"Volume":{"required":["properties"],"type":"object","properties":{"id":{"type":"string","description":"The resource's unique identifier.","readOnly":true},"type":{"type":"string","description":"The type of object that has been created.","allOf":[{"$ref":"#/components/schemas/Type"}]},"href":{"type":"string","description":"The URL to the object representation (absolute path).","format":"uri","readOnly":true},"metadata":{"$ref":"#/components/schemas/DatacenterElementMetadata"},"properties":{"$ref":"#/components/schemas/VolumeProperties"}}},"Type":{"type":"string","enum":["datacenter","server","volume","nic","loadbalancer","location","firewall-rule","flow-log","image","snapshot","lan","ipblock","pcc","contract","user","group","collection","resource","request","request-status","s3key","backupunit","label","k8s","nodepool","template","networkloadbalancer","forwarding-rule","natgateway","natgateway-rule","node","applicationloadbalancer","target-group","security-group","gpu"]},"DatacenterElementMetadata":{"type":"object","properties":{"etag":{"type":"string","description":"Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11  Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter.","readOnly":true},"createdDate":{"type":"string","description":"The last time the resource was created.","format":"date-time","readOnly":true},"createdBy":{"type":"string","description":"The user who created the resource.","readOnly":true},"createdByUserId":{"type":"string","description":"The unique ID of the user who created the resource.","readOnly":true},"lastModifiedDate":{"type":"string","description":"The last time the resource was modified.","format":"date-time","readOnly":true},"lastModifiedBy":{"type":"string","description":"The user who last modified the resource.","readOnly":true},"lastModifiedByUserId":{"type":"string","description":"The unique ID of the user who last modified the resource.","readOnly":true},"state":{"type":"string","description":"State of the resource. *AVAILABLE* There are no pending modification requests for this item; *BUSY* There is at least one modification request pending and all following requests will be queued; *INACTIVE* Resource has been de-provisioned; *DEPLOYING* Resource state DEPLOYING - relevant for Kubernetes cluster/nodepool; *ACTIVE* Resource state ACTIVE - relevant for Kubernetes cluster/nodepool; *FAILED* Resource state FAILED - relevant for Kubernetes cluster/nodepool; *SUSPENDED* Resource state SUSPENDED - relevant for Kubernetes cluster/nodepool; *FAILED_SUSPENDED* Resource state FAILED_SUSPENDED - relevant for Kubernetes cluster; *UPDATING* Resource state UPDATING - relevant for Kubernetes cluster/nodepool; *FAILED_UPDATING* Resource state FAILED_UPDATING - relevant for Kubernetes cluster/nodepool; *DESTROYING* Resource state DESTROYING - relevant for Kubernetes cluster; *FAILED_DESTROYING* Resource state FAILED_DESTROYING - relevant for Kubernetes cluster/nodepool; *TERMINATED* Resource state TERMINATED - relevant for Kubernetes cluster/nodepool; *HIBERNATING* Resource state HIBERNATING - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool; *MAINTENANCE* Resource state MAINTENANCE - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool.","readOnly":true,"enum":["AVAILABLE","INACTIVE","BUSY","DEPLOYING","ACTIVE","FAILED","SUSPENDED","FAILED_SUSPENDED","UPDATING","FAILED_UPDATING","DESTROYING","FAILED_DESTROYING","TERMINATED","HIBERNATING","FAILED_HIBERNATING","MAINTENANCE","FAILED_MAINTENANCE","UNKNOWN"]}}},"Error":{"type":"object","properties":{"httpStatus":{"type":"integer","description":"HTTP status code of the operation.","format":"int32","readOnly":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ErrorMessage"}}}},"ErrorMessage":{"type":"object","properties":{"errorCode":{"type":"string","description":"Application internal error code.","readOnly":true},"message":{"type":"string","description":"A human-readable message.","readOnly":true}}}}},"paths":{"/datacenters/{datacenterId}/volumes/{volumeId}":{"put":{"tags":["Volumes"],"summary":"Modify a Volume by ID","description":"Modifies the properties of the specified volume within the data center.","operationId":"datacentersVolumesPut","parameters":[{"name":"datacenterId","in":"path","description":"The unique ID of the data center.","required":true,"schema":{"type":"string"}},{"name":"volumeId","in":"path","description":"The unique ID of the volume.","required":true,"schema":{"type":"string"}},{"name":"pretty","in":"query","description":"Controls whether the response is pretty-printed (with indentations and new lines).","schema":{"type":"boolean","default":true}},{"name":"depth","in":"query","description":"Controls the detail depth of the response objects. \nGET /datacenters/[ID]\n\t- depth=0: Only direct properties are included; children (servers and other elements) are not included.\n\t- depth=1: Direct properties and children references are included.\n\t- depth=2: Direct properties and children properties are included.\n\t- depth=3: Direct properties and children properties and children's children are included.\n\t- depth=... and so on","schema":{"maximum":10,"minimum":0,"type":"integer","format":"int32","default":0}},{"name":"X-Contract-Number","in":"header","description":"Users with multiple contracts must provide the contract number, for which all API requests are to be executed.","schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"The modified volume","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VolumePropertiesPost"}}},"required":true},"responses":{"202":{"description":"Successful operation","headers":{"X-RateLimit-Remaining":{"description":"The number of requests that can still be made without triggering a failure response.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Limit":{"description":"The average number of requests per minute allowed.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Burst":{"description":"The maximum number of concurrent API requests allowed.","schema":{"type":"integer","format":"int32"}},"Location":{"description":"Callback URL to poll async operation status.","schema":{"pattern":"https://[apiBaseUri]/requests/[requestId]/status","type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Volume"}}}},"default":{"description":"Any erroneous status code: 400 (parse error), 401 (auth error), 402 (trial access), 403 (insufficient privileges), 404 (not found), 405 (unsupported HTTP method), 415 (unsupported content type, 422 (validation error), 429 (request rate limit exceeded), 500 (server error), or 503 (maintenance).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Delete volumes

> Delete the specified volume within the data center. Use with caution, the volume will be permanently removed!

```json
{"openapi":"3.0.3","info":{"title":"CLOUD API","version":"6.0"},"tags":[{"name":"Volumes"}],"servers":[{"url":"https://api.ionos.com/cloudapi/v6"}],"security":[{"BasicAuthentication":[]},{"TokenAuthentication":[]}],"components":{"securitySchemes":{"BasicAuthentication":{"type":"http","description":"You will need to base64 encode the string containing your credentials. <div style=\"padding: 15px; border: 1px solid #d1ecf1; background-color: #d1ecf1; color: #0c5460; margin-bottom: 15px;\">\n  <strong>Note:</strong><br/><br/>\n  <ul><li><b>Basic Authentication</b> is supported only when <b>2-Factor \n  Authentication</b> is not configured.</li>\n  <li>Users with <b>2-Factor \n  Authentication</b> activated must generate new 2FA-secured tokens in the DCD using [Token Manager](https://docs.ionos.com/cloud/set-up-ionos-cloud/management/identity-access-management/token-manager). \n  These tokens do not inherit the <b>2FA-secured</b> property by default.</li><li>Token deletion is only possible using the <b>Token Manager</b>.</li>\n</div> Separate your username and password with a colon, i.e., username:password and send it as 'Authorization' request header. More details: https://en.wikipedia.org/wiki/Basic_access_authentication","scheme":"basic"},"TokenAuthentication":{"type":"apiKey","description":"Please provide header value as 'Bearer <token>' and don't forget to add 'Bearer' HTTP Authorization Scheme before the token.","name":"Authorization","in":"header"}},"schemas":{"Error":{"type":"object","properties":{"httpStatus":{"type":"integer","description":"HTTP status code of the operation.","format":"int32","readOnly":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ErrorMessage"}}}},"ErrorMessage":{"type":"object","properties":{"errorCode":{"type":"string","description":"Application internal error code.","readOnly":true},"message":{"type":"string","description":"A human-readable message.","readOnly":true}}}}},"paths":{"/datacenters/{datacenterId}/volumes/{volumeId}":{"delete":{"tags":["Volumes"],"summary":"Delete volumes","description":"Delete the specified volume within the data center. Use with caution, the volume will be permanently removed!","operationId":"datacentersVolumesDelete","parameters":[{"name":"datacenterId","in":"path","description":"The unique ID of the data center.","required":true,"schema":{"type":"string"}},{"name":"volumeId","in":"path","description":"The unique ID of the volume.","required":true,"schema":{"type":"string"}},{"name":"pretty","in":"query","description":"Controls whether the response is pretty-printed (with indentations and new lines).","schema":{"type":"boolean","default":true}},{"name":"depth","in":"query","description":"Controls the detail depth of the response objects. \nGET /datacenters/[ID]\n\t- depth=0: Only direct properties are included; children (servers and other elements) are not included.\n\t- depth=1: Direct properties and children references are included.\n\t- depth=2: Direct properties and children properties are included.\n\t- depth=3: Direct properties and children properties and children's children are included.\n\t- depth=... and so on","schema":{"maximum":10,"minimum":0,"type":"integer","format":"int32","default":0}},{"name":"X-Contract-Number","in":"header","description":"Users with multiple contracts must provide the contract number, for which all API requests are to be executed.","schema":{"type":"integer","format":"int32"}}],"responses":{"202":{"description":"Successful operation","headers":{"X-RateLimit-Remaining":{"description":"The number of requests that can still be made without triggering a failure response.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Limit":{"description":"The average number of requests per minute allowed.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Burst":{"description":"The maximum number of concurrent API requests allowed.","schema":{"type":"integer","format":"int32"}},"Location":{"description":"Callback URL to poll async operation status.","schema":{"pattern":"https://[apiBaseUri]/requests/[requestId]/status","type":"string"}}},"content":{}},"default":{"description":"Any erroneous status code: 400 (parse error), 401 (auth error), 402 (trial access), 403 (insufficient privileges), 404 (not found), 405 (unsupported HTTP method), 415 (unsupported content type, 422 (validation error), 429 (request rate limit exceeded), 500 (server error), or 503 (maintenance).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Partially modify volumes

> Update the properties of the specified storage volume within the data center.

```json
{"openapi":"3.0.3","info":{"title":"CLOUD API","version":"6.0"},"tags":[{"name":"Volumes"}],"servers":[{"url":"https://api.ionos.com/cloudapi/v6"}],"security":[{"BasicAuthentication":[]},{"TokenAuthentication":[]}],"components":{"securitySchemes":{"BasicAuthentication":{"type":"http","description":"You will need to base64 encode the string containing your credentials. <div style=\"padding: 15px; border: 1px solid #d1ecf1; background-color: #d1ecf1; color: #0c5460; margin-bottom: 15px;\">\n  <strong>Note:</strong><br/><br/>\n  <ul><li><b>Basic Authentication</b> is supported only when <b>2-Factor \n  Authentication</b> is not configured.</li>\n  <li>Users with <b>2-Factor \n  Authentication</b> activated must generate new 2FA-secured tokens in the DCD using [Token Manager](https://docs.ionos.com/cloud/set-up-ionos-cloud/management/identity-access-management/token-manager). \n  These tokens do not inherit the <b>2FA-secured</b> property by default.</li><li>Token deletion is only possible using the <b>Token Manager</b>.</li>\n</div> Separate your username and password with a colon, i.e., username:password and send it as 'Authorization' request header. More details: https://en.wikipedia.org/wiki/Basic_access_authentication","scheme":"basic"},"TokenAuthentication":{"type":"apiKey","description":"Please provide header value as 'Bearer <token>' and don't forget to add 'Bearer' HTTP Authorization Scheme before the token.","name":"Authorization","in":"header"}},"schemas":{"VolumeProperties":{"required":["size"],"type":"object","properties":{"name":{"type":"string","description":"The name of the  resource."},"type":{"type":"string","description":"Hardware type of the volume. DAS (Direct Attached Storage) could be used only in a composite call with a Cube server.","enum":["HDD","SSD","SSD Standard","SSD Premium","DAS","ISO"]},"size":{"type":"number","description":"The size of the volume in GB."},"availabilityZone":{"type":"string","description":"The availability zone in which the volume should be provisioned. The storage volume will be provisioned on as few physical storage devices as possible, but this cannot be guaranteed upfront. This is uavailable for DAS (Direct Attached Storage), and subject to availability for SSD.","enum":["AUTO","ZONE_1","ZONE_2","ZONE_3"]},"image":{"type":"string","description":"Image or snapshot ID to be used as template for this volume. MSSQL Enterprise Images can be used only if the feature toggle for MSSQL Enterprise is enabled on the contract."},"imagePassword":{"type":"string","description":"Initial password to be set for installed OS. Works with public images only. Not modifiable, forbidden in update requests. Password rules allows all characters from a-z, A-Z, 0-9."},"sshKeys":{"type":"array","description":"Public SSH keys are set on the image as authorized keys for appropriate SSH login to the instance using the corresponding private key. This field may only be set in creation requests. When reading, it always returns null. SSH keys are only supported if a public Linux image is used for the volume creation.","items":{"type":"string"}},"bus":{"type":"string","description":"The bus type for this volume; default is VIRTIO.","enum":["VIRTIO","IDE","UNKNOWN"]},"licenceType":{"type":"string","description":"OS type for this volume."},"applicationType":{"$ref":"#/components/schemas/ApplicationType"},"cpuHotPlug":{"type":"boolean","description":"Hot-plug capable CPU (no reboot required)."},"ramHotPlug":{"type":"boolean","description":"Hot-plug capable RAM (no reboot required)."},"nicHotPlug":{"type":"boolean","description":"Hot-plug capable NIC (no reboot required)."},"nicHotUnplug":{"type":"boolean","description":"Hot-unplug capable NIC (no reboot required)."},"discVirtioHotPlug":{"type":"boolean","description":"Hot-plug capable Virt-IO drive (no reboot required)."},"discVirtioHotUnplug":{"type":"boolean","description":"Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs."},"exposeSerial":{"$ref":"#/components/schemas/ExposeSerial"},"requireLegacyBios":{"$ref":"#/components/schemas/RequireLegacyBios"},"deviceNumber":{"type":"integer","description":"The Logical Unit Number of the storage volume. Null for volumes, not mounted to a VM.","format":"int64","readOnly":true},"pciSlot":{"type":"integer","description":"The PCI slot number of the storage volume. Null for volumes, not mounted to a VM.","format":"int32","readOnly":true},"backupunitId":{"type":"string","format":"uuid","description":"The ID of the backup unit that the user has access to. The property is immutable and is only allowed to be set on creation of a new a volume. It is mandatory to provide either 'public image' or 'imageAlias' in conjunction with this property."},"userData":{"type":"string","description":"The cloud-init configuration for the volume as base64 encoded string. The property is immutable and is only allowed to be set on creation of a new a volume. It is mandatory to provide either 'public image' or 'imageAlias' that has cloud-init compatibility in conjunction with this property."},"bootServer":{"type":"string","description":"The UUID of the attached server.","readOnly":true},"bootOrder":{"type":"string","description":"Determines whether the volume will be used as a boot volume. Set to `NONE`, the volume will not be used as boot volume. Set to `PRIMARY`, the volume will be used as boot volume and all other volumes must be set to `NONE`. Set to `AUTO` or `null` requires all volumes to be set to `AUTO` or `null`; this will use the legacy behavior, which is to use the volume as a boot volume only if there are no other volumes or cdrom devices.","nullable":true,"default":"AUTO","enum":["AUTO","NONE","PRIMARY"]}}},"ApplicationType":{"type":"string","description":"The type of application that is hosted on this resource.  Only public images can have an Application type different than UNKNOWN."},"ExposeSerial":{"type":"boolean","description":"If set to `true` will expose the serial id of the disk attached to the server. If set to `false` will not expose the serial id. Some operating systems or software solutions require the serial id to be exposed to work properly. Exposing the serial  can influence licensed software (e.g. Windows) behavior","default":false},"RequireLegacyBios":{"type":"boolean","description":"Indicates if the image requires the legacy BIOS for compatibility or specific needs.","default":true},"ImageAlias":{"type":"object","properties":{"imageAlias":{"type":"string","description":"Image alias of an image to be used as template for this volume. MSSQL Enterprise Images can be used only if the feature toggle for MSSQL Enterprise is enabled on the contract."}}},"Volume":{"required":["properties"],"type":"object","properties":{"id":{"type":"string","description":"The resource's unique identifier.","readOnly":true},"type":{"type":"string","description":"The type of object that has been created.","allOf":[{"$ref":"#/components/schemas/Type"}]},"href":{"type":"string","description":"The URL to the object representation (absolute path).","format":"uri","readOnly":true},"metadata":{"$ref":"#/components/schemas/DatacenterElementMetadata"},"properties":{"$ref":"#/components/schemas/VolumeProperties"}}},"Type":{"type":"string","enum":["datacenter","server","volume","nic","loadbalancer","location","firewall-rule","flow-log","image","snapshot","lan","ipblock","pcc","contract","user","group","collection","resource","request","request-status","s3key","backupunit","label","k8s","nodepool","template","networkloadbalancer","forwarding-rule","natgateway","natgateway-rule","node","applicationloadbalancer","target-group","security-group","gpu"]},"DatacenterElementMetadata":{"type":"object","properties":{"etag":{"type":"string","description":"Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11  Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter.","readOnly":true},"createdDate":{"type":"string","description":"The last time the resource was created.","format":"date-time","readOnly":true},"createdBy":{"type":"string","description":"The user who created the resource.","readOnly":true},"createdByUserId":{"type":"string","description":"The unique ID of the user who created the resource.","readOnly":true},"lastModifiedDate":{"type":"string","description":"The last time the resource was modified.","format":"date-time","readOnly":true},"lastModifiedBy":{"type":"string","description":"The user who last modified the resource.","readOnly":true},"lastModifiedByUserId":{"type":"string","description":"The unique ID of the user who last modified the resource.","readOnly":true},"state":{"type":"string","description":"State of the resource. *AVAILABLE* There are no pending modification requests for this item; *BUSY* There is at least one modification request pending and all following requests will be queued; *INACTIVE* Resource has been de-provisioned; *DEPLOYING* Resource state DEPLOYING - relevant for Kubernetes cluster/nodepool; *ACTIVE* Resource state ACTIVE - relevant for Kubernetes cluster/nodepool; *FAILED* Resource state FAILED - relevant for Kubernetes cluster/nodepool; *SUSPENDED* Resource state SUSPENDED - relevant for Kubernetes cluster/nodepool; *FAILED_SUSPENDED* Resource state FAILED_SUSPENDED - relevant for Kubernetes cluster; *UPDATING* Resource state UPDATING - relevant for Kubernetes cluster/nodepool; *FAILED_UPDATING* Resource state FAILED_UPDATING - relevant for Kubernetes cluster/nodepool; *DESTROYING* Resource state DESTROYING - relevant for Kubernetes cluster; *FAILED_DESTROYING* Resource state FAILED_DESTROYING - relevant for Kubernetes cluster/nodepool; *TERMINATED* Resource state TERMINATED - relevant for Kubernetes cluster/nodepool; *HIBERNATING* Resource state HIBERNATING - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool; *MAINTENANCE* Resource state MAINTENANCE - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool.","readOnly":true,"enum":["AVAILABLE","INACTIVE","BUSY","DEPLOYING","ACTIVE","FAILED","SUSPENDED","FAILED_SUSPENDED","UPDATING","FAILED_UPDATING","DESTROYING","FAILED_DESTROYING","TERMINATED","HIBERNATING","FAILED_HIBERNATING","MAINTENANCE","FAILED_MAINTENANCE","UNKNOWN"]}}},"Error":{"type":"object","properties":{"httpStatus":{"type":"integer","description":"HTTP status code of the operation.","format":"int32","readOnly":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ErrorMessage"}}}},"ErrorMessage":{"type":"object","properties":{"errorCode":{"type":"string","description":"Application internal error code.","readOnly":true},"message":{"type":"string","description":"A human-readable message.","readOnly":true}}}}},"paths":{"/datacenters/{datacenterId}/volumes/{volumeId}":{"patch":{"tags":["Volumes"],"summary":"Partially modify volumes","description":"Update the properties of the specified storage volume within the data center.","operationId":"datacentersVolumesPatch","parameters":[{"name":"datacenterId","in":"path","description":"The unique ID of the data center.","required":true,"schema":{"type":"string"}},{"name":"volumeId","in":"path","description":"The unique ID of the volume.","required":true,"schema":{"type":"string"}},{"name":"pretty","in":"query","description":"Controls whether the response is pretty-printed (with indentations and new lines).","schema":{"type":"boolean","default":true}},{"name":"depth","in":"query","description":"Controls the detail depth of the response objects. \nGET /datacenters/[ID]\n\t- depth=0: Only direct properties are included; children (servers and other elements) are not included.\n\t- depth=1: Direct properties and children references are included.\n\t- depth=2: Direct properties and children properties are included.\n\t- depth=3: Direct properties and children properties and children's children are included.\n\t- depth=... and so on","schema":{"maximum":10,"minimum":0,"type":"integer","format":"int32","default":0}},{"name":"X-Contract-Number","in":"header","description":"Users with multiple contracts must provide the contract number, for which all API requests are to be executed.","schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"The properties of the volume to be updated.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/VolumeProperties"},{"$ref":"#/components/schemas/ImageAlias"}]}}},"required":true},"responses":{"202":{"description":"Successful operation","headers":{"X-RateLimit-Remaining":{"description":"The number of requests that can still be made without triggering a failure response.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Limit":{"description":"The average number of requests per minute allowed.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Burst":{"description":"The maximum number of concurrent API requests allowed.","schema":{"type":"integer","format":"int32"}},"Location":{"description":"Callback URL to poll async operation status.","schema":{"pattern":"https://[apiBaseUri]/requests/[requestId]/status","type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Volume"}}}},"default":{"description":"Any erroneous status code: 400 (parse error), 401 (auth error), 402 (trial access), 403 (insufficient privileges), 404 (not found), 405 (unsupported HTTP method), 415 (unsupported content type, 422 (validation error), 429 (request rate limit exceeded), 500 (server error), or 503 (maintenance).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Restore volume snapshots

> Restore a snapshot for the specified volume within the data center. A snapshot is an image of a volume, which can be used to restore this volume at a later time.

```json
{"openapi":"3.0.3","info":{"title":"CLOUD API","version":"6.0"},"tags":[{"name":"Volumes"}],"servers":[{"url":"https://api.ionos.com/cloudapi/v6"}],"security":[{"BasicAuthentication":[]},{"TokenAuthentication":[]}],"components":{"securitySchemes":{"BasicAuthentication":{"type":"http","description":"You will need to base64 encode the string containing your credentials. <div style=\"padding: 15px; border: 1px solid #d1ecf1; background-color: #d1ecf1; color: #0c5460; margin-bottom: 15px;\">\n  <strong>Note:</strong><br/><br/>\n  <ul><li><b>Basic Authentication</b> is supported only when <b>2-Factor \n  Authentication</b> is not configured.</li>\n  <li>Users with <b>2-Factor \n  Authentication</b> activated must generate new 2FA-secured tokens in the DCD using [Token Manager](https://docs.ionos.com/cloud/set-up-ionos-cloud/management/identity-access-management/token-manager). \n  These tokens do not inherit the <b>2FA-secured</b> property by default.</li><li>Token deletion is only possible using the <b>Token Manager</b>.</li>\n</div> Separate your username and password with a colon, i.e., username:password and send it as 'Authorization' request header. More details: https://en.wikipedia.org/wiki/Basic_access_authentication","scheme":"basic"},"TokenAuthentication":{"type":"apiKey","description":"Please provide header value as 'Bearer <token>' and don't forget to add 'Bearer' HTTP Authorization Scheme before the token.","name":"Authorization","in":"header"}},"schemas":{"RestoreSnapshot":{"type":"object","properties":{"properties":{"$ref":"#/components/schemas/RestoreSnapshotProperties"}}},"RestoreSnapshotProperties":{"type":"object","properties":{"snapshotId":{"type":"string","description":"The id of the snapshot"}}},"Error":{"type":"object","properties":{"httpStatus":{"type":"integer","description":"HTTP status code of the operation.","format":"int32","readOnly":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ErrorMessage"}}}},"ErrorMessage":{"type":"object","properties":{"errorCode":{"type":"string","description":"Application internal error code.","readOnly":true},"message":{"type":"string","description":"A human-readable message.","readOnly":true}}}}},"paths":{"/datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshot":{"post":{"tags":["Volumes"],"summary":"Restore volume snapshots","description":"Restore a snapshot for the specified volume within the data center. A snapshot is an image of a volume, which can be used to restore this volume at a later time.","operationId":"datacentersVolumesRestore-snapshotPost","parameters":[{"name":"datacenterId","in":"path","description":"The unique ID of the data center.","required":true,"schema":{"type":"string"}},{"name":"volumeId","in":"path","description":"The unique ID of the volume.","required":true,"schema":{"type":"string"}},{"name":"pretty","in":"query","description":"Controls whether the response is pretty-printed (with indentations and new lines).","schema":{"type":"boolean","default":true}},{"name":"depth","in":"query","description":"Controls the detail depth of the response objects. \nGET /datacenters/[ID]\n\t- depth=0: Only direct properties are included; children (servers and other elements) are not included.\n\t- depth=1: Direct properties and children references are included.\n\t- depth=2: Direct properties and children properties are included.\n\t- depth=3: Direct properties and children properties and children's children are included.\n\t- depth=... and so on","schema":{"maximum":10,"minimum":0,"type":"integer","format":"int32","default":0}},{"name":"X-Contract-Number","in":"header","description":"Users with multiple contracts must provide the contract number, for which all API requests are to be executed.","schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"The payload used to restore a snapshot.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreSnapshot"}}},"required":false},"responses":{"202":{"description":"Successful operation","headers":{"X-RateLimit-Remaining":{"description":"The number of requests that can still be made without triggering a failure response.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Limit":{"description":"The average number of requests per minute allowed.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Burst":{"description":"The maximum number of concurrent API requests allowed.","schema":{"type":"integer","format":"int32"}},"Location":{"description":"Callback URL to poll async operation status.","schema":{"pattern":"https://[apiBaseUri]/requests/[requestId]/status","type":"string"}}},"content":{}},"default":{"description":"Any erroneous status code: 400 (parse error), 401 (auth error), 402 (trial access), 403 (insufficient privileges), 404 (not found), 405 (unsupported HTTP method), 415 (unsupported content type, 422 (validation error), 429 (request rate limit exceeded), 500 (server error), or 503 (maintenance).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Create volume snapshots

> Create a snapshot of the specified volume within the data center; this snapshot can later be used to restore this volume.

```json
{"openapi":"3.0.3","info":{"title":"CLOUD API","version":"6.0"},"tags":[{"name":"Volumes"}],"servers":[{"url":"https://api.ionos.com/cloudapi/v6"}],"security":[{"BasicAuthentication":[]},{"TokenAuthentication":[]}],"components":{"securitySchemes":{"BasicAuthentication":{"type":"http","description":"You will need to base64 encode the string containing your credentials. <div style=\"padding: 15px; border: 1px solid #d1ecf1; background-color: #d1ecf1; color: #0c5460; margin-bottom: 15px;\">\n  <strong>Note:</strong><br/><br/>\n  <ul><li><b>Basic Authentication</b> is supported only when <b>2-Factor \n  Authentication</b> is not configured.</li>\n  <li>Users with <b>2-Factor \n  Authentication</b> activated must generate new 2FA-secured tokens in the DCD using [Token Manager](https://docs.ionos.com/cloud/set-up-ionos-cloud/management/identity-access-management/token-manager). \n  These tokens do not inherit the <b>2FA-secured</b> property by default.</li><li>Token deletion is only possible using the <b>Token Manager</b>.</li>\n</div> Separate your username and password with a colon, i.e., username:password and send it as 'Authorization' request header. More details: https://en.wikipedia.org/wiki/Basic_access_authentication","scheme":"basic"},"TokenAuthentication":{"type":"apiKey","description":"Please provide header value as 'Bearer <token>' and don't forget to add 'Bearer' HTTP Authorization Scheme before the token.","name":"Authorization","in":"header"}},"schemas":{"CreateSnapshot":{"type":"object","properties":{"properties":{"$ref":"#/components/schemas/CreateSnapshotProperties"}}},"CreateSnapshotProperties":{"type":"object","properties":{"name":{"type":"string","description":"The name of the snapshot"},"description":{"type":"string","description":"The description of the snapshot"},"secAuthProtection":{"type":"boolean","description":"Flag representing if extra protection is enabled on snapshot e.g. Two Factor protection etc."},"licenceType":{"type":"string","description":"OS type of this Snapshot"},"applicationType":{"$ref":"#/components/schemas/ApplicationType"}}},"ApplicationType":{"type":"string","description":"The type of application that is hosted on this resource.  Only public images can have an Application type different than UNKNOWN."},"Snapshot":{"required":["properties"],"type":"object","properties":{"id":{"type":"string","description":"The resource's unique identifier.","readOnly":true},"type":{"type":"string","description":"The type of object that has been created.","allOf":[{"$ref":"#/components/schemas/Type"}]},"href":{"type":"string","description":"URL to the object representation (absolute path).","format":"uri","readOnly":true},"metadata":{"$ref":"#/components/schemas/DatacenterElementMetadata"},"properties":{"$ref":"#/components/schemas/SnapshotProperties"}}},"Type":{"type":"string","enum":["datacenter","server","volume","nic","loadbalancer","location","firewall-rule","flow-log","image","snapshot","lan","ipblock","pcc","contract","user","group","collection","resource","request","request-status","s3key","backupunit","label","k8s","nodepool","template","networkloadbalancer","forwarding-rule","natgateway","natgateway-rule","node","applicationloadbalancer","target-group","security-group","gpu"]},"DatacenterElementMetadata":{"type":"object","properties":{"etag":{"type":"string","description":"Resource's Entity Tag as defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11  Entity Tag is also added as an 'ETag response header to requests which don't use 'depth' parameter.","readOnly":true},"createdDate":{"type":"string","description":"The last time the resource was created.","format":"date-time","readOnly":true},"createdBy":{"type":"string","description":"The user who created the resource.","readOnly":true},"createdByUserId":{"type":"string","description":"The unique ID of the user who created the resource.","readOnly":true},"lastModifiedDate":{"type":"string","description":"The last time the resource was modified.","format":"date-time","readOnly":true},"lastModifiedBy":{"type":"string","description":"The user who last modified the resource.","readOnly":true},"lastModifiedByUserId":{"type":"string","description":"The unique ID of the user who last modified the resource.","readOnly":true},"state":{"type":"string","description":"State of the resource. *AVAILABLE* There are no pending modification requests for this item; *BUSY* There is at least one modification request pending and all following requests will be queued; *INACTIVE* Resource has been de-provisioned; *DEPLOYING* Resource state DEPLOYING - relevant for Kubernetes cluster/nodepool; *ACTIVE* Resource state ACTIVE - relevant for Kubernetes cluster/nodepool; *FAILED* Resource state FAILED - relevant for Kubernetes cluster/nodepool; *SUSPENDED* Resource state SUSPENDED - relevant for Kubernetes cluster/nodepool; *FAILED_SUSPENDED* Resource state FAILED_SUSPENDED - relevant for Kubernetes cluster; *UPDATING* Resource state UPDATING - relevant for Kubernetes cluster/nodepool; *FAILED_UPDATING* Resource state FAILED_UPDATING - relevant for Kubernetes cluster/nodepool; *DESTROYING* Resource state DESTROYING - relevant for Kubernetes cluster; *FAILED_DESTROYING* Resource state FAILED_DESTROYING - relevant for Kubernetes cluster/nodepool; *TERMINATED* Resource state TERMINATED - relevant for Kubernetes cluster/nodepool; *HIBERNATING* Resource state HIBERNATING - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool; *MAINTENANCE* Resource state MAINTENANCE - relevant for Kubernetes cluster/nodepool; *FAILED_HIBERNATING* Resource state FAILED_HIBERNATING - relevant for Kubernetes cluster/nodepool.","readOnly":true,"enum":["AVAILABLE","INACTIVE","BUSY","DEPLOYING","ACTIVE","FAILED","SUSPENDED","FAILED_SUSPENDED","UPDATING","FAILED_UPDATING","DESTROYING","FAILED_DESTROYING","TERMINATED","HIBERNATING","FAILED_HIBERNATING","MAINTENANCE","FAILED_MAINTENANCE","UNKNOWN"]}}},"SnapshotProperties":{"type":"object","properties":{"name":{"type":"string","description":"The name of the  resource."},"description":{"type":"string","description":"Human-readable description."},"location":{"type":"string","description":"Location of that image/snapshot. ","readOnly":true},"size":{"type":"number","description":"The size of the image in GB.","readOnly":true},"secAuthProtection":{"type":"boolean","description":"Boolean value representing if the snapshot requires extra protection, such as two-step verification."},"cpuHotPlug":{"type":"boolean","description":"Hot-plug capable CPU (no reboot required)."},"cpuHotUnplug":{"type":"boolean","description":"Hot-unplug capable CPU (no reboot required)."},"ramHotPlug":{"type":"boolean","description":"Hot-plug capable RAM (no reboot required)."},"ramHotUnplug":{"type":"boolean","description":"Hot-unplug capable RAM (no reboot required)."},"nicHotPlug":{"type":"boolean","description":"Hot-plug capable NIC (no reboot required)."},"nicHotUnplug":{"type":"boolean","description":"Hot-unplug capable NIC (no reboot required)."},"discVirtioHotPlug":{"type":"boolean","description":"Hot-plug capable Virt-IO drive (no reboot required)."},"discVirtioHotUnplug":{"type":"boolean","description":"Hot-unplug capable Virt-IO drive (no reboot required). Not supported with Windows VMs."},"discScsiHotPlug":{"type":"boolean","description":"Hot-plug capable SCSI drive (no reboot required)."},"exposeSerial":{"$ref":"#/components/schemas/ExposeSerial"},"requireLegacyBios":{"$ref":"#/components/schemas/RequireLegacyBios"},"discScsiHotUnplug":{"type":"boolean","description":"Is capable of SCSI drive hot unplug (no reboot required). This works only for non-Windows virtual Machines."},"licenceType":{"type":"string","description":"OS type of this snapshot"},"applicationType":{"$ref":"#/components/schemas/ApplicationType"}}},"ExposeSerial":{"type":"boolean","description":"If set to `true` will expose the serial id of the disk attached to the server. If set to `false` will not expose the serial id. Some operating systems or software solutions require the serial id to be exposed to work properly. Exposing the serial  can influence licensed software (e.g. Windows) behavior","default":false},"RequireLegacyBios":{"type":"boolean","description":"Indicates if the image requires the legacy BIOS for compatibility or specific needs.","default":true},"Error":{"type":"object","properties":{"httpStatus":{"type":"integer","description":"HTTP status code of the operation.","format":"int32","readOnly":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ErrorMessage"}}}},"ErrorMessage":{"type":"object","properties":{"errorCode":{"type":"string","description":"Application internal error code.","readOnly":true},"message":{"type":"string","description":"A human-readable message.","readOnly":true}}}}},"paths":{"/datacenters/{datacenterId}/volumes/{volumeId}/create-snapshot":{"post":{"tags":["Volumes"],"summary":"Create volume snapshots","description":"Create a snapshot of the specified volume within the data center; this snapshot can later be used to restore this volume.","operationId":"datacentersVolumesCreate-snapshotPost","parameters":[{"name":"datacenterId","in":"path","description":"The unique ID of the data center.","required":true,"schema":{"type":"string"}},{"name":"volumeId","in":"path","description":"The unique ID of the volume.","required":true,"schema":{"type":"string"}},{"name":"pretty","in":"query","description":"Controls whether the response is pretty-printed (with indentations and new lines).","schema":{"type":"boolean","default":true}},{"name":"depth","in":"query","description":"Controls the detail depth of the response objects. \nGET /datacenters/[ID]\n\t- depth=0: Only direct properties are included; children (servers and other elements) are not included.\n\t- depth=1: Direct properties and children references are included.\n\t- depth=2: Direct properties and children properties are included.\n\t- depth=3: Direct properties and children properties and children's children are included.\n\t- depth=... and so on","schema":{"maximum":10,"minimum":0,"type":"integer","format":"int32","default":0}},{"name":"X-Contract-Number","in":"header","description":"Users with multiple contracts must provide the contract number, for which all API requests are to be executed.","schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"The payload of the snapshot.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSnapshot"}}},"required":false},"responses":{"202":{"description":"Successful operation","headers":{"X-RateLimit-Remaining":{"description":"The number of requests that can still be made without triggering a failure response.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Limit":{"description":"The average number of requests per minute allowed.","schema":{"type":"integer","format":"int32"}},"X-RateLimit-Burst":{"description":"The maximum number of concurrent API requests allowed.","schema":{"type":"integer","format":"int32"}},"Location":{"description":"Callback URL to poll async operation status.","schema":{"pattern":"https://[apiBaseUri]/requests/[requestId]/status","type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Snapshot"}}}},"default":{"description":"Any erroneous status code: 400 (parse error), 401 (auth error), 402 (trial access), 403 (insufficient privileges), 404 (not found), 405 (unsupported HTTP method), 415 (unsupported content type, 422 (validation error), 429 (request rate limit exceeded), 500 (server error), or 503 (maintenance).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```
