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

az eventgrid partner namespace channel

管理合作伙伴频道。

命令

名称 说明 类型 状态
az eventgrid partner namespace channel create

为合作伙伴命名空间创建新通道。

核心 GA
az eventgrid partner namespace channel delete

删除合作伙伴命名空间。

核心 GA
az eventgrid partner namespace channel list

列出可用的合作伙伴频道。

核心 GA
az eventgrid partner namespace channel show

获取合作伙伴命名空间下频道的详细信息。

核心 GA
az eventgrid partner namespace channel update

更新合作伙伴命名空间下频道的详细信息。

核心 GA

az eventgrid partner namespace channel create

为合作伙伴命名空间创建新通道。

az eventgrid partner namespace channel create --channel-type {PartnerDestination, PartnerTopic}
                                              --destination-rg
                                              --destination-sub-id
                                              --name
                                              --partner-namespace-name
                                              --resource-group
                                              [--aad-app-id]
                                              [--aad-tenant-id]
                                              [--act-exp-date]
                                              [--ed-serv-cont]
                                              [--endpoint-url]
                                              [--event-type-kind {inline}]
                                              [--inline-event-type]
                                              [--message-for-activation]
                                              [--partner-destination-name]
                                              [--partner-topic-name]
                                              [--partner-topic-source]

示例

使用内联事件类型创建 PartnerDestination 类型的新通道。

az eventgrid partner namespace channel create -g rg1 --name channel1 \
  --channel-type PartnerDestination --partner-namespace-name namespace1 \
  --partner-destination-name destination1 --destination-sub-id e14e31c8-0ce7-4ff5-be5b-dd2b2a3f3535 --destination-rg rg2

使用内联事件类型创建 PartnerTopic 类型的新通道。

az eventgrid partner namespace channel create -g rg1 --name channel1 \
  --channel-type PartnerTopic --partner-namespace-name namespace1 \
  --partner-topic-name topic1 \
   --destination-sub-id e14e31c8-0ce7-4ff5-be5b-dd2b2a3f3535 --destination-rg rg2 \
  --partner-topic-source /subscriptions/1b3b4501-23b9-4790-c31b-ddbd88d72123/resourceGroups/rg2/providers/Microsoft.Storage/storageAccounts/stgaccountname \
  --inline-event-type eventkey1 description="My event type." \
  --inline-event-type eventkey2 description="My second event type."

必需参数

--channel-type

表示事件方向流的事件通道的类型。

接受的值: PartnerDestination, PartnerTopic
--destination-rg

订阅服务器的 Azure 资源组,请求发布者创建通道资源。 与此资源组关联的相应合作伙伴资源(合作伙伴主题或合作伙伴目标)将在该资源组下创建。

--destination-sub-id

请求发布者创建频道资源的订阅服务器的 Azure 订阅 ID。 与此 Azure 订阅关联的相应合作伙伴资源(合作伙伴主题或合作伙伴目标)将在此 Azure 订阅下创建。

--name -n

渠道的名称。

--partner-namespace-name

合作伙伴命名空间的名称。

--resource-group -g

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

可选参数

--aad-app-id --azure-active-directory-application-id-or-uri

用于获取访问令牌的 Azure Active Directory 应用程序 ID 或 URI,该令牌将作为持有者令牌包含在传递请求中。

--aad-tenant-id --azure-active-directory-tenant-id

用于获取访问令牌的 Azure Active Directory 租户 ID,该令牌将作为传递请求中的持有者令牌包含在内。

--act-exp-date --activation-expiration-date

UTC ISO 8601 格式的日期或日期/时间(例如,“2022-02-17T01:59:59+00:00”或“2022-02-17”),之后频道和相应的合作伙伴主题将过期并自动删除。 如果未指定此时间,则默认将过期日期设置为 7 天。

--ed-serv-cont --endpoint-service-context

与此合作伙伴目标关联的终结点上下文。

--endpoint-url

表示合作伙伴目标的终结点的 URL。

--event-type-kind

所使用的事件类型。

接受的值: inline
--inline-event-type

为现有合作伙伴命名空间(类型为合作伙伴主题或合作伙伴目标)创建频道。 如果频道类型是合作伙伴主题,还可以添加内联事件类型信息。 可以使用多个 --inline-event-type 参数来指定多个属性。

用法:--inline-event-type KEY [description=] [documentation-url=]
[data-schema-url=]示例:--inline-event-type event1
description=“我的内联事件类型。”
documentation-url=https://www.microsoft.com
data-schema-url=https://www.microsoft.com.

--message-for-activation

可在审批过程中使用的上下文或有用的消息。

--partner-destination-name --pr-dest-n

合作伙伴目标的名称。

--partner-topic-name

合作伙伴主题的名称。

--partner-topic-source

构成事件的合作伙伴源的资源的标识符。 这表示合作伙伴资源模型中的唯一资源。

全局参数
--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 partner namespace channel delete

删除合作伙伴命名空间。

az eventgrid partner namespace channel delete [--ids]
                                              [--name]
                                              [--partner-namespace-name]
                                              [--resource-group]
                                              [--subscription]
                                              [--yes]

示例

删除特定的合作伙伴命名空间。

az eventgrid partner namespace channel delete -g rg1 --partner-namespace-name partnernamespace1 --name channelname1

可选参数

--ids

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

--name -n

渠道的名称。

--partner-namespace-name

合作伙伴命名空间的名称。

--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 partner namespace channel list

列出可用的合作伙伴频道。

az eventgrid partner namespace channel list --partner-namespace-name
                                            --resource-group
                                            [--odata-query]

示例

列出特定合作伙伴命名空间中的所有通道。

az eventgrid partner namespace channel list -g rg1 --partner-namespace-name partnernamespace1

列出名称包含模式“XYZ”的合作伙伴命名空间下的所有通道

az eventgrid partner namespace channel list -g rg1 --partner-namespace-name partnernamespace1  --odata-query "Contains(name, 'XYZ')"

必需参数

--partner-namespace-name

合作伙伴命名空间的名称。

--resource-group -g

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

可选参数

--odata-query

用于筛选列表结果的 OData 查询。 目前仅允许对 Name 属性进行筛选。 支持的操作包括:CONTAINS、eq(等于)、ne(不等于)、AND、OR 和 NOT。

全局参数
--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 partner namespace channel show

获取合作伙伴命名空间下频道的详细信息。

az eventgrid partner namespace channel show [--ids]
                                            [--name]
                                            [--partner-namespace-name]
                                            [--resource-group]
                                            [--subscription]

示例

显示通道的详细信息。

az eventgrid partner namespace channel show -g rg1 --partner-namespace-name partnernamespace1 --name channelname1

根据资源 ID 显示通道的详细信息。

az eventgrid partner namespace channel show --ids /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/partnenamespaces/partnernamespace1/channels/channelName1

可选参数

--ids

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

--name -n

渠道的名称。

--partner-namespace-name

合作伙伴命名空间的名称。

--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 partner namespace channel update

更新合作伙伴命名空间下频道的详细信息。

az eventgrid partner namespace channel update [--aad-app-id]
                                              [--aad-tenant-id]
                                              [--act-exp-date]
                                              [--endpoint-base-url]
                                              [--endpoint-url]
                                              [--event-type-kind {inline}]
                                              [--ids]
                                              [--inline-event-type]
                                              [--name]
                                              [--partner-namespace-name]
                                              [--resource-group]
                                              [--subscription]

示例

更新通道的过期时间。

az eventgrid partner namespace channel update -g rg1 \
  --partner-namespace-name partnernamespace1 \
  --name channelname1 \
  --activation-expiration-date 2022-06-14T05:37:51.272Z \

更新通道的内联事件。

az eventgrid partner namespace channel update -g rg1 \
  --partner-namespace-name partnernamespace1 \
  --name channelname1 \
  --event-type-kind inline --inline-event-type eventtype1 documentation-url=https://www.microsoft.com

可选参数

--aad-app-id --azure-active-directory-application-id-or-uri

用于获取访问令牌的 Azure Active Directory 应用程序 ID 或 URI,该令牌将作为持有者令牌包含在传递请求中。

--aad-tenant-id --azure-active-directory-tenant-id

用于获取访问令牌的 Azure Active Directory 租户 ID,该令牌将作为传递请求中的持有者令牌包含在内。

--act-exp-date --activation-expiration-date

UTC ISO 8601 格式的日期或日期/时间(例如,“2022-02-17T01:59:59+00:00”或“2022-02-17”),之后频道和相应的合作伙伴主题将过期并自动删除。 如果未指定此时间,则默认将过期日期设置为 7 天。

--endpoint-base-url

合作伙伴目标的终结点基 URL。

--endpoint-url

表示合作伙伴目标的终结点的 URL。

--event-type-kind

所使用的事件类型。

接受的值: inline
--ids

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

--inline-event-type

添加内联事件类型信息。 可以使用多个 --inline-event-type 参数来指定多个属性。

用法:--inline-event-type KEY [description=] [documentation-url=]
[data-schema-url=]示例:--inline-event-type event1
description=“我的内联事件类型。”
documentation-url=https://www.microsoft.com
data-schema-url=https://www.microsoft.com.

--name -n

渠道的名称。

--partner-namespace-name

合作伙伴命名空间的名称。

--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 获取完整的调试日志。