共用方式為


az postgres flexible-server identity

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

命令

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

將使用者指派的受控識別新增至伺服器。

核心 加語
az postgres flexible-server identity list

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

核心 加語
az postgres flexible-server identity remove

從伺服器移除使用者指派的受控識別。

核心 加語
az postgres flexible-server identity show

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

核心 加語
az postgres flexible-server identity update

更新以在伺服器上啟用或停用系統指派的受控識別。

核心 加語

az postgres flexible-server identity assign

將使用者指派的受控識別新增至伺服器。

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

範例

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

az postgres 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 postgres flexible-server identity list

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

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

範例

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

az postgres 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 postgres flexible-server identity remove

從伺服器移除使用者指派的受控識別。

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

範例

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

az postgres 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 postgres flexible-server identity show

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

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

範例

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

az postgres 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。

az postgres flexible-server identity update

更新以在伺服器上啟用或停用系統指派的受控識別。

az postgres flexible-server identity update --resource-group
                                            --server-name
                                            --system-assigned {Disabled, Enabled}
                                            [--no-wait]

範例

在伺服器上啟用系統指派的受控識別。

az postgres flexible-server identity update -g testgroup -s testsvr --system-assigned Enabled

必要參數

--resource-group -g

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

--server-name -s

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

--system-assigned

啟用或停用系統指派的身分識別,以向雲端服務進行驗證,而不需將認證儲存在程式代碼中。 預設值為 Disabled

接受的值: Disabled, Enabled

選擇性參數

--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。