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

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
idstring (uint64)[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. (pattern: a-z?)
capacityProvisioningTypestringProvisioning type of the byte capacity of the pool.
creationTimestampstring[Output Only] Creation timestamp in RFC3339 text format.
descriptionstringAn optional description of this resource. Provide this property when you create the resource.
kindstring[Output Only] Type of the resource. Always compute#storagePool for storage pools. (default: compute#storagePool)
labelFingerprintstring (byte)A 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.
poolProvisionedCapacityGbstring (int64)Size of the storage pool in GiB. For more information about the size limits, see https://cloud.google.com/compute/docs/disks/storage-pools.
poolProvisionedIopsstring (int64)Provisioned IOPS of the storage pool. Only relevant if the storage pool type is hyperdisk-balanced.
poolProvisionedThroughputstring (int64)Provisioned throughput of the storage pool in MiB/s. Only relevant if the storage pool type is hyperdisk-balanced or hyperdisk-throughput.
resourceStatusobject[Output Only] Status information for the storage pool resource. (id: StoragePoolResourceStatus)
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] Status information for the storage pool resource. (id: StoragePoolResourceStatus)
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

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectproject, zone, storagePoolReturns a specified storage pool. Gets a list of available storage pools by making a list() request.
listselectproject, zonefilter, maxResults, orderBy, pageToken, returnPartialSuccessRetrieves a list of storage pools contained within the specified zone.
aggregated_listselectprojectfilter, includeAllScopes, maxResults, orderBy, pageToken, returnPartialSuccess, serviceProjectNumberRetrieves an aggregated list of storage pools. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.
insertinsertproject, zonerequestIdCreates a storage pool in the specified project using the data in the request.
updateupdateproject, zone, storagePoolrequestId, updateMaskUpdates 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.
deletedeleteproject, zone, storagePoolrequestIdDeletes 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.

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.

NameDatatypeDescription
projectstring
storagePoolstring
zonestring
filterstring
includeAllScopesboolean
maxResultsinteger (uint32)
orderBystring
pageTokenstring
requestIdstring
returnPartialSuccessboolean
serviceProjectNumberstring (int64)
updateMaskstring (google-fieldmask)

SELECT examples

Returns a specified storage pool. Gets a list of available storage pools by making a list() request.

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

INSERT examples

Creates a storage pool in the specified project using the data in the request.

INSERT INTO google.compute.storage_pools (
data__kind,
data__id,
data__creationTimestamp,
data__name,
data__description,
data__poolProvisionedCapacityGb,
data__poolProvisionedIops,
data__poolProvisionedThroughput,
data__zone,
data__state,
data__selfLink,
data__selfLinkWithId,
data__labels,
data__labelFingerprint,
data__resourceStatus,
data__storagePoolType,
data__status,
data__capacityProvisioningType,
data__performanceProvisioningType,
project,
zone,
requestId
)
SELECT
'{{ kind }}',
'{{ id }}',
'{{ creationTimestamp }}',
'{{ name }}',
'{{ description }}',
'{{ poolProvisionedCapacityGb }}',
'{{ poolProvisionedIops }}',
'{{ poolProvisionedThroughput }}',
'{{ zone }}',
'{{ state }}',
'{{ selfLink }}',
'{{ selfLinkWithId }}',
'{{ labels }}',
'{{ labelFingerprint }}',
'{{ resourceStatus }}',
'{{ storagePoolType }}',
'{{ status }}',
'{{ capacityProvisioningType }}',
'{{ performanceProvisioningType }}',
'{{ project }}',
'{{ zone }}',
'{{ requestId }}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone
;

UPDATE examples

Updates 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.

UPDATE google.compute.storage_pools
SET
data__kind = '{{ kind }}',
data__id = '{{ id }}',
data__creationTimestamp = '{{ creationTimestamp }}',
data__name = '{{ name }}',
data__description = '{{ description }}',
data__poolProvisionedCapacityGb = '{{ poolProvisionedCapacityGb }}',
data__poolProvisionedIops = '{{ poolProvisionedIops }}',
data__poolProvisionedThroughput = '{{ poolProvisionedThroughput }}',
data__zone = '{{ zone }}',
data__state = '{{ state }}',
data__selfLink = '{{ selfLink }}',
data__selfLinkWithId = '{{ selfLinkWithId }}',
data__labels = '{{ labels }}',
data__labelFingerprint = '{{ labelFingerprint }}',
data__resourceStatus = '{{ resourceStatus }}',
data__storagePoolType = '{{ storagePoolType }}',
data__status = '{{ status }}',
data__capacityProvisioningType = '{{ capacityProvisioningType }}',
data__performanceProvisioningType = '{{ performanceProvisioningType }}'
WHERE
project = '{{ project }}' --required
AND zone = '{{ zone }}' --required
AND storagePool = '{{ storagePool }}' --required
AND requestId = '{{ requestId}}'
AND updateMask = '{{ updateMask}}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone;

DELETE examples

Deletes 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.

DELETE FROM google.compute.storage_pools
WHERE project = '{{ project }}' --required
AND zone = '{{ zone }}' --required
AND storagePool = '{{ storagePool }}' --required
AND requestId = '{{ requestId }}';