az blueprint artifact role

注意

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

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

命令

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

建立藍圖角色成品。

擴充 GA
az blueprint artifact role update

更新藍圖角色成品。

擴充 GA

az blueprint artifact role create

建立藍圖角色成品。

az blueprint artifact role create --artifact-name
                                  --blueprint-name
                                  --principal-ids
                                  --role-definition-id
                                  [--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 中的使用者或群組身分識別陣列,或藍圖定義中對應參數的參考。 roleDefinition 會套用至每個身分識別。

--role-definition-id

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

選擇性參數

--depends-on

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

--description

藍圖成品的描述。

--display-name

這個成品的 DisplayName。

--management-group -m

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

--resource-group-art

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

--subscription -s

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

全域參數
--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 blueprint artifact role update

更新藍圖角色成品。

az blueprint artifact role update --artifact-name
                                  --blueprint-name
                                  [--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

藍圖定義的名稱。

選擇性參數

--depends-on

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

--description

藍圖成品的描述。

--display-name

這個成品的 DisplayName。

--management-group -m

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

--resource-group-art

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

--subscription -s

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

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