Share via


az eventgrid topic

注意

此命令群組具有 Azure CLI 和至少一個擴充功能中定義的命令。 安裝每個擴充功能以受益于其擴充功能。 深入了解擴充功能。

管理Azure 事件方格主題。

命令

名稱 Description 類型 狀態
az eventgrid topic create

建立主題。

核心 GA
az eventgrid topic create (eventgrid 擴充功能)

建立主題。

副檔名 預覽版
az eventgrid topic delete

刪除主題。

核心 GA
az eventgrid topic delete (eventgrid 擴充功能)

刪除主題。

副檔名 預覽版
az eventgrid topic event-subscription

管理主題的事件訂閱。

核心 GA
az eventgrid topic event-subscription create

建立主題的新事件訂用帳戶。

核心 GA
az eventgrid topic event-subscription delete

刪除主題的事件訂閱。

核心 GA
az eventgrid topic event-subscription list

列出特定主題的事件訂閱。

核心 GA
az eventgrid topic event-subscription show

取得主題的事件訂用帳戶詳細資料。

核心 GA
az eventgrid topic event-subscription update

更新主題的事件訂閱。

核心 GA
az eventgrid topic key

管理主題的共用存取金鑰。

核心和擴充功能 GA
az eventgrid topic key list

列出主題的共用存取金鑰。

核心 GA
az eventgrid topic key list (eventgrid 擴充功能)

列出主題的共用存取金鑰。

副檔名 預覽版
az eventgrid topic key regenerate

重新產生主題的共用存取金鑰。

核心 GA
az eventgrid topic key regenerate (eventgrid 擴充功能)

重新產生主題的共用存取金鑰。

副檔名 預覽版
az eventgrid topic list

列出可用的主題。

核心 GA
az eventgrid topic list (eventgrid 擴充功能)

列出可用的主題。

副檔名 預覽版
az eventgrid topic private-endpoint-connection

管理主題的私人端點連線。

副檔名 預覽版
az eventgrid topic private-endpoint-connection approve

核准主題的私人端點連線要求。

副檔名 預覽版
az eventgrid topic private-endpoint-connection delete

刪除主題的私人端點連線。

副檔名 預覽版
az eventgrid topic private-endpoint-connection list

列出主題之所有私人端點連線的屬性。

副檔名 預覽版
az eventgrid topic private-endpoint-connection reject

拒絕主題的私人端點連線要求。

副檔名 預覽版
az eventgrid topic private-endpoint-connection show

顯示主題的私人端點連線屬性。

副檔名 預覽版
az eventgrid topic private-link-resource

管理主題的私人連結資源。

副檔名 預覽版
az eventgrid topic private-link-resource list

列出主題之所有私人連結資源的屬性。

副檔名 預覽版
az eventgrid topic private-link-resource show

顯示主題的私人連結資源屬性。

副檔名 預覽版
az eventgrid topic show

取得主題的詳細資料。

核心 GA
az eventgrid topic show (eventgrid 擴充功能)

取得主題的詳細資料。

副檔名 預覽版
az eventgrid topic update

更新主題。

核心 GA
az eventgrid topic update (eventgrid 擴充功能)

更新主題。

副檔名 預覽版

az eventgrid topic create

建立主題。

az eventgrid topic create --name
                          --resource-group
                          [--extended-location-name]
                          [--extended-location-type {customlocation}]
                          [--identity {noidentity, systemassigned}]
                          [--inbound-ip-rules]
                          [--input-mapping-default-values]
                          [--input-mapping-fields]
                          [--input-schema {cloudeventschemav1_0, customeventschema, eventgridschema}]
                          [--kind {azure, azurearc}]
                          [--location]
                          [--mi-system-assigned]
                          [--mi-user-assigned]
                          [--public-network-access {disabled, enabled}]
                          [--sku {basic, premium}]
                          [--tags]

範例

建立新的主題。

az eventgrid topic create -g rg1 --name topic1 -l westus2

使用自訂輸入對應建立新的主題。

az eventgrid topic create -g rg1 --name topic1 -l westus2 --input-schema customeventschema --input-mapping-fields topic=myTopicField eventType=myEventTypeField --input-mapping-default-values subject=DefaultSubject dataVersion=1.0

建立新的主題,以接受 CloudEvents V1.0 架構中發佈的事件。

az eventgrid topic create -g rg1 --name topic1 -l westus2 --input-schema cloudeventschemav1_0

建立新的主題,以允許具有基本 Sku 和系統指派身分識別的特定輸入 IP 規則

az eventgrid topic create -g rg1 --name topic1 -l westus2 --public-network-access enabled --inbound-ip-rules 10.0.0.0/8 Allow --inbound-ip-rules 10.2.0.0/8 Allow --sku Basic --identity systemassigned

在 Azure 中建立新主題。

az eventgrid topic create -g rg1 --name topic1 -l westus2

在 Azure 中建立新主題。

az eventgrid topic create -g rg1 --name topic1 -l westus2 --kind azure

在以自訂位置為目標的 AzureArc 中建立新主題。

az eventgrid topic create -g rg1 --name topic1 -l eastus2euap --kind azurearc --extended-location-name /subscriptions/<subid>/resourcegroups/<rgname>/providers/microsoft.extendedlocation/customlocations/<cust-loc-name> --extended-location-type customlocation --input-schema CloudEventSchemaV1_0

必要參數

--name -n

主題的名稱。

--resource-group -g

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

選擇性參數

--extended-location-name
預覽

如果 kind==azurearc,則為擴充位置名稱。

--extended-location-type
預覽

如果 kind==azurearc,則為擴充位置類型。

接受的值: customlocation
--identity
預覽 已被取代

引數 'identity' 已被取代,未來版本將會移除。

資源的受控識別類型。 未來將會被 --mi-system-assigned-identity 取代。

接受的值: noidentity, systemassigned
--inbound-ip-rules

輸入 IP 規則的清單。

以 CIDR 標記法指定 IP 位址的輸入 IP 規則清單,例如 10.0.0.0/8,以及根據 IpMask 的相符專案或不符合的對應動作來執行。 可能的值包括 - 允許。

--input-mapping-default-values

當輸入架構指定為 customeventschema 時,此參數可用來根據預設值來指定輸入對應。 當您的自訂架構不包含對應至此參數所支援三個欄位之一的欄位時,您可以使用此參數。 以 'key=value' 格式指定空格分隔的對應。 允許的索引鍵名稱為 'subject'、'eventtype'、'dataversion'。 對應的值名稱應該指定要用於對應的預設值,而且只有在發行的事件沒有特定欄位的有效對應時,才會使用它們。

--input-mapping-fields

當輸入架構指定為 customeventschema 時,此參數會用來根據功能變數名稱指定輸入對應。 以 'key=value' 格式指定空格分隔的對應。 允許的索引鍵名稱為 'id'、'topic'、'eventtime'、'subject'、'eventtype'、'dataversion'。 對應的值名稱應該指定自訂輸入架構中的欄位名稱。 如果未提供 'id' 或 'eventtime' 的對應,事件方格就會自動產生這兩個欄位的預設值。

--input-schema

將傳入事件發佈至本主題/網域的架構。 如果您將 customeventschema 指定為此參數的值,您也必須提供至少一個 --input_mapping_default_values / --input_mapping_fields 的值。

接受的值: cloudeventschemav1_0, customeventschema, eventgridschema
預設值: eventgridschema
--kind
預覽

主題資源的種類。

接受的值: azure, azurearc
預設值: Azure
--location -l

位置。​​ 來自的值: az account list-locations 。 您可以使用 az configure --defaults location=<location> 設定預設位置。

--mi-system-assigned

此參數的存在表示將使用 SystemAssigned 受控識別。

--mi-user-assigned
預覽

當 identityType 是使用者或混合時,新增使用者指派的身分識別。 此屬性適用于所有目的地類型,但 儲存體Queue 除外。 您可以使用多個 --mi-user-assigned 引數來指定多個屬性。

--public-network-access

這會判斷是否允許透過公用網路傳輸流量。 預設會啟用。 您可以藉由設定進一步限制特定 IP。

接受的值: disabled, enabled
--sku
預覽

資源的 SKU 名稱。

接受的值: basic, premium
預設值: Basic
--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「」 清除現有的標記。

全域參數
--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 eventgrid topic create (eventgrid 擴充功能)

預覽

命令群組 'az eventgrid' 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

建立主題。

az eventgrid topic create --location
                          --name
                          --resource-group
                          [--identity {noidentity, systemassigned}]
                          [--inbound-ip-rules]
                          [--input-mapping-default-values]
                          [--input-mapping-fields]
                          [--input-schema {cloudeventschemav1_0, customeventschema, eventgridschema}]
                          [--public-network-access {disabled, enabled}]
                          [--sku {basic, premium}]
                          [--tags]

範例

建立新的主題。

az eventgrid topic create -g rg1 --name topic1 -l westus2

使用自訂輸入對應建立新的主題。

az eventgrid topic create -g rg1 --name topic1 -l westus2 --input-schema customeventschema --input-mapping-fields topic=myTopicField eventType=myEventTypeField --input-mapping-default-values subject=DefaultSubject dataVersion=1.0

建立新的主題,以接受 CloudEvents V1.0 架構中發佈的事件。

az eventgrid topic create -g rg1 --name topic1 -l westus2 --input-schema cloudeventschemav1_0

建立新的主題,以允許具有基本 Sku 和系統指派身分識別的特定輸入 IP 規則

az eventgrid topic create -g rg1 --name topic1 -l westus2 --public-network-access enabled --inbound-ip-rules 10.0.0.0/8 Allow --inbound-ip-rules 10.2.0.0/8 Allow --sku Basic --identity systemassigned

必要參數

--location -l

位置。​​ 來自的值: az account list-locations 。 您可以使用 az configure --defaults location=<location> 設定預設位置。

--name -n

主題的名稱。

--resource-group -g

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

選擇性參數

--identity

資源的識別類型(例如主題或網域)。

接受的值: noidentity, systemassigned
--inbound-ip-rules

輸入 IP 規則的清單。

以 CIDR 標記法指定 IP 位址的輸入 IP 規則清單,例如 10.0.0.0/8,以及根據 IpMask 的相符專案或不符合的對應動作來執行。 可能的值包括 - 允許。

--input-mapping-default-values

當輸入架構指定為 customeventschema 時,此參數可用來根據預設值來指定輸入對應。 當您的自訂架構不包含對應至此參數所支援三個欄位之一的欄位時,您可以使用此參數。 以 'key=value' 格式指定空格分隔的對應。 允許的索引鍵名稱為 'subject'、'eventtype'、'dataversion'。 對應的值名稱應該指定要用於對應的預設值,而且只有在發行的事件沒有特定欄位的有效對應時,才會使用它們。

--input-mapping-fields

當輸入架構指定為 customeventschema 時,此參數會用來根據功能變數名稱指定輸入對應。 以 'key=value' 格式指定空格分隔的對應。 允許的索引鍵名稱為 'id'、'topic'、'eventtime'、'subject'、'eventtype'、'dataversion'。 對應的值名稱應該指定自訂輸入架構中的欄位名稱。 如果未提供 'id' 或 'eventtime' 的對應,事件方格就會自動產生這兩個欄位的預設值。

--input-schema

將傳入事件發佈至本主題/網域的架構。 如果您將 customeventschema 指定為此參數的值,您也必須提供至少一個 --input_mapping_default_values / --input_mapping_fields 的值。

接受的值: cloudeventschemav1_0, customeventschema, eventgridschema
預設值: eventgridschema
--public-network-access

這會判斷是否允許透過公用網路傳輸流量。 預設會啟用。 您可以藉由設定進一步限制特定 IP。

接受的值: disabled, enabled
--sku

資源的 SKU 名稱。

接受的值: basic, premium
預設值: Basic
--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「」 清除現有的標記。

全域參數
--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 eventgrid topic delete

刪除主題。

az eventgrid topic delete [--ids]
                          [--name]
                          [--resource-group]
                          [--subscription]

範例

刪除主題。

az eventgrid topic delete -g rg1 --name topic1

選擇性參數

--ids

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

--name -n

主題的名稱。

--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 eventgrid topic delete (eventgrid 擴充功能)

預覽

命令群組 'az eventgrid' 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

刪除主題。

az eventgrid topic delete [--ids]
                          [--name]
                          [--resource-group]
                          [--subscription]

範例

刪除主題。

az eventgrid topic delete -g rg1 --name topic1

選擇性參數

--ids

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

--name -n

主題的名稱。

--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 eventgrid topic list

列出可用的主題。

az eventgrid topic list [--odata-query]
                        [--resource-group]

範例

列出目前 Azure 訂用帳戶中的所有主題。

az eventgrid topic list

列出資源群組中的所有主題。

az eventgrid topic list -g rg1

列出名稱包含模式 「XYZ」 的資源群組中的所有主題

az eventgrid topic list -g rg1 --odata-query "Contains(name, 'XYZ')"

列出資源群組中的所有主題,但名稱為 「name1」 的功能變數名稱除外

az eventgrid topic list -g rg1 --odata-query "NOT (name eq 'name1')"

選擇性參數

--odata-query

用於篩選清單結果的 OData 查詢。 [名稱] 屬性目前只允許篩選。 支援的作業包括:CONTAINS、eq (等於)、ne (不等於)、AND、OR 和 NOT。

--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 eventgrid topic list (eventgrid 擴充功能)

預覽

命令群組 'az eventgrid' 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

列出可用的主題。

az eventgrid topic list [--odata-query]
                        [--resource-group]

範例

列出目前 Azure 訂用帳戶中的所有主題。

az eventgrid topic list

列出資源群組中的所有主題。

az eventgrid topic list -g rg1

列出名稱包含模式 「XYZ」 的資源群組中的所有主題

az eventgrid topic list -g rg1 --odata-query "Contains(name, 'XYZ')"

列出資源群組中的所有主題,但名稱為 「name1」 的功能變數名稱除外

az eventgrid topic list -g rg1 --odata-query "NOT (name eq 'name1')"

選擇性參數

--odata-query

用來使用 OData 語法篩選結果的查詢。

--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 eventgrid topic show

取得主題的詳細資料。

az eventgrid topic show [--ids]
                        [--name]
                        [--resource-group]
                        [--subscription]

範例

顯示主題的詳細資料。

az eventgrid topic show -g rg1 -n topic1

根據資源識別碼顯示主題的詳細資料。

az eventgrid topic show --ids /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1

選擇性參數

--ids

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

--name -n

主題的名稱。

--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 eventgrid topic show (eventgrid 擴充功能)

預覽

命令群組 'az eventgrid' 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

取得主題的詳細資料。

az eventgrid topic show [--ids]
                        [--name]
                        [--resource-group]
                        [--subscription]

範例

顯示主題的詳細資料。

az eventgrid topic show -g rg1 -n topic1

根據資源識別碼顯示主題的詳細資料。

az eventgrid topic show --ids /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1

選擇性參數

--ids

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

--name -n

主題的名稱。

--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 eventgrid topic update

更新主題。

az eventgrid topic update [--identity {noidentity, systemassigned}]
                          [--ids]
                          [--inbound-ip-rules]
                          [--mi-system-assigned]
                          [--mi-user-assigned]
                          [--name]
                          [--public-network-access {disabled, enabled}]
                          [--resource-group]
                          [--sku {basic, premium}]
                          [--subscription]
                          [--tags]

範例

使用新的 SKU、身分識別和公用網路存取訊號更新現有主題的屬性。

az eventgrid topic update -g rg1 --name topic1 --sku Premium --identity systemassigned --public-network-access enabled --inbound-ip-rules 10.0.0.0/8 Allow --inbound-ip-rules 10.2.0.0/8 Allow --tags Dept=IT --sku basic

選擇性參數

--identity
預覽 已被取代

引數 'identity' 已被取代,未來版本將會移除。

資源的受控識別類型。 未來將會被 --mi-system-assigned-identity 取代。

接受的值: noidentity, systemassigned
--ids

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

--inbound-ip-rules

以 CIDR 標記法指定 IP 位址的輸入 IP 規則清單,例如 10.0.0.0/8,以及根據 IpMask 的相符專案或不符合的對應動作來執行。 可能的值包括 - 允許。

--mi-system-assigned

此參數的存在表示將使用 SystemAssigned 受控識別。

--mi-user-assigned
預覽

當 identityType 是使用者或混合時,新增使用者指派的身分識別。 此屬性適用于所有目的地類型,但 儲存體Queue 除外。 您可以使用多個 --mi-user-assigned 引數來指定多個屬性。

--name -n

主題的名稱。

--public-network-access

這會判斷是否允許透過公用網路傳輸流量。 預設會啟用。 您可以藉由設定進一步限制特定 IP。

接受的值: disabled, enabled
--resource-group -g

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

--sku
預覽

資源的 SKU 名稱。

接受的值: basic, premium
--subscription

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

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「」 清除現有的標記。

全域參數
--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 eventgrid topic update (eventgrid 擴充功能)

預覽

命令群組 'az eventgrid' 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

更新主題。

az eventgrid topic update [--identity {noidentity, systemassigned}]
                          [--ids]
                          [--inbound-ip-rules]
                          [--name]
                          [--public-network-access {disabled, enabled}]
                          [--resource-group]
                          [--sku {basic, premium}]
                          [--subscription]
                          [--tags]

範例

使用新的 SKU、身分識別和公用網路存取訊號更新現有主題的屬性。

az eventgrid topic update -g rg1 --name topic1 --sku Premium --identity systemassigned --public-network-access enabled --inbound-ip-rules 10.0.0.0/8 Allow --inbound-ip-rules 10.2.0.0/8 Allow --tags Dept=IT --sku basic

選擇性參數

--identity

資源的識別類型(例如主題或網域)。

接受的值: noidentity, systemassigned
--ids

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

--inbound-ip-rules

以 CIDR 標記法指定 IP 位址的輸入 IP 規則清單,例如 10.0.0.0/8,以及根據 IpMask 的相符專案或不符合的對應動作來執行。 可能的值包括 - 允許。

--name -n

主題的名稱。

--public-network-access

這會判斷是否允許透過公用網路傳輸流量。 預設會啟用。 您可以藉由設定進一步限制特定 IP。

接受的值: disabled, enabled
--resource-group -g

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

--sku

資源的 SKU 名稱。

接受的值: basic, premium
--subscription

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

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「」 清除現有的標記。

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