Package com.azure.compute.batch.models
Class BatchNodeUserCreateContent
java.lang.Object
com.azure.compute.batch.models.BatchNodeUserCreateContent
- All Implemented Interfaces:
com.azure.json.JsonSerializable<BatchNodeUserCreateContent>
public final class BatchNodeUserCreateContent
extends Object
implements com.azure.json.JsonSerializable<BatchNodeUserCreateContent>
Parameters for creating a user account for RDP or SSH access on an Azure Batch Compute Node.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of BatchNodeUserCreateContent class. -
Method Summary
Modifier and TypeMethodDescriptionstatic BatchNodeUserCreateContent
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of BatchNodeUserCreateContent from the JsonReader.Get the expiryTime property: The time at which the Account should expire.getName()
Get the name property: The user name of the Account.Get the password property: The password of the Account.Get the sshPublicKey property: The SSH public key that can be used for remote login to the Compute Node.isAdmin()
Get the isAdmin property: Whether the Account should be an administrator on the Compute Node.setExpiryTime
(OffsetDateTime expiryTime) Set the expiryTime property: The time at which the Account should expire.setIsAdmin
(Boolean isAdmin) Set the isAdmin property: Whether the Account should be an administrator on the Compute Node.setPassword
(String password) Set the password property: The password of the Account.setSshPublicKey
(String sshPublicKey) Set the sshPublicKey property: The SSH public key that can be used for remote login to the Compute Node.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
BatchNodeUserCreateContent
Creates an instance of BatchNodeUserCreateContent class.- Parameters:
name
- the name value to set.
-
-
Method Details
-
getName
Get the name property: The user name of the Account.- Returns:
- the name value.
-
isAdmin
Get the isAdmin property: Whether the Account should be an administrator on the Compute Node. The default value is false.- Returns:
- the isAdmin value.
-
setIsAdmin
Set the isAdmin property: Whether the Account should be an administrator on the Compute Node. The default value is false.- Parameters:
isAdmin
- the isAdmin value to set.- Returns:
- the BatchNodeUserCreateContent object itself.
-
getExpiryTime
Get the expiryTime property: The time at which the Account should expire. If omitted, the default is 1 day from the current time. For Linux Compute Nodes, the expiryTime has a precision up to a day.- Returns:
- the expiryTime value.
-
setExpiryTime
Set the expiryTime property: The time at which the Account should expire. If omitted, the default is 1 day from the current time. For Linux Compute Nodes, the expiryTime has a precision up to a day.- Parameters:
expiryTime
- the expiryTime value to set.- Returns:
- the BatchNodeUserCreateContent object itself.
-
getPassword
Get the password property: The password of the Account. The password is required for Windows Compute Nodes. For Linux Compute Nodes, the password can optionally be specified along with the sshPublicKey property.- Returns:
- the password value.
-
setPassword
Set the password property: The password of the Account. The password is required for Windows Compute Nodes. For Linux Compute Nodes, the password can optionally be specified along with the sshPublicKey property.- Parameters:
password
- the password value to set.- Returns:
- the BatchNodeUserCreateContent object itself.
-
getSshPublicKey
Get the sshPublicKey property: The SSH public key that can be used for remote login to the Compute Node. The public key should be compatible with OpenSSH encoding and should be base 64 encoded. This property can be specified only for Linux Compute Nodes. If this is specified for a Windows Compute Node, then the Batch service rejects the request; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).- Returns:
- the sshPublicKey value.
-
setSshPublicKey
Set the sshPublicKey property: The SSH public key that can be used for remote login to the Compute Node. The public key should be compatible with OpenSSH encoding and should be base 64 encoded. This property can be specified only for Linux Compute Nodes. If this is specified for a Windows Compute Node, then the Batch service rejects the request; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).- Parameters:
sshPublicKey
- the sshPublicKey value to set.- Returns:
- the BatchNodeUserCreateContent object itself.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<BatchNodeUserCreateContent>
- Throws:
IOException
-
fromJson
public static BatchNodeUserCreateContent fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of BatchNodeUserCreateContent from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of BatchNodeUserCreateContent 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 BatchNodeUserCreateContent.
-