Share via


az mysql flexible-server identity

管理伺服器使用者指派的身分識別。

命令

名稱 Description 類型 狀態
az mysql flexible-server identity assign

將使用者已簽署的受控識別新增至伺服器。

核心 GA
az mysql flexible-server identity list

列出來自伺服器的所有使用者指派受控識別。

核心 GA
az mysql flexible-server identity remove

從伺服器移除使用者已簽署的受控識別。

核心 GA
az mysql flexible-server identity show

從伺服器取得使用者指派的受控識別。

核心 GA

az mysql flexible-server identity assign

將使用者已簽署的受控識別新增至伺服器。

az mysql flexible-server identity assign --identity
                                         --resource-group
                                         --server-name
                                         [--no-wait]

範例

將身分識別 'test-identity' 和 'test-identity-2' 新增至伺服器 'testsvr'。

az mysql flexible-server identity assign -g testgroup -s testsvr --identity test-identity test-identity-2

必要參數

--identity -n

以空格分隔的名稱或識別碼的身分識別。

--resource-group -g

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

--server-name -s

伺服器的名稱。 名稱只能包含小寫字母、數字及連字號 (-) 字元。 最少 3 個字元,最多 63 個字元。

選擇性參數

--no-wait

請勿等候長時間執行的作業完成。

預設值: False
全域參數
--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 mysql flexible-server identity list

列出來自伺服器的所有使用者指派受控識別。

az mysql flexible-server identity list --resource-group
                                       --server-name

範例

列出伺服器 'testvr' 中的所有身分識別。

az mysql flexible-server identity list -g testgroup -s testsvr

必要參數

--resource-group -g

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

--server-name -s

伺服器的名稱。 名稱只能包含小寫字母、數字及連字號 (-) 字元。 最少 3 個字元,最多 63 個字元。

全域參數
--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 mysql flexible-server identity remove

從伺服器移除使用者已簽署的受控識別。

az mysql flexible-server identity remove --identity
                                         --resource-group
                                         --server-name
                                         [--no-wait]
                                         [--yes]

範例

從伺服器 'testvr' 移除身分識別 'test-identity'。

az mysql flexible-server identity remove -g testgroup -s testsvr --identity test-identity

必要參數

--identity -n

以空格分隔的名稱或識別碼的身分識別。

--resource-group -g

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

--server-name -s

伺服器的名稱。 名稱只能包含小寫字母、數字及連字號 (-) 字元。 最少 3 個字元,最多 63 個字元。

選擇性參數

--no-wait

請勿等候長時間執行的作業完成。

預設值: False
--yes -y

不提示確認。

預設值: False
全域參數
--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 mysql flexible-server identity show

從伺服器取得使用者指派的受控識別。

az mysql flexible-server identity show --identity
                                       --resource-group
                                       --server-name

範例

從伺服器 'testvr' 取得身分識別 'test-identity'。

az mysql flexible-server identity show -g testgroup -s testsvr --identity test-identity

必要參數

--identity -n

要顯示之身分識別的名稱或識別碼。

--resource-group -g

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

--server-name -s

伺服器的名稱。 名稱只能包含小寫字母、數字及連字號 (-) 字元。 最少 3 個字元,最多 63 個字元。

全域參數
--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 來取得完整偵錯記錄。