Update-AzEventGridSubscription
Update the properties of an Event Grid event subscription.
Syntax
Update-AzEventGridSubscription
[-EventSubscriptionName] <String>
[[-ResourceGroupName] <String>]
[-EndpointType <String>]
[-Endpoint <String>]
[-SubjectBeginsWith <String>]
[-SubjectEndsWith <String>]
[-IncludedEventType <String[]>]
[-Label <String[]>]
[-ExpirationDate <DateTime>]
[-AdvancedFilter <Hashtable[]>]
[-DeliveryAttributeMapping <Hashtable[]>]
[-EventTtl <Int32>]
[-MaxDeliveryAttempt <Int32>]
[-DeadLetterEndpoint <String>]
[-MaxEventsPerBatch <Int32>]
[-PreferredBatchSizeInKiloByte <Int32>]
[-AzureActiveDirectoryApplicationIdOrUri <String>]
[-AzureActiveDirectoryTenantId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzEventGridSubscription
[-ResourceId] <String>
[-EventSubscriptionName] <String>
[-EndpointType <String>]
[-Endpoint <String>]
[-SubjectBeginsWith <String>]
[-SubjectEndsWith <String>]
[-IncludedEventType <String[]>]
[-Label <String[]>]
[-ExpirationDate <DateTime>]
[-AdvancedFilter <Hashtable[]>]
[-DeliveryAttributeMapping <Hashtable[]>]
[-EventTtl <Int32>]
[-MaxDeliveryAttempt <Int32>]
[-DeadLetterEndpoint <String>]
[-MaxEventsPerBatch <Int32>]
[-PreferredBatchSizeInKiloByte <Int32>]
[-AzureActiveDirectoryApplicationIdOrUri <String>]
[-AzureActiveDirectoryTenantId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzEventGridSubscription
[-InputObject] <PSEventSubscription>
[-EndpointType <String>]
[-Endpoint <String>]
[-SubjectBeginsWith <String>]
[-SubjectEndsWith <String>]
[-IncludedEventType <String[]>]
[-Label <String[]>]
[-ExpirationDate <DateTime>]
[-AdvancedFilter <Hashtable[]>]
[-DeliveryAttributeMapping <Hashtable[]>]
[-EventTtl <Int32>]
[-MaxDeliveryAttempt <Int32>]
[-DeadLetterEndpoint <String>]
[-MaxEventsPerBatch <Int32>]
[-PreferredBatchSizeInKiloByte <Int32>]
[-AzureActiveDirectoryApplicationIdOrUri <String>]
[-AzureActiveDirectoryTenantId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzEventGridSubscription
[-EventSubscriptionName] <String>
[-ResourceGroupName] <String>
[-TopicName] <String>
[-EndpointType <String>]
[-Endpoint <String>]
[-SubjectBeginsWith <String>]
[-SubjectEndsWith <String>]
[-IncludedEventType <String[]>]
[-Label <String[]>]
[-ExpirationDate <DateTime>]
[-AdvancedFilter <Hashtable[]>]
[-DeliveryAttributeMapping <Hashtable[]>]
[-EventTtl <Int32>]
[-MaxDeliveryAttempt <Int32>]
[-DeadLetterEndpoint <String>]
[-MaxEventsPerBatch <Int32>]
[-PreferredBatchSizeInKiloByte <Int32>]
[-AzureActiveDirectoryApplicationIdOrUri <String>]
[-AzureActiveDirectoryTenantId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzEventGridSubscription
[-EventSubscriptionName] <String>
[-ResourceGroupName] <String>
[-DomainName] <String>
[-EndpointType <String>]
[-Endpoint <String>]
[-SubjectBeginsWith <String>]
[-SubjectEndsWith <String>]
[-IncludedEventType <String[]>]
[-Label <String[]>]
[-ExpirationDate <DateTime>]
[-AdvancedFilter <Hashtable[]>]
[-DeliveryAttributeMapping <Hashtable[]>]
[-EventTtl <Int32>]
[-MaxDeliveryAttempt <Int32>]
[-DeadLetterEndpoint <String>]
[-MaxEventsPerBatch <Int32>]
[-PreferredBatchSizeInKiloByte <Int32>]
[-AzureActiveDirectoryApplicationIdOrUri <String>]
[-AzureActiveDirectoryTenantId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzEventGridSubscription
[-EventSubscriptionName] <String>
[-ResourceGroupName] <String>
[-DomainName] <String>
[-DomainTopicName] <String>
[-EndpointType <String>]
[-Endpoint <String>]
[-SubjectBeginsWith <String>]
[-SubjectEndsWith <String>]
[-IncludedEventType <String[]>]
[-Label <String[]>]
[-ExpirationDate <DateTime>]
[-AdvancedFilter <Hashtable[]>]
[-DeliveryAttributeMapping <Hashtable[]>]
[-EventTtl <Int32>]
[-MaxDeliveryAttempt <Int32>]
[-DeadLetterEndpoint <String>]
[-MaxEventsPerBatch <Int32>]
[-PreferredBatchSizeInKiloByte <Int32>]
[-AzureActiveDirectoryApplicationIdOrUri <String>]
[-AzureActiveDirectoryTenantId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Update the properties of an Event Grid event subscription. This can be used to update the filter, destination, or labels of an existing event subscription.
Examples
Example 1
Update-AzEventGridSubscription -EventSubscriptionName ES1 -TopicName Topic1 -ResourceGroup MyResourceGroupName -Endpoint https://requestb.in/1kxxoui1
Updates the endpoint of the event subscription `ES1` for topic `Topic1` in resource group `MyResourceGroupName` to `https://requestb.in/1kxxoui1`
Example 2
Get-AzEventGridSubscription -EventSubscriptionName ES1 -TopicName Topic1 -ResourceGroup MyResourceGroupName | Update-AzEventGridSubscription -Endpoint https://requestb.in/1kxxoui1
Updates the endpoint of the event subscription `ES1` for topic `Topic1` in resource group `MyResourceGroupName` to `https://requestb.in/1kxxoui1`
Example 3
Update-AzEventGridSubscription -EventSubscriptionName ES1 -ResourceId "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace" -Endpoint https://requestb.in/1kxxoui1 -SubjectEndsWith "jpg"
Updates the properties of the event subscription `ES1` for the EventHub namespace ContosoNamespace with the new endpoint as `https://requestb.in/1kxxoui1` and the new SubjectEndsWith filter as `jpg`
Example 4
$labels = "Finance", "HR"
Update-AzEventGridSubscription -EventSubscriptionName ES1 -ResourceGroup MyResourceGroupName -Label $labels
Updates the properties of the event subscription `ES1` for the resource group `MyResourceGroupName` with the new labels $labels.
Parameters
-AdvancedFilter
Advanced filter that specifies an array of multiple Hashtable values that are used for the attribute-based filtering. Each Hashtable value has the following keys-value info: Operation, Key and Value or Values. Operator can be one of the following values: NumberIn, NumberNotIn, NumberLessThan, NumberGreaterThan, NumberLessThanOrEquals, NumberGreaterThanOrEquals, BoolEquals, StringIn, StringNotIn, StringBeginsWith, StringEndsWith or StringContains. Key represents the payload property where the advanced filtering policies are applied. Finally, Value or Values represent the value or set of values to be matched. This can be a single value of the corresponding type or an array of values. As an example of the advanced filter parameters: $AdvancedFilters=@($AdvFilter1, $AdvFilter2) where $AdvFilter1=@{operator="NumberIn"; key="Data.Key1"; Values=@(1,2)} and $AdvFilter2=@{operator="StringBeginsWith"; key="Subject"; Values=@("SubjectPrefix1","SubjectPrefix2")}
Type: | Hashtable[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AzureActiveDirectoryApplicationIdOrUri
The Microsoft Entra Application Id or Uri to get the access token that will be included as the bearer token in delivery requests.Applicable only for webhook as a destination.
Type: | String |
Aliases: | AliasAadAppIdUri |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AzureActiveDirectoryTenantId
The Microsoft Entra tenant Id to get the access token that will be included as the bearer token in delivery requests.Applicable only for webhook as a destination.
Type: | String |
Aliases: | AliasAadTenantId |
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 |
-DeadLetterEndpoint
The endpoint used for storing undelivered events. Specify the Azure resource ID of a Storage blob container. For example: /subscriptions/[SubscriptionId]/resourceGroups/[ResourceGroupName]/providers/Microsoft.Storage/storageAccounts/[StorageAccountName]/blobServices/default/containers/[ContainerName].
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DeliveryAttributeMapping
The delivery attribute mappings for this system topic event subscription. Each delivery attribute mapping should contain following two mandatory fields : Name and Type. The Type can either be 'Static' or 'Dynamic'. If the type is 'Static' then properties 'Value' and 'IsSecret' are required. If the type is 'Dynamic' then property 'SourceField' is required. An example of the DynamicAttributeMapping parameters: $DeliveryAttributeMapping=@($DeliveryAttributeMapping1, $DeliveryAttributeMapping2) where $DeliveryAttributeMapping1=@{Name="Name1"; Type="Static"; Values="value"; IsSecret="false"} and $DeliveryAttributeMapping2=@{Name="Name2"; Type="Dynamic"; SourceField="data.prop1"}
Type: | Hashtable[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DomainName
The name of the domain to which the event subscription should be created.
Type: | String |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DomainTopicName
The name of the domain topic to which the event subscription should be created.
Type: | String |
Position: | 3 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Endpoint
Event subscription destination endpoint. This can be a webhook URL, or the Azure resource ID of an EventHub, storage queue, hybridconnection or servicebusqueue. For example, the resource ID for a hybrid connection takes the following form: /subscriptions/[Azure Subscription ID]/resourceGroups/[ResourceGroupName]/providers/Microsoft.Relay/namespaces/[NamespaceName]/hybridConnections/[HybridConnectionName]. It is expected that the destination endpoint to be created and available for use before executing any Event Grid cmdlets.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EndpointType
Endpoint Type. This can be webhook, eventhub, storagequeue, hybridconnection or servicebusqueue. Default value is webhook.
Type: | String |
Accepted values: | webhook, eventhub, storagequeue, hybridconnection, servicebusqueue, servicebustopic, azurefunction |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EventSubscriptionName
The name of the event subscription
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-EventTtl
The time in minutes for the event delivery. This value must be between 1 and 1440
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ExpirationDate
Determines the expiration DateTime for the event subscription after which event subscription will retire.
Type: | DateTime |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IncludedEventType
Filter that specifies a list of event types to include.If not specified, all event types will be included.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
EventGridSubscription object.
Type: | PSEventSubscription |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Label
Labels for the event subscription
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MaxDeliveryAttempt
The maximum number of attempts to deliver the event. This value must be between 1 and 30
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MaxEventsPerBatch
The maximum number of events in a batch. This value must be between 1 and 5000. This parameter is valid when Endpint Type is webhook only.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PreferredBatchSizeInKiloByte
The preferred batch size in kilobytes. This value must be between 1 and 1024. This parameter is valid when Endpint Type is webhook only.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
The resource group of the topic.
Type: | String |
Aliases: | ResourceGroup |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceId
The identifier of the resource to which the event subscription was created.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SubjectBeginsWith
Filter that specifies that only events matching the specified subject prefix will be included. If not specified, events with all subject prefixes will be included.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubjectEndsWith
Filter that specifies that only events matching the specified subject suffix will be included. If not specified, events with all subject suffixes will be included.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TopicName
The name of the topic to which the event subscription should be created.
Type: | String |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
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
Outputs
Azure PowerShell
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for