ImageReference Class
- java.
lang. Object - com.
azure. resourcemanager. batch. models. ImageReference
- com.
public final class ImageReference
A reference to an Azure Virtual Machines Marketplace image or the Azure Image resource of a custom Virtual Machine. To get the list of all imageReferences verified by Azure Batch, see the 'List supported node agent SKUs' operation.
Constructor Summary
Constructor | Description | |
---|---|---|
ImageReference() |
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
id()
Get the id property: The ARM resource identifier of the Shared Image Gallery Image. |
String |
offer()
Get the offer property: The offer type of the Azure Virtual Machines Marketplace image. |
String |
publisher()
Get the publisher property: The publisher of the Azure Virtual Machines Marketplace image. |
String |
sku()
Get the sku property: The SKU of the Azure Virtual Machines Marketplace image. |
void |
validate()
Validates the instance. |
String |
version()
Get the version property: The version of the Azure Virtual Machines Marketplace image. |
Image |
withId(String id)
Set the id property: The ARM resource identifier of the Shared Image Gallery Image. |
Image |
withOffer(String offer)
Set the offer property: The offer type of the Azure Virtual Machines Marketplace image. |
Image |
withPublisher(String publisher)
Set the publisher property: The publisher of the Azure Virtual Machines Marketplace image. |
Image |
withSku(String sku)
Set the sku property: The SKU of the Azure Virtual Machines Marketplace image. |
Image |
withVersion(String version)
Set the version property: The version of the Azure Virtual Machines Marketplace image. |
Methods inherited from java.lang.Object
Constructor Details
ImageReference
public ImageReference()
Method Details
id
public String id()
Get the id property: The ARM resource identifier of the Shared Image 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}. This property is mutually exclusive with other properties. The Shared Image Gallery image must have replicas in the same region as the Azure Batch account. For information about the firewall settings for the Batch 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.
Returns:
offer
public String offer()
Get the offer property: The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer.
Returns:
publisher
public String publisher()
Get the publisher property: The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer.
Returns:
sku
public String sku()
Get the sku property: The SKU of the Azure Virtual Machines Marketplace image. For example, 18.04-LTS or 2022-datacenter.
Returns:
validate
public void validate()
Validates the instance.
version
public String version()
Get the version property: 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'.
Returns:
withId
public ImageReference withId(String id)
Set the id property: The ARM resource identifier of the Shared Image 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}. This property is mutually exclusive with other properties. The Shared Image Gallery image must have replicas in the same region as the Azure Batch account. For information about the firewall settings for the Batch 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.
Parameters:
Returns:
withOffer
public ImageReference withOffer(String offer)
Set the offer property: The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer.
Parameters:
Returns:
withPublisher
public ImageReference withPublisher(String publisher)
Set the publisher property: The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer.
Parameters:
Returns:
withSku
public ImageReference withSku(String sku)
Set the sku property: The SKU of the Azure Virtual Machines Marketplace image. For example, 18.04-LTS or 2022-datacenter.
Parameters:
Returns:
withVersion
public ImageReference withVersion(String version)
Set the version property: 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'.
Parameters:
Returns:
Applies to
Azure SDK for Java