az grafana service-account token

注意

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

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

命令

名稱 Description 類型 狀態
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 token create

建立新的服務帳戶令牌。

az grafana service-account token create --name
                                        --service-account
                                        --token
                                        [--resource-group]
                                        [--time-to-live]

範例

建立持續 1 天的服務帳戶令牌

az grafana service-account token create -g myResourceGroup -n myGrafana --service-account myAccount --token myToken --time-to-live 1d

必要參數

--name -n

Azure 受控 Grafana 的名稱。

--service-account

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

--token

新服務帳戶令牌的名稱。

選擇性參數

--resource-group -g

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

--time-to-live

存續期。 例如,如果您的金鑰將持續一天,則為 1d。 支持的單位包括:s、m、h、d、w、M、y。

預設值: 1d
全域參數
--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 token delete

刪除服務帳戶令牌。

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

必要參數

--name -n

Azure 受控 Grafana 的名稱。

--service-account

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

--token

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

選擇性參數

--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 token list

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

az grafana service-account token list --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 來取得完整偵錯記錄。