Share via


EventGrid.EventSubscriptionsGet Method

Definition

Get properties of an event subscription.

public System.Threading.Tasks.Task EventSubscriptionsGet (string scope, string eventSubscriptionName, Func<System.Net.Http.HttpResponseMessage,System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.EventGrid.Models.IEventSubscription>,System.Threading.Tasks.Task> onOk, Func<System.Net.Http.HttpResponseMessage,System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EventGrid.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EventGrid.Runtime.ISendAsync sender);
member this.EventSubscriptionsGet : string * string * Func<System.Net.Http.HttpResponseMessage, System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.EventGrid.Models.IEventSubscription>, System.Threading.Tasks.Task> * Func<System.Net.Http.HttpResponseMessage, System.Threading.Tasks.Task> * Microsoft.Azure.PowerShell.Cmdlets.EventGrid.Runtime.IEventListener * Microsoft.Azure.PowerShell.Cmdlets.EventGrid.Runtime.ISendAsync -> System.Threading.Tasks.Task
Public Function EventSubscriptionsGet (scope As String, eventSubscriptionName As String, onOk As Func(Of HttpResponseMessage, Task(Of IEventSubscription), Task), onDefault As Func(Of HttpResponseMessage, Task), eventListener As IEventListener, sender As ISendAsync) As Task

Parameters

scope
String

The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid topic.

eventSubscriptionName
String

Name of the event subscription.

onOk
Func<HttpResponseMessage,Task<IEventSubscription>,Task>

a delegate that is called when the remote service returns 200 (OK).

onDefault
Func<HttpResponseMessage,Task>

a delegate that is called when the remote service returns default (any response code not handled elsewhere).

eventListener
IEventListener

an IEventListener instance that will receive events.

sender
ISendAsync

an instance of an Microsoft.Azure.PowerShell.Cmdlets.EventGrid.Runtime.ISendAsync pipeline to use to make the request.

Returns

A Task that will be complete when handling of the response is completed.

Applies to