volumes
Creates, updates, deletes, gets or lists a volumes
resource.
Overview
Name | volumes |
Type | Resource |
Id | google.baremetalsolution.volumes |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
id | string | An identifier for the Volume , generated by the backend. |
name | string | Output only. The resource name of this Volume . Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. Format: projects/{project}/locations/{location}/volumes/{volume} |
attached | boolean | Output only. Is the Volume attached at at least one instance. This field is a lightweight counterpart of instances field. It is filled in List responses as well. |
autoGrownSizeGib | string (int64) | The size, in GiB, that this storage volume has expanded as a result of an auto grow policy. In the absence of auto-grow, the value is 0. |
bootVolume | boolean | Output only. Whether this volume is a boot volume. A boot volume is one which contains a boot LUN. |
currentSizeGib | string (int64) | The current size of this storage volume, in GiB, including space reserved for snapshots. This size might be different than the requested size if the storage volume has been configured with auto grow or auto shrink. |
emergencySizeGib | string (int64) | Additional emergency size that was requested for this Volume, in GiB. current_size_gib includes this value. |
expireTime | string (google-datetime) | Output only. Time after which volume will be fully deleted. It is filled only for volumes in COOLOFF state. |
instances | array | Output only. Instances this Volume is attached to. This field is set only in Get requests. |
labels | object | Labels as key value pairs. |
maxSizeGib | string (int64) | Maximum size volume can be expanded to in case of evergency, in GiB. |
notes | string | Input only. User-specified notes for new Volume. Used to provision Volumes that require manual intervention. |
originallyRequestedSizeGib | string (int64) | Originally requested size, in GiB. |
performanceTier | string | Immutable. Performance tier of the Volume. Default is SHARED. |
pod | string | Immutable. Pod name. Pod is an independent part of infrastructure. Volume can only be connected to the instances allocated in the same pod. |
protocol | string | Output only. Storage protocol for the Volume. |
remainingSpaceGib | string (int64) | The space remaining in the storage volume for new LUNs, in GiB, excluding space reserved for snapshots. |
requestedSizeGib | string (int64) | The requested size of this storage volume, in GiB. |
snapshotAutoDeleteBehavior | string | The behavior to use when snapshot reserved space is full. |
snapshotEnabled | boolean | Whether snapshots are enabled. |
snapshotReservationDetail | object | Details about snapshot space reservation and usage on the storage volume. (id: SnapshotReservationDetail) |
state | string | The state of this storage volume. |
storageType | string | The storage type for this volume. |
workloadProfile | string | The workload profile for the volume. |
Successful response
Name | Datatype | Description |
---|---|---|
id | string | An identifier for the Volume , generated by the backend. |
name | string | Output only. The resource name of this Volume . Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. Format: projects/{project}/locations/{location}/volumes/{volume} |
attached | boolean | Output only. Is the Volume attached at at least one instance. This field is a lightweight counterpart of instances field. It is filled in List responses as well. |
autoGrownSizeGib | string (int64) | The size, in GiB, that this storage volume has expanded as a result of an auto grow policy. In the absence of auto-grow, the value is 0. |
bootVolume | boolean | Output only. Whether this volume is a boot volume. A boot volume is one which contains a boot LUN. |
currentSizeGib | string (int64) | The current size of this storage volume, in GiB, including space reserved for snapshots. This size might be different than the requested size if the storage volume has been configured with auto grow or auto shrink. |
emergencySizeGib | string (int64) | Additional emergency size that was requested for this Volume, in GiB. current_size_gib includes this value. |
expireTime | string (google-datetime) | Output only. Time after which volume will be fully deleted. It is filled only for volumes in COOLOFF state. |
instances | array | Output only. Instances this Volume is attached to. This field is set only in Get requests. |
labels | object | Labels as key value pairs. |
maxSizeGib | string (int64) | Maximum size volume can be expanded to in case of evergency, in GiB. |
notes | string | Input only. User-specified notes for new Volume. Used to provision Volumes that require manual intervention. |
originallyRequestedSizeGib | string (int64) | Originally requested size, in GiB. |
performanceTier | string | Immutable. Performance tier of the Volume. Default is SHARED. |
pod | string | Immutable. Pod name. Pod is an independent part of infrastructure. Volume can only be connected to the instances allocated in the same pod. |
protocol | string | Output only. Storage protocol for the Volume. |
remainingSpaceGib | string (int64) | The space remaining in the storage volume for new LUNs, in GiB, excluding space reserved for snapshots. |
requestedSizeGib | string (int64) | The requested size of this storage volume, in GiB. |
snapshotAutoDeleteBehavior | string | The behavior to use when snapshot reserved space is full. |
snapshotEnabled | boolean | Whether snapshots are enabled. |
snapshotReservationDetail | object | Details about snapshot space reservation and usage on the storage volume. (id: SnapshotReservationDetail) |
state | string | The state of this storage volume. |
storageType | string | The storage type for this volume. |
workloadProfile | string | The workload profile for the volume. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , volumesId | Get details of a single storage volume. | |
list | select | projectsId , locationsId | pageSize , pageToken , filter | List storage volumes in a given project and location. |
patch | update | projectsId , locationsId , volumesId | updateMask | Update details of a single storage volume. |
rename | exec | projectsId , locationsId , volumesId | RenameVolume sets a new name for a volume. Use with caution, previous names become immediately invalidated. | |
evict | exec | projectsId , locationsId , volumesId | Skips volume's cooloff and deletes it now. Volume must be in cooloff state. | |
resize | exec | projectsId , locationsId , volumesId | Emergency Volume resize. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
projectsId | string | |
volumesId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Get details of a single storage volume.
SELECT
id,
name,
attached,
autoGrownSizeGib,
bootVolume,
currentSizeGib,
emergencySizeGib,
expireTime,
instances,
labels,
maxSizeGib,
notes,
originallyRequestedSizeGib,
performanceTier,
pod,
protocol,
remainingSpaceGib,
requestedSizeGib,
snapshotAutoDeleteBehavior,
snapshotEnabled,
snapshotReservationDetail,
state,
storageType,
workloadProfile
FROM google.baremetalsolution.volumes
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND volumesId = '{{ volumesId }}' -- required;
List storage volumes in a given project and location.
SELECT
id,
name,
attached,
autoGrownSizeGib,
bootVolume,
currentSizeGib,
emergencySizeGib,
expireTime,
instances,
labels,
maxSizeGib,
notes,
originallyRequestedSizeGib,
performanceTier,
pod,
protocol,
remainingSpaceGib,
requestedSizeGib,
snapshotAutoDeleteBehavior,
snapshotEnabled,
snapshotReservationDetail,
state,
storageType,
workloadProfile
FROM google.baremetalsolution.volumes
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}';
UPDATE
examples
- patch
Update details of a single storage volume.
UPDATE google.baremetalsolution.volumes
SET
data__id = '{{ id }}',
data__storageType = '{{ storageType }}',
data__state = '{{ state }}',
data__requestedSizeGib = '{{ requestedSizeGib }}',
data__originallyRequestedSizeGib = '{{ originallyRequestedSizeGib }}',
data__currentSizeGib = '{{ currentSizeGib }}',
data__emergencySizeGib = '{{ emergencySizeGib }}',
data__maxSizeGib = '{{ maxSizeGib }}',
data__autoGrownSizeGib = '{{ autoGrownSizeGib }}',
data__remainingSpaceGib = '{{ remainingSpaceGib }}',
data__snapshotReservationDetail = '{{ snapshotReservationDetail }}',
data__snapshotAutoDeleteBehavior = '{{ snapshotAutoDeleteBehavior }}',
data__labels = '{{ labels }}',
data__snapshotEnabled = {{ snapshotEnabled }},
data__pod = '{{ pod }}',
data__performanceTier = '{{ performanceTier }}',
data__notes = '{{ notes }}',
data__workloadProfile = '{{ workloadProfile }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND volumesId = '{{ volumesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
Lifecycle Methods
- rename
- evict
- resize
RenameVolume sets a new name for a volume. Use with caution, previous names become immediately invalidated.
EXEC google.baremetalsolution.volumes.rename
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@volumesId='{{ volumesId }}' --required
@@json=
'{
"newVolumeId": "{{ newVolumeId }}"
}';
Skips volume's cooloff and deletes it now. Volume must be in cooloff state.
EXEC google.baremetalsolution.volumes.evict
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@volumesId='{{ volumesId }}' --required;
Emergency Volume resize.
EXEC google.baremetalsolution.volumes.resize
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@volumesId='{{ volumesId }}' --required
@@json=
'{
"sizeGib": "{{ sizeGib }}"
}';