---
title: "Update an event subscription."
method: PATCH
path: "/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}"
tags: ["EventSubscriptions"]
---

# Update an event subscription.

`PATCH /{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}`

Asynchronously updates an existing event subscription.

## Path parameters

- `scope` string, required
- `eventSubscriptionName` string, required

## Query parameters

- `api-version` string, required

## Request body

- EventSubscriptionUpdateParameters — Properties of the Event Subscription update
  - `destination` EventSubscriptionDestination — Information about the destination for an event subscription
    - `endpointType` 'WebHook' | 'EventHub' | 'StorageQueue' | 'HybridConnection' | 'ServiceBusQueue', required — Type of the endpoint for the event subscription destination
  - `filter` EventSubscriptionFilter — Filter for the Event Subscription.
    - `subjectBeginsWith` string — An optional string to filter events for an event subscription based on a resource path prefix. The format of this depends on the publisher of the events. Wildcard characters are not supported in this path.
    - `subjectEndsWith` string — An optional string to filter events for an event subscription based on a resource path suffix. Wildcard characters are not supported in this path.
    - `includedEventTypes` string[] — A list of applicable event types that need to be part of the event subscription. If it is desired to subscribe to all default event types, set the IncludedEventTypes to null.
    - `isSubjectCaseSensitive` boolean — Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the filter should be compared in a case sensitive manner.
    - `advancedFilters` AdvancedFilter[] — An array of advanced filters that are used for filtering event subscriptions.
      - `operatorType` 'NumberIn' | 'NumberNotIn' | 'NumberLessThan' | 'NumberGreaterThan' | 'NumberLessThanOrEquals' | 'NumberGreaterThanOrEquals' | 'BoolEquals' | 'StringIn' | 'StringNotIn' | 'StringBeginsWith' | 'StringEndsWith' | 'StringContains', required — The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
      - `key` string — The field/property in the event based on which you want to filter.
  - `labels` string[] — List of user defined labels.
  - `expirationTimeUtc` string, date-time — Information about the expiration time for the event subscription.
  - `retryPolicy` RetryPolicy — Information about the retry policy for an event subscription.
    - `maxDeliveryAttempts` integer — Maximum number of delivery retry attempts for events.
    - `eventTimeToLiveInMinutes` integer — Time To Live (in minutes) for events.
  - `deadLetterDestination` DeadLetterDestination — Information about the dead letter destination for an event subscription. To configure a deadletter destination, do not directly instantiate an object of this class. Instead, instantiate an object of a derived class. Currently, StorageBlobDeadLetterDestination is the only class that derives from this class.
    - `endpointType` 'StorageBlob', required — Type of the endpoint for the dead letter destination

## Response `201`

EventSubscription update request accepted.

- EventSubscription — Definition of a Resource.
  - `id` string — Fully qualified identifier of the resource.
  - `name` string — Name of the resource.
  - `type` string — Type of the resource.

## Other responses

- `default` — *** Error Responses: *** * 400 Bad Request. * 500 Internal Server Error.

---

[API](https://skmtc.net/azure/apis/eventgridmanagementclient.md) · [All operations](https://skmtc.net/azure/apis/eventgridmanagementclient/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/eventgridmanagementclient/versions/df0357af3193/schema)
