public interface Disk
An immutable client-side representation of Disk.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    The entirety of the Disk definition.
    static interface 
    The Disk definition stages.
    static interface 
    The template for Disk update.
    static interface 
    The Disk update stages.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    attach(AttachDiskProperties attachDiskProperties)
    Attach and create the lease of the disk to the virtual machine.
    void
    attach(AttachDiskProperties attachDiskProperties, com.azure.core.util.Context context)
    Attach and create the lease of the disk to the virtual machine.
    Gets the createdDate property: The creation date of the disk.
    void
    detach(DetachDiskProperties detachDiskProperties)
    Detach and break the lease of the disk attached to the virtual machine.
    void
    detach(DetachDiskProperties detachDiskProperties, com.azure.core.util.Context context)
    Detach and break the lease of the disk attached to the virtual machine.
    Gets the diskBlobName property: When backed by a blob, the name of the VHD blob without extension.
    Gets the diskSizeGiB property: The size of the disk in Gibibytes.
    Gets the diskType property: The storage type for the disk (i.e.
    Gets the diskUri property: When backed by a blob, the URI of underlying blob.
    Gets the hostCaching property: The host caching policy of the disk (i.e.
    id()
    Gets the id property: Fully qualified resource Id for the resource.
    Gets the inner com.azure.resourcemanager.devtestlabs.fluent.models.DiskInner object.
    Gets the leasedByLabVmId property: The resource ID of the VM to which this disk is leased.
    Gets the location property: The geo-location where the resource lives.
    Gets the managedDiskId property: When backed by managed disk, this is the ID of the compute disk resource.
    Gets the name property: The name of the resource.
    Gets the provisioningState property: The provisioning status of the resource.
    Refreshes the resource to sync with Azure.
    refresh(com.azure.core.util.Context context)
    Refreshes the resource to sync with Azure.
    com.azure.core.management.Region
    Gets the region of the resource.
    Gets the name of the resource region.
    Gets the name of the resource group.
    Gets the storageAccountId property: When backed by a blob, the storage account where the blob is.
    Gets the tags property: Resource tags.
    Gets the type property: The type of the resource.
    Gets the uniqueIdentifier property: The unique immutable identifier of a resource (Guid).
    Begins update for the Disk resource.
  • Method Details

    • id

      String id()
      Gets the id property: Fully qualified resource Id for the resource.
      Returns:
      the id value.
    • name

      String name()
      Gets the name property: The name of the resource.
      Returns:
      the name value.
    • type

      String type()
      Gets the type property: The type of the resource.
      Returns:
      the type value.
    • location

      String location()
      Gets the location property: The geo-location where the resource lives.
      Returns:
      the location value.
    • tags

      Map<String,String> tags()
      Gets the tags property: Resource tags.
      Returns:
      the tags value.
    • diskType

      StorageType diskType()
      Gets the diskType property: The storage type for the disk (i.e. Standard, Premium).
      Returns:
      the diskType value.
    • diskSizeGiB

      Integer diskSizeGiB()
      Gets the diskSizeGiB property: The size of the disk in Gibibytes.
      Returns:
      the diskSizeGiB value.
    • leasedByLabVmId

      String leasedByLabVmId()
      Gets the leasedByLabVmId property: The resource ID of the VM to which this disk is leased.
      Returns:
      the leasedByLabVmId value.
    • diskBlobName

      String diskBlobName()
      Gets the diskBlobName property: When backed by a blob, the name of the VHD blob without extension.
      Returns:
      the diskBlobName value.
    • diskUri

      String diskUri()
      Gets the diskUri property: When backed by a blob, the URI of underlying blob.
      Returns:
      the diskUri value.
    • storageAccountId

      String storageAccountId()
      Gets the storageAccountId property: When backed by a blob, the storage account where the blob is.
      Returns:
      the storageAccountId value.
    • createdDate

      OffsetDateTime createdDate()
      Gets the createdDate property: The creation date of the disk.
      Returns:
      the createdDate value.
    • hostCaching

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

      String managedDiskId()
      Gets the managedDiskId property: When backed by managed disk, this is the ID of the compute disk resource.
      Returns:
      the managedDiskId value.
    • provisioningState

      String provisioningState()
      Gets the provisioningState property: The provisioning status of the resource.
      Returns:
      the provisioningState value.
    • uniqueIdentifier

      String uniqueIdentifier()
      Gets the uniqueIdentifier property: The unique immutable identifier of a resource (Guid).
      Returns:
      the uniqueIdentifier value.
    • region

      com.azure.core.management.Region region()
      Gets the region of the resource.
      Returns:
      the region of the resource.
    • regionName

      String regionName()
      Gets the name of the resource region.
      Returns:
      the name of the resource region.
    • resourceGroupName

      String resourceGroupName()
      Gets the name of the resource group.
      Returns:
      the name of the resource group.
    • innerModel

      DiskInner innerModel()
      Gets the inner com.azure.resourcemanager.devtestlabs.fluent.models.DiskInner object.
      Returns:
      the inner object.
    • update

      Disk.Update update()
      Begins update for the Disk resource.
      Returns:
      the stage of resource update.
    • refresh

      Disk refresh()
      Refreshes the resource to sync with Azure.
      Returns:
      the refreshed resource.
    • refresh

      Disk refresh(com.azure.core.util.Context context)
      Refreshes the resource to sync with Azure.
      Parameters:
      context - The context to associate with this operation.
      Returns:
      the refreshed resource.
    • attach

      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.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • attach

      void attach(AttachDiskProperties attachDiskProperties, com.azure.core.util.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.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • detach

      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.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • detach

      void detach(DetachDiskProperties detachDiskProperties, com.azure.core.util.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.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.