Partilhar via


ComputeBatchModelFactory.ImageReference Method

Definition

Initializes a new instance of ImageReference.

public static Azure.Compute.Batch.ImageReference ImageReference (string publisher = default, string offer = default, string sku = default, string version = default, string virtualMachineImageId = default, string exactVersion = default);
static member ImageReference : string * string * string * string * string * string -> Azure.Compute.Batch.ImageReference
Public Shared Function ImageReference (Optional publisher As String = Nothing, Optional offer As String = Nothing, Optional sku As String = Nothing, Optional version As String = Nothing, Optional virtualMachineImageId As String = Nothing, Optional exactVersion As String = Nothing) As ImageReference

Parameters

publisher
String

The publisher of the Azure Virtual Machines Marketplace Image. For example, Canonical or MicrosoftWindowsServer.

offer
String

The offer type of the Azure Virtual Machines Marketplace Image. For example, UbuntuServer or WindowsServer.

sku
String

The SKU of the Azure Virtual Machines Marketplace Image. For example, 18.04-LTS or 2019-Datacenter.

version
String

The version of the Azure Virtual Machines Marketplace Image. A value of 'latest' can be specified to select the latest version of an Image. If omitted, the default is 'latest'.

virtualMachineImageId
String

The ARM resource identifier of the Azure Compute Gallery Image. Compute Nodes in the Pool will be created using this Image Id. This is of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{VersionId} or /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName} for always defaulting to the latest image version. This property is mutually exclusive with other ImageReference properties. The Azure Compute Gallery Image must have replicas in the same region and must be in the same subscription as the Azure Batch account. If the image version is not specified in the imageId, the latest version will be used. For information about the firewall settings for the Batch Compute Node agent to communicate with the Batch service see https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration.

exactVersion
String

The specific version of the platform image or marketplace image used to create the node. This read-only field differs from 'version' only if the value specified for 'version' when the pool was created was 'latest'.

Returns

A new ImageReference instance for mocking.

Applies to