Package com.azure.compute.batch.models
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 Summary
ConstructorsConstructorDescriptionVMExtension
(String name, String publisher, String type) Creates an instance of VMExtension class. -
Method Summary
Modifier and TypeMethodDescriptionstatic VMExtension
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of VMExtension from the JsonReader.getName()
Get the name property: The name of the virtual machine extension.Get the protectedSettings property: The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.Get the provisionAfterExtensions property: The collection of extension names.Get the publisher property: The name of the extension handler publisher.Get the settings property: JSON formatted public settings for the extension.getType()
Get the type property: The type of the extension.Get the typeHandlerVersion property: The version of script handler.Get the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one is available at deployment time.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.setAutoUpgradeMinorVersion
(Boolean autoUpgradeMinorVersion) Set the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one is available at deployment time.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.setProtectedSettings
(Map<String, String> protectedSettings) Set the protectedSettings property: The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.setProvisionAfterExtensions
(List<String> provisionAfterExtensions) Set the provisionAfterExtensions property: The collection of extension names.setSettings
(Map<String, String> settings) Set the settings property: JSON formatted public settings for the extension.setTypeHandlerVersion
(String typeHandlerVersion) Set the typeHandlerVersion property: The version of script handler.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
VMExtension
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
Get the name property: The name of the virtual machine extension.- Returns:
- the name value.
-
getPublisher
Get the publisher property: The name of the extension handler publisher.- Returns:
- the publisher value.
-
getType
Get the type property: The type of the extension.- Returns:
- the type value.
-
getTypeHandlerVersion
Get the typeHandlerVersion property: The version of script handler.- Returns:
- the typeHandlerVersion value.
-
setTypeHandlerVersion
Set the typeHandlerVersion property: The version of script handler.- Parameters:
typeHandlerVersion
- the typeHandlerVersion value to set.- Returns:
- the VMExtension object itself.
-
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
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
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
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
Get the settings property: JSON formatted public settings for the extension.- Returns:
- the settings value.
-
setSettings
Set the settings property: JSON formatted public settings for the extension.- Parameters:
settings
- the settings value to set.- Returns:
- the VMExtension object itself.
-
getProtectedSettings
Get the protectedSettings property: The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.- Returns:
- the protectedSettings value.
-
setProtectedSettings
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
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
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
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<VMExtension>
- Throws:
IOException
-
fromJson
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.
-