Disk class

Represents a Persistent Disk resource.

Persistent disks are required for running your VM instances. Create both boot and non-boot (data) persistent disks. For more information, read Persistent Disks. For more storage options, read Storage options.

The disks resource represents a zonal persistent disk. For more information, read Zonal persistent disks.

The regionDisks resource represents a regional persistent disk. For more information, read Regional resources. (== resource_for beta.disks ==) (== resource_for v1.disks ==) (== resource_for v1.regionDisks ==) (== resource_for beta.regionDisks ==)

Constructors

Disk()
Disk.fromJson(Map _json)

Properties

creationTimestamp ↔ String
Output Only Creation timestamp in RFC3339 text format.
read / write
description ↔ String
An optional description of this resource. Provide this property when you create the resource.
read / write
diskEncryptionKey CustomerEncryptionKey
Encrypts the disk using a customer-supplied encryption key. [...]
read / write
guestOsFeatures ↔ List<GuestOsFeature>
A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
read / write
id ↔ String
Output Only The unique identifier for the resource. This identifier is defined by the server.
read / write
kind ↔ String
Output Only Type of the resource. Always compute#disk for disks.
read / write
labelFingerprint ↔ String
A fingerprint for the labels being applied to this disk, 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. [...]
read / write
labelFingerprintAsBytes ↔ List<int>
read / write
labels ↔ Map<String, String>
Labels to apply to this disk. These can be later modified by the setLabels method.
read / write
lastAttachTimestamp ↔ String
Output Only Last attach timestamp in RFC3339 text format.
read / write
lastDetachTimestamp ↔ String
Output Only Last detach timestamp in RFC3339 text format.
read / write
licenseCodes ↔ List<String>
Integer license codes indicating which licenses are attached to this disk.
read / write
licenses ↔ List<String>
A list of publicly visible licenses. Reserved for Google's use.
read / write
name ↔ String
Name 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.
read / write
options ↔ String
Internal use only.
read / write
physicalBlockSizeBytes ↔ String
Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project.
read / write
region ↔ String
Output Only URL of the region where the disk resides. Only applicable for regional resources. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
read / write
replicaZones ↔ List<String>
URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
read / write
resourcePolicies ↔ List<String>
Resource policies applied to this disk for automatic snapshot creations.
read / write
Output Only Server-defined fully-qualified URL for this resource.
read / write
sizeGb ↔ String
Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk. [...]
read / write
sourceImage ↔ String
The source image used to create this disk. If the source image is deleted, this field will not be set. [...]
read / write
sourceImageEncryptionKey CustomerEncryptionKey
The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
read / write
sourceImageId ↔ String
Output Only The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
read / write
sourceSnapshot ↔ String
The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: [...]
read / write
sourceSnapshotEncryptionKey CustomerEncryptionKey
The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
read / write
sourceSnapshotId ↔ String
Output Only The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
read / write
status ↔ String
Output Only The status of disk creation. Possible string values are: [...]
read / write
type ↔ String
URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example: projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
read / write
users ↔ List<String>
Output Only Links to the users of the disk (attached instances) in form: projects/project/zones/zone/instances/instance
read / write
zone ↔ String
Output Only URL of the zone where the disk resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
read / write
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

toJson() → Map<String, Object>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited