az storage account local-user

管理儲存體帳戶本機使用者。

命令

名稱 Description 類型 狀態
az storage account local-user create

為指定的儲存體帳戶建立本機使用者。

核心 GA
az storage account local-user delete

刪除本機使用者。

核心 GA
az storage account local-user list

列出儲存體帳戶的本機使用者。

核心 GA
az storage account local-user list-keys

列出本機使用者的共用金鑰和 sshAuthorizedKeys。

核心 GA
az storage account local-user regenerate-password

重新產生本機使用者的 sshPassword。

核心 GA
az storage account local-user show

顯示本機使用者的資訊。

核心 GA
az storage account local-user update

更新本機使用者的屬性。

核心 GA

az storage account local-user create

為指定的儲存體帳戶建立本機使用者。

az storage account local-user create --account-name
                                     --name
                                     --resource-group
                                     [--has-shared-key {false, true}]
                                     [--has-ssh-key {false, true}]
                                     [--has-ssh-password {false, true}]
                                     [--home-directory]
                                     [--permission-scope]
                                     [--ssh-authorized-key]

範例

建立具有兩個許可權範圍和 ssh 授權金鑰的本機使用者

az storage account local-user create --account-name {account-name} -g {resource-group} -n {username} --home-directory home --permission-scope permissions=r service=blob resource-name=container1 --permission-scope permissions=rw service=file resource-name=share2 --ssh-authorized-key key="ssh-rsa a2V5" --has-ssh-key true --has-ssh-password --has-shared-key false

必要參數

--account-name

儲存體帳戶名稱。

--name --user-name -n

本機使用者的名稱。 使用者名稱必須只包含小寫字母和數位。 它只能在儲存體帳戶內是唯一的。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

選擇性參數

--has-shared-key

指出共用金鑰是否存在。 將它設定為 false,以移除現有的共用金鑰。

接受的值: false, true
--has-ssh-key

指出 SSH 金鑰是否存在。 將它設定為 false 以移除現有的 SSH 金鑰。

接受的值: false, true
--has-ssh-password

指出 SSH 密碼是否存在。 將它設定為 false 以移除現有的 SSH 密碼。

接受的值: false, true
--home-directory

主目錄。

--permission-scope

許可權範圍引數清單,其中包含許可權、服務和resource_name。許可權可以是下列可能值的組合:Read(r)、Write (w)、Delete (d)、List (l) 和 Create (c)。 服務有可能的值:Blob、檔案。 資源名稱是容器名稱或檔案共用名稱稱。 範例:--permission-scope permissions=r service=blob resource-name=container1Can 指定多個許可權範圍:--permission-scope permissions=rw service=blob resource-name=container1--permission-scope permissions=rwd service=file resource-name=share2。

--ssh-authorized-key

SFTP 的 SSH 授權金鑰。 包含選擇性的描述和索引鍵。 金鑰是 base64 編碼的 SSH 公開金鑰,格式如下:ssh-rsa AAAABBBB。範例:--ssh_authorized_key description=description key=「ssh-rsa AAAABBBB」或 --ssh_authorized_key key=「ssh-rsa AAAABBBB」。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az storage account local-user delete

刪除本機使用者。

az storage account local-user delete --account-name
                                     --name
                                     --resource-group

範例

刪除本機使用者

az storage account local-user delete --account-name {account-name} -g {resource-group} -n {username}

必要參數

--account-name

儲存體帳戶名稱。

--name --user-name -n

本機使用者的名稱。 使用者名稱必須只包含小寫字母和數位。 它只能在儲存體帳戶內是唯一的。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az storage account local-user list

列出儲存體帳戶的本機使用者。

az storage account local-user list --account-name
                                   --resource-group

範例

列出儲存體帳戶的本機使用者

az storage account local-user list --account-name {account-name} -g {resource-group}

必要參數

--account-name

儲存體帳戶名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az storage account local-user list-keys

列出本機使用者的共用金鑰和 sshAuthorizedKeys。

az storage account local-user list-keys --account-name
                                        --name
                                        --resource-group

範例

列出本機使用者的共用金鑰和 sshAuthorizedKeys

az storage account local-user list-keys --account-name {account-name} -g {resource-group} -n {username}

必要參數

--account-name

儲存體帳戶名稱。

--name --user-name -n

本機使用者的名稱。 使用者名稱必須只包含小寫字母和數位。 它只能在儲存體帳戶內是唯一的。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az storage account local-user regenerate-password

重新產生本機使用者的 sshPassword。

az storage account local-user regenerate-password --account-name
                                                  --name
                                                  --resource-group

範例

重新產生本機使用者的 sshPassword

az storage account local-user regenerate-password --account-name {account-name} -g {resource-group} -n {username}

必要參數

--account-name

儲存體帳戶名稱。

--name --user-name -n

本機使用者的名稱。 使用者名稱必須只包含小寫字母和數位。 它只能在儲存體帳戶內是唯一的。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az storage account local-user show

顯示本機使用者的資訊。

az storage account local-user show --account-name
                                   --name
                                   --resource-group

範例

顯示本機使用者的資訊

az storage account local-user show --account-name {account-name} -g {resource-group} -n {username}

必要參數

--account-name

儲存體帳戶名稱。

--name --user-name -n

本機使用者的名稱。 使用者名稱必須只包含小寫字母和數位。 它只能在儲存體帳戶內是唯一的。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az storage account local-user update

更新本機使用者的屬性。

az storage account local-user update --account-name
                                     --name
                                     --resource-group
                                     [--has-shared-key {false, true}]
                                     [--has-ssh-key {false, true}]
                                     [--has-ssh-password {false, true}]
                                     [--home-directory]
                                     [--permission-scope]
                                     [--ssh-authorized-key]

範例

使用一個許可權範圍更新本機使用者,且沒有 ssh-key

az storage account local-user update --account-name {account-name} -g {resource-group} -n {username} --permission-scope permissions=rw service=file resource-name=share2 --has-ssh-key false

必要參數

--account-name

儲存體帳戶名稱。

--name --user-name -n

本機使用者的名稱。 使用者名稱必須只包含小寫字母和數位。 它只能在儲存體帳戶內是唯一的。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

選擇性參數

--has-shared-key

指出共用金鑰是否存在。 將它設定為 false,以移除現有的共用金鑰。

接受的值: false, true
--has-ssh-key

指出 SSH 金鑰是否存在。 將它設定為 false 以移除現有的 SSH 金鑰。

接受的值: false, true
--has-ssh-password

指出 SSH 密碼是否存在。 將它設定為 false 以移除現有的 SSH 密碼。

接受的值: false, true
--home-directory

主目錄。

--permission-scope

許可權範圍引數清單,其中包含許可權、服務和resource_name。許可權可以是下列可能值的組合:Read(r)、Write (w)、Delete (d)、List (l) 和 Create (c)。 服務有可能的值:Blob、檔案。 資源名稱是容器名稱或檔案共用名稱稱。 範例:--permission-scope permissions=r service=blob resource-name=container1Can 指定多個許可權範圍:--permission-scope permissions=rw service=blob resource-name=container1--permission-scope permissions=rwd service=file resource-name=share2。

--ssh-authorized-key

SFTP 的 SSH 授權金鑰。 包含選擇性的描述和索引鍵。 金鑰是 base64 編碼的 SSH 公開金鑰,格式如下:ssh-rsa AAAABBBB。範例:--ssh_authorized_key description=description key=「ssh-rsa AAAABBBB」或 --ssh_authorized_key key=「ssh-rsa AAAABBBB」。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。