ArmComputeModelFactory.ImageReference Method

Definition

Initializes a new instance of ImageReference.

public static Azure.ResourceManager.Compute.Models.ImageReference ImageReference (Azure.Core.ResourceIdentifier id = default, string publisher = default, string offer = default, string sku = default, string version = default, string exactVersion = default, string sharedGalleryImageUniqueId = default, string communityGalleryImageId = default);
static member ImageReference : Azure.Core.ResourceIdentifier * string * string * string * string * string * string * string -> Azure.ResourceManager.Compute.Models.ImageReference
Public Shared Function ImageReference (Optional id As ResourceIdentifier = Nothing, Optional publisher As String = Nothing, Optional offer As String = Nothing, Optional sku As String = Nothing, Optional version As String = Nothing, Optional exactVersion As String = Nothing, Optional sharedGalleryImageUniqueId As String = Nothing, Optional communityGalleryImageId As String = Nothing) As ImageReference

Parameters

id
ResourceIdentifier

Resource Id.

publisher
String

The image publisher.

offer
String

Specifies the offer of the platform image or marketplace image used to create the virtual machine.

sku
String

The image SKU.

version
String

Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. Please do not use field 'version' for gallery image deployment, gallery image should always use 'id' field for deployment, to use 'latest' version of gallery image, just set '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' in the 'id' field without version input.

exactVersion
String

Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual machine. This readonly field differs from 'version', only if the value specified in 'version' field is 'latest'.

sharedGalleryImageUniqueId
String

Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call.

communityGalleryImageId
String

Specified the community gallery image unique id for vm deployment. This can be fetched from community gallery image GET call.

Returns

A new ImageReference instance for mocking.

Applies to