Share via


az network-analytics data-product

注意

此參考是 Azure CLI 的網路分析延伸模組的一部分(2.51.0 版或更高版本)。 擴充功能會在您第一次執行 az network-analytics data-product 命令時自動安裝。 深入了解擴充功能。

Azure Operator Insights 數據產品作業。

命令

名稱 Description 類型 狀態
az network-analytics data-product add-user-role

將角色指派給數據產品。

副檔名 GA
az network-analytics data-product create

建立數據產品資源。

副檔名 GA
az network-analytics data-product delete

刪除資料產品資源。

副檔名 GA
az network-analytics data-product list

依資源群組列出數據產品。

副檔名 GA
az network-analytics data-product list-roles-assignment

列出與數據產品相關聯的使用者角色。

副檔名 GA
az network-analytics data-product remove-user-role

從數據產品中移除角色。

副檔名 GA
az network-analytics data-product show

取得數據產品資源。

副檔名 GA
az network-analytics data-product wait

將 CLI 置於等候狀態,直到符合條件為止。

副檔名 GA

az network-analytics data-product add-user-role

將角色指派給數據產品。

az network-analytics data-product add-user-role --data-type-scope
                                                --principal-id
                                                --principal-type
                                                --role {Reader, SensitiveReader}
                                                --role-id
                                                --user-name
                                                [--data-product-name]
                                                [--ids]
                                                [--resource-group]
                                                [--subscription]

範例

新增使用者角色

az network-analytics data-product add-user-role --data-product-name <dpname> --resource-group <rgname> --data-type-scope " " --principal-id <userid> --principal-type user --role reader --role-id " " --user-name " "

必要參數

--data-type-scope

建立角色指派的數據類型範圍。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

--principal-id

AAD 主體或安全組的物件標識碼。

--principal-type

主體標識碼的類型:使用者、群組或 ServicePrincipal。

--role

要指派給用戶的數據產品角色。

接受的值: Reader, SensitiveReader
--role-id

內建角色的角色標識碼。

--user-name

使用者名稱。

選擇性參數

--data-product-name

數據產品資源名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--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 network-analytics data-product create

建立數據產品資源。

az network-analytics data-product create --data-product-name
                                         --resource-group
                                         [--encryption-key]
                                         [--identity]
                                         [--key-encryption-enable {Disabled, Enabled}]
                                         [--location]
                                         [--major-version]
                                         [--managed-rg]
                                         [--networkacls]
                                         [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                         [--owners]
                                         [--private-links-enabled {Disabled, Enabled}]
                                         [--product]
                                         [--public-network-access {Disabled, Enabled}]
                                         [--publisher]
                                         [--purview-account]
                                         [--purview-collection]
                                         [--redundancy {Disabled, Enabled}]
                                         [--tags]

範例

使用所有參數建立數據產品

az network-analytics data-product create --name dpname --resource-group rgname --location westcentralus --publisher Microsoft --product MCC --major-version  2.0.0 --owners xyz@email --customer-managed-key-encryption-enabled Enabled --key-encryption-enable Enabled --encryption-key '{"keyVaultUri":"<vaulturi>","keyName":"<keyname>","keyVersion":"<version>"}' --managed-rg '{"location":"westcentralus","name":"<mrgname>"}' --networkacls '{"virtualNetworkRule":[{"id":"<ruleid>","action":"<action>","state":"<state>"}],"ipRules":[{"value":"<value>","action":"<action>"}],"allowedQueryIpRangeList":["1.2.3.4-1.2.3.10"],"defaultAction":"Allow"}' --private-links-enabled Enabled --public-network-access Enabled --purview-account perviewaccount --purview-collection collection --redundancy Enabled --identity '{"type":"userAssigned","userAssignedIdentities":{"/subscriptions/<subid>/resourceGroups/<rgname>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<idname>"}}' --tags '{"key1":"value1","key2":"value2"}'

必要參數

--data-product-name --name -n

數據產品資源名稱。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

選擇性參數

--encryption-key

客戶管理的數據產品加密金鑰詳細數據。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

--identity

指派給此資源的受控服務識別。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

--key-encryption-enable

為資料產品啟用客戶管理的金鑰加密旗標。

接受的值: Disabled, Enabled
--location -l

未指定資源所在的地理位置,將會使用資源群組的位置。

--major-version

數據產品的主要版本。

--managed-rg

受控資源群組組態。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

--networkacls

數據產品的網路規則集。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

--no-wait

請勿等候長時間執行的作業完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--owners

與數據產品資源部署相關聯的名稱或電子郵件清單。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

--private-links-enabled

為數據產品資源啟用或停用私人連結的旗標。

接受的值: Disabled, Enabled
--product

數據產品的產品名稱。

--public-network-access

旗標,以啟用或停用數據產品資源的公用存取。

接受的值: Disabled, Enabled
--publisher

數據產品發行者名稱。

--purview-account

要連線之數據產品的 Purview 帳戶 URL。

--purview-collection

要連線之數據產品的 Purview 集合 URL。

--redundancy

為數據產品啟用或停用備援的旗標。

接受的值: Disabled, Enabled
--tags

資源標籤。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

全域參數
--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 network-analytics data-product delete

刪除資料產品資源。

az network-analytics data-product delete [--data-product-name]
                                         [--ids]
                                         [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                         [--resource-group]
                                         [--subscription]
                                         [--yes]

範例

刪除 DP

az network-analytics data-product delete --name <dpname> --resource-group <rg>

選擇性參數

--data-product-name --name -n

數據產品資源名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--no-wait

請勿等候長時間執行的作業完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--yes -y

不提示確認。

預設值: False
全域參數
--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 network-analytics data-product list

依資源群組列出數據產品。

az network-analytics data-product list [--max-items]
                                       [--next-token]
                                       [--resource-group]

範例

列出所有 DP

az network-analytics data-product list

列出 RG 中的 DP

az network-analytics data-product list --resource-group <rg>

選擇性參數

--max-items

命令輸出中要傳回的項目總數。 如果可用的專案總數超過指定的值,則會在命令的輸出中提供令牌。 若要繼續分頁,請在後續命令的自變數中 --next-token 提供令牌值。

--next-token

標記,指定要開始分頁的位置。 這是先前截斷回應中的令牌值。

--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 network-analytics data-product list-roles-assignment

列出與數據產品相關聯的使用者角色。

az network-analytics data-product list-roles-assignment [--data-product-name]
                                                        [--ids]
                                                        [--resource-group]
                                                        [--subscription]

範例

列出角色

az network-analytics data-product list-roles-assignment --data-product-name <dpname> --resource-group <rg>

選擇性參數

--data-product-name

數據產品資源名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--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 network-analytics data-product remove-user-role

從數據產品中移除角色。

az network-analytics data-product remove-user-role --data-type-scope
                                                   --principal-id
                                                   --principal-type
                                                   --role {Reader, SensitiveReader}
                                                   --role-assignment-id
                                                   --role-id
                                                   --user-name
                                                   [--data-product-name]
                                                   [--ids]
                                                   [--resource-group]
                                                   [--subscription]

範例

拿掉使用者角色

az network-analytics data-product remove-user-role --data-product-name <dpname> --resource-group <rg> --data-type-scope " " --principal-id <userid> --principal-type user --role reader --role-id " " --user-name " " --role-assignment-id " "

必要參數

--data-type-scope

建立角色指派的數據類型範圍。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

--principal-id

AAD 主體或安全組的物件標識碼。

--principal-type

主體標識碼的類型:使用者、群組或 ServicePrincipal。

--role

要指派給用戶的數據產品角色。

接受的值: Reader, SensitiveReader
--role-assignment-id

角色指派要求的標識碼。

--role-id

內建角色的角色標識碼。

--user-name

使用者名稱。

選擇性參數

--data-product-name

數據產品資源名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--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 network-analytics data-product show

取得數據產品資源。

az network-analytics data-product show [--data-product-name]
                                       [--ids]
                                       [--resource-group]
                                       [--subscription]

範例

取得 DP

az network-analytics data-product show --name <dpname> --resource-group <rg>

選擇性參數

--data-product-name --name -n

數據產品資源名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--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 network-analytics data-product wait

將 CLI 置於等候狀態,直到符合條件為止。

az network-analytics data-product wait [--created]
                                       [--custom]
                                       [--data-product-name]
                                       [--deleted]
                                       [--exists]
                                       [--ids]
                                       [--interval]
                                       [--resource-group]
                                       [--subscription]
                                       [--timeout]
                                       [--updated]

選擇性參數

--created

請等候在 'Succeeded' 使用 'provisioningState' 建立。

預設值: False
--custom

等到條件符合自定義 JMESPath 查詢為止。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。

--data-product-name --name -n

數據產品資源名稱。

--deleted

等到刪除為止。

預設值: False
--exists

等候資源存在。

預設值: False
--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--interval

輪詢間隔以秒為單位。

預設值: 30
--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--timeout

以秒為單位的等候上限。

預設值: 3600
--updated

等到 provisioningState 更新為 'Succeeded'。

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