Event Subscriptions - Delete

Delete an event subscription.
Delete an existing event subscription.

DELETE https://management.azure.com/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}?api-version=2022-06-15

URI Parameters

Name In Required Type Description
eventSubscriptionName
path True

string

Name of the event subscription.

scope
path True

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.

api-version
query True

string

Version of the API to be used with the client request.

Responses

Name Type Description
200 OK

OK

202 Accepted

Accepted

204 No Content

NoContent

Other Status Codes

*** Error Responses: ***

  • 400 Bad Request.

  • 404 Not Found.

  • 500 Internal Server Error.

Examples

EventSubscriptions_DeleteForCustomTopic
EventSubscriptions_DeleteForResource
EventSubscriptions_DeleteForResourceGroup
EventSubscriptions_DeleteForSubscription

EventSubscriptions_DeleteForCustomTopic

Sample request

DELETE https://management.azure.com/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription1?api-version=2022-06-15

Sample response

EventSubscriptions_DeleteForResource

Sample request

DELETE https://management.azure.com/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription10?api-version=2022-06-15

Sample response

EventSubscriptions_DeleteForResourceGroup

Sample request

DELETE https://management.azure.com/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription2?api-version=2022-06-15

Sample response

EventSubscriptions_DeleteForSubscription

Sample request

DELETE https://management.azure.com/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/providers/Microsoft.EventGrid/eventSubscriptions/examplesubscription3?api-version=2022-06-15

Sample response