az blueprint artifact role

Note

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

Azure 藍圖 將於 2027 年 1 月 31 日正式退役,並於 2026 年 7 月 31 日開始實施分階段限制。 退休後,服務 API 停止回應,這些指令也會停止運作;它們將在後續版本中從 Azure CLI 中移除。 將藍圖定義遷移到 Template Specs,並將指派遷移到 Azure Deployment Stacks(建議)。 遷移指引: https://aka.ms/AzureBlueprintsRetirement 此指令群組隱含被棄用,因為指令群「az blueprint」已被棄用,未來版本將被移除。

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

命令

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

建立藍圖角色成品。

Extension GA
az blueprint artifact role update

更新藍圖角色成品。

Extension GA

az blueprint artifact role create

重大變更

此命令已隱含取代,因為命令群組 'az blueprint' 已被取代,且將在未來的版本中移除。 Azure 藍圖 將於 2027 年 1 月 31 日正式退役,並於 2026 年 7 月 31 日開始實施分階段限制。 退休後,服務 API 停止回應,這些指令也會停止運作;它們將在後續版本中從 Azure CLI 中移除。 將藍圖定義遷移到 Template Specs,並將指派遷移到 Azure Deployment Stacks(建議)。 遷移指引: https://aka.ms/AzureBlueprintsRetirement

建立藍圖角色成品。

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

重大變更

此命令已隱含取代,因為命令群組 'az blueprint' 已被取代,且將在未來的版本中移除。 Azure 藍圖 將於 2027 年 1 月 31 日正式退役,並於 2026 年 7 月 31 日開始實施分階段限制。 退休後,服務 API 停止回應,這些指令也會停止運作;它們將在後續版本中從 Azure CLI 中移除。 將藍圖定義遷移到 Template Specs,並將指派遷移到 Azure Deployment Stacks(建議)。 遷移指引: https://aka.ms/AzureBlueprintsRetirement

更新藍圖角色成品。

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