Share via


az grafana service-account

注意

此參考是 Azure CLI 的 amg 延伸模組的一部分(2.38.0 版或更高版本)。 擴充功能會在您第一次執行 az grafana service-account 命令時自動安裝。 深入了解擴充功能。

管理服務帳戶的命令。

命令

名稱 Description 類型 狀態
az grafana service-account create

建立新的服務帳戶。

副檔名 GA
az grafana service-account delete

刪除服務帳戶。

副檔名 GA
az grafana service-account list

列出現有的服務帳戶。

副檔名 GA
az grafana service-account show

取得服務帳戶的詳細數據。

副檔名 GA
az grafana service-account token

管理服務帳戶令牌的命令。

副檔名 GA
az grafana service-account token create

建立新的服務帳戶令牌。

副檔名 GA
az grafana service-account token delete

刪除服務帳戶令牌。

副檔名 GA
az grafana service-account token list

列出現有的服務帳戶令牌。

副檔名 GA
az grafana service-account update

更新服務帳戶。

副檔名 GA

az grafana service-account create

建立新的服務帳戶。

az grafana service-account create --name
                                  --service-account
                                  [--is-disabled {false, true}]
                                  [--resource-group]
                                  [--role {Admin, Editor, Viewer}]

範例

建立具有系統管理員角色的服務帳戶

az grafana service-account create -g myResourceGroup -n myGrafana --service-account myAccount --role admin

必要參數

--name -n

Azure 受控 Grafana 的名稱。

--service-account

服務帳戶名稱。

選擇性參數

--is-disabled

停用服務帳戶。 默認值:false。

接受的值: false, true
--resource-group -g

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

--role -r

Grafana 角色名稱。

接受的值: Admin, Editor, Viewer
預設值: Viewer
全域參數
--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 grafana service-account delete

刪除服務帳戶。

az grafana service-account delete --name
                                  --service-account
                                  [--resource-group]

必要參數

--name -n

Azure 受控 Grafana 的名稱。

--service-account

可識別服務帳戶的標識碼或名稱。

選擇性參數

--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 grafana service-account list

列出現有的服務帳戶。

az grafana service-account list --name
                                [--resource-group]

必要參數

--name -n

Azure 受控 Grafana 的名稱。

選擇性參數

--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 grafana service-account show

取得服務帳戶的詳細數據。

az grafana service-account show --name
                                --service-account
                                [--resource-group]

必要參數

--name -n

Azure 受控 Grafana 的名稱。

--service-account

可識別服務帳戶的標識碼或名稱。

選擇性參數

--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 grafana service-account update

更新服務帳戶。

az grafana service-account update --name
                                  --service-account
                                  [--is-disabled {false, true}]
                                  [--new-name]
                                  [--resource-group]
                                  [--role {Admin, Editor, Viewer}]

範例

停用服務帳戶

az grafana service-account update -g myResourceGroup -n myGrafana --service-account myAccount --is-disabled true

必要參數

--name -n

Azure 受控 Grafana 的名稱。

--service-account

可識別服務帳戶的標識碼或名稱。

選擇性參數

--is-disabled

停用服務帳戶。 默認值:false。

接受的值: false, true
--new-name

服務帳戶的新名稱。

--resource-group -g

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

--role -r

Grafana 角色名稱。

接受的值: Admin, Editor, Viewer
全域參數
--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 來取得完整偵錯記錄。