Skip to main content

storage_pools

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

Overview

Namestorage_pools
TypeResource
Idgoogle.compute.storage_pools

Fields

NameDatatypeDescription
idstring[Output Only] The unique identifier for the resource. This identifier is defined by the server.
namestringName of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
descriptionstringAn optional description of this resource. Provide this property when you create the resource.
capacityProvisioningTypestringProvisioning type of the byte capacity of the pool.
creationTimestampstring[Output Only] Creation timestamp in RFC3339 text format.
kindstring[Output Only] Type of the resource. Always compute#storagePool for storage pools.
labelFingerprintstringA fingerprint for the labels being applied to this storage pool, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a storage pool.
labelsobjectLabels to apply to this storage pool. These can be later modified by the setLabels method.
performanceProvisioningTypestringProvisioning type of the performance-related parameters of the pool, such as throughput and IOPS.
poolProvisionedCapacityGbstringSize, in GiB, of the storage pool. For more information about the size limits, see https://cloud.google.com/compute/docs/disks/storage-pools.
poolProvisionedIopsstringProvisioned IOPS of the storage pool. Only relevant if the storage pool type is hyperdisk-balanced.
poolProvisionedThroughputstringProvisioned throughput of the storage pool. Only relevant if the storage pool type is hyperdisk-balanced or hyperdisk-throughput.
resourceStatusobject[Output Only] Contains output only fields.
selfLinkstring[Output Only] Server-defined fully-qualified URL for this resource.
selfLinkWithIdstring[Output Only] Server-defined URL for this resource's resource id.
statestring[Output Only] The status of storage pool creation. - CREATING: Storage pool is provisioning. storagePool. - FAILED: Storage pool creation failed. - READY: Storage pool is ready for use. - DELETING: Storage pool is deleting.
statusobject[Output Only] Contains output only fields.
storagePoolTypestringType of the storage pool.
zonestring[Output Only] URL of the zone where the storage pool resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

Methods

NameAccessible byRequired ParamsDescription
aggregated_listSELECTprojectRetrieves an aggregated list of storage pools. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.
getSELECTproject, storagePool, zoneReturns a specified storage pool. Gets a list of available storage pools by making a list() request.
listSELECTproject, zoneRetrieves a list of storage pools contained within the specified zone.
insertINSERTproject, zoneCreates a storage pool in the specified project using the data in the request.
deleteDELETEproject, storagePool, zoneDeletes the specified storage pool. Deleting a storagePool removes its data permanently and is irreversible. However, deleting a storagePool does not delete any snapshots previously made from the storagePool. You must separately delete snapshots.
updateUPDATEproject, storagePool, zoneUpdates the specified storagePool with the data included in the request. The update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: pool_provisioned_capacity_gb, pool_provisioned_iops and pool_provisioned_throughput.

SELECT examples

Retrieves an aggregated list of storage pools. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

SELECT
id,
name,
description,
capacityProvisioningType,
creationTimestamp,
kind,
labelFingerprint,
labels,
performanceProvisioningType,
poolProvisionedCapacityGb,
poolProvisionedIops,
poolProvisionedThroughput,
resourceStatus,
selfLink,
selfLinkWithId,
state,
status,
storagePoolType,
zone
FROM google.compute.storage_pools
WHERE project = '{{ project }}';

INSERT example

Use the following StackQL query and manifest file to create a new storage_pools resource.

/*+ create */
INSERT INTO google.compute.storage_pools (
project,
zone,
name,
description,
poolProvisionedCapacityGb,
poolProvisionedIops,
poolProvisionedThroughput,
zone,
state,
labels,
labelFingerprint,
resourceStatus,
storagePoolType,
status,
capacityProvisioningType,
performanceProvisioningType
)
SELECT
'{{ project }}',
'{{ zone }}',
'{{ name }}',
'{{ description }}',
'{{ poolProvisionedCapacityGb }}',
'{{ poolProvisionedIops }}',
'{{ poolProvisionedThroughput }}',
'{{ zone }}',
'{{ state }}',
'{{ labels }}',
'{{ labelFingerprint }}',
'{{ resourceStatus }}',
'{{ storagePoolType }}',
'{{ status }}',
'{{ capacityProvisioningType }}',
'{{ performanceProvisioningType }}'
;

UPDATE example

Updates a storage_pools resource.

/*+ update */
UPDATE google.compute.storage_pools
SET
name = '{{ name }}',
description = '{{ description }}',
poolProvisionedCapacityGb = '{{ poolProvisionedCapacityGb }}',
poolProvisionedIops = '{{ poolProvisionedIops }}',
poolProvisionedThroughput = '{{ poolProvisionedThroughput }}',
zone = '{{ zone }}',
state = '{{ state }}',
labels = '{{ labels }}',
labelFingerprint = '{{ labelFingerprint }}',
resourceStatus = '{{ resourceStatus }}',
storagePoolType = '{{ storagePoolType }}',
status = '{{ status }}',
capacityProvisioningType = '{{ capacityProvisioningType }}',
performanceProvisioningType = '{{ performanceProvisioningType }}'
WHERE
project = '{{ project }}'
AND storagePool = '{{ storagePool }}'
AND zone = '{{ zone }}';

DELETE example

Deletes the specified storage_pools resource.

/*+ delete */
DELETE FROM google.compute.storage_pools
WHERE project = '{{ project }}'
AND storagePool = '{{ storagePool }}'
AND zone = '{{ zone }}';