你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
New-AzEventGridChannel
同步创建具有指定参数的新通道。
语法
New-AzEventGridChannel
-Name <String>
-PartnerNamespaceName <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-ChannelType <String>]
[-EventTypeInfoInlineEventType <Hashtable>]
[-EventTypeInfoKind <String>]
[-ExpirationTimeIfNotActivatedUtc <DateTime>]
[-MessageForActivation <String>]
[-PartnerDestinationInfoAzureSubscriptionId <String>]
[-PartnerDestinationInfoEndpointServiceContext <String>]
[-PartnerDestinationInfoName <String>]
[-PartnerDestinationInfoResourceGroupName <String>]
[-PartnerDestinationInfoResourceMoveChangeHistory <IResourceMoveChangeHistory[]>]
[-PartnerTopicInfoAzureSubscriptionId <String>]
[-PartnerTopicInfoName <String>]
[-PartnerTopicInfoResourceGroupName <String>]
[-PartnerTopicInfoSource <String>]
[-ProvisioningState <String>]
[-ReadinessState <String>]
[-DefaultProfile <PSObject>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzEventGridChannel
-Name <String>
-PartnerNamespaceName <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-JsonString <String>
[-DefaultProfile <PSObject>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzEventGridChannel
-Name <String>
-PartnerNamespaceName <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-JsonFilePath <String>
[-DefaultProfile <PSObject>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzEventGridChannel
-Name <String>
-PartnerNamespaceInputObject <IEventGridIdentity>
[-ChannelType <String>]
[-EventTypeInfoInlineEventType <Hashtable>]
[-EventTypeInfoKind <String>]
[-ExpirationTimeIfNotActivatedUtc <DateTime>]
[-MessageForActivation <String>]
[-PartnerDestinationInfoAzureSubscriptionId <String>]
[-PartnerDestinationInfoEndpointServiceContext <String>]
[-PartnerDestinationInfoName <String>]
[-PartnerDestinationInfoResourceGroupName <String>]
[-PartnerDestinationInfoResourceMoveChangeHistory <IResourceMoveChangeHistory[]>]
[-PartnerTopicInfoAzureSubscriptionId <String>]
[-PartnerTopicInfoName <String>]
[-PartnerTopicInfoResourceGroupName <String>]
[-PartnerTopicInfoSource <String>]
[-ProvisioningState <String>]
[-ReadinessState <String>]
[-DefaultProfile <PSObject>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzEventGridChannel
-InputObject <IEventGridIdentity>
[-ChannelType <String>]
[-EventTypeInfoInlineEventType <Hashtable>]
[-EventTypeInfoKind <String>]
[-ExpirationTimeIfNotActivatedUtc <DateTime>]
[-MessageForActivation <String>]
[-PartnerDestinationInfoAzureSubscriptionId <String>]
[-PartnerDestinationInfoEndpointServiceContext <String>]
[-PartnerDestinationInfoName <String>]
[-PartnerDestinationInfoResourceGroupName <String>]
[-PartnerDestinationInfoResourceMoveChangeHistory <IResourceMoveChangeHistory[]>]
[-PartnerTopicInfoAzureSubscriptionId <String>]
[-PartnerTopicInfoName <String>]
[-PartnerTopicInfoResourceGroupName <String>]
[-PartnerTopicInfoSource <String>]
[-ProvisioningState <String>]
[-ReadinessState <String>]
[-DefaultProfile <PSObject>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
同步创建具有指定参数的新通道。
示例
示例 1:使用指定参数同步创建新通道。
$dateObj = Get-Date -Year 2023 -Month 11 -Day 10 -Hour 11 -Minute 06 -Second 07
New-AzEventGridChannel -Name azps-channel -PartnerNamespaceName azps-partnernamespace -ResourceGroupName azps_test_group_eventgrid -ChannelType PartnerTopic -PartnerTopicInfoAzureSubscriptionId "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" -PartnerTopicInfoResourceGroupName "azps_test_group_eventgrid2" -PartnerTopicInfoName "default" -PartnerTopicInfoSource "ContosoCorp.Accounts.User1" -ExpirationTimeIfNotActivatedUtc $dateObj.ToUniversalTime()
Name ResourceGroupName
---- -----------------
azps-channel azps_test_group_eventgrid
同步创建具有指定参数的新通道。
参数
-ChannelType
表示事件方向流的事件通道的类型。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Confirm
在运行 cmdlet 之前,提示你进行确认。
类型: | SwitchParameter |
别名: | cf |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DefaultProfile
DefaultProfile 参数不起作用。 如果对其他订阅执行 cmdlet,请使用 SubscriptionId 参数。
类型: | PSObject |
别名: | AzureRMContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-EventTypeInfoInlineEventType
资源的内联事件类型的集合。 内联事件类型键是表示事件名称的类型字符串。有效的内联事件名称示例是“Contoso.OrderCreated”。内联事件类型值的类型为 InlineEventProperties,并且将包含每个内联事件类型的附加信息。
类型: | Hashtable |
别名: | InlineEvent |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-EventTypeInfoKind
所使用的事件类型。
类型: | String |
别名: | EventTypeKind |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-ExpirationTimeIfNotActivatedUtc
通道的过期时间。 如果此计时器在相应的合作伙伴主题从未激活时过期,则会删除频道和相应的合作伙伴主题。
类型: | DateTime |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-InputObject
标识参数
类型: | IEventGridIdentity |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-JsonFilePath
提供给“创建”操作的 Json 文件的路径
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-JsonString
提供给“创建”操作的 Json 字符串
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-MessageForActivation
订阅者可在审批过程中使用的上下文或有用消息。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Name
通道的名称。
类型: | String |
别名: | ChannelName |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-PartnerDestinationInfoAzureSubscriptionId
订阅者的 Azure 订阅 ID。 与此频道关联的合作伙伴目标将在此 Azure 订阅下创建。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-PartnerDestinationInfoEndpointServiceContext
合作伙伴目标终结点的其他上下文。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-PartnerDestinationInfoName
与频道关联的合作伙伴目标的名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-PartnerDestinationInfoResourceGroupName
订阅者的 Azure 资源组。 与此频道关联的合作伙伴目标将在此资源组下创建。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-PartnerDestinationInfoResourceMoveChangeHistory
更改资源移动的历史记录。
类型: | IResourceMoveChangeHistory[] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-PartnerNamespaceInputObject
标识参数
类型: | IEventGridIdentity |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-PartnerNamespaceName
合作伙伴命名空间的名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-PartnerTopicInfoAzureSubscriptionId
订阅者的 Azure 订阅 ID。 与此频道关联的合作伙伴主题将在此 Azure 订阅下创建。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-PartnerTopicInfoName
与频道关联的合作伙伴主题的名称。
类型: | String |
别名: | PartnerTopicName |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-PartnerTopicInfoResourceGroupName
订阅者的 Azure 资源组。 与此资源组关联的合作伙伴主题将创建。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-PartnerTopicInfoSource
源信息由发布者提供,用于确定事件源自的范围或上下文。 在创建合作伙伴主题的审批过程中,订阅者可以使用此信息。
类型: | String |
别名: | PartnerTopicSource |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-PassThru
当命令成功时返回 true
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-ProvisioningState
通道的预配状态。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-ReadinessState
相应合作伙伴主题的就绪状态。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-ResourceGroupName
合作伙伴订阅中的资源组的名称。
类型: | String |
别名: | ResourceGroup |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-SubscriptionId
唯一标识Microsoft Azure 订阅的订阅凭据。 订阅 ID 构成了每个服务调用的 URI 的一部分。
类型: | String |
Position: | Named |
默认值: | (Get-AzContext).Subscription.Id |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-WhatIf
显示 cmdlet 运行时会发生什么情况。 cmdlet 未运行。
类型: | SwitchParameter |
别名: | wi |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |