Skip to main content

volumes

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

Overview

Namevolumes
TypeResource
Idgoogle.netapp.volumes

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. Name of the volume
activeDirectorystringOutput only. Specifies the ActiveDirectory name of a SMB volume.
backupConfigobjectBackupConfig of the volume. (id: BackupConfig)
capacityGibstring (int64)Required. Capacity in GIB of the volume
coldTierSizeGibstring (int64)Output only. Size of the volume cold tier data rounded down to the nearest GiB.
createTimestring (google-datetime)Output only. Create time of the volume
descriptionstringOptional. Description of the volume
encryptionTypestringOutput only. Specified the current volume encryption key source.
exportPolicyobjectOptional. Export policy of the volume (id: ExportPolicy)
hasReplicationbooleanOutput only. Indicates whether the volume is part of a replication relationship.
hybridReplicationParametersobjectOptional. The Hybrid Replication parameters for the volume. (id: HybridReplicationParameters)
kerberosEnabledbooleanOptional. Flag indicating if the volume is a kerberos volume or not, export policy rules control kerberos security modes (krb5, krb5i, krb5p).
kmsConfigstringOutput only. Specifies the KMS config to be used for volume encryption.
labelsobjectOptional. Labels as key value pairs
largeCapacitybooleanOptional. Flag indicating if the volume will be a large capacity volume or a regular volume.
ldapEnabledbooleanOutput only. Flag indicating if the volume is NFS LDAP enabled or not.
mountOptionsarrayOutput only. Mount options of this volume
multipleEndpointsbooleanOptional. Flag indicating if the volume will have an IP address per node for volumes supporting multiple IP endpoints. Only the volume with large_capacity will be allowed to have multiple endpoints.
networkstringOutput only. VPC Network name. Format: projects/{project}/global/networks/{network}
protocolsarrayRequired. Protocols required for the volume
psaRangestringOutput only. This field is not implemented. The values provided in this field are ignored.
replicaZonestringOutput only. Specifies the replica zone for regional volume.
restoreParametersobjectOptional. Specifies the source of the volume to be created from. (id: RestoreParameters)
restrictedActionsarrayOptional. List of actions that are restricted on this volume.
securityStylestringOptional. Security Style of the Volume
serviceLevelstringOutput only. Service level of the volume
shareNamestringRequired. Share name of the volume
smbSettingsarrayOptional. SMB share settings for the volume.
snapReservenumber (double)Optional. Snap_reserve specifies percentage of volume storage reserved for snapshot storage. Default is 0 percent.
snapshotDirectorybooleanOptional. Snapshot_directory if enabled (true) the volume will contain a read-only .snapshot directory which provides access to each of the volume's snapshots.
snapshotPolicyobjectOptional. SnapshotPolicy for a volume. (id: SnapshotPolicy)
statestringOutput only. State of the volume
stateDetailsstringOutput only. State details of the volume
storagePoolstringRequired. StoragePool name of the volume
throughputMibpsnumber (double)Optional. Throughput of the volume (in MiB/s)
tieringPolicyobjectTiering policy for the volume. (id: TieringPolicy)
unixPermissionsstringOptional. Default unix style permission (e.g. 777) the mount point will be created with. Applicable for NFS protocol types only.
usedGibstring (int64)Output only. Used capacity in GIB of the volume. This is computed periodically and it does not represent the realtime usage.
zonestringOutput only. Specifies the active zone for regional volume.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, volumesIdGets details of a single Volume.
listselectprojectsId, locationsIdpageSize, pageToken, filter, orderByLists Volumes in a given project.
createinsertprojectsId, locationsIdvolumeIdCreates a new Volume in a given project and location.
patchupdateprojectsId, locationsId, volumesIdupdateMaskUpdates the parameters of a single Volume.
deletedeleteprojectsId, locationsId, volumesIdforceDeletes a single Volume.
revertexecprojectsId, locationsId, volumesIdRevert an existing volume to a specified snapshot. Warning! This operation will permanently revert all changes made after the snapshot was created.

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
locationsIdstring
projectsIdstring
volumesIdstring
filterstring
forceboolean
orderBystring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)
volumeIdstring

SELECT examples

Gets details of a single Volume.

SELECT
name,
activeDirectory,
backupConfig,
capacityGib,
coldTierSizeGib,
createTime,
description,
encryptionType,
exportPolicy,
hasReplication,
hybridReplicationParameters,
kerberosEnabled,
kmsConfig,
labels,
largeCapacity,
ldapEnabled,
mountOptions,
multipleEndpoints,
network,
protocols,
psaRange,
replicaZone,
restoreParameters,
restrictedActions,
securityStyle,
serviceLevel,
shareName,
smbSettings,
snapReserve,
snapshotDirectory,
snapshotPolicy,
state,
stateDetails,
storagePool,
throughputMibps,
tieringPolicy,
unixPermissions,
usedGib,
zone
FROM google.netapp.volumes
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND volumesId = '{{ volumesId }}' -- required;

INSERT examples

Creates a new Volume in a given project and location.

INSERT INTO google.netapp.volumes (
data__name,
data__shareName,
data__storagePool,
data__capacityGib,
data__exportPolicy,
data__protocols,
data__smbSettings,
data__unixPermissions,
data__labels,
data__description,
data__snapshotPolicy,
data__snapReserve,
data__snapshotDirectory,
data__securityStyle,
data__kerberosEnabled,
data__restoreParameters,
data__backupConfig,
data__restrictedActions,
data__largeCapacity,
data__multipleEndpoints,
data__tieringPolicy,
data__hybridReplicationParameters,
data__throughputMibps,
projectsId,
locationsId,
volumeId
)
SELECT
'{{ name }}',
'{{ shareName }}',
'{{ storagePool }}',
'{{ capacityGib }}',
'{{ exportPolicy }}',
'{{ protocols }}',
'{{ smbSettings }}',
'{{ unixPermissions }}',
'{{ labels }}',
'{{ description }}',
'{{ snapshotPolicy }}',
{{ snapReserve }},
{{ snapshotDirectory }},
'{{ securityStyle }}',
{{ kerberosEnabled }},
'{{ restoreParameters }}',
'{{ backupConfig }}',
'{{ restrictedActions }}',
{{ largeCapacity }},
{{ multipleEndpoints }},
'{{ tieringPolicy }}',
'{{ hybridReplicationParameters }}',
{{ throughputMibps }},
'{{ projectsId }}',
'{{ locationsId }}',
'{{ volumeId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the parameters of a single Volume.

UPDATE google.netapp.volumes
SET
data__name = '{{ name }}',
data__shareName = '{{ shareName }}',
data__storagePool = '{{ storagePool }}',
data__capacityGib = '{{ capacityGib }}',
data__exportPolicy = '{{ exportPolicy }}',
data__protocols = '{{ protocols }}',
data__smbSettings = '{{ smbSettings }}',
data__unixPermissions = '{{ unixPermissions }}',
data__labels = '{{ labels }}',
data__description = '{{ description }}',
data__snapshotPolicy = '{{ snapshotPolicy }}',
data__snapReserve = {{ snapReserve }},
data__snapshotDirectory = {{ snapshotDirectory }},
data__securityStyle = '{{ securityStyle }}',
data__kerberosEnabled = {{ kerberosEnabled }},
data__restoreParameters = '{{ restoreParameters }}',
data__backupConfig = '{{ backupConfig }}',
data__restrictedActions = '{{ restrictedActions }}',
data__largeCapacity = {{ largeCapacity }},
data__multipleEndpoints = {{ multipleEndpoints }},
data__tieringPolicy = '{{ tieringPolicy }}',
data__hybridReplicationParameters = '{{ hybridReplicationParameters }}',
data__throughputMibps = {{ throughputMibps }}
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND volumesId = '{{ volumesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a single Volume.

DELETE FROM google.netapp.volumes
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND volumesId = '{{ volumesId }}' --required
AND force = '{{ force }}';

Lifecycle Methods

Revert an existing volume to a specified snapshot. Warning! This operation will permanently revert all changes made after the snapshot was created.

EXEC google.netapp.volumes.revert 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@volumesId='{{ volumesId }}' --required
@@json=
'{
"snapshotId": "{{ snapshotId }}"
}';