Edit

Share via


New-AzEventGridPartnerTopicEventSubscription

Asynchronously create an event subscription of a partner topic with the specified parameters. Existing event subscriptions will be updated with this API.

Syntax

CreateExpanded (Default)

New-AzEventGridPartnerTopicEventSubscription
    -EventSubscriptionName <String>
    -PartnerTopicName <String>
    -ResourceGroupName <String>
    [-SubscriptionId <String>]
    [-DeadLetterWithResourceIdentityType <String>]
    [-DeadLetterWithResourceIdentityUserAssignedIdentity <String>]
    [-DeliveryWithResourceIdentityDestination <IEventSubscriptionDestination>]
    [-DeliveryWithResourceIdentityType <String>]
    [-DeliveryWithResourceIdentityUserAssignedIdentity <String>]
    [-Destination <IEventSubscriptionDestination>]
    [-EventDeliverySchema <String>]
    [-ExpirationTimeUtc <DateTime>]
    [-FilterAdvancedFilter <IAdvancedFilter[]>]
    [-FilterEnableAdvancedFilteringOnArray]
    [-FilterIncludedEventType <String[]>]
    [-FilterIsSubjectCaseSensitive]
    [-FilterSubjectBeginsWith <String>]
    [-FilterSubjectEndsWith <String>]
    [-Label <String[]>]
    [-RetryPolicyEventTimeToLiveInMinute <Int32>]
    [-RetryPolicyMaxDeliveryAttempt <Int32>]
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-PassThru]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

CreateViaJsonString

New-AzEventGridPartnerTopicEventSubscription
    -EventSubscriptionName <String>
    -PartnerTopicName <String>
    -ResourceGroupName <String>
    -JsonString <String>
    [-SubscriptionId <String>]
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-PassThru]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

CreateViaJsonFilePath

New-AzEventGridPartnerTopicEventSubscription
    -EventSubscriptionName <String>
    -PartnerTopicName <String>
    -ResourceGroupName <String>
    -JsonFilePath <String>
    [-SubscriptionId <String>]
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-PassThru]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

CreateViaIdentityPartnerTopicExpanded

New-AzEventGridPartnerTopicEventSubscription
    -EventSubscriptionName <String>
    -PartnerTopicInputObject <IEventGridIdentity>
    [-DeadLetterWithResourceIdentityType <String>]
    [-DeadLetterWithResourceIdentityUserAssignedIdentity <String>]
    [-DeliveryWithResourceIdentityDestination <IEventSubscriptionDestination>]
    [-DeliveryWithResourceIdentityType <String>]
    [-DeliveryWithResourceIdentityUserAssignedIdentity <String>]
    [-Destination <IEventSubscriptionDestination>]
    [-EventDeliverySchema <String>]
    [-ExpirationTimeUtc <DateTime>]
    [-FilterAdvancedFilter <IAdvancedFilter[]>]
    [-FilterEnableAdvancedFilteringOnArray]
    [-FilterIncludedEventType <String[]>]
    [-FilterIsSubjectCaseSensitive]
    [-FilterSubjectBeginsWith <String>]
    [-FilterSubjectEndsWith <String>]
    [-Label <String[]>]
    [-RetryPolicyEventTimeToLiveInMinute <Int32>]
    [-RetryPolicyMaxDeliveryAttempt <Int32>]
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-PassThru]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

CreateViaIdentityExpanded

New-AzEventGridPartnerTopicEventSubscription
    -InputObject <IEventGridIdentity>
    [-DeadLetterWithResourceIdentityType <String>]
    [-DeadLetterWithResourceIdentityUserAssignedIdentity <String>]
    [-DeliveryWithResourceIdentityDestination <IEventSubscriptionDestination>]
    [-DeliveryWithResourceIdentityType <String>]
    [-DeliveryWithResourceIdentityUserAssignedIdentity <String>]
    [-Destination <IEventSubscriptionDestination>]
    [-EventDeliverySchema <String>]
    [-ExpirationTimeUtc <DateTime>]
    [-FilterAdvancedFilter <IAdvancedFilter[]>]
    [-FilterEnableAdvancedFilteringOnArray]
    [-FilterIncludedEventType <String[]>]
    [-FilterIsSubjectCaseSensitive]
    [-FilterSubjectBeginsWith <String>]
    [-FilterSubjectEndsWith <String>]
    [-Label <String[]>]
    [-RetryPolicyEventTimeToLiveInMinute <Int32>]
    [-RetryPolicyMaxDeliveryAttempt <Int32>]
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-PassThru]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Asynchronously create an event subscription of a partner topic with the specified parameters. Existing event subscriptions will be updated with this API.

Examples

Example 1: Asynchronously Create an event subscription of a partner topic with the specified parameters.

$obj = New-AzEventGridWebHookEventSubscriptionDestinationObject -EndpointUrl "https://azpsweb.azurewebsites.net"
New-AzEventGridPartnerTopicEventSubscription -EventSubscriptionName azps-eventsub -ResourceGroupName azps_test_group_eventgrid -PartnerTopicName default -FilterIsSubjectCaseSensitive:$false -FilterSubjectBeginsWith "ExamplePrefix" -FilterSubjectEndsWith "ExampleSuffix" -EventDeliverySchema CloudEventSchemaV1_0 -Destination $obj
Name              ResourceGroupName
----              -----------------
azps-eventsubname azps_test_group_eventgrid

Asynchronously Create an event subscription of a partner topic with the specified parameters. Existing event subscriptions will be updated with this API.

Parameters

-AsJob

Run the command as a job

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DeadLetterWithResourceIdentityType

The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user-assigned identities. The type 'None' will remove any identity.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityPartnerTopicExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DeadLetterWithResourceIdentityUserAssignedIdentity

The user identity associated with the resource.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityPartnerTopicExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

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

Parameter properties

Type:PSObject
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzureRMContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DeliveryWithResourceIdentityDestination

Information about the destination where events have to be delivered for the event subscription.Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering.

Parameter properties

Type:IEventSubscriptionDestination
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityPartnerTopicExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DeliveryWithResourceIdentityType

The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user-assigned identities. The type 'None' will remove any identity.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityPartnerTopicExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DeliveryWithResourceIdentityUserAssignedIdentity

The user identity associated with the resource.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityPartnerTopicExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Destination

Information about the destination where events have to be delivered for the event subscription.Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering.

Parameter properties

Type:IEventSubscriptionDestination
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityPartnerTopicExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EventDeliverySchema

The event delivery schema for the event subscription.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:DeliverySchema

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityPartnerTopicExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EventSubscriptionName

Name of the event subscription to be created. Event subscription names must be between 3 and 100 characters in length and use alphanumeric letters only.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Name

Parameter sets

CreateExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaJsonString
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaJsonFilePath
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityPartnerTopicExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExpirationTimeUtc

Expiration time of the event subscription.

Parameter properties

Type:DateTime
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ExpirationDate

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityPartnerTopicExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FilterAdvancedFilter

An array of advanced filters that are used for filtering event subscriptions.

Parameter properties

Type:

IAdvancedFilter[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:AdvancedFilter

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityPartnerTopicExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FilterEnableAdvancedFilteringOnArray

Allows advanced filters to be evaluated against an array of values instead of expecting a singular value.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AdvancedFilteringOnArray

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityPartnerTopicExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FilterIncludedEventType

A list of applicable event types that need to be part of the event subscription. If it is desired to subscribe to all default event types, set the IncludedEventTypes to null.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:IncludedEventType

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityPartnerTopicExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FilterIsSubjectCaseSensitive

Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the filter should be compared in a case sensitive manner.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:SubjectCaseSensitive

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityPartnerTopicExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FilterSubjectBeginsWith

An optional string to filter events for an event subscription based on a resource path prefix.The format of this depends on the publisher of the events.Wildcard characters are not supported in this path.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:SubjectBeginsWith

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityPartnerTopicExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FilterSubjectEndsWith

An optional string to filter events for an event subscription based on a resource path suffix.Wildcard characters are not supported in this path.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:SubjectEndsWith

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityPartnerTopicExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Identity Parameter

Parameter properties

Type:IEventGridIdentity
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CreateViaIdentityExpanded
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-JsonFilePath

Path of Json file supplied to the Create operation

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CreateViaJsonFilePath
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-JsonString

Json string supplied to the Create operation

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CreateViaJsonString
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Label

List of user defined labels.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityPartnerTopicExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-NoWait

Run the command asynchronously

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PartnerTopicInputObject

Identity Parameter

Parameter properties

Type:IEventGridIdentity
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CreateViaIdentityPartnerTopicExpanded
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-PartnerTopicName

Name of the partner topic.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaJsonString
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaJsonFilePath
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PassThru

Returns true when the command succeeds

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

The name of the resource group within the user's subscription.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ResourceGroup

Parameter sets

CreateExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaJsonString
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaJsonFilePath
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RetryPolicyEventTimeToLiveInMinute

Time To Live (in minutes) for events.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False
Aliases:EventTtl

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityPartnerTopicExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RetryPolicyMaxDeliveryAttempt

Maximum number of delivery retry attempts for events.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False
Aliases:MaxDeliveryAttempt

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityPartnerTopicExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SubscriptionId

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

Parameter properties

Type:String
Default value:(Get-AzContext).Subscription.Id
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaJsonString
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaJsonFilePath
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

IEventGridIdentity

Outputs

IEventSubscription