Partilhar via


LinuxConfiguration Class

  • java.lang.Object
    • com.azure.resourcemanager.compute.models.LinuxConfiguration

Implements

public final class LinuxConfiguration
implements JsonSerializable<LinuxConfiguration>

Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros).

Constructor Summary

Constructor Description
LinuxConfiguration()

Creates an instance of LinuxConfiguration class.

Method Summary

Modifier and Type Method and Description
Boolean disablePasswordAuthentication()

Get the disablePasswordAuthentication property: Specifies whether password authentication should be disabled.

Boolean enableVMAgentPlatformUpdates()

Get the enableVMAgentPlatformUpdates property: Indicates whether VMAgent Platform Updates is enabled for the Linux virtual machine.

static LinuxConfiguration fromJson(JsonReader jsonReader)

Reads an instance of LinuxConfiguration from the JsonReader.

LinuxPatchSettings patchSettings()

Get the patchSettings property: [Preview Feature] Specifies settings related to VM Guest Patching on Linux.

Boolean provisionVMAgent()

Get the provisionVMAgent property: Indicates whether virtual machine agent should be provisioned on the virtual machine.

SshConfiguration ssh()

Get the ssh property: Specifies the ssh key configuration for a Linux OS.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

LinuxConfiguration withDisablePasswordAuthentication(Boolean disablePasswordAuthentication)

Set the disablePasswordAuthentication property: Specifies whether password authentication should be disabled.

LinuxConfiguration withEnableVMAgentPlatformUpdates(Boolean enableVMAgentPlatformUpdates)

Set the enableVMAgentPlatformUpdates property: Indicates whether VMAgent Platform Updates is enabled for the Linux virtual machine.

LinuxConfiguration withPatchSettings(LinuxPatchSettings patchSettings)

Set the patchSettings property: [Preview Feature] Specifies settings related to VM Guest Patching on Linux.

LinuxConfiguration withProvisionVMAgent(Boolean provisionVMAgent)

Set the provisionVMAgent property: Indicates whether virtual machine agent should be provisioned on the virtual machine.

LinuxConfiguration withSsh(SshConfiguration ssh)

Set the ssh property: Specifies the ssh key configuration for a Linux OS.

Methods inherited from java.lang.Object

Constructor Details

LinuxConfiguration

public LinuxConfiguration()

Creates an instance of LinuxConfiguration class.

Method Details

disablePasswordAuthentication

public Boolean disablePasswordAuthentication()

Get the disablePasswordAuthentication property: Specifies whether password authentication should be disabled.

Returns:

the disablePasswordAuthentication value.

enableVMAgentPlatformUpdates

public Boolean enableVMAgentPlatformUpdates()

Get the enableVMAgentPlatformUpdates property: Indicates whether VMAgent Platform Updates is enabled for the Linux virtual machine. Default value is false.

Returns:

the enableVMAgentPlatformUpdates value.

fromJson

public static LinuxConfiguration fromJson(JsonReader jsonReader)

Reads an instance of LinuxConfiguration from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of LinuxConfiguration if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the LinuxConfiguration.

patchSettings

public LinuxPatchSettings patchSettings()

Get the patchSettings property: [Preview Feature] Specifies settings related to VM Guest Patching on Linux.

Returns:

the patchSettings value.

provisionVMAgent

public Boolean provisionVMAgent()

Get the provisionVMAgent property: Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.

Returns:

the provisionVMAgent value.

ssh

public SshConfiguration ssh()

Get the ssh property: Specifies the ssh key configuration for a Linux OS.

Returns:

the ssh value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withDisablePasswordAuthentication

public LinuxConfiguration withDisablePasswordAuthentication(Boolean disablePasswordAuthentication)

Set the disablePasswordAuthentication property: Specifies whether password authentication should be disabled.

Parameters:

disablePasswordAuthentication - the disablePasswordAuthentication value to set.

Returns:

the LinuxConfiguration object itself.

withEnableVMAgentPlatformUpdates

public LinuxConfiguration withEnableVMAgentPlatformUpdates(Boolean enableVMAgentPlatformUpdates)

Set the enableVMAgentPlatformUpdates property: Indicates whether VMAgent Platform Updates is enabled for the Linux virtual machine. Default value is false.

Parameters:

enableVMAgentPlatformUpdates - the enableVMAgentPlatformUpdates value to set.

Returns:

the LinuxConfiguration object itself.

withPatchSettings

public LinuxConfiguration withPatchSettings(LinuxPatchSettings patchSettings)

Set the patchSettings property: [Preview Feature] Specifies settings related to VM Guest Patching on Linux.

Parameters:

patchSettings - the patchSettings value to set.

Returns:

the LinuxConfiguration object itself.

withProvisionVMAgent

public LinuxConfiguration withProvisionVMAgent(Boolean provisionVMAgent)

Set the provisionVMAgent property: Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.

Parameters:

provisionVMAgent - the provisionVMAgent value to set.

Returns:

the LinuxConfiguration object itself.

withSsh

public LinuxConfiguration withSsh(SshConfiguration ssh)

Set the ssh property: Specifies the ssh key configuration for a Linux OS.

Parameters:

ssh - the ssh value to set.

Returns:

the LinuxConfiguration object itself.

Applies to