Modifier and Type | Method and Description |
---|---|
Disk.Builder |
addAllGuestOsFeatures(List<GuestOsFeature> guestOsFeatures)
A list of features to enable on the guest operating system.
|
Disk.Builder |
addAllLicenseCodes(List<String> licenseCodes)
Integer license codes indicating which licenses are attached to this disk.
|
Disk.Builder |
addAllLicenses(List<String> licenses)
A list of publicly visible licenses.
|
Disk.Builder |
addAllReplicaZones(List<String> replicaZones)
URLs of the zones where the disk should be replicated to.
|
Disk.Builder |
addAllUsers(List<String> users)
[Output Only] Links to the users of the disk (attached instances) in form:
project/zones/zone/instances/instance
|
Disk.Builder |
addGuestOsFeatures(GuestOsFeature guestOsFeatures)
A list of features to enable on the guest operating system.
|
Disk.Builder |
addLicenseCodes(String licenseCodes)
Integer license codes indicating which licenses are attached to this disk.
|
Disk.Builder |
addLicenses(String licenses)
A list of publicly visible licenses.
|
Disk.Builder |
addReplicaZones(String replicaZones)
URLs of the zones where the disk should be replicated to.
|
Disk.Builder |
addUsers(String users)
[Output Only] Links to the users of the disk (attached instances) in form:
project/zones/zone/instances/instance
|
Disk |
build() |
Disk.Builder |
clone() |
String |
getCreationTimestamp()
[Output Only] Creation timestamp in RFC3339 text format.
|
String |
getDescription()
An optional description of this resource.
|
CustomerEncryptionKey |
getDiskEncryptionKey()
Encrypts the disk using a customer-supplied encryption key.
|
List<GuestOsFeature> |
getGuestOsFeaturesList()
A list of features to enable on the guest operating system.
|
String |
getId()
[Output Only] The unique identifier for the resource.
|
String |
getKind()
[Output Only] Type of the resource.
|
String |
getLabelFingerprint()
A fingerprint for the labels being applied to this disk, which is essentially a hash of the
labels set used for optimistic locking.
|
Map<String,String> |
getLabelsMap()
Labels to apply to this disk.
|
String |
getLastAttachTimestamp()
[Output Only] Last attach timestamp in RFC3339 text format.
|
String |
getLastDetachTimestamp()
[Output Only] Last detach timestamp in RFC3339 text format.
|
List<String> |
getLicenseCodesList()
Integer license codes indicating which licenses are attached to this disk.
|
List<String> |
getLicensesList()
A list of publicly visible licenses.
|
String |
getName()
Name of the resource.
|
String |
getOptions()
Internal use only.
|
String |
getPhysicalBlockSizeBytes()
Physical block size of the persistent disk, in bytes.
|
String |
getRegion()
[Output Only] URL of the region where the disk resides.
|
List<String> |
getReplicaZonesList()
URLs of the zones where the disk should be replicated to.
|
String |
getSelfLink()
[Output Only] Server-defined fully-qualified URL for this resource.
|
String |
getSizeGb()
Size of the persistent disk, specified in GB.
|
String |
getSourceImage()
The source image used to create this disk.
|
CustomerEncryptionKey |
getSourceImageEncryptionKey()
The customer-supplied encryption key of the source image.
|
String |
getSourceImageId()
[Output Only] The ID value of the image used to create this disk.
|
String |
getSourceSnapshot()
The source snapshot used to create this disk.
|
CustomerEncryptionKey |
getSourceSnapshotEncryptionKey()
The customer-supplied encryption key of the source snapshot.
|
String |
getSourceSnapshotId()
[Output Only] The unique ID of the snapshot used to create this disk.
|
String |
getStatus()
[Output Only] The status of disk creation.
|
String |
getType()
URL of the disk type resource describing which disk type to use to create the disk.
|
List<String> |
getUsersList()
[Output Only] Links to the users of the disk (attached instances) in form:
project/zones/zone/instances/instance
|
String |
getZone()
[Output Only] URL of the zone where the disk resides.
|
Disk.Builder |
mergeFrom(Disk other) |
Disk.Builder |
putAllLabels(Map<String,String> labels)
Labels to apply to this disk.
|
Disk.Builder |
setCreationTimestamp(String creationTimestamp)
[Output Only] Creation timestamp in RFC3339 text format.
|
Disk.Builder |
setDescription(String description)
An optional description of this resource.
|
Disk.Builder |
setDiskEncryptionKey(CustomerEncryptionKey diskEncryptionKey)
Encrypts the disk using a customer-supplied encryption key.
|
Disk.Builder |
setId(String id)
[Output Only] The unique identifier for the resource.
|
Disk.Builder |
setKind(String kind)
[Output Only] Type of the resource.
|
Disk.Builder |
setLabelFingerprint(String labelFingerprint)
A fingerprint for the labels being applied to this disk, which is essentially a hash of the
labels set used for optimistic locking.
|
Disk.Builder |
setLastAttachTimestamp(String lastAttachTimestamp)
[Output Only] Last attach timestamp in RFC3339 text format.
|
Disk.Builder |
setLastDetachTimestamp(String lastDetachTimestamp)
[Output Only] Last detach timestamp in RFC3339 text format.
|
Disk.Builder |
setName(String name)
Name of the resource.
|
Disk.Builder |
setOptions(String options)
Internal use only.
|
Disk.Builder |
setPhysicalBlockSizeBytes(String physicalBlockSizeBytes)
Physical block size of the persistent disk, in bytes.
|
Disk.Builder |
setRegion(String region)
[Output Only] URL of the region where the disk resides.
|
Disk.Builder |
setSelfLink(String selfLink)
[Output Only] Server-defined fully-qualified URL for this resource.
|
Disk.Builder |
setSizeGb(String sizeGb)
Size of the persistent disk, specified in GB.
|
Disk.Builder |
setSourceImage(String sourceImage)
The source image used to create this disk.
|
Disk.Builder |
setSourceImageEncryptionKey(CustomerEncryptionKey sourceImageEncryptionKey)
The customer-supplied encryption key of the source image.
|
Disk.Builder |
setSourceImageId(String sourceImageId)
[Output Only] The ID value of the image used to create this disk.
|
Disk.Builder |
setSourceSnapshot(String sourceSnapshot)
The source snapshot used to create this disk.
|
Disk.Builder |
setSourceSnapshotEncryptionKey(CustomerEncryptionKey sourceSnapshotEncryptionKey)
The customer-supplied encryption key of the source snapshot.
|
Disk.Builder |
setSourceSnapshotId(String sourceSnapshotId)
[Output Only] The unique ID of the snapshot used to create this disk.
|
Disk.Builder |
setStatus(String status)
[Output Only] The status of disk creation.
|
Disk.Builder |
setType(String type)
URL of the disk type resource describing which disk type to use to create the disk.
|
Disk.Builder |
setZone(String zone)
[Output Only] URL of the zone where the disk resides.
|
public Disk.Builder mergeFrom(Disk other)
public String getCreationTimestamp()
public Disk.Builder setCreationTimestamp(String creationTimestamp)
public String getDescription()
public Disk.Builder setDescription(String description)
public CustomerEncryptionKey getDiskEncryptionKey()
After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine).
Customer-supplied encryption keys do not protect access to metadata of the disk.
If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
public Disk.Builder setDiskEncryptionKey(CustomerEncryptionKey diskEncryptionKey)
After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine).
Customer-supplied encryption keys do not protect access to metadata of the disk.
If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
public List<GuestOsFeature> getGuestOsFeaturesList()
public Disk.Builder addAllGuestOsFeatures(List<GuestOsFeature> guestOsFeatures)
public Disk.Builder addGuestOsFeatures(GuestOsFeature guestOsFeatures)
public String getId()
public Disk.Builder setId(String id)
public String getKind()
public Disk.Builder setKind(String kind)
public String getLabelFingerprint()
To see the latest fingerprint, make a get() request to retrieve a disk.
public Disk.Builder setLabelFingerprint(String labelFingerprint)
To see the latest fingerprint, make a get() request to retrieve a disk.
public Map<String,String> getLabelsMap()
public Disk.Builder putAllLabels(Map<String,String> labels)
public String getLastAttachTimestamp()
public Disk.Builder setLastAttachTimestamp(String lastAttachTimestamp)
public String getLastDetachTimestamp()
public Disk.Builder setLastDetachTimestamp(String lastDetachTimestamp)
public List<String> getLicenseCodesList()
public Disk.Builder addAllLicenseCodes(List<String> licenseCodes)
public Disk.Builder addLicenseCodes(String licenseCodes)
public List<String> getLicensesList()
public Disk.Builder addAllLicenses(List<String> licenses)
public Disk.Builder addLicenses(String licenses)
public String getName()
public Disk.Builder setName(String name)
public String getOptions()
public Disk.Builder setOptions(String options)
public String getPhysicalBlockSizeBytes()
public Disk.Builder setPhysicalBlockSizeBytes(String physicalBlockSizeBytes)
public String getRegion()
public Disk.Builder setRegion(String region)
public List<String> getReplicaZonesList()
public Disk.Builder addAllReplicaZones(List<String> replicaZones)
public Disk.Builder addReplicaZones(String replicaZones)
public String getSelfLink()
public Disk.Builder setSelfLink(String selfLink)
public String getSizeGb()
If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot. Acceptable values are 1 to 65536, inclusive.
public Disk.Builder setSizeGb(String sizeGb)
If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot. Acceptable values are 1 to 65536, inclusive.
public String getSourceImage()
To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image: projects/debian-cloud/global/images/family/debian-9
Alternatively, use a specific version of a public operating system image: projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
To create a disk with a custom image that you created, specify the image name in the following format: global/images/my-custom-image
You can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name: global/images/family/my-image-family
public Disk.Builder setSourceImage(String sourceImage)
To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image: projects/debian-cloud/global/images/family/debian-9
Alternatively, use a specific version of a public operating system image: projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
To create a disk with a custom image that you created, specify the image name in the following format: global/images/my-custom-image
You can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name: global/images/family/my-image-family
public CustomerEncryptionKey getSourceImageEncryptionKey()
public Disk.Builder setSourceImageEncryptionKey(CustomerEncryptionKey sourceImageEncryptionKey)
public String getSourceImageId()
public Disk.Builder setSourceImageId(String sourceImageId)
public String getSourceSnapshot()
public Disk.Builder setSourceSnapshot(String sourceSnapshot)
public CustomerEncryptionKey getSourceSnapshotEncryptionKey()
public Disk.Builder setSourceSnapshotEncryptionKey(CustomerEncryptionKey sourceSnapshotEncryptionKey)
public String getSourceSnapshotId()
public Disk.Builder setSourceSnapshotId(String sourceSnapshotId)
public String getStatus()
public Disk.Builder setStatus(String status)
public String getType()
public Disk.Builder setType(String type)
public List<String> getUsersList()
public Disk.Builder addAllUsers(List<String> users)
public Disk.Builder addUsers(String users)
public String getZone()
public Disk.Builder setZone(String zone)
public Disk build()
public Disk.Builder clone()
Copyright © 2019 Google LLC. All rights reserved.