Share via


UserAccount Class

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

Implements

public final class UserAccount
implements JsonSerializable<UserAccount>

Properties used to create a user used to execute Tasks on an Azure Batch Compute Node.

Constructor Summary

Constructor Description
UserAccount(String name, String password)

Creates an instance of UserAccount class.

Method Summary

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

Reads an instance of UserAccount from the JsonReader.

ElevationLevel getElevationLevel()

Get the elevationLevel property: The elevation level of the user Account.

LinuxUserConfiguration getLinuxUserConfiguration()

Get the linuxUserConfiguration property: The Linux-specific user configuration for the user Account.

String getName()

Get the name property: The name of the user Account.

String getPassword()

Get the password property: The password for the user Account.

WindowsUserConfiguration getWindowsUserConfiguration()

Get the windowsUserConfiguration property: The Windows-specific user configuration for the user Account.

UserAccount setElevationLevel(ElevationLevel elevationLevel)

Set the elevationLevel property: The elevation level of the user Account.

UserAccount setLinuxUserConfiguration(LinuxUserConfiguration linuxUserConfiguration)

Set the linuxUserConfiguration property: The Linux-specific user configuration for the user Account.

UserAccount setWindowsUserConfiguration(WindowsUserConfiguration windowsUserConfiguration)

Set the windowsUserConfiguration property: The Windows-specific user configuration for the user Account.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

UserAccount

public UserAccount(String name, String password)

Creates an instance of UserAccount class.

Parameters:

name - the name value to set.
password - the password value to set.

Method Details

fromJson

public static UserAccount fromJson(JsonReader jsonReader)

Reads an instance of UserAccount from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of UserAccount 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.

getElevationLevel

public ElevationLevel getElevationLevel()

Get the elevationLevel property: The elevation level of the user Account. The default value is nonAdmin.

Returns:

the elevationLevel value.

getLinuxUserConfiguration

public LinuxUserConfiguration getLinuxUserConfiguration()

Get the linuxUserConfiguration property: The Linux-specific user configuration for the user Account. This property is ignored if specified on a Windows Pool. If not specified, the user is created with the default options.

Returns:

the linuxUserConfiguration value.

getName

public String getName()

Get the name property: The name of the user Account. Names can contain any Unicode characters up to a maximum length of 20.

Returns:

the name value.

getPassword

public String getPassword()

Get the password property: The password for the user Account.

Returns:

the password value.

getWindowsUserConfiguration

public WindowsUserConfiguration getWindowsUserConfiguration()

Get the windowsUserConfiguration property: The Windows-specific user configuration for the user Account. This property can only be specified if the user is on a Windows Pool. If not specified and on a Windows Pool, the user is created with the default options.

Returns:

the windowsUserConfiguration value.

setElevationLevel

public UserAccount setElevationLevel(ElevationLevel elevationLevel)

Set the elevationLevel property: The elevation level of the user Account. The default value is nonAdmin.

Parameters:

elevationLevel - the elevationLevel value to set.

Returns:

the UserAccount object itself.

setLinuxUserConfiguration

public UserAccount setLinuxUserConfiguration(LinuxUserConfiguration linuxUserConfiguration)

Set the linuxUserConfiguration property: The Linux-specific user configuration for the user Account. This property is ignored if specified on a Windows Pool. If not specified, the user is created with the default options.

Parameters:

linuxUserConfiguration - the linuxUserConfiguration value to set.

Returns:

the UserAccount object itself.

setWindowsUserConfiguration

public UserAccount setWindowsUserConfiguration(WindowsUserConfiguration windowsUserConfiguration)

Set the windowsUserConfiguration property: The Windows-specific user configuration for the user Account. This property can only be specified if the user is on a Windows Pool. If not specified and on a Windows Pool, the user is created with the default options.

Parameters:

windowsUserConfiguration - the windowsUserConfiguration value to set.

Returns:

the UserAccount object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to