ManagedDiskResource.GrantAccessAsync Method

Definition

Grants access to a disk.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess
  • Operation Id: Disks_GrantAccess
  • Default Api Version: 2024-03-02
  • Resource: ManagedDiskResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Compute.Models.AccessUri>> GrantAccessAsync (Azure.WaitUntil waitUntil, Azure.ResourceManager.Compute.Models.GrantAccessData data, System.Threading.CancellationToken cancellationToken = default);
abstract member GrantAccessAsync : Azure.WaitUntil * Azure.ResourceManager.Compute.Models.GrantAccessData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Compute.Models.AccessUri>>
override this.GrantAccessAsync : Azure.WaitUntil * Azure.ResourceManager.Compute.Models.GrantAccessData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Compute.Models.AccessUri>>
Public Overridable Function GrantAccessAsync (waitUntil As WaitUntil, data As GrantAccessData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of AccessUri))

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

data
GrantAccessData

Access data object supplied in the body of the get disk access operation.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

data is null.

Applies to