ImageReference Class
- java.
lang. Object - com.
azure. resourcemanager. batch. models. ImageReference
- com.
Implements
public final class ImageReference
implements JsonSerializable<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() |
Creates an instance of Image |
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
communityGalleryImageId()
Get the community |
static
Image |
fromJson(JsonReader jsonReader)
Reads an instance of Image |
String |
id()
Get the id property: This property is mutually exclusive with other properties. |
String |
offer()
Get the offer property: For example, Ubuntu |
String |
publisher()
Get the publisher property: For example, Canonical or Microsoft |
String |
sharedGalleryImageId()
Get the shared |
String |
sku()
Get the sku property: For example, 18.04-LTS or 2022-datacenter. |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
String |
version()
Get the version property: A value of 'latest' can be specified to select the latest version of an image. |
Image |
withCommunityGalleryImageId(String communityGalleryImageId)
Set the community |
Image |
withId(String id)
Set the id property: This property is mutually exclusive with other properties. |
Image |
withOffer(String offer)
Set the offer property: For example, Ubuntu |
Image |
withPublisher(String publisher)
Set the publisher property: For example, Canonical or Microsoft |
Image |
withSharedGalleryImageId(String sharedGalleryImageId)
Set the shared |
Image |
withSku(String sku)
Set the sku property: For example, 18.04-LTS or 2022-datacenter. |
Image |
withVersion(String version)
Set the version property: A value of 'latest' can be specified to select the latest version of an image. |
Methods inherited from java.lang.Object
Constructor Details
ImageReference
public ImageReference()
Creates an instance of ImageReference class.
Method Details
communityGalleryImageId
public String communityGalleryImageId()
Get the communityGalleryImageId property: This property is mutually exclusive with other properties and can be fetched from community gallery image GET call.
Returns:
fromJson
public static ImageReference fromJson(JsonReader jsonReader)
Reads an instance of ImageReference from the JsonReader.
Parameters:
Returns:
Throws:
id
public String id()
Get the id property: This property is mutually exclusive with other properties. The Azure Compute 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: For example, UbuntuServer or WindowsServer.
Returns:
publisher
public String publisher()
Get the publisher property: For example, Canonical or MicrosoftWindowsServer.
Returns:
sharedGalleryImageId
public String sharedGalleryImageId()
Get the sharedGalleryImageId property: This property is mutually exclusive with other properties and can be fetched from shared gallery image GET call.
Returns:
sku
public String sku()
Get the sku property: For example, 18.04-LTS or 2022-datacenter.
Returns:
toJson
validate
public void validate()
Validates the instance.
version
public String version()
Get the version property: A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'.
Returns:
withCommunityGalleryImageId
public ImageReference withCommunityGalleryImageId(String communityGalleryImageId)
Set the communityGalleryImageId property: This property is mutually exclusive with other properties and can be fetched from community gallery image GET call.
Parameters:
Returns:
withId
public ImageReference withId(String id)
Set the id property: This property is mutually exclusive with other properties. The Azure Compute 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: For example, UbuntuServer or WindowsServer.
Parameters:
Returns:
withPublisher
public ImageReference withPublisher(String publisher)
Set the publisher property: For example, Canonical or MicrosoftWindowsServer.
Parameters:
Returns:
withSharedGalleryImageId
public ImageReference withSharedGalleryImageId(String sharedGalleryImageId)
Set the sharedGalleryImageId property: This property is mutually exclusive with other properties and can be fetched from shared gallery image GET call.
Parameters:
Returns:
withSku
public ImageReference withSku(String sku)
Set the sku property: For example, 18.04-LTS or 2022-datacenter.
Parameters:
Returns:
withVersion
public ImageReference withVersion(String version)
Set the version property: 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