Class UserIdentity

java.lang.Object
com.azure.resourcemanager.batch.models.UserIdentity

public class UserIdentity extends Object
The definition of the user identity under which the task is run.

Specify either the userName or autoUser property, but not both.

  • Constructor Details

    • UserIdentity

      public UserIdentity()
      Creates an instance of UserIdentity class.
  • Method Details

    • username

      public String username()
      Get the username property: The name of the user identity under which the task is run.

      The userName and autoUser properties are mutually exclusive; you must specify one but not both.

      Returns:
      the username value.
    • withUsername

      public UserIdentity withUsername(String username)
      Set the username property: The name of the user identity under which the task is run.

      The userName and autoUser properties are mutually exclusive; you must specify one but not both.

      Parameters:
      username - the username value to set.
      Returns:
      the UserIdentity object itself.
    • autoUser

      public AutoUserSpecification autoUser()
      Get the autoUser property: Specifies the parameters for the auto user that runs a task on the Batch service.

      The userName and autoUser properties are mutually exclusive; you must specify one but not both.

      Returns:
      the autoUser value.
    • withAutoUser

      public UserIdentity withAutoUser(AutoUserSpecification autoUser)
      Set the autoUser property: Specifies the parameters for the auto user that runs a task on the Batch service.

      The userName and autoUser properties are mutually exclusive; you must specify one but not both.

      Parameters:
      autoUser - the autoUser value to set.
      Returns:
      the UserIdentity object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.