Package com.azure.compute.batch.models
Class ImageReference
java.lang.Object
com.azure.compute.batch.models.ImageReference
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ImageReference>
public final class ImageReference
extends Object
implements com.azure.json.JsonSerializable<ImageReference>
A reference to an Azure Virtual Machines Marketplace Image or a Azure Compute Gallery Image.
To get the list of all Azure Marketplace Image references verified by Azure Batch, see the
' List Supported Images ' operation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ImageReference
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of ImageReference from the JsonReader.Get the communityGalleryImageId property: The community gallery image unique identifier.Get the exactVersion property: The specific version of the platform image or marketplace image used to create the node.getOffer()
Get the offer property: The offer type of the Azure Virtual Machines Marketplace Image.Get the publisher property: The publisher of the Azure Virtual Machines Marketplace Image.Get the sharedGalleryImageId property: The shared gallery image unique identifier.getSku()
Get the sku property: The SKU of the Azure Virtual Machines Marketplace Image.Get the version property: The version of the Azure Virtual Machines Marketplace Image.Get the virtualMachineImageId property: The ARM resource identifier of the Azure Compute Gallery Image.setCommunityGalleryImageId
(String communityGalleryImageId) Set the communityGalleryImageId property: The community gallery image unique identifier.Set the offer property: The offer type of the Azure Virtual Machines Marketplace Image.setPublisher
(String publisher) Set the publisher property: The publisher of the Azure Virtual Machines Marketplace Image.setSharedGalleryImageId
(String sharedGalleryImageId) Set the sharedGalleryImageId property: The shared gallery image unique identifier.Set the sku property: The SKU of the Azure Virtual Machines Marketplace Image.setVersion
(String version) Set the version property: The version of the Azure Virtual Machines Marketplace Image.setVirtualMachineImageId
(String virtualMachineImageId) Set the virtualMachineImageId property: The ARM resource identifier of the Azure Compute Gallery Image.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ImageReference
public ImageReference()Creates an instance of ImageReference class.
-
-
Method Details
-
getPublisher
Get the publisher property: The publisher of the Azure Virtual Machines Marketplace Image. For example, Canonical or MicrosoftWindowsServer.- Returns:
- the publisher value.
-
setPublisher
Set the publisher property: The publisher of the Azure Virtual Machines Marketplace Image. For example, Canonical or MicrosoftWindowsServer.- Parameters:
publisher
- the publisher value to set.- Returns:
- the ImageReference object itself.
-
getOffer
Get the offer property: The offer type of the Azure Virtual Machines Marketplace Image. For example, UbuntuServer or WindowsServer.- Returns:
- the offer value.
-
setOffer
Set the offer property: The offer type of the Azure Virtual Machines Marketplace Image. For example, UbuntuServer or WindowsServer.- Parameters:
offer
- the offer value to set.- Returns:
- the ImageReference object itself.
-
getSku
Get the sku property: The SKU of the Azure Virtual Machines Marketplace Image. For example, 18.04-LTS or 2019-Datacenter.- Returns:
- the sku value.
-
setSku
Set the sku property: The SKU of the Azure Virtual Machines Marketplace Image. For example, 18.04-LTS or 2019-Datacenter.- Parameters:
sku
- the sku value to set.- Returns:
- the ImageReference object itself.
-
getVersion
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:
- the version value.
-
setVersion
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:
version
- the version value to set.- Returns:
- the ImageReference object itself.
-
getVirtualMachineImageId
Get the virtualMachineImageId property: 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://learn.microsoft.com/azure/batch/nodes-and-pools#virtual-network-vnet-and-firewall-configuration.- Returns:
- the virtualMachineImageId value.
-
setVirtualMachineImageId
Set the virtualMachineImageId property: 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://learn.microsoft.com/azure/batch/nodes-and-pools#virtual-network-vnet-and-firewall-configuration.- Parameters:
virtualMachineImageId
- the virtualMachineImageId value to set.- Returns:
- the ImageReference object itself.
-
getExactVersion
Get the exactVersion property: 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:
- the exactVersion value.
-
getCommunityGalleryImageId
Get the communityGalleryImageId property: The community gallery image unique identifier. This property is mutually exclusive with other properties and can be fetched from community gallery image GET call.- Returns:
- the communityGalleryImageId value.
-
setCommunityGalleryImageId
Set the communityGalleryImageId property: The community gallery image unique identifier. This property is mutually exclusive with other properties and can be fetched from community gallery image GET call.- Parameters:
communityGalleryImageId
- the communityGalleryImageId value to set.- Returns:
- the ImageReference object itself.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<ImageReference>
- Throws:
IOException
-
fromJson
Reads an instance of ImageReference from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of ImageReference if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException
- If an error occurs while reading the ImageReference.
-