Remove-AzEventGridSubscription
Removes an Azure Event Grid event subscription.
Syntax
Remove-AzEventGridSubscription
[-EventSubscriptionName] <String>
[[-ResourceGroupName] <String>]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzEventGridSubscription
[-ResourceId] <String>
[-EventSubscriptionName] <String>
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzEventGridSubscription
[-InputObject] <PSTopic>
[-EventSubscriptionName] <String>
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzEventGridSubscription
[-DomainInputObject] <PSDomain>
[-EventSubscriptionName] <String>
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzEventGridSubscription
[-DomainTopicInputObject] <PSDomainTopic>
[-EventSubscriptionName] <String>
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzEventGridSubscription
[-EventSubscriptionName] <String>
[-ResourceGroupName] <String>
[-TopicName] <String>
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzEventGridSubscription
[-EventSubscriptionName] <String>
[-ResourceGroupName] <String>
[-DomainName] <String>
[-DomainTopicName <String>]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzEventGridSubscription
[-EventSubscriptionName] <String>
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzEventGridSubscription
[-EventSubscriptionName] <String>
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Removes an Azure Event Grid event subscription for an Azure Event Grid topic, a resource, an Azure subscription or resource group.
Examples
Example 1
Remove-AzEventGridSubscription -ResourceGroup MyResourceGroup -TopicName Topic1 -EventSubscriptionName EventSubscription1
Removes the event subscription `EventSubscription1` to an Azure Event Grid topic `Topic1` in resource group `MyResourceGroupName`.
Example 2
Remove-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -EventSubscriptionName EventSubscription1
Removes the event subscription `EventSubscription1` to a resource group `MyResourceGroupName`.
Example 3
Remove-AzEventGridSubscription -EventSubscriptionName EventSubscription1
Removes the event subscription `EventSubscription1` to the default Azure subscription.
Example 4
Get-AzResource -ResourceId "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.EventHub/namespaces/$namespaceName" | Remove-AzEventGridSubscription -EventSubscriptionName EventSubscription1
Removes the event subscription `EventSubscription1` to an Event Hub namespace.
Example 5
Get-AzEventGridTopic -ResourceGroup MyResourceGroup -TopicName Topic1 | Remove-AzEventGridSubscription -EventSubscriptionName EventSubscription1
Removes the event subscription `EventSubscription1` to an Event Grid Topic.
Parameters
-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 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 |
-DomainInputObject
EventGrid Domain object.
Type: | PSDomain |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DomainName
EventGrid domain name.
Type: | String |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DomainTopicInputObject
EventGrid Domain Topic object.
Type: | PSDomainTopic |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DomainTopicName
EventGrid domain topic name.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-EventSubscriptionName
Name of the event subscription that needs to be removed.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-InputObject
EventGrid Topic object.
Type: | PSTopic |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PassThru
Returns the status of the Remove operation. By default, this cmdlet does not generate any output.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Resource Group Name.
Type: | String |
Aliases: | ResourceGroup |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceId
Identifier of the resource whose event subscription needs to be removed.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TopicName
Event Grid Topic Name.
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 |