Share via


BatchVmImageReference Class

  • java.lang.Object
    • com.azure.compute.batch.models.BatchVmImageReference

Implements

public final class BatchVmImageReference
implements JsonSerializable<BatchVmImageReference>

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

Constructor Description
BatchVmImageReference()

Creates an instance of BatchVmImageReference class.

Method Summary

Modifier and Type Method and Description
static BatchVmImageReference fromJson(JsonReader jsonReader)

Reads an instance of BatchVmImageReference from the JsonReader.

String getCommunityGalleryImageId()

Get the communityGalleryImageId property: The community gallery image unique identifier.

String getExactVersion()

Get the exactVersion property: The specific version of the platform image or marketplace image used to create the node.

String getOffer()

Get the offer property: The offer type of the Azure Virtual Machines Marketplace Image.

String getPublisher()

Get the publisher property: The publisher of the Azure Virtual Machines Marketplace Image.

String getSharedGalleryImageId()

Get the sharedGalleryImageId property: The shared gallery image unique identifier.

String getSku()

Get the sku property: The SKU of the Azure Virtual Machines Marketplace Image.

String getVersion()

Get the version property: The version of the Azure Virtual Machines Marketplace Image.

String getVirtualMachineImageId()

Get the virtualMachineImageId property: The ARM resource identifier of the Azure Compute Gallery Image.

BatchVmImageReference setCommunityGalleryImageId(String communityGalleryImageId)

Set the communityGalleryImageId property: The community gallery image unique identifier.

BatchVmImageReference setOffer(String offer)

Set the offer property: The offer type of the Azure Virtual Machines Marketplace Image.

BatchVmImageReference setPublisher(String publisher)

Set the publisher property: The publisher of the Azure Virtual Machines Marketplace Image.

BatchVmImageReference setSharedGalleryImageId(String sharedGalleryImageId)

Set the sharedGalleryImageId property: The shared gallery image unique identifier.

BatchVmImageReference setSku(String sku)

Set the sku property: The SKU of the Azure Virtual Machines Marketplace Image.

BatchVmImageReference setVersion(String version)

Set the version property: The version of the Azure Virtual Machines Marketplace Image.

BatchVmImageReference setVirtualMachineImageId(String virtualMachineImageId)

Set the virtualMachineImageId property: The ARM resource identifier of the Azure Compute Gallery Image.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

BatchVmImageReference

public BatchVmImageReference()

Creates an instance of BatchVmImageReference class.

Method Details

fromJson

public static BatchVmImageReference fromJson(JsonReader jsonReader)

Reads an instance of BatchVmImageReference from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of BatchVmImageReference 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 BatchVmImageReference.

getCommunityGalleryImageId

public String 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.

getExactVersion

public String 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.

getOffer

public String getOffer()

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

Returns:

the offer value.

getPublisher

public String getPublisher()

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

Returns:

the publisher value.

getSharedGalleryImageId

public String getSharedGalleryImageId()

Get the sharedGalleryImageId property: The shared gallery image unique identifier. This property is mutually exclusive with other properties and can be fetched from shared gallery image GET call.

Returns:

the sharedGalleryImageId value.

getSku

public String 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.

getVersion

public String 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.

getVirtualMachineImageId

public String 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.

setCommunityGalleryImageId

public BatchVmImageReference setCommunityGalleryImageId(String communityGalleryImageId)

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 BatchVmImageReference object itself.

setOffer

public BatchVmImageReference setOffer(String offer)

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 BatchVmImageReference object itself.

setPublisher

public BatchVmImageReference setPublisher(String publisher)

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 BatchVmImageReference object itself.

setSharedGalleryImageId

public BatchVmImageReference setSharedGalleryImageId(String sharedGalleryImageId)

Set the sharedGalleryImageId property: The shared gallery image unique identifier. This property is mutually exclusive with other properties and can be fetched from shared gallery image GET call.

Parameters:

sharedGalleryImageId - the sharedGalleryImageId value to set.

Returns:

the BatchVmImageReference object itself.

setSku

public BatchVmImageReference setSku(String sku)

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 BatchVmImageReference object itself.

setVersion

public BatchVmImageReference setVersion(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:

version - the version value to set.

Returns:

the BatchVmImageReference object itself.

setVirtualMachineImageId

public BatchVmImageReference setVirtualMachineImageId(String virtualMachineImageId)

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 BatchVmImageReference object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to