共用方式為


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

Description

使用指定的參數同步建立新的通道。

範例

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

Identity 參數

類型: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 訂用帳戶標識碼。 與此通道相關聯的合作夥伴目的地將會在此 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

Identity 參數

類型:IEventGridIdentity
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-PartnerNamespaceName

夥伴命名空間的名稱。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-PartnerTopicInfoAzureSubscriptionId

訂閱者的 Azure 訂用帳戶標識碼。 與通道相關聯的合作夥伴主題將會在此 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 訂用帳戶的訂用帳戶認證。 訂用帳戶標識碼會形成每個服務呼叫 URI 的一部分。

類型:String
Position:Named
預設值:(Get-AzContext).Subscription.Id
必要:False
接受管線輸入:False
接受萬用字元:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

輸出