Initrd (initial ramdisk) and actual volumes serve different purposes. An initrd is a file system loaded into memory during the boot process of the instance. Any new files created as well as any modifications made to files in the initrd are lost when the instance is stopped. In contrast, a volume is a persistent storage device that keeps data across restarts. In addition, it can be initialized with a set of files with one instance and then be detached and attached to a another one.
List Volumes
Return the current status and the configuration of one or more volumes specified by either UUID(s) or name(s). If no identifier is provided, all volumes are returned.
query Parameters
details
booleanWhether to include details about the volume in the response. By default this is set to true, meaning that all information about the volume will be included in the response. If set to false, only the basic information about the volume will be included, such as its name and UUID.
Request Body
Decision Table
Variant | Matching Criteria |
---|---|
type = object · requires: uuid | |
type = object · requires: name |
uuid
string · uuid · requiredMutually exclusive with name.
Example: 123e4567-e89b-12d3-a456-426614174000
Responses
default
Decision Table
Variant | Matching Criteria |
---|---|
type = object |
message
stringAn optional message providing additional information about the status. This field is useful when the status is not
success
.Example: Failed to perform all operations
Create Volume
Create a volume given the specified configuration parameters.
The volume is automatically initialized with an empty file system.
After initialization, the volume is in the available
state and can be
attached to an instance with the PUT /v1/volumes/attach
endpoint.
Note that, the size of a volume cannot be changed after creation.
Request Body
Decision Table
Variant | Matching Criteria |
---|---|
type = object |
name
stringThe name of the volume.
This is a human-readable name that can be used to identify the volume. The name must be unique within the context of your account. If no name is specified, a random name of the form
vol-X
is generated for you, whereX
is a 5 character long random alphanumeric suffix.. The name can also be used to identify the volume in API calls.Example: funky-vol-t7qumh5j
Responses
default
Decision Table
Variant | Matching Criteria |
---|---|
type = object |
message
stringAn optional message providing additional information about the status. This field is useful when the status is not
success
.Example: Failed to perform all operations
Delete Volumes
Delete one or more volumes by their UUID(s) or name(s). If the volumes are still attached to an instance, the operation fails. After this call, the IDs associated with the volumes are no longer valid.
Request Body
Decision Table
Variant | Matching Criteria |
---|---|
type = object · requires: uuid | |
type = object · requires: name |
uuid
string · uuid · requiredMutually exclusive with name.
Example: 123e4567-e89b-12d3-a456-426614174000
Responses
default
Decision Table
Variant | Matching Criteria |
---|---|
type = object |
message
stringAn optional message providing additional information about the status. This field is useful when the status is not
success
.Example: Failed to perform all operations
Update Volumes
Update one or more volumes specified by either UUID(s) or name(s).
Request Body
prop
string · enum · enum · requiredThe property to modify.
Enum values:size_mbtagsquota_policydelete_lockExample: size_mbop
string · enum · enum · requiredThe operation to perform.
Enum values:setadddelExample: set
id
string(Optional). A client-provided identifier for tracking this operation in the response.
Example: op-1uuid
string · uuidThe UUID of the volume to update. Mutually exclusive with name.
Example: 123e4567-e89b-12d3-a456-426614174000name
stringThe name of the volume to update. Mutually exclusive with UUID.
Example: funky-town-g756b5dvalue
The value for the update operation. The type depends on the property and operation:
- For "size_mb": unsigned integer
- For "quota_policy": 1 - static reservation, 2 - dynamic reservation
- For "tags": array of Strings
- For "delete_lock": boolean
Responses
default
status
string · enum · enumThe status of the response.
Enum values:successerrormessage
stringAn optional message providing additional information about the status. This field is useful when the status is not
success
.Example: Failed to perform all operationsdata
objectThe response data for this request.
errors
object[]A list of errors which may have occurred during the request.
op_time_us
integer · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 76
Attach Volumes
Attach one or more volumes specified by ID(s) (name or UUID) to instances
so that the volumes are mounted when the instances start. The volumes need
to be in available
state and the instances must be in stopped
state.
Request Body
attach_to
object · requiredUUID or name of the instance to attach the volume to.
at
string · regex · pattern:^/(?!.*\.\./|.*\.$|.…
· requiredPath of the mountpoint.
The path must be absolute, not contain
.
and..
components, and not contain colons (:
). The path must point to an empty directory. If the directory does not exist, it is created.Example: /mnt/my-volume
uuid
string · uuidThe UUID of the volume to attach. Mutually exclusive with name. Exactly one of uuid or name must be provided.
Example: c1d2e3f4-5678-90ab-cdef-1234567890abname
stringThe name of the volume to attach. Mutually exclusive with UUID. Exactly one of uuid or name must be provided.
Example: funky-vol-g7gum5cjreadonly
booleanWhether the volume should be mounted read-only.
Example: false
Responses
default
Decision Table
Variant | Matching Criteria |
---|---|
type = object |
message
stringAn optional message providing additional information about the status. This field is useful when the status is not
success
.Example: Failed to perform all operations
Detach Volumes
Detach volumes specified by ID(s) (name or UUID) from instances. If no particular instance is specified the volume is detached from all instances. The instances from which to detach must not have the volumes mounted. The API returns an error for each instance from which it was unable to detach the volume. If the volume has been created together with an instance, detaching the volume will make it persistent (i.e., it survives the deletion of the instance).
Request Body
uuid
string · uuidThe UUID of the volume to detach. Mutually exclusive with name. Exactly one of uuid or name must be provided.
Example: c1d2e3f4-5678-90ab-cdef-1234567890abname
stringThe name of the volume to detach. Mutually exclusive with UUID. Exactly one of uuid or name must be provided.
Example: funky-town-g7gum5cjfrom
objectUUID or name of the instance to detach the volume from.
Responses
default
Decision Table
Variant | Matching Criteria |
---|---|
type = object |
message
stringAn optional message providing additional information about the status. This field is useful when the status is not
success
.Example: Failed to perform all operations
Get Volume by UUID
Return the current status and the configuration of a particular volume by its UUID.
path Parameters
uuid
string · uuid · requiredThe UUID of the volume to retrieve.
Example: c1d2e3f4-5678-90ab-cdef-1234567890ab
query Parameters
details
booleanWhether to include details about the volume in the response. By default this is set to true, meaning that all information about the volume will be included in the response. If set to false, only the basic information about the volume will be included, such as its name and UUID.
Responses
default
Decision Table
Variant | Matching Criteria |
---|---|
type = object |
message
stringAn optional message providing additional information about the status. This field is useful when the status is not
success
.Example: Failed to perform all operations
Delete Volume by UUID
Delete the specified volume by its UUID. If the volume is still attached to an instance, the operation fails. After this call, the IDs associated with the volume are no longer valid.
path Parameters
uuid
string · uuid · requiredThe UUID of the volume to delete.
Example: c1d2e3f4-5678-90ab-cdef-1234567890ab
Responses
default
Decision Table
Variant | Matching Criteria |
---|---|
type = object |
message
stringAn optional message providing additional information about the status. This field is useful when the status is not
success
.Example: Failed to perform all operations
Update Volume by UUID
Update the specified volume by its UUID.
path Parameters
uuid
string · uuid · requiredThe UUID of the service group to update.
Example: 123e4567-e89b-12d3-a456-426614174000
Request Body
prop
string · enum · enum · requiredThe property to modify.
Enum values:size_mbtagsquota_policydelete_lockExample: size_mbop
string · enum · enum · requiredThe operation to perform.
Enum values:setadddelExample: set
id
string(Optional). A client-provided identifier for tracking this operation in the response.
Example: op-1value
The value for the update operation. The type depends on the property and operation:
- For "size_mb": unsigned integer
- For "quota_policy": "static" or "dynamic"
- For "tags": array of Strings
- For "delete_lock": boolean
Responses
default
status
string · enum · enumThe status of the response.
Enum values:successerrormessage
stringAn optional message providing additional information about the status. This field is useful when the status is not
success
.Example: Failed to perform all operationsdata
objectThe response data for this request.
errors
object[]A list of errors which may have occurred during the request.
op_time_us
integer · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 76
Attach Volume by UUID
Attach a volume by UUID to an instance so that the volume is mounted when
the instance starts. The volume needs to be in available
state and the
instance must be in stopped
state.
path Parameters
uuid
string · uuid · requiredThe UUID of the volume to attach.
Example: c1d2e3f4-5678-90ab-cdef-1234567890ab
Request Body
Decision Table
Variant | Matching Criteria |
---|---|
type = object |
readonly
booleanWhether the volume should be mounted read-only.
Example: false
Responses
default
Decision Table
Variant | Matching Criteria |
---|---|
type = object |
message
stringAn optional message providing additional information about the status. This field is useful when the status is not
success
.Example: Failed to perform all operations
Detach Volume by UUID
Detaches a volume by UUID from instances. If no particular instance is specified the volume is detached from all instances. The instances from which to detach must not have the volume mounted. The API returns an error for each instance from which it was unable to detach the volume. If the volume has been created together with an instance, detaching the volume will make it persistent (i.e., it survives the deletion of the instance).
path Parameters
uuid
string · uuid · requiredThe UUID of the volume to detach.
Example: c1d2e3f4-5678-90ab-cdef-1234567890ab
Responses
default
Decision Table
Variant | Matching Criteria |
---|---|
type = object |
message
stringAn optional message providing additional information about the status. This field is useful when the status is not
success
.Example: Failed to perform all operations