Dela via


SnapshotResource.GrantAccess 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 Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Compute.Models.AccessUri> GrantAccess (Azure.WaitUntil waitUntil, Azure.ResourceManager.Compute.Models.GrantAccessData data, System.Threading.CancellationToken cancellationToken = default);
abstract member GrantAccess : Azure.WaitUntil * Azure.ResourceManager.Compute.Models.GrantAccessData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Compute.Models.AccessUri>
override this.GrantAccess : Azure.WaitUntil * Azure.ResourceManager.Compute.Models.GrantAccessData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Compute.Models.AccessUri>
Public Overridable Function GrantAccess (waitUntil As WaitUntil, data As GrantAccessData, Optional cancellationToken As CancellationToken = Nothing) As 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