REST Resource: projects.locations.volumes

Resource: Volume

Volume provides a filesystem that you can mount.

JSON representation
{
  "name": string,
  "state": enum (State),
  "stateDetails": string,
  "createTime": string,
  "shareName": string,
  "psaRange": string,
  "storagePool": string,
  "network": string,
  "serviceLevel": enum (ServiceLevel),
  "capacityGib": string,
  "exportPolicy": {
    object (ExportPolicy)
  },
  "protocols": [
    enum (Protocols)
  ],
  "smbSettings": [
    enum (SMBSettings)
  ],
  "mountOptions": [
    {
      object (MountOption)
    }
  ],
  "unixPermissions": string,
  "labels": {
    string: string,
    ...
  },
  "description": string,
  "snapshotPolicy": {
    object (SnapshotPolicy)
  },
  "snapReserve": number,
  "snapshotDirectory": boolean,
  "usedGib": string,
  "securityStyle": enum (SecurityStyle),
  "kerberosEnabled": boolean,
  "ldapEnabled": boolean,
  "activeDirectory": string,
  "restoreParameters": {
    object (RestoreParameters)
  },
  "kmsConfig": string,
  "encryptionType": enum (EncryptionType),
  "hasReplication": boolean,
  "restrictedActions": [
    enum (RestrictedAction)
  ],
  "largeCapacity": boolean,
  "multipleEndpoints": boolean,
  "replicaZone": string,
  "zone": string,
  "coldTierSizeGib": string,
  "backupConfig": {
    object (BackupConfig)
  },
  "tieringPolicy": {
    object (TieringPolicy)
  }
}
Fields
name

string

Identifier. Name of the volume

state

enum (State)

Output only. State of the volume

stateDetails

string

Output only. State details of the volume

createTime

string (Timestamp format)

Output only. Create time of the volume

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

shareName

string

Required. Share name of the volume

psaRange

string

Output only. This field is not implemented. The values provided in this field are ignored.

storagePool

string

Required. StoragePool name of the volume

network

string

Output only. VPC Network name. Format: projects/{project}/global/networks/{network}

serviceLevel

enum (ServiceLevel)

Output only. Service level of the volume

capacityGib

string (int64 format)

Required. Capacity in GIB of the volume

exportPolicy

object (ExportPolicy)

Optional. Export policy of the volume

protocols[]

enum (Protocols)

Required. Protocols required for the volume

smbSettings[]

enum (SMBSettings)

Optional. SMB share settings for the volume.

mountOptions[]

object (MountOption)

Output only. Mount options of this volume

unixPermissions

string

Optional. Default unix style permission (e.g. 777) the mount point will be created with. Applicable for NFS protocol types only.

labels

map (key: string, value: string)

Optional. Labels as key value pairs

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

description

string

Optional. Description of the volume

snapshotPolicy

object (SnapshotPolicy)

Optional. SnapshotPolicy for a volume.

snapReserve

number

Optional. Snap_reserve specifies percentage of volume storage reserved for snapshot storage. Default is 0 percent.

snapshotDirectory

boolean

Optional. Snapshot_directory if enabled (true) the volume will contain a read-only .snapshot directory which provides access to each of the volume's snapshots.

usedGib

string (int64 format)

Output only. Used capacity in GIB of the volume. This is computed periodically and it does not represent the realtime usage.

securityStyle

enum (SecurityStyle)

Optional. Security Style of the Volume

kerberosEnabled

boolean

Optional. Flag indicating if the volume is a kerberos volume or not, export policy rules control kerberos security modes (krb5, krb5i, krb5p).

ldapEnabled

boolean

Output only. Flag indicating if the volume is NFS LDAP enabled or not.

activeDirectory

string

Output only. Specifies the ActiveDirectory name of a SMB volume.

restoreParameters

object (RestoreParameters)

Optional. Specifies the source of the volume to be created from.

kmsConfig

string

Output only. Specifies the KMS config to be used for volume encryption.

encryptionType

enum (EncryptionType)

Output only. Specified the current volume encryption key source.

hasReplication

boolean

Output only. Indicates whether the volume is part of a replication relationship.

restrictedActions[]

enum (RestrictedAction)

Optional. List of actions that are restricted on this volume.

largeCapacity

boolean

Optional. Flag indicating if the volume will be a large capacity volume or a regular volume.

multipleEndpoints

boolean

Optional. Flag indicating if the volume will have an IP address per node for volumes supporting multiple IP endpoints. Only the volume with largeCapacity will be allowed to have multiple endpoints.

replicaZone

string

Output only. Specifies the replica zone for regional volume.

zone

string

Output only. Specifies the active zone for regional volume.

coldTierSizeGib

string (int64 format)

Output only. Size of the volume cold tier data in GiB.

backupConfig

object (BackupConfig)

BackupConfig of the volume.

tieringPolicy

object (TieringPolicy)

Tiering policy for the volume.

State

The volume states

Enums
STATE_UNSPECIFIED Unspecified Volume State
READY Volume State is Ready
CREATING Volume State is Creating
DELETING Volume State is Deleting
UPDATING Volume State is Updating
RESTORING Volume State is Restoring
DISABLED Volume State is Disabled
ERROR Volume State is Error

ExportPolicy

Defines the export policy for the volume.

JSON representation
{
  "rules": [
    {
      object (SimpleExportPolicyRule)
    }
  ]
}
Fields
rules[]

object (SimpleExportPolicyRule)

Required. List of export policy rules

SimpleExportPolicyRule

An export policy rule describing various export options.

JSON representation
{
  "allowedClients": string,
  "hasRootAccess": string,
  "accessType": enum (AccessType),
  "nfsv3": boolean,
  "nfsv4": boolean,
  "kerberos5ReadOnly": boolean,
  "kerberos5ReadWrite": boolean,
  "kerberos5iReadOnly": boolean,
  "kerberos5iReadWrite": boolean,
  "kerberos5pReadOnly": boolean,
  "kerberos5pReadWrite": boolean
}
Fields
allowedClients

string

Comma separated list of allowed clients IP addresses

hasRootAccess

string

Whether Unix root access will be granted.

accessType

enum (AccessType)

Access type (ReadWrite, ReadOnly, None)

nfsv3

boolean

NFS V3 protocol.

nfsv4

boolean

NFS V4 protocol.

kerberos5ReadOnly

boolean

If enabled (true) the rule defines a read only access for clients matching the 'allowedClients' specification. It enables nfs clients to mount using 'authentication' kerberos security mode.

kerberos5ReadWrite

boolean

If enabled (true) the rule defines read and write access for clients matching the 'allowedClients' specification. It enables nfs clients to mount using 'authentication' kerberos security mode. The 'kerberos5ReadOnly' value be ignored if this is enabled.

kerberos5iReadOnly

boolean

If enabled (true) the rule defines a read only access for clients matching the 'allowedClients' specification. It enables nfs clients to mount using 'integrity' kerberos security mode.

kerberos5iReadWrite

boolean

If enabled (true) the rule defines read and write access for clients matching the 'allowedClients' specification. It enables nfs clients to mount using 'integrity' kerberos security mode. The 'kerberos5iReadOnly' value be ignored if this is enabled.

kerberos5pReadOnly

boolean

If enabled (true) the rule defines a read only access for clients matching the 'allowedClients' specification. It enables nfs clients to mount using 'privacy' kerberos security mode.

kerberos5pReadWrite

boolean

If enabled (true) the rule defines read and write access for clients matching the 'allowedClients' specification. It enables nfs clients to mount using 'privacy' kerberos security mode. The 'kerberos5pReadOnly' value be ignored if this is enabled.

AccessType

AccessType is an enum of all the supported access types for a volume.

Enums
ACCESS_TYPE_UNSPECIFIED Unspecified Access Type
READ_ONLY Read Only
READ_WRITE Read Write
READ_NONE None

Protocols

Protocols is an enum of all the supported network protocols for a volume.

Enums
PROTOCOLS_UNSPECIFIED Unspecified protocol
NFSV3 NFS V3 protocol
NFSV4 NFS V4 protocol
SMB SMB protocol

SMBSettings

SMBSettings Modifies the behaviour of a SMB volume.

Enums
SMB_SETTINGS_UNSPECIFIED Unspecified default option
ENCRYPT_DATA SMB setting encrypt data
BROWSABLE SMB setting browsable
CHANGE_NOTIFY SMB setting notify change
NON_BROWSABLE SMB setting not to notify change
OPLOCKS SMB setting oplocks
SHOW_SNAPSHOT SMB setting to show snapshots
SHOW_PREVIOUS_VERSIONS SMB setting to show previous versions
ACCESS_BASED_ENUMERATION SMB setting to access volume based on enumerartion
CONTINUOUSLY_AVAILABLE Continuously available enumeration

MountOption

View only mount options for a volume.

JSON representation
{
  "export": string,
  "exportFull": string,
  "protocol": enum (Protocols),
  "instructions": string
}
Fields
export

string

Export string

exportFull

string

Full export string

protocol

enum (Protocols)

Protocol to mount with.

instructions

string

Instructions for mounting

SnapshotPolicy

Snapshot Policy for a volume.

JSON representation
{
  "enabled": boolean,
  "hourlySchedule": {
    object (HourlySchedule)
  },
  "dailySchedule": {
    object (DailySchedule)
  },
  "weeklySchedule": {
    object (WeeklySchedule)
  },
  "monthlySchedule": {
    object (MonthlySchedule)
  }
}
Fields
enabled

boolean

If enabled, make snapshots automatically according to the schedules. Default is false.

hourlySchedule

object (HourlySchedule)

Hourly schedule policy.

dailySchedule

object (DailySchedule)

Daily schedule policy.

weeklySchedule

object (WeeklySchedule)

Weekly schedule policy.

monthlySchedule

object (MonthlySchedule)

Monthly schedule policy.

HourlySchedule

Make a snapshot every hour e.g. at 04:00, 05:00, 06:00.

JSON representation
{
  "snapshotsToKeep": number,
  "minute": number
}
Fields
snapshotsToKeep

number

The maximum number of Snapshots to keep for the hourly schedule

minute

number

Set the minute of the hour to start the snapshot (0-59), defaults to the top of the hour (0).

DailySchedule

Make a snapshot every day e.g. at 04:00, 05:20, 23:50

JSON representation
{
  "snapshotsToKeep": number,
  "minute": number,
  "hour": number
}
Fields
snapshotsToKeep

number

The maximum number of Snapshots to keep for the hourly schedule

minute

number

Set the minute of the hour to start the snapshot (0-59), defaults to the top of the hour (0).

hour

number

Set the hour to start the snapshot (0-23), defaults to midnight (0).

WeeklySchedule

Make a snapshot every week e.g. at Monday 04:00, Wednesday 05:20, Sunday 23:50

JSON representation
{
  "snapshotsToKeep": number,
  "minute": number,
  "hour": number,
  "day": string
}
Fields
snapshotsToKeep

number

The maximum number of Snapshots to keep for the hourly schedule

minute

number

Set the minute of the hour to start the snapshot (0-59), defaults to the top of the hour (0).

hour

number

Set the hour to start the snapshot (0-23), defaults to midnight (0).

day

string

Set the day or days of the week to make a snapshot. Accepts a comma separated days of the week. Defaults to 'Sunday'.

MonthlySchedule

Make a snapshot once a month e.g. at 2nd 04:00, 7th 05:20, 24th 23:50

JSON representation
{
  "snapshotsToKeep": number,
  "minute": number,
  "hour": number,
  "daysOfMonth": string
}
Fields
snapshotsToKeep

number

The maximum number of Snapshots to keep for the hourly schedule

minute

number

Set the minute of the hour to start the snapshot (0-59), defaults to the top of the hour (0).

hour

number

Set the hour to start the snapshot (0-23), defaults to midnight (0).

daysOfMonth

string

Set the day or days of the month to make a snapshot (1-31). Accepts a comma separated number of days. Defaults to '1'.

SecurityStyle

The security style of the volume, can be either UNIX or NTFS.

Enums
SECURITY_STYLE_UNSPECIFIED SecurityStyle is unspecified
NTFS SecurityStyle uses NTFS
UNIX SecurityStyle uses UNIX

RestoreParameters

The RestoreParameters if volume is created from a snapshot or backup.

JSON representation
{

  // Union field source can be only one of the following:
  "sourceSnapshot": string,
  "sourceBackup": string
  // End of list of possible types for union field source.
}
Fields
Union field source. The source that the volume is created from. source can be only one of the following:
sourceSnapshot

string

Full name of the snapshot resource. Format: projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}

sourceBackup

string

Full name of the backup resource. Format: projects/{project}/locations/{location}/backupVaults/{backupVaultId}/backups/{backupId}

BackupConfig

BackupConfig contains backup related config on a volume.

JSON representation
{
  "backupPolicies": [
    string
  ],
  "backupVault": string,
  "scheduledBackupEnabled": boolean,
  "backupChainBytes": string
}
Fields
backupPolicies[]

string

Optional. When specified, schedule backups will be created based on the policy configuration.

backupVault

string

Optional. Name of backup vault. Format: projects/{projectId}/locations/{location}/backupVaults/{backupVaultId}

scheduledBackupEnabled

boolean

Optional. When set to true, scheduled backup is enabled on the volume. This field should be nil when there's no backup policy attached.

backupChainBytes

string (int64 format)

Output only. Total size of all backups in a chain in bytes = baseline backup size + sum(incremental backup size).

RestrictedAction

Actions to be restricted for a volume.

Enums
RESTRICTED_ACTION_UNSPECIFIED Unspecified restricted action
DELETE Prevent volume from being deleted when mounted.

TieringPolicy

Defines tiering policy for the volume.

JSON representation
{
  "tierAction": enum (TierAction),
  "coolingThresholdDays": integer
}
Fields
tierAction

enum (TierAction)

Optional. Flag indicating if the volume has tiering policy enable/pause. Default is PAUSED.

coolingThresholdDays

integer

Optional. Time in days to mark the volume's data block as cold and make it eligible for tiering, can be range from 7-183. Default is 31.

TierAction

Tier action for the volume.

Enums
TIER_ACTION_UNSPECIFIED Unspecified.
ENABLED When tiering is enabled, new cold data will be tiered.
PAUSED When paused, tiering won't be performed on new data. Existing data stays tiered until accessed.

Methods

create

Creates a new Volume in a given project and location.

delete

Deletes a single Volume.

get

Gets details of a single Volume.

list

Lists Volumes in a given project.

patch

Updates the parameters of a single Volume.

revert

Revert an existing volume to a specified snapshot.