az batch node user

Manage the user accounts of a Batch compute node.

Commands

az batch node user create Add a user account to a Batch compute node.
az batch node user delete Deletes a user account from the specified compute node.
az batch node user reset Update the properties of a user account on a Batch compute node. Unspecified properties which can be updated are reset to their defaults.

az batch node user create

Add a user account to a Batch compute node.

az batch node user create --node-id
--pool-id
[--account-endpoint]
[--account-key]
[--account-name]
[--expiry-time]
[--is-admin]
[--json-file]
[--name]
[--password]
[--ssh-public-key]

Required Parameters

--node-id
The ID of the machine on which you want to create a user account.
--pool-id
The ID of the pool that contains the compute node.

Optional Parameters

--account-endpoint
Batch service endpoint. Alternatively, set by environment variable: AZURE_BATCH_ENDPOINT.
--account-key
Batch account key. Alternatively, set by environment variable: AZURE_BATCH_ACCESS_KEY.
--account-name
Batch account name. Alternatively, set by environment variable: AZURE_BATCH_ACCOUNT.
--expiry-time
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. Expected format is an ISO-8601 timestamp.
--is-admin
Whether the account should be an administrator on the compute node. The default value is false. True if flag present.
--json-file
A file containing the user specification in JSON format. If this parameter is specified, all 'User Arguments' are ignored.
--name
The user name of the account.
--password
The password of the account. The password is required for Windows nodes (those created with 'cloudServiceConfiguration', or created with 'virtualMachineConfiguration' using a Windows image reference). For Linux compute nodes, the password can optionally be specified along with the sshPublicKey property.
--ssh-public-key
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 nodes. If this is specified for a Windows node, then the Batch service rejects the request; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

az batch node user delete

Deletes a user account from the specified compute node.

az batch node user delete --node-id
--pool-id
--user-name
[--account-endpoint]
[--account-key]
[--account-name]
[--yes]

Required Parameters

--node-id
The ID of the machine on which you want to delete a user account.
--pool-id
The ID of the pool that contains the compute node.
--user-name
The name of the user account to delete.

Optional Parameters

--account-endpoint
Batch service endpoint. Alternatively, set by environment variable: AZURE_BATCH_ENDPOINT.
--account-key
Batch account key. Alternatively, set by environment variable: AZURE_BATCH_ACCESS_KEY.
--account-name
Batch account name. Alternatively, set by environment variable: AZURE_BATCH_ACCOUNT.
--yes -y
Do not prompt for confirmation.

az batch node user reset

Update the properties of a user account on a Batch compute node. Unspecified properties which can be updated are reset to their defaults.

az batch node user reset --node-id
--pool-id
--user-name
[--account-endpoint]
[--account-key]
[--account-name]
[--expiry-time]
[--json-file]
[--password]
[--ssh-public-key]

Required Parameters

--node-id
The ID of the machine on which you want to update a user account.
--pool-id
The ID of the pool that contains the compute node.
--user-name
The name of the user account to update.

Optional Parameters

--account-endpoint
Batch service endpoint. Alternatively, set by environment variable: AZURE_BATCH_ENDPOINT.
--account-key
Batch account key. Alternatively, set by environment variable: AZURE_BATCH_ACCESS_KEY.
--account-name
Batch account name. Alternatively, set by environment variable: AZURE_BATCH_ACCOUNT.
--expiry-time
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. Expected format is an ISO-8601 timestamp.
--json-file
A file containing the node update user parameter specification in JSON format. If this parameter is specified, all 'Node Update User Arguments' are ignored.
--password
The password of the account. The password is required for Windows nodes (those created with 'cloudServiceConfiguration', or created with 'virtualMachineConfiguration' using a Windows image reference). For Linux compute nodes, the password can optionally be specified along with the sshPublicKey property. If omitted, any existing password is removed.
--ssh-public-key
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 nodes. If this is specified for a Windows node, then the Batch service rejects the request; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If omitted, any existing SSH public key is removed.