Interface Disk
- All Superinterfaces:
GroupableResource<com.microsoft.azure.management.compute.implementation.ComputeManager,
,com.microsoft.azure.management.compute.implementation.DiskInner> HasId
,HasInner<com.microsoft.azure.management.compute.implementation.DiskInner>
,HasManager<com.microsoft.azure.management.compute.implementation.ComputeManager>
,HasName
,HasResourceGroup
,Indexable
,Refreshable<Disk>
,Resource
,Updatable<Disk.Update>
public interface Disk
extends GroupableResource<com.microsoft.azure.management.compute.implementation.ComputeManager,com.microsoft.azure.management.compute.implementation.DiskInner>, Refreshable<Disk>, Updatable<Disk.Update>
An immutable client-side representation of an Azure managed disk.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
The entirety of the managed disk definition.static interface
Grouping of managed disk definition stages.static interface
The template for an update operation, containing all the settings that can be modified.static interface
Grouping of managed disk update stages.Nested classes/interfaces inherited from interface com.microsoft.azure.management.resources.fluentcore.arm.models.Resource
Resource.DefinitionWithRegion<T>, Resource.DefinitionWithTags<T>, Resource.UpdateWithTags<T>
-
Method Summary
Modifier and TypeMethodDescriptiongrantAccess
(int accessDurationInSeconds) Grants access to the disk.rx.Observable<String>
grantAccessAsync
(int accessDurationInSeconds) Grants access to the disk asynchronously.com.microsoft.rest.ServiceFuture<String>
grantAccessAsync
(int accessDurationInSeconds, com.microsoft.rest.ServiceCallback<String> callback) Grants access to the disk asynchronously.boolean
osType()
void
Revokes access granted to the disk.rx.Completable
Revokes access granted to the disk asynchronously.com.microsoft.rest.ServiceFuture<Void>
revokeAccessAsync
(com.microsoft.rest.ServiceCallback<Void> callback) Revokes access granted to the disk asynchronously.long
int
sizeInGB()
sku()
source()
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.arm.models.HasId
id
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.model.HasInner
inner
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.arm.models.HasManager
manager
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.arm.models.HasName
name
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.arm.models.HasResourceGroup
resourceGroupName
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.model.Indexable
key
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.model.Refreshable
refresh, refreshAsync
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.arm.models.Resource
region, regionName, tags, type
-
Method Details
-
sku
DiskSkuTypes sku()- Returns:
- the disk SKU
-
creationMethod
DiskCreateOption creationMethod()- Returns:
- the disk creation method
-
isAttachedToVirtualMachine
boolean isAttachedToVirtualMachine()- Returns:
- true if the disk is attached to a virtual machine, otherwise false
-
virtualMachineId
String virtualMachineId()- Returns:
- the resource ID of the virtual machine this disk is attached to, or null if the disk is in a detached state
-
sizeInGB
int sizeInGB()- Returns:
- disk size in GB
-
sizeInByte
long sizeInByte()- Returns:
- disk size in byte
-
osType
OperatingSystemTypes osType()- Returns:
- the type of the operating system on the disk
-
source
CreationSource source()- Returns:
- the details of the source from which the disk is created
-
availabilityZones
Set<AvailabilityZoneId> availabilityZones()- Returns:
- the availability zones assigned to the disk
-
encryptionSettings
EncryptionSettingsCollection encryptionSettings()- Returns:
- the disk encryption settings
-
grantAccess
Grants access to the disk.- Parameters:
accessDurationInSeconds
- the access duration in seconds- Returns:
- the read-only SAS URI to the disk
-
grantAccessAsync
Grants access to the disk asynchronously.- Parameters:
accessDurationInSeconds
- the access duration in seconds- Returns:
- a representation of the deferred computation of this call returning a read-only SAS URI to the disk
-
grantAccessAsync
com.microsoft.rest.ServiceFuture<String> grantAccessAsync(int accessDurationInSeconds, com.microsoft.rest.ServiceCallback<String> callback) Grants access to the disk asynchronously.- Parameters:
accessDurationInSeconds
- the access duration in secondscallback
- the callback to call on success or failure, containing a read-only SAS URI to the disk, if successful- Returns:
- a handle to cancel the request
-
revokeAccess
void revokeAccess()Revokes access granted to the disk. -
revokeAccessAsync
rx.Completable revokeAccessAsync()Revokes access granted to the disk asynchronously.- Returns:
- a representation of the deferred computation of this call
-
revokeAccessAsync
com.microsoft.rest.ServiceFuture<Void> revokeAccessAsync(com.microsoft.rest.ServiceCallback<Void> callback) Revokes access granted to the disk asynchronously.- Parameters:
callback
- the callback to call on success or failure- Returns:
- a handle to cancel the request
-