你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az eventgrid system-topic

注意

此命令组具有在 Azure CLI 和至少一个扩展中定义的命令。 安装每个扩展,使其受益于其扩展功能。 详细了解扩展。

管理系统主题。

命令

名称 说明 类型 状态
az eventgrid system-topic create

创建系统主题。

核心 GA
az eventgrid system-topic create (eventgrid 扩展)

创建系统主题。

分机 预览版
az eventgrid system-topic delete

删除系统主题。

核心 GA
az eventgrid system-topic delete (eventgrid 扩展)

删除系统主题。

分机 预览
az eventgrid system-topic event-subscription

管理系统主题的事件订阅。

核心和扩展 GA
az eventgrid system-topic event-subscription create

为系统主题创建新的事件订阅。

核心 GA
az eventgrid system-topic event-subscription create (eventgrid 扩展)

为系统主题创建新的事件订阅。

分机 预览版
az eventgrid system-topic event-subscription delete

删除系统主题的事件订阅。

核心 GA
az eventgrid system-topic event-subscription delete (eventgrid 扩展)

删除系统主题的事件订阅。

分机 预览
az eventgrid system-topic event-subscription list

列出特定系统主题的事件订阅。

核心 GA
az eventgrid system-topic event-subscription list (eventgrid 扩展)

列出特定系统主题的事件订阅。

分机 预览
az eventgrid system-topic event-subscription show

获取系统主题的事件订阅的详细信息。

核心 GA
az eventgrid system-topic event-subscription show (eventgrid 扩展)

获取系统主题的事件订阅的详细信息。

分机 预览
az eventgrid system-topic event-subscription update

更新系统主题的事件订阅。

核心 GA
az eventgrid system-topic event-subscription update (eventgrid 扩展)

更新系统主题的事件订阅。

分机 预览
az eventgrid system-topic list

列出可用的系统主题。

核心 GA
az eventgrid system-topic list (eventgrid 扩展)

列出可用的系统主题。

扩展 预览
az eventgrid system-topic show

获取系统主题的详细信息。

核心 GA
az eventgrid system-topic show (eventgrid 扩展)

获取系统主题的详细信息。

分机 预览
az eventgrid system-topic update

更新系统主题。

核心 GA
az eventgrid system-topic update (eventgrid 扩展)

更新系统主题。

分机 预览

az eventgrid system-topic create

创建系统主题。

az eventgrid system-topic create --name
                                 --resource-group
                                 --source
                                 --topic-type
                                 [--identity {noidentity, systemassigned}]
                                 [--location]
                                 [--mi-system-assigned]
                                 [--mi-user-assigned]
                                 [--tags]

示例

为存储帐户源创建新的系统主题。

az eventgrid system-topic create -g rg1 --name systemtopic1 --location westus2 --topic-type microsoft.storage.storageaccounts --source /subscriptions/1b3b4501-23b9-4790-c31b-ddbd88d72123/resourceGroups/rg2/providers/Microsoft.Storage/storageAccounts/stgaccountname

使用 systemassigned 标识创建新的系统主题

az eventgrid system-topic create -g rg1 --name systemtopic1 --location westus2 --topic-type microsoft.storage.storageaccounts --source /subscriptions/1b3b4501-23b9-4790-c31b-ddbd88d72123/resourceGroups/rg2/providers/Microsoft.Storage/storageAccounts/stgaccountname --identity systemassigned

必需参数

--name -n

系统主题的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--source

主题的 ARM ID,例如 /subscriptions/{SubId}/resourceGroups/{RgName}/providers/Microsoft。存储/storageAccounts/{AccountName}。

--topic-type

主题类型的名称。

可选参数

--identity
预览 已放弃

参数“identity”已弃用,将在将来的版本中删除。

资源的托管标识类型。 将来将被弃用并替换为 --mi-system-assigned-identity。

接受的值: noidentity, systemassigned
--location -l

位置。 az account list-locations 中的值。 可以使用 az configure --defaults location=<location> 配置默认位置。

--mi-system-assigned

存在此参数表示将使用 SystemAssigned 托管标识。

--mi-user-assigned
预览

在 identityType 为用户或混合时添加用户分配的标识。 此属性适用于所有目标类型,存储Queue 除外。 可以使用多个 --mi-user-assigned 参数来指定多个属性。

--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

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az eventgrid system-topic create (eventgrid 扩展)

预览

命令组“az eventgrid”处于预览状态,正在开发中。 参考和支持级别: https://aka.ms/CLI_refstatus

创建系统主题。

az eventgrid system-topic create --location
                                 --name
                                 --resource-group
                                 --source
                                 --topic-type
                                 [--tags]

示例

为存储帐户源创建新的系统主题。

az eventgrid system-topic create -g rg1 --name systemtopic1 --location westus2 --topic-type microsoft.storage.storageaccounts --source /subscriptions/1b3b4501-23b9-4790-c31b-ddbd88d72123/resourceGroups/rg2/providers/Microsoft.Storage/storageAccounts/stgaccountname

必需参数

--location -l

位置。 az account list-locations 中的值。 可以使用 az configure --defaults location=<location> 配置默认位置。

--name -n

系统主题的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--source

主题的 ARM ID,例如 /subscriptions/{SubId}/resourceGroups/{RgName}/providers/Microsoft。存储/storageAccounts/{AccountName}。

--topic-type

主题类型的名称。

可选参数

--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

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az eventgrid system-topic delete

删除系统主题。

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

示例

删除特定的系统主题。

az eventgrid system-topic delete -g rg1 --name systemtopic1

可选参数

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--name -n

系统主题的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--subscription

订阅的名称或 ID。 可以使用 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

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az eventgrid system-topic delete (eventgrid 扩展)

预览

命令组“az eventgrid”处于预览状态,正在开发中。 参考和支持级别: https://aka.ms/CLI_refstatus

删除系统主题。

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

示例

删除特定的系统主题。

az eventgrid system-topic delete -g rg1 --name systemtopic1

可选参数

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--name -n

系统主题的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--subscription

订阅的名称或 ID。 可以使用 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

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az eventgrid system-topic list

列出可用的系统主题。

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

示例

列出当前 Azure 订阅中的所有系统主题。

az eventgrid system-topic list

列出资源组中的所有系统主题。

az eventgrid system-topic list -g rg1

列出名称包含模式“XYZ”的资源组中的所有系统主题

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

列出资源组中的所有系统主题,名称为“name1”的系统主题除外

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

可选参数

--odata-query

用于筛选列表结果的 OData 查询。 目前仅允许对 Name 属性进行筛选。 支持的操作包括: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

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az eventgrid system-topic list (eventgrid 扩展)

预览

命令组“az eventgrid”处于预览状态,正在开发中。 参考和支持级别: https://aka.ms/CLI_refstatus

列出可用的系统主题。

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

示例

列出当前 Azure 订阅中的所有系统主题。

az eventgrid system-topic list

列出资源组中的所有系统主题。

az eventgrid system-topic list -g rg1

列出名称包含模式“XYZ”的资源组中的所有系统主题

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

列出资源组中的所有系统主题,名称为“name1”的系统主题除外

az eventgrid system-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

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az eventgrid system-topic show

获取系统主题的详细信息。

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

示例

显示系统主题的详细信息。

az eventgrid system-topic show -g rg1 -n systemtopic1

根据资源 ID 显示系统主题的详细信息。

az eventgrid system-topic show --ids /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/systemtopics/systemtopic1

可选参数

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--name -n

系统主题的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--subscription

订阅的名称或 ID。 可以使用 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

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az eventgrid system-topic show (eventgrid 扩展)

预览

命令组“az eventgrid”处于预览状态,正在开发中。 参考和支持级别: https://aka.ms/CLI_refstatus

获取系统主题的详细信息。

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

示例

显示系统主题的详细信息。

az eventgrid system-topic show -g rg1 -n systemtopic1

根据资源 ID 显示系统主题的详细信息。

az eventgrid system-topic show --ids /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/systemtopics/systemtopic1

可选参数

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--name -n

系统主题的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--subscription

订阅的名称或 ID。 可以使用 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

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az eventgrid system-topic update

更新系统主题。

az eventgrid system-topic update [--identity {noidentity, systemassigned}]
                                 [--ids]
                                 [--mi-system-assigned]
                                 [--mi-user-assigned]
                                 [--name]
                                 [--resource-group]
                                 [--subscription]
                                 [--tags]

示例

更新现有系统主题的属性。

az eventgrid system-topic update -g rg1 --name systemtopic1 --tags Dept=IT

更新现有系统主题的标识。

az eventgrid system-topic update -g rg1 --name systemtopic1 --identity systemassigned

可选参数

--identity
预览 已放弃

参数“identity”已弃用,将在将来的版本中删除。

资源的托管标识类型。 将来将被弃用并替换为 --mi-system-assigned-identity。

接受的值: noidentity, systemassigned
--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--mi-system-assigned

存在此参数表示将使用 SystemAssigned 托管标识。

--mi-user-assigned
预览

在 identityType 为用户或混合时添加用户分配的标识。 此属性适用于所有目标类型,存储Queue 除外。 可以使用多个 --mi-user-assigned 参数来指定多个属性。

--name -n

系统主题的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--subscription

订阅的名称或 ID。 可以使用 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

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az eventgrid system-topic update (eventgrid 扩展)

预览

命令组“az eventgrid”处于预览状态,正在开发中。 参考和支持级别: https://aka.ms/CLI_refstatus

更新系统主题。

az eventgrid system-topic update [--ids]
                                 [--name]
                                 [--resource-group]
                                 [--subscription]
                                 [--tags]

示例

更新现有系统主题的属性。

az eventgrid system-topic update -g rg1 --name systemtopic1 --tags Dept=IT

可选参数

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--name -n

系统主题的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--subscription

订阅的名称或 ID。 可以使用 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

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。