Class UserAccount

java.lang.Object
com.azure.compute.batch.models.UserAccount
All Implemented Interfaces:
com.azure.json.JsonSerializable<UserAccount>

public final class UserAccount extends Object implements com.azure.json.JsonSerializable<UserAccount>
Properties used to create a user used to execute Tasks on an Azure Batch Compute Node.
  • 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

    • 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.
    • getElevationLevel

      public ElevationLevel getElevationLevel()
      Get the elevationLevel property: The elevation level of the user Account. The default value is nonAdmin.
      Returns:
      the elevationLevel 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.
    • 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.
    • 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.
    • 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.
    • 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 com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<UserAccount>
      Throws:
      IOException
    • fromJson

      public static UserAccount fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the UserAccount.