Disk Interface

public interface Disk

An immutable client-side representation of Disk.

Method Summary

Modifier and Type Method and Description
abstract void attach(AttachDiskProperties attachDiskProperties)

Attach and create the lease of the disk to the virtual machine.

abstract void attach(AttachDiskProperties attachDiskProperties, Context context)

Attach and create the lease of the disk to the virtual machine.

abstract OffsetDateTime createdDate()

Gets the createdDate property: The creation date of the disk.

abstract void detach(DetachDiskProperties detachDiskProperties)

Detach and break the lease of the disk attached to the virtual machine.

abstract void detach(DetachDiskProperties detachDiskProperties, Context context)

Detach and break the lease of the disk attached to the virtual machine.

abstract String diskBlobName()

Gets the diskBlobName property: When backed by a blob, the name of the VHD blob without extension.

abstract Integer diskSizeGiB()

Gets the diskSizeGiB property: The size of the disk in Gibibytes.

abstract StorageType diskType()

Gets the diskType property: The storage type for the disk (i.e.

abstract String diskUri()

Gets the diskUri property: When backed by a blob, the URI of underlying blob.

abstract String hostCaching()

Gets the hostCaching property: The host caching policy of the disk (i.e.

abstract String id()

Gets the id property: Fully qualified resource Id for the resource.

abstract DiskInner innerModel()

Gets the inner com.azure.resourcemanager.devtestlabs.fluent.models.DiskInner object.

abstract String leasedByLabVmId()

Gets the leasedByLabVmId property: The resource ID of the VM to which this disk is leased.

abstract String location()

Gets the location property: The geo-location where the resource lives.

abstract String managedDiskId()

Gets the managedDiskId property: When backed by managed disk, this is the ID of the compute disk resource.

abstract String name()

Gets the name property: The name of the resource.

abstract String provisioningState()

Gets the provisioningState property: The provisioning status of the resource.

abstract Disk refresh()

Refreshes the resource to sync with Azure.

abstract Disk refresh(Context context)

Refreshes the resource to sync with Azure.

abstract Region region()

Gets the region of the resource.

abstract String regionName()

Gets the name of the resource region.

abstract String resourceGroupName()

Gets the name of the resource group.

abstract String storageAccountId()

Gets the storageAccountId property: When backed by a blob, the storage account where the blob is.

abstract SystemData systemData()

Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.

abstract Map<String,String> tags()

Gets the tags property: Resource tags.

abstract String type()

Gets the type property: The type of the resource.

abstract String uniqueIdentifier()

Gets the uniqueIdentifier property: The unique immutable identifier of a resource (Guid).

abstract Update update()

Begins update for the Disk resource.

Method Details

attach

public abstract void attach(AttachDiskProperties attachDiskProperties)

Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete.

Parameters:

attachDiskProperties - Properties of the disk to attach.

attach

public abstract void attach(AttachDiskProperties attachDiskProperties, Context context)

Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete.

Parameters:

attachDiskProperties - Properties of the disk to attach.
context - The context to associate with this operation.

createdDate

public abstract OffsetDateTime createdDate()

Gets the createdDate property: The creation date of the disk.

Returns:

the createdDate value.

detach

public abstract void detach(DetachDiskProperties detachDiskProperties)

Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete.

Parameters:

detachDiskProperties - Properties of the disk to detach.

detach

public abstract void detach(DetachDiskProperties detachDiskProperties, Context context)

Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete.

Parameters:

detachDiskProperties - Properties of the disk to detach.
context - The context to associate with this operation.

diskBlobName

public abstract String diskBlobName()

Gets the diskBlobName property: When backed by a blob, the name of the VHD blob without extension.

Returns:

the diskBlobName value.

diskSizeGiB

public abstract Integer diskSizeGiB()

Gets the diskSizeGiB property: The size of the disk in Gibibytes.

Returns:

the diskSizeGiB value.

diskType

public abstract StorageType diskType()

Gets the diskType property: The storage type for the disk (i.e. Standard, Premium).

Returns:

the diskType value.

diskUri

public abstract String diskUri()

Gets the diskUri property: When backed by a blob, the URI of underlying blob.

Returns:

the diskUri value.

hostCaching

public abstract String hostCaching()

Gets the hostCaching property: The host caching policy of the disk (i.e. None, ReadOnly, ReadWrite).

Returns:

the hostCaching value.

id

public abstract String id()

Gets the id property: Fully qualified resource Id for the resource.

Returns:

the id value.

innerModel

public abstract DiskInner innerModel()

Gets the inner com.azure.resourcemanager.devtestlabs.fluent.models.DiskInner object.

Returns:

the inner object.

leasedByLabVmId

public abstract String leasedByLabVmId()

Gets the leasedByLabVmId property: The resource ID of the VM to which this disk is leased.

Returns:

the leasedByLabVmId value.

location

public abstract String location()

Gets the location property: The geo-location where the resource lives.

Returns:

the location value.

managedDiskId

public abstract String managedDiskId()

Gets the managedDiskId property: When backed by managed disk, this is the ID of the compute disk resource.

Returns:

the managedDiskId value.

name

public abstract String name()

Gets the name property: The name of the resource.

Returns:

the name value.

provisioningState

public abstract String provisioningState()

Gets the provisioningState property: The provisioning status of the resource.

Returns:

the provisioningState value.

refresh

public abstract Disk refresh()

Refreshes the resource to sync with Azure.

Returns:

the refreshed resource.

refresh

public abstract Disk refresh(Context context)

Refreshes the resource to sync with Azure.

Parameters:

context - The context to associate with this operation.

Returns:

the refreshed resource.

region

public abstract Region region()

Gets the region of the resource.

Returns:

the region of the resource.

regionName

public abstract String regionName()

Gets the name of the resource region.

Returns:

the name of the resource region.

resourceGroupName

public abstract String resourceGroupName()

Gets the name of the resource group.

Returns:

the name of the resource group.

storageAccountId

public abstract String storageAccountId()

Gets the storageAccountId property: When backed by a blob, the storage account where the blob is.

Returns:

the storageAccountId value.

systemData

public abstract SystemData systemData()

Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.

Returns:

the systemData value.

tags

public abstract Map<String,String> tags()

Gets the tags property: Resource tags.

Returns:

the tags value.

type

public abstract String type()

Gets the type property: The type of the resource.

Returns:

the type value.

uniqueIdentifier

public abstract String uniqueIdentifier()

Gets the uniqueIdentifier property: The unique immutable identifier of a resource (Guid).

Returns:

the uniqueIdentifier value.

update

public abstract Disk.Update update()

Begins update for the Disk resource.

Returns:

the stage of resource update.

Applies to