Share via


az batch node user

Manage the user accounts of a Batch compute node.

Commands

Name Description Type Status
az batch node user create

Add a user account to a Batch compute node.

Core GA
az batch node user delete

Deletes a user Account from the specified Compute Node.

Core GA
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.

Core GA

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

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 (formatted to match the respective REST API body). If this parameter is specified, all 'User Arguments' are ignored.

--name

Required.

--password

The password is required for Windows Compute 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 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).

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az batch node user delete

Deletes a user Account from the specified Compute Node.

You can delete a user Account to a Compute Node only when it is in the idle or running state.

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.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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

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 (formatted to match the respective REST API body). If this parameter is specified, all 'Node Update User Arguments' are ignored.

--password

The password is required for Windows Compute 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 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). If omitted, any existing SSH public key is removed.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.