Class BatchPoolReplaceContent

java.lang.Object
com.azure.compute.batch.models.BatchPoolReplaceContent
All Implemented Interfaces:
com.azure.json.JsonSerializable<BatchPoolReplaceContent>

public final class BatchPoolReplaceContent extends Object implements com.azure.json.JsonSerializable<BatchPoolReplaceContent>
Parameters for replacing properties on an Azure Batch Pool.
  • Constructor Details

    • BatchPoolReplaceContent

      public BatchPoolReplaceContent(List<BatchCertificateReference> certificateReferences, List<BatchApplicationPackageReference> applicationPackageReferences, List<MetadataItem> metadata)
      Creates an instance of BatchPoolReplaceContent class.
      Parameters:
      certificateReferences - the certificateReferences value to set.
      applicationPackageReferences - the applicationPackageReferences value to set.
      metadata - the metadata value to set.
  • Method Details

    • getStartTask

      public BatchStartTask getStartTask()
      Get the startTask property: A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted. If this element is present, it overwrites any existing StartTask. If omitted, any existing StartTask is removed from the Pool.
      Returns:
      the startTask value.
    • setStartTask

      public BatchPoolReplaceContent setStartTask(BatchStartTask startTask)
      Set the startTask property: A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted. If this element is present, it overwrites any existing StartTask. If omitted, any existing StartTask is removed from the Pool.
      Parameters:
      startTask - the startTask value to set.
      Returns:
      the BatchPoolReplaceContent object itself.
    • getCertificateReferences

      public List<BatchCertificateReference> getCertificateReferences()
      Get the certificateReferences property: This list replaces any existing Certificate references configured on the Pool. If you specify an empty collection, any existing Certificate references are removed from the Pool. For Windows Nodes, the Batch service installs the Certificates to the specified Certificate store and location. For Linux Compute Nodes, the Certificates are stored in a directory inside the Task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this location. For Certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and Certificates are placed in that directory. Warning: This property is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.
      Returns:
      the certificateReferences value.
    • getApplicationPackageReferences

      public List<BatchApplicationPackageReference> getApplicationPackageReferences()
      Get the applicationPackageReferences property: The list of Application Packages to be installed on each Compute Node in the Pool. The list replaces any existing Application Package references on the Pool. Changes to Application Package references affect all new Compute Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Application Package references on any given Pool. If omitted, or if you specify an empty collection, any existing Application Packages references are removed from the Pool. A maximum of 10 references may be specified on a given Pool.
      Returns:
      the applicationPackageReferences value.
    • getMetadata

      public List<MetadataItem> getMetadata()
      Get the metadata property: A list of name-value pairs associated with the Pool as metadata. This list replaces any existing metadata configured on the Pool. If omitted, or if you specify an empty collection, any existing metadata is removed from the Pool.
      Returns:
      the metadata value.
    • getTargetNodeCommunicationMode

      public BatchNodeCommunicationMode getTargetNodeCommunicationMode()
      Get the targetNodeCommunicationMode property: The desired node communication mode for the pool. This setting replaces any existing targetNodeCommunication setting on the Pool. If omitted, the existing setting is default.
      Returns:
      the targetNodeCommunicationMode value.
    • setTargetNodeCommunicationMode

      public BatchPoolReplaceContent setTargetNodeCommunicationMode(BatchNodeCommunicationMode targetNodeCommunicationMode)
      Set the targetNodeCommunicationMode property: The desired node communication mode for the pool. This setting replaces any existing targetNodeCommunication setting on the Pool. If omitted, the existing setting is default.
      Parameters:
      targetNodeCommunicationMode - the targetNodeCommunicationMode value to set.
      Returns:
      the BatchPoolReplaceContent 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<BatchPoolReplaceContent>
      Throws:
      IOException
    • fromJson

      public static BatchPoolReplaceContent fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of BatchPoolReplaceContent from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of BatchPoolReplaceContent if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the BatchPoolReplaceContent.