Condividi tramite


ComputeExtensions.GetSnapshots Method

Definition

Overloads

GetSnapshots(SubscriptionResource, CancellationToken)

Lists snapshots under a subscription.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Compute/snapshots
  • Operation Id: Snapshots_List
  • Default Api Version: 2024-03-02
  • Resource: SnapshotResource
GetSnapshots(ResourceGroupResource)

Gets a collection of SnapshotResources in the ResourceGroupResource. MockingTo mock this method, please mock GetSnapshots() instead.

GetSnapshots(SubscriptionResource, CancellationToken)

Source:
ComputeExtensions.cs
Source:
ComputeExtensions.cs

Lists snapshots under a subscription.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Compute/snapshots
  • Operation Id: Snapshots_List
  • Default Api Version: 2024-03-02
  • Resource: SnapshotResource
public static Azure.Pageable<Azure.ResourceManager.Compute.SnapshotResource> GetSnapshots (this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default);
static member GetSnapshots : Azure.ResourceManager.Resources.SubscriptionResource * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Compute.SnapshotResource>
<Extension()>
Public Function GetSnapshots (subscriptionResource As SubscriptionResource, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of SnapshotResource)

Parameters

subscriptionResource
SubscriptionResource

The SubscriptionResource instance the method will execute against.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

A collection of SnapshotResource that may take multiple service requests to iterate over.

Exceptions

subscriptionResource is null.

Applies to

GetSnapshots(ResourceGroupResource)

Source:
ComputeExtensions.cs
Source:
ComputeExtensions.cs

Gets a collection of SnapshotResources in the ResourceGroupResource. MockingTo mock this method, please mock GetSnapshots() instead.

public static Azure.ResourceManager.Compute.SnapshotCollection GetSnapshots (this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource);
static member GetSnapshots : Azure.ResourceManager.Resources.ResourceGroupResource -> Azure.ResourceManager.Compute.SnapshotCollection
<Extension()>
Public Function GetSnapshots (resourceGroupResource As ResourceGroupResource) As SnapshotCollection

Parameters

resourceGroupResource
ResourceGroupResource

The ResourceGroupResource instance the method will execute against.

Returns

An object representing collection of SnapshotResources and their operations over a SnapshotResource.

Exceptions

resourceGroupResource is null.

Applies to