DiskCreateOption Class

public final class DiskCreateOption
extends ExpandableStringEnum<DiskCreateOption>

This enumerates the possible sources of a disk's creation.

Field Summary

Modifier and Type Field and Description
static final DiskCreateOption ATTACH

Disk will be attached to a VM.

static final DiskCreateOption COPY

Create a new disk or snapshot by copying from a disk or snapshot specified by the given sourceResourceId.

static final DiskCreateOption COPY_FROM_SAN_SNAPSHOT

Create a new disk by exporting from elastic san volume snapshot.

static final DiskCreateOption COPY_START

Create a new disk by using a deep copy process, where the resource creation is considered complete only after all data has been copied from the source.

static final DiskCreateOption EMPTY

Create an empty data disk of a size given by diskSizeGB.

static final DiskCreateOption FROM_IMAGE

Create a new disk from a platform image specified by the given imageReference or galleryImageReference.

static final DiskCreateOption IMPORT

Create a disk by importing from a blob specified by a sourceUri in a storage account specified by storageAccountId.

static final DiskCreateOption IMPORT_SECURE

Similar to Import create option.

static final DiskCreateOption RESTORE

Create a new disk by copying from a backup recovery point.

static final DiskCreateOption UPLOAD

Create a new disk by obtaining a write token and using it to directly upload the contents of the disk.

static final DiskCreateOption UPLOAD_PREPARED_SECURE

Similar to Upload create option.

Constructor Summary

Constructor Description
DiskCreateOption()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of DiskCreateOption value.

Method Summary

Modifier and Type Method and Description
static DiskCreateOption fromString(String name)

Creates or finds a DiskCreateOption from its string representation.

static Collection<DiskCreateOption> values()

Gets known DiskCreateOption values.

Methods inherited from ExpandableStringEnum

Methods inherited from java.lang.Object

Field Details

ATTACH

public static final DiskCreateOption ATTACH

Disk will be attached to a VM.

COPY

public static final DiskCreateOption COPY

Create a new disk or snapshot by copying from a disk or snapshot specified by the given sourceResourceId.

COPY_FROM_SAN_SNAPSHOT

public static final DiskCreateOption COPY_FROM_SAN_SNAPSHOT

Create a new disk by exporting from elastic san volume snapshot.

COPY_START

public static final DiskCreateOption COPY_START

Create a new disk by using a deep copy process, where the resource creation is considered complete only after all data has been copied from the source.

EMPTY

public static final DiskCreateOption EMPTY

Create an empty data disk of a size given by diskSizeGB.

FROM_IMAGE

public static final DiskCreateOption FROM_IMAGE

Create a new disk from a platform image specified by the given imageReference or galleryImageReference.

IMPORT

public static final DiskCreateOption IMPORT

Create a disk by importing from a blob specified by a sourceUri in a storage account specified by storageAccountId.

IMPORT_SECURE

public static final DiskCreateOption IMPORT_SECURE

Similar to Import create option. Create a new Trusted Launch VM or Confidential VM supported disk by importing additional blobs for VM guest state specified by securityDataUri and VM metadata specified by securityMetadataUri in storage account specified by storageAccountId. The VM metadata is optional and only required for certain Confidential VM configurations and not required for Trusted Launch VM.

RESTORE

public static final DiskCreateOption RESTORE

Create a new disk by copying from a backup recovery point.

UPLOAD

public static final DiskCreateOption UPLOAD

Create a new disk by obtaining a write token and using it to directly upload the contents of the disk.

UPLOAD_PREPARED_SECURE

public static final DiskCreateOption UPLOAD_PREPARED_SECURE

Similar to Upload create option. Create a new Trusted Launch VM or Confidential VM supported disk and upload using write token in disk, VM guest state and VM metadata. The VM metadata is optional and only required for certain Confidential VM configurations and not required for Trusted Launch VM.

Constructor Details

DiskCreateOption

@Deprecated
public DiskCreateOption()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of DiskCreateOption value.

Method Details

fromString

public static DiskCreateOption fromString(String name)

Creates or finds a DiskCreateOption from its string representation.

Parameters:

name - a name to look for.

Returns:

the corresponding DiskCreateOption.

values

public static Collection<DiskCreateOption> values()

Gets known DiskCreateOption values.

Returns:

known DiskCreateOption values.

Applies to