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 Details

    • ImageReference

      public ImageReference()
      Creates an instance of ImageReference class.
  • Method Details

    • 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.
    • setPublisher

      public ImageReference 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 ImageReference object itself.
    • 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.
    • setOffer

      public ImageReference 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 ImageReference object itself.
    • 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.
    • setSku

      public ImageReference 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 ImageReference object itself.
    • 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.
    • setVersion

      public ImageReference 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 ImageReference object itself.
    • 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.
    • setVirtualMachineImageId

      public ImageReference 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 ImageReference object itself.
    • 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.
    • 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.
    • setSharedGalleryImageId

      public ImageReference 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 ImageReference object itself.
    • 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.
    • setCommunityGalleryImageId

      public ImageReference 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 ImageReference object itself.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ImageReference>
      Throws:
      IOException
    • fromJson

      public static ImageReference fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.