Share via


ComputeExtensions.GetSharedGalleryImageVersionsAsync Method

Definition

List shared gallery image versions by subscription id or tenant id.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}/versions
  • Operation Id: SharedGalleryImageVersions_List
  • Default Api Version: 2024-03-03
<item>MockingTo mock this method, please mock GetSharedGalleryImageVersions(AzureLocation, String, String, Nullable<SharedToValue>, CancellationToken) instead.</item>
public static Azure.AsyncPageable<Azure.ResourceManager.Compute.SharedGalleryImageVersionData> GetSharedGalleryImageVersionsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string galleryUniqueName, string galleryImageName, Azure.ResourceManager.Compute.Models.SharedToValue? sharedTo = default, System.Threading.CancellationToken cancellationToken = default);
static member GetSharedGalleryImageVersionsAsync : Azure.ResourceManager.Resources.SubscriptionResource * Azure.Core.AzureLocation * string * string * Nullable<Azure.ResourceManager.Compute.Models.SharedToValue> * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.Compute.SharedGalleryImageVersionData>
<Extension()>
Public Function GetSharedGalleryImageVersionsAsync (subscriptionResource As SubscriptionResource, location As AzureLocation, galleryUniqueName As String, galleryImageName As String, Optional sharedTo As Nullable(Of SharedToValue) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of SharedGalleryImageVersionData)

Parameters

subscriptionResource
SubscriptionResource

The SubscriptionResource instance the method will execute against.

location
AzureLocation

The name of Azure region.

galleryUniqueName
String

The unique name of the Shared Gallery.

galleryImageName
String

The name of the Shared Gallery Image Definition from which the Image Versions are to be listed.

sharedTo
Nullable<SharedToValue>

The query parameter to decide what shared galleries to fetch when doing listing operations.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

An async collection of SharedGalleryImageVersionData that may take multiple service requests to iterate over.

Exceptions

galleryUniqueName or galleryImageName is an empty string, and was expected to be non-empty.

subscriptionResource, galleryUniqueName or galleryImageName is null.

Applies to