az blueprint artifact role

Note

此參考文獻是Azure CLIblueprint擴充套件(版本 2.50.0 或更高版本)的一部分。 當您第一次執行 az blueprint artifact role az blueprint artifact role 命令時,擴充功能會自動安裝。 深入了解擴充功能。

此命令群組已隱含取代,因為命令群組 'az blueprint' 已被取代,未來版本將會移除。 藍圖和相關聯的命令最早將於 2026 年 7 月淘汰。 建議客戶在該日期之後轉移至範本規範和部署堆疊,以支援其應用場景。 遷移文件可以在 https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/migrate-blueprint取得。

管理藍圖角色指派成品的命令。

命令

名稱 Description 類型 狀態
az blueprint artifact role create

建立藍圖角色成品。

Extension GA
az blueprint artifact role update

更新藍圖角色成品。

Extension GA

az blueprint artifact role create

重大變更

藍圖和相關聯的命令最早將於 2026 年 7 月淘汰。 建議客戶在該日期之後轉移至範本規範和部署堆疊,以支援其應用場景。 遷移文件可以在 https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/migrate-blueprint取得。 此命令已隱含取代,因為命令群組 'az blueprint' 已被取代,且將在未來的版本中移除。

建立藍圖角色成品。

az blueprint artifact role create --artifact-name
                                  --blueprint-name
                                  --principal-ids
                                  --role-definition-id
                                  [--acquire-policy-token]
                                  [--change-reference]
                                  [--depends-on]
                                  [--description]
                                  [--display-name]
                                  [--management-group]
                                  [--resource-group-art]
                                  [--subscription]

範例

建立角色成品

az blueprint artifact role create \
--blueprint-name MyBlueprint --artifact-name MyRole --role-definition-id \
"/providers/Microsoft.Authorization/roleDefinitions/00000000-0000-0000-0000-000000000000" \
--principal-ids "[parameters('[Usergrouporapplicationname]:MyRoleAssignmentName')]"

必要參數

--artifact-name

藍圖成品的名稱。

--blueprint-name

藍圖定義的名稱。

--principal-ids

Azure Active Directory 中的使用者或群組身份陣列,或是 blueprint definiton 中對應參數的參考。 roleDefinition 會套用至每個身分識別。

--role-definition-id

完整角色定義標識碼。僅支援內建角色。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--acquire-policy-token

自動取得 Azure 原則 令牌以進行此資源操作。

屬性
參數群組: Global Policy Arguments
--change-reference

相關變更的 ID 是為此資源操作所參考的。

屬性
參數群組: Global Policy Arguments
--depends-on

必須在指定成品之前部署的成品。

--description

藍圖成品的描述。

--display-name

這個成品的 DisplayName。

--management-group -m

針對藍圖的範圍使用管理群組。

屬性
參數群組: Resource_scope Arguments
--resource-group-art

將指派原則的資源群組成品名稱。

--subscription -s

針對藍圖的範圍使用訂用帳戶。 如果未指定 --management-group,則會使用 --subscription 值或預設訂用帳戶作為範圍。

屬性
參數群組: Resource_scope Arguments
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az blueprint artifact role update

重大變更

藍圖和相關聯的命令最早將於 2026 年 7 月淘汰。 建議客戶在該日期之後轉移至範本規範和部署堆疊,以支援其應用場景。 遷移文件可以在 https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/migrate-blueprint取得。 此命令已隱含取代,因為命令群組 'az blueprint' 已被取代,且將在未來的版本中移除。

更新藍圖角色成品。

az blueprint artifact role update --artifact-name
                                  --blueprint-name
                                  [--acquire-policy-token]
                                  [--change-reference]
                                  [--depends-on]
                                  [--description]
                                  [--display-name]
                                  [--management-group]
                                  [--resource-group-art]
                                  [--subscription]

範例

更新角色成品

az blueprint artifact role update \
--blueprint-name MyBlueprint --artifact-name MyRole --display-name "My Big Role"

必要參數

--artifact-name

藍圖成品的名稱。

--blueprint-name

藍圖定義的名稱。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--acquire-policy-token

自動取得 Azure 原則 令牌以進行此資源操作。

屬性
參數群組: Global Policy Arguments
--change-reference

相關變更的 ID 是為此資源操作所參考的。

屬性
參數群組: Global Policy Arguments
--depends-on

必須在指定成品之前部署的成品。 使用不含任何值的 『--depends-on』 來移除相依性。

--description

藍圖成品的描述。

--display-name

這個成品的 DisplayName。

--management-group -m

針對藍圖的範圍使用管理群組。

屬性
參數群組: Resource_scope Arguments
--resource-group-art

將指派原則的資源群組成品名稱。

--subscription -s

針對藍圖的範圍使用訂用帳戶。 如果未指定 --management-group,則會使用 --subscription 值或預設訂用帳戶作為範圍。

屬性
參數群組: Resource_scope Arguments
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False