編輯

共用方式為


New-AzEventGridChannel

Synchronously create a new channel with the specified parameters.

Syntax

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

Synchronously create a new channel with the specified parameters.

Examples

Example 1: Synchronously Create a new channel with the specified parameters.

$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

Synchronously Create a new channel with the specified parameters.

Parameters

-ChannelType

The type of the event channel which represents the direction flow of events.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EventTypeInfoInlineEventType

A collection of inline event types for the resource. The inline event type keys are of type string which represents the name of the event.An example of a valid inline event name is "Contoso.OrderCreated".The inline event type values are of type InlineEventProperties and will contain additional information for every inline event type.

Type:Hashtable
Aliases:InlineEvent
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EventTypeInfoKind

The kind of event type used.

Type:String
Aliases:EventTypeKind
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ExpirationTimeIfNotActivatedUtc

Expiration time of the channel. If this timer expires while the corresponding partner topic is never activated,the channel and corresponding partner topic are deleted.

Type:DateTime
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Identity Parameter

Type:IEventGridIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-JsonFilePath

Path of Json file supplied to the Create operation

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-JsonString

Json string supplied to the Create operation

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-MessageForActivation

Context or helpful message that can be used during the approval process by the subscriber.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Name of the channel.

Type:String
Aliases:ChannelName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PartnerDestinationInfoAzureSubscriptionId

Azure subscription ID of the subscriber. The partner destination associated with the channel will becreated under this Azure subscription.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PartnerDestinationInfoEndpointServiceContext

Additional context of the partner destination endpoint.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PartnerDestinationInfoName

Name of the partner destination associated with the channel.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PartnerDestinationInfoResourceGroupName

Azure Resource Group of the subscriber. The partner destination associated with the channel will becreated under this resource group.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PartnerDestinationInfoResourceMoveChangeHistory

Change history of the resource move.

Type:IResourceMoveChangeHistory[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PartnerNamespaceInputObject

Identity Parameter

Type:IEventGridIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-PartnerNamespaceName

Name of the partner namespace.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PartnerTopicInfoAzureSubscriptionId

Azure subscription ID of the subscriber. The partner topic associated with the channel will becreated under this Azure subscription.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PartnerTopicInfoName

Name of the partner topic associated with the channel.

Type:String
Aliases:PartnerTopicName
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PartnerTopicInfoResourceGroupName

Azure Resource Group of the subscriber. The partner topic associated with the channel will becreated under this resource group.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PartnerTopicInfoSource

The source information is provided by the publisher to determine the scope or context from which the eventsare originating. This information can be used by the subscriber during the approval process of thecreated partner topic.

Type:String
Aliases:PartnerTopicSource
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Returns true when the command succeeds

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ProvisioningState

Provisioning state of the channel.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ReadinessState

The readiness state of the corresponding partner topic.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The name of the resource group within the partners subscription.

Type:String
Aliases:ResourceGroup
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

IEventGridIdentity

Outputs

IChannel