Share via


az attestation policy

注意

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

命令群組「證明」是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

管理原則。

命令

名稱 Description 類型 狀態
az attestation policy reset

重設指定租用戶的證明原則,並還原為默認原則。

副檔名 實驗性
az attestation policy set

設定指定之證明類型的原則。

副檔名 實驗性
az attestation policy show

擷取指定之證明類型的目前原則。

副檔名 實驗性

az attestation policy reset

實驗

命令群組「證明」是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

重設指定租用戶的證明原則,並還原為默認原則。

az attestation policy reset --attestation-type {OpenEnclave, SevSnpVm, SgxEnclave, Tpm}
                            [--id]
                            [--name]
                            [--policy-jws]
                            [--resource-group]

範例

重設指定租用戶的證明原則,並還原為默認原則。

az attestation policy reset -n "myattestationprovider" -g "MyResourceGroup" --attestation-type SGX-OpenEnclaveSDK --policy-jws "eyJhbGciOiJub25lIn0.."

必要參數

--attestation-type

證明的類型。

接受的值: OpenEnclave, SevSnpVm, SgxEnclave, Tpm

選擇性參數

--id

提供者的資源標識碼。 如果您已經指定 --id,請省略 --resource-group/-g 或 --name/-n。

--name -n

證明提供者的名稱。

--policy-jws

具有空白原則檔的 JSON Web 簽章。

預設值: eyJhbGciOiJub25lIn0..
--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 attestation policy set

實驗

命令群組「證明」是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

設定指定之證明類型的原則。

az attestation policy set --attestation-type {OpenEnclave, SevSnpVm, SgxEnclave, Tpm}
                          [--id]
                          [--name]
                          [--new-attestation-policy]
                          [--new-attestation-policy-file]
                          [--policy-format]
                          [--resource-group]

範例

使用 JWT 內容設定指定之證明類型的原則。

az attestation policy set -n "myattestationprovider" -g "MyResourceGroup" --attestation-type SGX-OpenEnclaveSDK --new-attestation-policy "{JWT}" --policy-format JWT

使用文字內容設定指定之證明類型的原則。

az attestation policy set -n "myattestationprovider" -g "MyResourceGroup" --attestation-type SGX-OpenEnclaveSDK --new-attestation-policy "{json_text}"

使用檔名設定指定之證明類型的原則。

az attestation policy set -n "myattestationprovider" -g "MyResourceGroup" --attestation-type SGX-OpenEnclaveSDK --new-attestation-policy-file "{file_name}" --policy- format JWT

必要參數

--attestation-type

證明的類型。

接受的值: OpenEnclave, SevSnpVm, SgxEnclave, Tpm

選擇性參數

--id

提供者的資源標識碼。 如果您已經指定 --id,請省略 --resource-group/-g 或 --name/-n。

--name -n

證明提供者的名稱。

--new-attestation-policy

新證明原則的內容(文字或 JWT)。

--new-attestation-policy-file -f

新證明原則的檔名。

--policy-format

指定原則的格式,即 Text 或 JWT (JSON Web Token)。 允許的值:JWT、Text。

預設值: Text
--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 attestation policy show

實驗

命令群組「證明」是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

擷取指定之證明類型的目前原則。

az attestation policy show --attestation-type {OpenEnclave, SevSnpVm, SgxEnclave, Tpm}
                           [--id]
                           [--name]
                           [--resource-group]

範例

擷取指定之證明類型的目前原則。

az attestation policy show -n "myattestationprovider" -g "MyResourceGroup" --attestation-type SGX-OpenEnclaveSDK

必要參數

--attestation-type

證明的類型。

接受的值: OpenEnclave, SevSnpVm, SgxEnclave, Tpm

選擇性參數

--id

提供者的資源標識碼。 如果您已經指定 --id,請省略 --resource-group/-g 或 --name/-n。

--name -n

證明提供者的名稱。

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