az storage account local-user
注意
此命令群組具有 Azure CLI 和至少一個擴充功能中定義的命令。 安裝每個擴充功能以受益於其擴充功能。 深入了解擴充功能。
管理記憶體帳戶本機使用者。
命令
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
必要參數
儲存體帳戶名稱。
本機用戶的名稱。 使用者名稱必須只包含小寫字母和數位。 它只能在記憶體帳戶內是唯一的。
資源群組的名稱。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
選擇性參數
指出共用金鑰是否存在。 將它設定為 false,以移除現有的共用金鑰。
指出 SSH 金鑰是否存在。 將它設定為 false 以移除現有的 SSH 金鑰。
指出 SSH 密碼是否存在。 將它設定為 false 以移除現有的 SSH 密碼。
主目錄。
許可權範圍自變數清單,其中包含許可權、服務和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。
SFTP 的 SSH 授權金鑰。 包含選擇性的描述和索引鍵。 密鑰是base64編碼的 SSH 公鑰,格式為:<keyType> <keyData>
例如 ssh-rsa AAAABBBB。範例:--ssh_authorized_key description=description key=“ssh-rsa AAAABBBB”或 --ssh_authorized_key key=“ssh-rsa AAAABBBB”。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID
設定預設訂用帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az storage account local-user create (storage-preview 擴充功能)
為指定的記憶體帳戶建立本機使用者。
az storage account local-user create --account-name
--name
--resource-group
[--allow-acl-auth {false, true}]
[--extended-groups]
[--group-id]
[--has-shared-key {false, true}]
[--has-ssh-key {false, true}]
[--has-ssh-password {false, true}]
[--home-directory]
[--is-nfsv3-enabled {false, true}]
[--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 --group-id 1 --allow-acl-authorization true --extended-groups 3 4 --is-nfsv3-enabled true
必要參數
儲存體帳戶名稱。
本機用戶的名稱。 使用者名稱必須只包含小寫字母和數位。 它只能在記憶體帳戶內是唯一的。
資源群組的名稱。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
選擇性參數
指出是否允許此使用者的 ACL 授權。 將它設定為 false,以不允許使用 ACL 授權。
補充群組成員資格。 僅適用於啟用 NFSv3 存取的本機使用者。
關聯使用者群組的標識碼。
指出共用金鑰是否存在。 將它設定為 false,以移除現有的共用金鑰。
指出 SSH 金鑰是否存在。 將它設定為 false 以移除現有的 SSH 金鑰。
指出 SSH 密碼是否存在。 將它設定為 false 以移除現有的 SSH 密碼。
主目錄。
指出是否已啟用本機使用者以使用NFSv3通訊協議進行存取。
許可權範圍自變數清單,其中包含許可權、服務和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。
SFTP 的 SSH 授權金鑰。 包含選擇性的描述和索引鍵。 密鑰是base64編碼的 SSH 公鑰,格式為:<keyType> <keyData>
例如 ssh-rsa AAAABBBB。範例:--ssh_authorized_key description=description key=“ssh-rsa AAAABBBB”或 --ssh_authorized_key key=“ssh-rsa AAAABBBB”。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID
設定預設訂用帳戶。
增加記錄詳細資訊。 使用 --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}
必要參數
儲存體帳戶名稱。
本機用戶的名稱。 使用者名稱必須只包含小寫字母和數位。 它只能在記憶體帳戶內是唯一的。
資源群組的名稱。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID
設定預設訂用帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az storage account local-user delete (storage-preview 擴充功能)
刪除本機使用者。
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}
必要參數
儲存體帳戶名稱。
本機用戶的名稱。 使用者名稱必須只包含小寫字母和數位。 它只能在記憶體帳戶內是唯一的。
資源群組的名稱。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID
設定預設訂用帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az storage account local-user list
列出記憶體帳戶的本機使用者。
az storage account local-user list --account-name
--resource-group
[--filter]
[--include]
[--maxpagesize]
範例
列出記憶體帳戶的本機使用者
az storage account local-user list --account-name {account-name} -g {resource-group}
必要參數
儲存體帳戶名稱。
資源群組的名稱。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
選擇性參數
選擇性。 指定時,只會列出以篩選開頭的本機用戶名稱。 預設值為 None。
選擇性,指定時,會列出為特定通訊協定啟用的本機使用者。 預設會列出所有使用者。 “nfsv3” 預設值為 None。
選擇性指定清單回應中將包含的本機用戶數目上限。 預設值為 None。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID
設定預設訂用帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az storage account local-user list (storage-preview 擴充功能)
列出記憶體帳戶的本機使用者。
az storage account local-user list --account-name
--resource-group
[--filter]
[--include]
[--maxpagesize]
範例
列出名稱開頭為test且只傳回3個結果的記憶體帳戶本機使用者
az storage account local-user list --account-name {account-name} -g {resource-group} --filter "startswith(name, test)" --maxpagesize 3
必要參數
儲存體帳戶名稱。
資源群組的名稱。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
選擇性參數
選擇性。 指定時,只會列出以篩選開頭的本機用戶名稱。 預設值為 None。
選擇性,指定時,會列出為特定通訊協定啟用的本機使用者。 預設會列出所有使用者。 “nfsv3” 預設值為 None。
選擇性指定清單回應中將包含的本機用戶數目上限。 預設值為 None。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID
設定預設訂用帳戶。
增加記錄詳細資訊。 使用 --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}
必要參數
儲存體帳戶名稱。
本機用戶的名稱。 使用者名稱必須只包含小寫字母和數位。 它只能在記憶體帳戶內是唯一的。
資源群組的名稱。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID
設定預設訂用帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az storage account local-user list-keys (storage-preview 擴充功能)
列出本機用戶的共用密鑰和 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}
必要參數
儲存體帳戶名稱。
本機用戶的名稱。 使用者名稱必須只包含小寫字母和數位。 它只能在記憶體帳戶內是唯一的。
資源群組的名稱。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID
設定預設訂用帳戶。
增加記錄詳細資訊。 使用 --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}
必要參數
儲存體帳戶名稱。
本機用戶的名稱。 使用者名稱必須只包含小寫字母和數位。 它只能在記憶體帳戶內是唯一的。
資源群組的名稱。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID
設定預設訂用帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az storage account local-user regenerate-password (storage-preview 擴充功能)
重新產生本機使用者的 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}
必要參數
儲存體帳戶名稱。
本機用戶的名稱。 使用者名稱必須只包含小寫字母和數位。 它只能在記憶體帳戶內是唯一的。
資源群組的名稱。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID
設定預設訂用帳戶。
增加記錄詳細資訊。 使用 --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}
必要參數
儲存體帳戶名稱。
本機用戶的名稱。 使用者名稱必須只包含小寫字母和數位。 它只能在記憶體帳戶內是唯一的。
資源群組的名稱。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID
設定預設訂用帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az storage account local-user show (storage-preview 擴充功能)
顯示本機用戶的資訊。
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}
必要參數
儲存體帳戶名稱。
本機用戶的名稱。 使用者名稱必須只包含小寫字母和數位。 它只能在記憶體帳戶內是唯一的。
資源群組的名稱。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID
設定預設訂用帳戶。
增加記錄詳細資訊。 使用 --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
必要參數
儲存體帳戶名稱。
本機用戶的名稱。 使用者名稱必須只包含小寫字母和數位。 它只能在記憶體帳戶內是唯一的。
資源群組的名稱。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
選擇性參數
指出共用金鑰是否存在。 將它設定為 false,以移除現有的共用金鑰。
指出 SSH 金鑰是否存在。 將它設定為 false 以移除現有的 SSH 金鑰。
指出 SSH 密碼是否存在。 將它設定為 false 以移除現有的 SSH 密碼。
主目錄。
許可權範圍自變數清單,其中包含許可權、服務和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。
SFTP 的 SSH 授權金鑰。 包含選擇性的描述和索引鍵。 密鑰是base64編碼的 SSH 公鑰,格式為:<keyType> <keyData>
例如 ssh-rsa AAAABBBB。範例:--ssh_authorized_key description=description key=“ssh-rsa AAAABBBB”或 --ssh_authorized_key key=“ssh-rsa AAAABBBB”。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID
設定預設訂用帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az storage account local-user update (storage-preview 擴充功能)
更新本機用戶的屬性。
az storage account local-user update --account-name
--name
--resource-group
[--allow-acl-auth {false, true}]
[--extended-groups]
[--group-id]
[--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 --group-id 2 --allow-acl-authorization false --extended-groups 3 4
必要參數
儲存體帳戶名稱。
本機用戶的名稱。 使用者名稱必須只包含小寫字母和數位。 它只能在記憶體帳戶內是唯一的。
資源群組的名稱。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
選擇性參數
指出是否允許此使用者的 ACL 授權。 將它設定為 false,以不允許使用 ACL 授權。
補充群組成員資格。 僅適用於啟用 NFSv3 存取的本機使用者。
關聯使用者群組的標識碼。
指出共用金鑰是否存在。 將它設定為 false,以移除現有的共用金鑰。
指出 SSH 金鑰是否存在。 將它設定為 false 以移除現有的 SSH 金鑰。
指出 SSH 密碼是否存在。 將它設定為 false 以移除現有的 SSH 密碼。
主目錄。
許可權範圍自變數清單,其中包含許可權、服務和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。
SFTP 的 SSH 授權金鑰。 包含選擇性的描述和索引鍵。 密鑰是base64編碼的 SSH 公鑰,格式為:<keyType> <keyData>
例如 ssh-rsa AAAABBBB。範例:--ssh_authorized_key description=description key=“ssh-rsa AAAABBBB”或 --ssh_authorized_key key=“ssh-rsa AAAABBBB”。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID
設定預設訂用帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。