< Back

Get-AzureRmEventGridSubscription

Tue Jan 29, 2019 9:46 pm

NAME Get-AzureRmEventGridSubscription



SYNOPSIS

Gets the details of an event subscription, or gets a list of all event subscriptions in the current Azure subscription.





SYNTAX

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

<IAzureContextContainer>] [-IncludeFullEndpointUrl] [<CommonParameters>]



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

[-IncludeFullEndpointUrl] [<CommonParameters>]



Get-AzureRmEventGridSubscription [[-ResourceGroupName] <String>] [[-TopicTypeName] <String>] [[-Location] <String>] [-DefaultProfile

<IAzureContextContainer>] [-IncludeFullEndpointUrl] [<CommonParameters>]



Get-AzureRmEventGridSubscription [-InputObject] <PSTopic> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]





DESCRIPTION

The Get-AzureRmEventGridSubscription cmdlet gets either the details of a specified Event Grid subscription, or a list of all Event Grid

subscriptions in the current Azure subscription or resource group. If the event subscription name is provided, the details of a single Event Grid

subscription is returned. If the event subscription name is not provided, a list of all event subscriptions is returned.





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>

The name of the event subscription



Required? false

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-IncludeFullEndpointUrl [<SwitchParameter>]

Include the full endpoint URL of the event subscription destination.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-InputObject <PSTopic>

EventGrid Event Subscription object.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-Location <String>

Location



Required? false

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceGroupName <String>

Resource Group Name.



Required? false

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceId <String>

Identifier of the resource to which event subscriptions have been created.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-TopicName <String>

EventGrid Topic Name.



Required? false

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-TopicTypeName <String>

TopicType name



Required? false

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

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 System.Management.Automation.SwitchParameter





OUTPUTS

Microsoft.Azure.Commands.EventGrid.Models.PSEventSubscription

System.Collections.Generic.List`1[[Microsoft.Azure.Commands.EventGrid.Models.PSEventSubscriptionListInstance,

Microsoft.Azure.Commands.EventGrid, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]





NOTES









Example 1



PS C:\\> Get-AzureRmEventGridSubscription -ResourceGroupName MyResourceGroupName -TopicName Topic1 -EventSubscriptionName EventSubscription1



Gets the details of event subscription `EventSubscription1` created for topic `Topic1` in resource group `MyResourceGroupName`.





Example 2



PS C:\\> Get-AzureRmEventGridSubscription -ResourceGroupName MyResourceGroupName -TopicName Topic1 -EventSubscriptionName EventSubscription1

-IncludeFullEndpointUrl



Gets the details of event subscription `EventSubscription1` created for topic `Topic1` in resource group `MyResourceGroupName`, including the full

endpoint URL if it is a webhook based event subscription.





Example 3



PS C:\\> Get-AzureRmEventGridSubscription -ResourceGroupName MyResourceGroupName -TopicName Topic1



Get a list of all the event subscriptions created for topic `Topic1` in resource group `MyResourceGroupName`.





Example 4



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



Gets the details of event subscription `EventSubscription1` created for resource group `MyResourceGroupName`.





Example 5



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



Gets the details of event subscription `EventSubscription1` created for the currently selected Azure subscription.





Example 6



PS C:\\> Get-AzureRmEventGridSubscription -ResourceGroupName MyResourceGroupName



Gets the list of all global event subscriptions created under the resource group `MyResourceGroupName`.





Example 7



PS C:\\> Get-AzureRmEventGridSubscription



Gets the list of all global event subscriptions created under the currently selected Azure subscription.





Example 8



PS C:\\> Get-AzureRmEventGridSubscription -ResourceGroupName MyResourceGroupName -Location westus2



Gets the list of all regional event subscriptions created under resource group `MyResourceGroupName` in the specified location `westus2`.





Example 9



PS C:\\> Get-AzureRmEventGridSubscription -ResourceId

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



Gets the list of all event subscriptions created for the specified EventHub namespace.





Example 10



PS C:\\> Get-AzureRmEventGridSubscription -TopicTypeName "Microsoft.EventHub.Namespaces" -Location $location



Gets the list of all event subscriptions created for the specified topic type (EventHub namespaces) in the specified location.





Example 11



PS C:\\> Get-AzureRmEventGridSubscription -TopicTypeName "Microsoft.Resources.ResourceGroups" -ResourceGroupName MyResourceGroupName



Gets the list of all event subscriptions created for the specific resource group.







RELATED LINKS

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