Freigeben über


ComputeExtensions.GetCommunityGalleryImageAsync Method

Definition

Get a community gallery image.

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

Parameters

subscriptionResource
SubscriptionResource

The SubscriptionResource instance the method will execute against.

location
AzureLocation

The name of Azure region.

publicGalleryName
String

The public name of the community gallery.

galleryImageName
String

The name of the community gallery image definition.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

subscriptionResource, publicGalleryName or galleryImageName is null.

Applies to