共用方式為


SnapshotResource.GrantAccessAsync Method

Definition

Grants access to a snapshot.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess
  • Operation Id: Snapshots_GrantAccess
  • Default Api Version: 2024-03-02
  • Resource: SnapshotResource
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 snapshot access operation.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

data is null.

Applies to