az containerapp secret
管理秘密的命令。
命令
名稱 | Description | 類型 | 狀態 |
---|---|---|---|
az containerapp secret list |
列出容器應用程式的秘密。 |
Core | GA |
az containerapp secret remove |
從容器應用程式移除秘密。 |
Core | GA |
az containerapp secret set |
Create/update secrets. |
Core | GA |
az containerapp secret show |
顯示秘密的詳細數據。 |
Core | GA |
az containerapp secret list
列出容器應用程式的秘密。
az containerapp secret list --name
--resource-group
[--show-values]
範例
列出容器應用程式的秘密。
az containerapp secret list -n my-containerapp -g MyResourceGroup
必要參數
Containerapp 的名稱。 名稱必須包含小寫英數位元或 '-'、以字母開頭、以英數位元結尾、不能有 '--' 且必須小於 32 個字元。
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
選擇性參數
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
顯示秘密值。
屬性 | 值 |
---|---|
預設值: | False |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
屬性 | 值 |
---|---|
預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
屬性 | 值 |
---|---|
預設值: | False |
Output format.
屬性 | 值 |
---|---|
預設值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
屬性 | 值 |
---|---|
預設值: | False |
az containerapp secret remove
從容器應用程式移除秘密。
az containerapp secret remove --secret-names
[--ids]
[--name]
[--resource-group]
[--subscription]
範例
從容器應用程式移除秘密。
az containerapp secret remove -n my-containerapp -g MyResourceGroup --secret-names MySecret MySecret2
必要參數
容器應用程式的秘密清單。 以空格分隔的秘密值名稱。
選擇性參數
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
Containerapp 的名稱。 名稱必須包含小寫英數位元或 '-'、以字母開頭、以英數位元結尾、不能有 '--' 且必須小於 32 個字元。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
屬性 | 值 |
---|---|
預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
屬性 | 值 |
---|---|
預設值: | False |
Output format.
屬性 | 值 |
---|---|
預設值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
屬性 | 值 |
---|---|
預設值: | False |
az containerapp secret set
Create/update secrets.
az containerapp secret set --secrets
[--ids]
[--name]
[--resource-group]
[--subscription]
範例
將秘密新增至容器應用程式。
az containerapp secret set -n my-containerapp -g MyResourceGroup --secrets MySecretName1=MySecretValue1 MySecretName2=keyvaultref:https://example.vault.azure.net/secrets/mysecret,identityref:/subscriptions/sub/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity
更新秘密。
az containerapp secret set -n my-containerapp -g MyResourceGroup --secrets MyExistingSecretName=MyNewSecretValue MyExistingSecretName2=keyvaultref:https://example.vault.azure.net/secrets/mysecret,identityref:/subscriptions/sub/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity
必要參數
容器應用程式的秘密清單。 'key=value' 或 'key=keyvaultref:keyvaulturl,identityref:identity' 格式的空間分隔值(其中 'key' 不能超過 20 個字符。針對 'identityref',使用 'system' 作為系統定義的身分識別或使用者定義身分識別的資源標識符。
屬性 | 值 |
---|---|
Parameter group: | Configuration Arguments |
選擇性參數
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
Containerapp 的名稱。 名稱必須包含小寫英數位元或 '-'、以字母開頭、以英數位元結尾、不能有 '--' 且必須小於 32 個字元。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
屬性 | 值 |
---|---|
預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
屬性 | 值 |
---|---|
預設值: | False |
Output format.
屬性 | 值 |
---|---|
預設值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
屬性 | 值 |
---|---|
預設值: | False |
az containerapp secret show
顯示秘密的詳細數據。
az containerapp secret show --secret-name
[--ids]
[--name]
[--resource-group]
[--subscription]
範例
顯示秘密的詳細數據。
az containerapp secret show -n my-containerapp -g MyResourceGroup --secret-name MySecret
必要參數
要顯示的秘密名稱。
選擇性參數
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
Containerapp 的名稱。 名稱必須包含小寫英數位元或 '-'、以字母開頭、以英數位元結尾、不能有 '--' 且必須小於 32 個字元。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
屬性 | 值 |
---|---|
預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
屬性 | 值 |
---|---|
預設值: | False |
Output format.
屬性 | 值 |
---|---|
預設值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
屬性 | 值 |
---|---|
預設值: | False |