volumes
Creates, updates, deletes, gets or lists a volumes
resource.
Overview
Name | volumes |
Type | Resource |
Id | google.baremetalsolution.volumes |
Fields
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 | 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 | 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 | Additional emergency size that was requested for this Volume, in GiB. current_size_gib includes this value. |
expireTime | string | 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 | 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 | 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 | The space remaining in the storage volume for new LUNs, in GiB, excluding space reserved for snapshots. |
requestedSizeGib | string | 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. |
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
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, projectsId, volumesId | Get details of a single storage volume. |
list | SELECT | locationsId, projectsId | List storage volumes in a given project and location. |
patch | UPDATE | locationsId, projectsId, volumesId | Update details of a single storage volume. |
evict | EXEC | locationsId, projectsId, volumesId | Skips volume's cooloff and deletes it now. Volume must be in cooloff state. |
rename | EXEC | locationsId, projectsId, volumesId | RenameVolume sets a new name for a volume. Use with caution, previous names become immediately invalidated. |
resize | EXEC | locationsId, projectsId, volumesId | Emergency 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 }}';