Class VirtualMachineExtensionInner

java.lang.Object
com.azure.core.management.ProxyResource
com.azure.core.management.Resource
com.azure.resourcemanager.compute.models.ResourceWithOptionalLocation
com.azure.resourcemanager.compute.fluent.models.VirtualMachineExtensionInner
All Implemented Interfaces:
com.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>

public final class VirtualMachineExtensionInner extends ResourceWithOptionalLocation
Describes a Virtual Machine Extension.
  • Constructor Details

    • VirtualMachineExtensionInner

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

    • id

      public String id()
      Get the id property: Fully qualified resource Id for the resource.
      Overrides:
      id in class ResourceWithOptionalLocation
      Returns:
      the id value.
    • name

      public String name()
      Get the name property: The name of the resource.
      Overrides:
      name in class ResourceWithOptionalLocation
      Returns:
      the name value.
    • type

      public String type()
      Get the type property: The type of the resource.
      Overrides:
      type in class ResourceWithOptionalLocation
      Returns:
      the type value.
    • withLocation

      public VirtualMachineExtensionInner withLocation(String location)
      Overrides:
      withLocation in class ResourceWithOptionalLocation
    • withTags

      public VirtualMachineExtensionInner withTags(Map<String,String> tags)
      Overrides:
      withTags in class ResourceWithOptionalLocation
    • forceUpdateTag

      public String forceUpdateTag()
      Get the forceUpdateTag property: How the extension handler should be forced to update even if the extension configuration has not changed.
      Returns:
      the forceUpdateTag value.
    • withForceUpdateTag

      public VirtualMachineExtensionInner withForceUpdateTag(String forceUpdateTag)
      Set the forceUpdateTag property: How the extension handler should be forced to update even if the extension configuration has not changed.
      Parameters:
      forceUpdateTag - the forceUpdateTag value to set.
      Returns:
      the VirtualMachineExtensionInner object itself.
    • publisher

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

      public VirtualMachineExtensionInner withPublisher(String publisher)
      Set the publisher property: The name of the extension handler publisher.
      Parameters:
      publisher - the publisher value to set.
      Returns:
      the VirtualMachineExtensionInner object itself.
    • typePropertiesType

      public String typePropertiesType()
      Get the type property: Specifies the type of the extension; an example is "CustomScriptExtension".
      Returns:
      the type value.
    • withTypePropertiesType

      public VirtualMachineExtensionInner withTypePropertiesType(String type)
      Set the type property: Specifies the type of the extension; an example is "CustomScriptExtension".
      Parameters:
      type - the type value to set.
      Returns:
      the VirtualMachineExtensionInner object itself.
    • typeHandlerVersion

      public String typeHandlerVersion()
      Get the typeHandlerVersion property: Specifies the version of the script handler.
      Returns:
      the typeHandlerVersion value.
    • withTypeHandlerVersion

      public VirtualMachineExtensionInner withTypeHandlerVersion(String typeHandlerVersion)
      Set the typeHandlerVersion property: Specifies the version of the script handler.
      Parameters:
      typeHandlerVersion - the typeHandlerVersion value to set.
      Returns:
      the VirtualMachineExtensionInner object itself.
    • autoUpgradeMinorVersion

      public Boolean autoUpgradeMinorVersion()
      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.
    • withAutoUpgradeMinorVersion

      public VirtualMachineExtensionInner withAutoUpgradeMinorVersion(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 VirtualMachineExtensionInner object itself.
    • enableAutomaticUpgrade

      public Boolean enableAutomaticUpgrade()
      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.
    • withEnableAutomaticUpgrade

      public VirtualMachineExtensionInner withEnableAutomaticUpgrade(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 VirtualMachineExtensionInner object itself.
    • settings

      public Object settings()
      Get the settings property: Json formatted public settings for the extension.
      Returns:
      the settings value.
    • withSettings

      public VirtualMachineExtensionInner withSettings(Object settings)
      Set the settings property: Json formatted public settings for the extension.
      Parameters:
      settings - the settings value to set.
      Returns:
      the VirtualMachineExtensionInner object itself.
    • protectedSettings

      public Object protectedSettings()
      Get the protectedSettings property: The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
      Returns:
      the protectedSettings value.
    • withProtectedSettings

      public VirtualMachineExtensionInner withProtectedSettings(Object 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 VirtualMachineExtensionInner object itself.
    • provisioningState

      public String provisioningState()
      Get the provisioningState property: The provisioning state, which only appears in the response.
      Returns:
      the provisioningState value.
    • instanceView

      public VirtualMachineExtensionInstanceView instanceView()
      Get the instanceView property: The virtual machine extension instance view.
      Returns:
      the instanceView value.
    • withInstanceView

      public VirtualMachineExtensionInner withInstanceView(VirtualMachineExtensionInstanceView instanceView)
      Set the instanceView property: The virtual machine extension instance view.
      Parameters:
      instanceView - the instanceView value to set.
      Returns:
      the VirtualMachineExtensionInner object itself.
    • suppressFailures

      public Boolean suppressFailures()
      Get the suppressFailures property: Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.
      Returns:
      the suppressFailures value.
    • withSuppressFailures

      public VirtualMachineExtensionInner withSuppressFailures(Boolean suppressFailures)
      Set the suppressFailures property: Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.
      Parameters:
      suppressFailures - the suppressFailures value to set.
      Returns:
      the VirtualMachineExtensionInner object itself.
    • protectedSettingsFromKeyVault

      public KeyVaultSecretReference protectedSettingsFromKeyVault()
      Get the protectedSettingsFromKeyVault property: The extensions protected settings that are passed by reference, and consumed from key vault.
      Returns:
      the protectedSettingsFromKeyVault value.
    • withProtectedSettingsFromKeyVault

      public VirtualMachineExtensionInner withProtectedSettingsFromKeyVault(KeyVaultSecretReference protectedSettingsFromKeyVault)
      Set the protectedSettingsFromKeyVault property: The extensions protected settings that are passed by reference, and consumed from key vault.
      Parameters:
      protectedSettingsFromKeyVault - the protectedSettingsFromKeyVault value to set.
      Returns:
      the VirtualMachineExtensionInner object itself.
    • provisionAfterExtensions

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

      public VirtualMachineExtensionInner withProvisionAfterExtensions(List<String> provisionAfterExtensions)
      Set the provisionAfterExtensions property: Collection of extension names after which this extension needs to be provisioned.
      Parameters:
      provisionAfterExtensions - the provisionAfterExtensions value to set.
      Returns:
      the VirtualMachineExtensionInner object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class ResourceWithOptionalLocation
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>
      Overrides:
      toJson in class ResourceWithOptionalLocation
      Throws:
      IOException
    • fromJson

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