public class AttachedDisk extends Object implements Serializable
AttachedDisk.CreateDiskConfiguration
. To attach an existing persistent disk use
AttachedDisk.PersistentDiskConfiguration
. To attach a scratch disk use AttachedDisk.ScratchDiskConfiguration
.Modifier and Type | Class and Description |
---|---|
static class |
AttachedDisk.AttachedDiskConfiguration
Base class for
AttachedDisk configuration. |
static class |
AttachedDisk.Builder
A builder for
AttachedDisk objects. |
static class |
AttachedDisk.CreateDiskConfiguration
An attached disk configuration for bootable persistent disks that must be created with the
instance they are attached to.
|
static class |
AttachedDisk.PersistentDiskConfiguration
An attached disk configuration for existing persistent disks.
|
static class |
AttachedDisk.ScratchDiskConfiguration
An attached disk configuration for scratch disks.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
<T extends AttachedDisk.AttachedDiskConfiguration> |
getConfiguration()
Returns the attached disk configuration.
|
String |
getDeviceName()
Returns the unique device name of your choice that is reflected into the
/dev/disk/by-id/google-* tree of a Linux operating system running within the instance. |
Integer |
getIndex()
Returns a zero-based index to this disk, where 0 is reserved for the boot disk.
|
List<LicenseId> |
getLicenses()
Returns a list of publicly accessible licenses for the attached disk.
|
int |
hashCode() |
static AttachedDisk.Builder |
newBuilder(AttachedDisk.AttachedDiskConfiguration configuration)
Returns a builder for an
AttachedDisk object given its configuration. |
static AttachedDisk |
of(AttachedDisk.AttachedDiskConfiguration configuration)
Returns an
AttachedDisk object given its configuration. |
static AttachedDisk |
of(String deviceName,
AttachedDisk.AttachedDiskConfiguration configuration)
Returns an
AttachedDisk object given the device name and its configuration. |
AttachedDisk.Builder |
toBuilder()
Returns a builder for the current attached disk.
|
String |
toString() |
public String getDeviceName()
/dev/disk/by-id/google-*
tree of a Linux operating system running within the instance. This
name can be used to reference the device for mounting, resizing, and so on, from within the
instance. If not specified, the service chooses a default device name to apply to this disk, in
the form persistent-disks-x
, where x is a number assigned by Google Compute Engine.public Integer getIndex()
public <T extends AttachedDisk.AttachedDiskConfiguration> T getConfiguration()
AttachedDisk.ScratchDiskConfiguration
to attach a
scratch disk to the instance. Returns AttachedDisk.PersistentDiskConfiguration
to attach a
persistent disk to the instance. Returns AttachedDisk.CreateDiskConfiguration
to create and attach a
new persistent disk.public List<LicenseId> getLicenses()
public AttachedDisk.Builder toBuilder()
public static AttachedDisk.Builder newBuilder(AttachedDisk.AttachedDiskConfiguration configuration)
AttachedDisk
object given its configuration.public static AttachedDisk of(AttachedDisk.AttachedDiskConfiguration configuration)
AttachedDisk
object given its configuration.public static AttachedDisk of(String deviceName, AttachedDisk.AttachedDiskConfiguration configuration)
AttachedDisk
object given the device name and its configuration.Copyright © 2019 Google LLC. All rights reserved.