Share via


VMExtension Class

  • java.lang.Object
    • com.azure.compute.batch.models.VMExtension

Implements

public final class VMExtension
implements JsonSerializable<VMExtension>

The configuration for virtual machine extensions.

Constructor Summary

Constructor Description
VMExtension(String name, String publisher, String type)

Creates an instance of VMExtension class.

Method Summary

Modifier and Type Method and Description
static VMExtension fromJson(JsonReader jsonReader)

Reads an instance of VMExtension from the JsonReader.

String getName()

Get the name property: The name of the virtual machine extension.

Map<String,String> getProtectedSettings()

Get the protectedSettings property: The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.

List<String> getProvisionAfterExtensions()

Get the provisionAfterExtensions property: The collection of extension names.

String getPublisher()

Get the publisher property: The name of the extension handler publisher.

Map<String,String> getSettings()

Get the settings property: JSON formatted public settings for the extension.

String getType()

Get the type property: The type of the extension.

String getTypeHandlerVersion()

Get the typeHandlerVersion property: The version of script handler.

Boolean isAutoUpgradeMinorVersion()

Get the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one is available at deployment time.

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.

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.

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.

VMExtension setProtectedSettings(Map<String,String> protectedSettings)

Set the protectedSettings property: The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.

VMExtension setProvisionAfterExtensions(List<String> provisionAfterExtensions)

Set the provisionAfterExtensions property: The collection of extension names.

VMExtension setSettings(Map<String,String> settings)

Set the settings property: JSON formatted public settings for the extension.

VMExtension setTypeHandlerVersion(String typeHandlerVersion)

Set the typeHandlerVersion property: The version of script handler.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

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

fromJson

public static VMExtension fromJson(JsonReader jsonReader)

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:

IOException

- If the deserialized JSON object was missing any required properties.

getName

public String getName()

Get the name property: The name of the virtual machine extension.

Returns:

the name value.

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.

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.

getPublisher

public String getPublisher()

Get the publisher property: The name of the extension handler publisher.

Returns:

the publisher value.

getSettings

public Map<String,String> getSettings()

Get the settings property: JSON formatted public settings for the extension.

Returns:

the settings 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.

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.

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.

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.

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.

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.

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.

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.

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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to