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:

NameDatatypeDescription
idstring (uint64)Output only. [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 withRFC1035. 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](?:[-a-z0-9]{0,61}[a-z0-9])?)
capacityProvisioningTypestringProvisioning type of the byte capacity of the pool. (ADVANCED, STANDARD, UNSPECIFIED)
creationTimestampstringOutput only. [Output Only] Creation timestamp inRFC3339 text format.
descriptionstringAn optional description of this resource. Provide this property when you create the resource.
exapoolProvisionedCapacityGbobjectProvisioned capacities for each SKU for this Exapool in GiB (id: StoragePoolExapoolProvisionedCapacityGb)
kindstringOutput only. [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 error412 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.
paramsobjectInput only. Additional params passed with the request, but not persisted as part of resource payload. (id: StoragePoolParams)
performanceProvisioningTypestringProvisioning type of the performance-related parameters of the pool, such as throughput and IOPS. (ADVANCED, STANDARD, UNSPECIFIED)
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.
resourceStatusobjectOutput only. [Output Only] Status information for the storage pool resource. (id: StoragePoolResourceStatus)
selfLinkstringOutput only. [Output Only] Server-defined fully-qualified URL for this resource.
selfLinkWithIdstringOutput only. [Output Only] Server-defined URL for this resource's resource id.
shareSettingsobjectShare settings for the storage pool. (id: StoragePoolShareSettings)
statestringOutput only. [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. (CREATING, DELETING, FAILED, READY)
statusobjectOutput only. [Output Only] Status information for the storage pool resource. (id: StoragePoolResourceStatus)
storagePoolTypestringType of the storage pool.
zonestringOutput only. [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, pageToken, orderBy, returnPartialSuccessRetrieves a list of storage pools contained within
the specified zone.
aggregated_listselectprojectreturnPartialSuccess, includeAllScopes, orderBy, filter, serviceProjectNumber, maxResults, pageTokenRetrieves 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,
exapoolProvisionedCapacityGb,
kind,
labelFingerprint,
labels,
params,
performanceProvisioningType,
poolProvisionedCapacityGb,
poolProvisionedIops,
poolProvisionedThroughput,
resourceStatus,
selfLink,
selfLinkWithId,
shareSettings,
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__labelFingerprint,
data__shareSettings,
data__params,
data__name,
data__description,
data__poolProvisionedCapacityGb,
data__labels,
data__poolProvisionedIops,
data__storagePoolType,
data__capacityProvisioningType,
data__performanceProvisioningType,
data__exapoolProvisionedCapacityGb,
data__poolProvisionedThroughput,
project,
zone,
requestId
)
SELECT
'{{ labelFingerprint }}',
'{{ shareSettings }}',
'{{ params }}',
'{{ name }}',
'{{ description }}',
'{{ poolProvisionedCapacityGb }}',
'{{ labels }}',
'{{ poolProvisionedIops }}',
'{{ storagePoolType }}',
'{{ capacityProvisioningType }}',
'{{ performanceProvisioningType }}',
'{{ exapoolProvisionedCapacityGb }}',
'{{ poolProvisionedThroughput }}',
'{{ project }}',
'{{ zone }}',
'{{ requestId }}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
getVersionOperationMetadata,
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__labelFingerprint = '{{ labelFingerprint }}',
data__shareSettings = '{{ shareSettings }}',
data__params = '{{ params }}',
data__name = '{{ name }}',
data__description = '{{ description }}',
data__poolProvisionedCapacityGb = '{{ poolProvisionedCapacityGb }}',
data__labels = '{{ labels }}',
data__poolProvisionedIops = '{{ poolProvisionedIops }}',
data__storagePoolType = '{{ storagePoolType }}',
data__capacityProvisioningType = '{{ capacityProvisioningType }}',
data__performanceProvisioningType = '{{ performanceProvisioningType }}',
data__exapoolProvisionedCapacityGb = '{{ exapoolProvisionedCapacityGb }}',
data__poolProvisionedThroughput = '{{ poolProvisionedThroughput }}'
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,
getVersionOperationMetadata,
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 }}'
;