Class VMExtension

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

public final class VMExtension extends Object implements com.azure.json.JsonSerializable<VMExtension>
The configuration for virtual machine extensions.
  • Constructor Details

    • VMExtension

      public VMExtension(String name, String publisher, String type)
      Creates an instance of VMExtension class.
      Parameters:
      name - the name value to set.
      publisher - the publisher value to set.
      type - the type value to set.
  • Method Details

    • getName

      public String getName()
      Get the name property: The name of the virtual machine extension.
      Returns:
      the name value.
    • getPublisher

      public String getPublisher()
      Get the publisher property: The name of the extension handler publisher.
      Returns:
      the publisher value.
    • getType

      public String getType()
      Get the type property: The type of the extension.
      Returns:
      the type value.
    • getTypeHandlerVersion

      public String getTypeHandlerVersion()
      Get the typeHandlerVersion property: The version of script handler.
      Returns:
      the typeHandlerVersion value.
    • setTypeHandlerVersion

      public VMExtension setTypeHandlerVersion(String typeHandlerVersion)
      Set the typeHandlerVersion property: The version of script handler.
      Parameters:
      typeHandlerVersion - the typeHandlerVersion value to set.
      Returns:
      the VMExtension object itself.
    • isAutoUpgradeMinorVersion

      public Boolean isAutoUpgradeMinorVersion()
      Get the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
      Returns:
      the autoUpgradeMinorVersion value.
    • setAutoUpgradeMinorVersion

      public VMExtension setAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion)
      Set the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
      Parameters:
      autoUpgradeMinorVersion - the autoUpgradeMinorVersion value to set.
      Returns:
      the VMExtension object itself.
    • isEnableAutomaticUpgrade

      public Boolean isEnableAutomaticUpgrade()
      Get the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
      Returns:
      the enableAutomaticUpgrade value.
    • setEnableAutomaticUpgrade

      public VMExtension setEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade)
      Set the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
      Parameters:
      enableAutomaticUpgrade - the enableAutomaticUpgrade value to set.
      Returns:
      the VMExtension object itself.
    • getSettings

      public Map<String,String> getSettings()
      Get the settings property: JSON formatted public settings for the extension.
      Returns:
      the settings value.
    • setSettings

      public VMExtension setSettings(Map<String,String> settings)
      Set the settings property: JSON formatted public settings for the extension.
      Parameters:
      settings - the settings value to set.
      Returns:
      the VMExtension object itself.
    • getProtectedSettings

      public Map<String,String> getProtectedSettings()
      Get the protectedSettings property: The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
      Returns:
      the protectedSettings value.
    • setProtectedSettings

      public VMExtension setProtectedSettings(Map<String,String> protectedSettings)
      Set the protectedSettings property: The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
      Parameters:
      protectedSettings - the protectedSettings value to set.
      Returns:
      the VMExtension object itself.
    • getProvisionAfterExtensions

      public List<String> getProvisionAfterExtensions()
      Get the provisionAfterExtensions property: The collection of extension names. Collection of extension names after which this extension needs to be provisioned.
      Returns:
      the provisionAfterExtensions value.
    • setProvisionAfterExtensions

      public VMExtension setProvisionAfterExtensions(List<String> provisionAfterExtensions)
      Set the provisionAfterExtensions property: The collection of extension names. Collection of extension names after which this extension needs to be provisioned.
      Parameters:
      provisionAfterExtensions - the provisionAfterExtensions value to set.
      Returns:
      the VMExtension 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<VMExtension>
      Throws:
      IOException
    • fromJson

      public static VMExtension fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of VMExtension from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of VMExtension 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 VMExtension.