< Back

Remove-AzureRmEventGridSubscription

Tue Jan 29, 2019 9:46 pm

NAME Remove-AzureRmEventGridSubscription



SYNOPSIS

Removes an Azure Event Grid event subscription.





SYNTAX

Remove-AzureRmEventGridSubscription [-EventSubscriptionName] <String> [[-ResourceGroupName] <String>] [-DefaultProfile <IAzureContextContainer>]

[-PassThru] [-Confirm] [-WhatIf] [<CommonParameters>]



Remove-AzureRmEventGridSubscription [-EventSubscriptionName] <String> [-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>]

[-PassThru] [-Confirm] [-WhatIf] [<CommonParameters>]



Remove-AzureRmEventGridSubscription [-EventSubscriptionName] <String> [-ResourceGroupName] <String> [-TopicName] <String> [-DefaultProfile

<IAzureContextContainer>] [-PassThru] [-Confirm] [-WhatIf] [<CommonParameters>]



Remove-AzureRmEventGridSubscription [-EventSubscriptionName] <String> [-InputObject] <PSTopic> [-DefaultProfile <IAzureContextContainer>]

[-PassThru] [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

Removes an Azure Event Grid event subscription for an Azure Event Grid topic, a resource, an Azure subscription or resource group.





PARAMETERS

-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-EventSubscriptionName <String>

Name of the event subscription that needs to be removed.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-InputObject <PSTopic>

EventGrid EventSubscription object.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-PassThru [<SwitchParameter>]

Returns the status of the Remove operation. By default, this cmdlet does not generate any output.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-ResourceGroupName <String>

Resource Group Name.



Required? false

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceId <String>

Identifier of the resource whose event subscription needs to be removed.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-TopicName <String>

Event Grid Topic Name.



Required? true

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

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



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String

Microsoft.Azure.Commands.EventGrid.Models.PSEventSubscription





OUTPUTS

System.Object







NOTES









Example 1



PS C:\\> Remove-AzureRmEventGridSubscription -ResourceGroup MyResourceGroup -TopicName Topic1 -EventSubscriptionName EventSubscription1



Removes the event subscription `EventSubscription1` to an Azure Event Grid topic `Topic1` in resource group `MyResourceGroupName`.





Example 2



PS C:\\> Remove-AzureRmEventGridSubscription -ResourceGroupName MyResourceGroupName -EventSubscriptionName EventSubscription1



Removes the event subscription `EventSubscription1` to a resource group `MyResourceGroupName`.





Example 3



PS C:\\> Remove-AzureRmEventGridSubscription -EventSubscriptionName EventSubscription1



Removes the event subscription `EventSubscription1` to the default Azure subscription.





Example 4



PS C:\\> Get-AzureRmResource -ResourceId

"/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.EventHub/namespaces/$namespaceName" |

Remove-AzureRmEventGridSubscription -EventSubscriptionName EventSubscription1



Removes the event subscription `EventSubscription1` to an Event Hub namespace.





Example 5



PS C:\\> Get-AzureRmEventGridTopic -ResourceGroup MyResourceGroup -TopicName Topic1 | Remove-AzureRmEventGridSubscription -EventSubscriptionName

EventSubscription1



Removes the event subscription `EventSubscription1` to an Event Grid Topic.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... bscription