Skip to main content

volumes

Creates, updates, deletes, gets or lists a volumes resource.

Overview

Namevolumes
TypeResource
Idgoogle.baremetalsolution.volumes

Fields

NameDatatypeDescription
idstringAn identifier for the Volume, generated by the backend.
namestringOutput 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}
attachedbooleanOutput 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.
autoGrownSizeGibstringThe 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.
bootVolumebooleanOutput only. Whether this volume is a boot volume. A boot volume is one which contains a boot LUN.
currentSizeGibstringThe 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.
emergencySizeGibstringAdditional emergency size that was requested for this Volume, in GiB. current_size_gib includes this value.
expireTimestringOutput only. Time after which volume will be fully deleted. It is filled only for volumes in COOLOFF state.
instancesarrayOutput only. Instances this Volume is attached to. This field is set only in Get requests.
labelsobjectLabels as key value pairs.
maxSizeGibstringMaximum size volume can be expanded to in case of evergency, in GiB.
notesstringInput only. User-specified notes for new Volume. Used to provision Volumes that require manual intervention.
originallyRequestedSizeGibstringOriginally requested size, in GiB.
performanceTierstringImmutable. Performance tier of the Volume. Default is SHARED.
podstringImmutable. Pod name. Pod is an independent part of infrastructure. Volume can only be connected to the instances allocated in the same pod.
protocolstringOutput only. Storage protocol for the Volume.
remainingSpaceGibstringThe space remaining in the storage volume for new LUNs, in GiB, excluding space reserved for snapshots.
requestedSizeGibstringThe requested size of this storage volume, in GiB.
snapshotAutoDeleteBehaviorstringThe behavior to use when snapshot reserved space is full.
snapshotEnabledbooleanWhether snapshots are enabled.
snapshotReservationDetailobjectDetails about snapshot space reservation and usage on the storage volume.
statestringThe state of this storage volume.
storageTypestringThe storage type for this volume.
workloadProfilestringThe workload profile for the volume.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, projectsId, volumesIdGet details of a single storage volume.
listSELECTlocationsId, projectsIdList storage volumes in a given project and location.
patchUPDATElocationsId, projectsId, volumesIdUpdate details of a single storage volume.
evictEXEClocationsId, projectsId, volumesIdSkips volume's cooloff and deletes it now. Volume must be in cooloff state.
renameEXEClocationsId, projectsId, volumesIdRenameVolume sets a new name for a volume. Use with caution, previous names become immediately invalidated.
resizeEXEClocationsId, projectsId, volumesIdEmergency Volume resize.

SELECT examples

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 locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

UPDATE example

Updates a volumes resource.

/*+ update */
UPDATE google.baremetalsolution.volumes
SET
storageType = '{{ storageType }}',
state = '{{ state }}',
requestedSizeGib = '{{ requestedSizeGib }}',
originallyRequestedSizeGib = '{{ originallyRequestedSizeGib }}',
currentSizeGib = '{{ currentSizeGib }}',
emergencySizeGib = '{{ emergencySizeGib }}',
maxSizeGib = '{{ maxSizeGib }}',
autoGrownSizeGib = '{{ autoGrownSizeGib }}',
remainingSpaceGib = '{{ remainingSpaceGib }}',
snapshotReservationDetail = '{{ snapshotReservationDetail }}',
snapshotAutoDeleteBehavior = '{{ snapshotAutoDeleteBehavior }}',
labels = '{{ labels }}',
snapshotEnabled = true|false,
pod = '{{ pod }}',
performanceTier = '{{ performanceTier }}',
notes = '{{ notes }}',
workloadProfile = '{{ workloadProfile }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND volumesId = '{{ volumesId }}';