Share via


ComputeExtensions.GetSharedGalleryImageAsync Method

Definition

Get a shared gallery image by subscription id or tenant id.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}
  • Operation Id: SharedGalleryImages_Get
  • Default Api Version: 2024-03-03
<item>MockingTo mock this method, please mock GetSharedGalleryImage(AzureLocation, String, String, CancellationToken) instead.</item>
public static System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Compute.SharedGalleryImageData>> GetSharedGalleryImageAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string galleryUniqueName, string galleryImageName, System.Threading.CancellationToken cancellationToken = default);
static member GetSharedGalleryImageAsync : Azure.ResourceManager.Resources.SubscriptionResource * Azure.Core.AzureLocation * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Compute.SharedGalleryImageData>>
<Extension()>
Public Function GetSharedGalleryImageAsync (subscriptionResource As SubscriptionResource, location As AzureLocation, galleryUniqueName As String, galleryImageName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of SharedGalleryImageData))

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.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

subscriptionResource, galleryUniqueName or galleryImageName is null.

Applies to