az eventgrid partner topic event-subscription
Note
This command group has commands that are defined in both Azure CLI and at least one extension. Install each extension to benefit from its extended capabilities. Learn more about extensions.
Manage event subscriptions of partner topic.
Commands
Name | Description | Type | Status |
---|---|---|---|
az eventgrid partner topic event-subscription create |
Create a new event subscription for a partner topic. |
Core | GA |
az eventgrid partner topic event-subscription create (eventgrid extension) |
Create a new event subscription for a partner topic. |
Extension | Preview |
az eventgrid partner topic event-subscription delete |
Delete an event subscription of a partner topic. |
Core | GA |
az eventgrid partner topic event-subscription delete (eventgrid extension) |
Delete an event subscription of a partner topic. |
Extension | Preview |
az eventgrid partner topic event-subscription list |
List event subscriptions of a specific partner topic. |
Core | GA |
az eventgrid partner topic event-subscription list (eventgrid extension) |
List event subscriptions of a specific partner topic. |
Extension | Preview |
az eventgrid partner topic event-subscription show |
Get the details of an event subscription of a partner topic. |
Core | GA |
az eventgrid partner topic event-subscription show (eventgrid extension) |
Get the details of an event subscription of a partner topic. |
Extension | Preview |
az eventgrid partner topic event-subscription update |
Update an event subscription of a partner topic. |
Core | GA |
az eventgrid partner topic event-subscription update (eventgrid extension) |
Update an event subscription of a partner topic. |
Extension | Preview |
az eventgrid partner topic event-subscription create
Create a new event subscription for a partner topic.
az eventgrid partner topic event-subscription create --name
--partner-topic-name
--resource-group
[--aad-tenant-id]
[--advanced-filter]
[--azure-active-directory-application-id-or-uri]
[--deadletter-endpoint]
[--delivery-attribute-mapping]
[--enable-advanced-filtering-on-arrays {false, true}]
[--endpoint]
[--endpoint-type {azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook}]
[--event-delivery-schema {cloudeventschemav1_0, custominputschema, eventgridschema}]
[--event-ttl]
[--expiration-date]
[--included-event-types]
[--labels]
[--max-delivery-attempts]
[--max-events-per-batch]
[--preferred-batch-size-in-kilobytes]
[--qttl]
[--subject-begins-with]
[--subject-case-sensitive {false, true}]
[--subject-ends-with]
Examples
Create a new event subscription for an Event Grid partner topic, using default filters.
az eventgrid partner topic event-subscription create --name es1 \
-g rg1 --partner-topic-name partnertopic1 \
--endpoint https://contoso.azurewebsites.net/api/f1?code=code
Create a new event subscription for an Event Grid partner topic, with a filter specifying a subject prefix.
az eventgrid partner topic event-subscription create --name es4 \
-g rg1 --partner-topic-name partnertopic1 \
--endpoint https://contoso.azurewebsites.net/api/f1?code=code \
--subject-begins-with mysubject_prefix
Create a new event subscription for an Event Grid partner topic, using default filters, and CloudEvent V 1.0 as the delivery schema.
az eventgrid partner topic event-subscription create -n es2 \
-g rg1 --partner-topic-name partnertopic1 \
--endpoint https://contoso.azurewebsites.net/api/f1?code=code \
--event-delivery-schema cloudeventschemav1_0
Create a new event subscription for an Event Grid partnertopic, with a deadletter destination and custom retry policy of maximum 10 delivery attempts and an Event TTL of 2 hours (whichever happens earlier) and expiration date.
az eventgrid partner topic event-subscription create --name es2 \
-g rg1 --partner-topic-name partnertopic1 \
--endpoint https://contoso.azurewebsites.net/api/f1?code=code \
--deadletter-endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/s2/blobServices/default/containers/blobcontainer1 \
--max-delivery-attempts 10 --event-ttl 120 --expiration-date "2022-10-31"
Create a new event subscription for an Event Grid partner topic, using Azure Active Directory enabled Webhook as a destination .
az eventgrid partner topic event-subscription create --name es1 \
-g rg1 --partner-topic-name partnertopic1 \
--endpoint https://contoso.azurewebsites.net/api/f1?code=code
--azure-active-directory-tenant-id azureactivedirectorytenantid
--azure-active-directory-application-id-or-uri azureactivedirectoryapplicationidoruri
Create a new event subscription for an Event Grid partner topic, using Azure Function as destination.
az eventgrid partner topic event-subscription create -n es1 \
-g rg1 --partner-topic-name partnertopic1 \
--endpoint /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Web/sites/{functionappname}/functions/{functionname} --endpoint-type azurefunction
Create a new event subscription for an Event Grid partner topic using Storage Queue as destination with message ttl at 5 mins
az eventgrid partner topic event-subscription create -n es1 \
-g rg1 --partner-topic-name partnertopic1 \
--endpoint-type storagequeue \
--endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/sa1/queueservices/default/queues/q1 \
--storage-queue-msg-ttl 300
Create a new event subscription for an Event Grid partner topic with advanced filtering on arrays enabled
az eventgrid partner topic event-subscription create -n es1 \
-g rg1 --partner-topic-name partnertopic1 \
--endpoint-type storagequeue \
--endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/sa1/queueservices/default/queues/q1 \
--enable-advanced-filtering-on-arrays true
Required Parameters
Name of the event subscription.
Name of the partner topic.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The Azure Active Directory Tenant Id to get the access token that will be included as the bearer token in delivery requests. Applicable only for webhook as a destination.
An advanced filter enables filtering of events based on a specific event property.
Usage: --advanced-filter KEY[.INNERKEY] FILTEROPERATOR VALUE [VALUE ...]
StringIn: --advanced-filter data.Color StringIn Blue Red Orange Yellow
StringNotIn: --advanced-filter data.Color StringNotIn Blue Red Orange Yellow
StringContains: --advanced-filter subject StringContains Blue Red
StringNotContains: --advanced-filter subject StringNotContains Blue Red
StringBeginsWith: --advanced-filter subject StringBeginsWith Blue Red
StringNotBeginsWith: --advanced-filter subject StringNotBeginsWith Blue Red
StringEndsWith: --advanced-filter subject StringEndsWith img png jpg
StringNotEndsWith: --advanced-filter subject StringNotEndsWith img png jpg
NumberIn: --advanced-filter data.property1 NumberIn 5 10 20
NumberInRange --advanced-filter data.property1 NumberInRange 5,10 20,30 40,50
NumberNotIn: --advanced-filter data.property2 NumberNotIn 100 200 300
NumberNotInRange: --advanced-filter data.property2 NumberNotInRange 100,110 200,210 300,310
NumberLessThan: --advanced-filter data.property3 NumberLessThan 100
NumberLessThanOrEquals: --advanced-filter data.property2 NumberLessThanOrEquals 100
NumberGreaterThan: --advanced-filter data.property3 NumberGreaterThan 100
NumberGreaterThanOrEquals: --advanced-filter data.property2 NumberGreaterThanOrEquals 100
BoolEquals: --advanced-filter data.property3 BoolEquals true
IsNullOrUndefined: --advanced-filter data.property3 IsNullOrUndefined
IsNotNull: --advanced-filter data.property3 IsNotNull
Multiple advanced filters can be specified by using more than one --advanced-filter
argument.
The Azure Active Directory Application Id or Uri to get the access token that will be included as the bearer token in delivery requests. Applicable only for webhook as a destination.
The Azure resource ID of an Azure Storage blob container destination where EventGrid should deadletter undeliverable events for this event subscription.
Example: --deadletter-endpoint /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/sa1/blobServices/default/containers/containerName.
Add delivery attribute mapping to send additional information via HTTP headers when delivering events. This attribute is valid for all destination types except StorageQueue. Multiple attributes can be specified by using more than one --delivery-attribute-mapping
argument.
Usage: --delivery-attribute-mapping attribute-name attribute-type attribute-value [attribute-is-secret] Static Attribute Mapping: --delivery-attribute-mapping somename static somevalue Static Attribute Mapping: --delivery-attribute-mapping somename static somevalue false Static Attribute Mapping: --delivery-attribute-mapping somename static somevalue true Dynamic Attribute Mapping: --delivery-attribute-mapping somename dynamic somevalue Both Static and Dynamic: --delivery-attribute-mapping somename dynamic somevalue --delivery-attribute-mapping somename2 static somevalue.
Allows advanced filters to be evaluated against an array of values instead of expecting a singular value.
Endpoint where EventGrid should deliver events matching this event subscription. For webhook endpoint type, this should be the corresponding webhook URL. For other endpoint types, this should be the Azure resource identifier of the endpoint. It is expected that the destination endpoint to be already created and available for use before executing any Event Grid command.
The type of the destination endpoint.
The schema in which events should be delivered for this event subscription. By default, events will be delivered in the same schema in which they are published (based on the corresponding topic's input schema).
Event time to live (in minutes). Must be a number between 1 and 1440.
Date or datetime (in UTC, e.g. '2018-11-30T11:59:59+00:00' or '2018-11-30') after which the event subscription would expire. By default, there is no expiration for the event subscription.
A space-separated list of event types (e.g., Microsoft.Storage.BlobCreated and Microsoft.Storage.BlobDeleted). In order to subscribe to all default event types, do not specify any value for this argument. For event grid topics, event types are customer defined. For Azure events, e.g., Storage Accounts, IoT Hub, etc., you can query their event types using this CLI command 'az eventgrid topic-type list-event-types'.
A space-separated list of labels to associate with this event subscription.
Maximum number of delivery attempts. Must be a number between 1 and 30.
Maximum number of events in a batch. Must be a number between 1 and 5000.
Preferred batch size in kilobytes. Must be a number between 1 and 1024.
Storage queue message time to live in seconds.
An optional string to filter events for an event subscription based on a prefix. Wildcard characters are not supported.
Specify to indicate whether the subject fields should be compared in a case sensitive manner. True if flag present.
An optional string to filter events for an event subscription based on a suffix. Wildcard characters are not supported.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az eventgrid partner topic event-subscription create (eventgrid extension)
Command group 'az eventgrid' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Create a new event subscription for a partner topic.
az eventgrid partner topic event-subscription create --name
--partner-topic-name
--resource-group
[--advanced-filter]
[--azure-active-directory-application-id-or-uri]
[--azure-active-directory-tenant-id]
[--deadletter-endpoint]
[--endpoint]
[--endpoint-type {azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook}]
[--event-delivery-schema {cloudeventschemav1_0, custominputschema, eventgridschema}]
[--event-ttl]
[--expiration-date]
[--included-event-types]
[--labels]
[--max-delivery-attempts]
[--max-events-per-batch]
[--preferred-batch-size-in-kilobytes]
[--subject-begins-with]
[--subject-case-sensitive {false, true}]
[--subject-ends-with]
Examples
Create a new event subscription for an Event Grid partner topic, using default filters.
az eventgrid partner topic event-subscription create --name es1 \
-g rg1 --partner-topic-name partnertopic1 \
--endpoint https://contoso.azurewebsites.net/api/f1?code=code
Create a new event subscription for an Event Grid partner topic, with a filter specifying a subject prefix.
az eventgrid partner topic event-subscription create --name es4 \
-g rg1 --partner-topic-name partnertopic1 \
--endpoint https://contoso.azurewebsites.net/api/f1?code=code \
--subject-begins-with mysubject_prefix
Create a new event subscription for an Event Grid partner topic, using default filters, and CloudEvent V 1.0 as the delivery schema.
az eventgrid partner topic event-subscription create -n es2 \
-g rg1 --partner-topic-name partnertopic1 \
--endpoint https://contoso.azurewebsites.net/api/f1?code=code \
--event-delivery-schema cloudeventschemav1_0
Create a new event subscription for an Event Grid partnertopic, with a deadletter destination and custom retry policy of maximum 10 delivery attempts and an Event TTL of 2 hours (whichever happens earlier) and expiration date.
az eventgrid partner topic event-subscription create --name es2 \
-g rg1 --partner-topic-name partnertopic1 \
--endpoint https://contoso.azurewebsites.net/api/f1?code=code \
--deadletter-endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/s2/blobServices/default/containers/blobcontainer1 \
--max-delivery-attempts 10 --event-ttl 120 --expiration-date "2022-10-31"
Create a new event subscription for an Event Grid partner topic, using Azure Active Directory enabled Webhook as a destination .
az eventgrid partner topic event-subscription create --name es1 \
-g rg1 --partner-topic-name partnertopic1 \
--endpoint https://contoso.azurewebsites.net/api/f1?code=code
--azure-active-directory-tenant-id azureactivedirectorytenantid
--azure-active-directory-application-id-or-uri azureactivedirectoryapplicationidoruri
Create a new event subscription for an Event Grid partner topic, using Azure Function as destination.
az eventgrid partner topic event-subscription create -n es1 \
-g rg1 --partner-topic-name partnertopic1 \
--endpoint /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Web/sites/{functionappname}/functions/{functionname} --endpoint-type azurefunction
Required Parameters
Name of the event subscription.
Name of the partner topic.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
An advanced filter enables filtering of events based on a specific event property.
Usage: --advanced-filter KEY[.INNERKEY] FILTEROPERATOR VALUE [VALUE ...]
StringIn: --advanced-filter data.Color StringIn Blue Red Orange Yellow
StringNotIn: --advanced-filter data.Color StringNotIn Blue Red Orange Yellow
StringContains: --advanced-filter subject StringContains Blue Red
StringBeginsWith: --advanced-filter subject StringBeginsWith Blue Red
StringEndsWith: --advanced-filter subject StringEndsWith img png jpg
NumberIn: --advanced-filter data.property1 NumberIn 5 10 20
NumberNotIn: --advanced-filter data.property2 NumberNotIn 100 200 300
NumberLessThan: --advanced-filter data.property3 NumberLessThan 100
NumberLessThanOrEquals: --advanced-filter data.property2 NumberLessThanOrEquals 100
NumberGreaterThan: --advanced-filter data.property3 NumberGreaterThan 100
NumberGreaterThanOrEquals: --advanced-filter data.property2 NumberGreaterThanOrEquals 100
BoolEquals: --advanced-filter data.property3 BoolEquals true
Multiple advanced filters can be specified by using more than one --advanced-filter
argument.
The Azure Active Directory Application Id or Uri to get the access token that will be included as the bearer token in delivery requests. Applicable only for webhook as a destination.
The Azure Active Directory Tenant Id to get the access token that will be included as the bearer token in delivery requests. Applicable only for webhook as a destination.
The Azure resource ID of an Azure Storage blob container destination where EventGrid should deadletter undeliverable events for this event subscription.
Example: --deadletter-endpoint /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/sa1/blobServices/default/containers/containerName.
Endpoint where EventGrid should deliver events matching this event subscription. For webhook endpoint type, this should be the corresponding webhook URL. For other endpoint types, this should be the Azure resource identifier of the endpoint.
The type of the destination endpoint.
The schema in which events should be delivered for this event subscription. By default, events will be delivered in the same schema in which they are published (based on the corresponding topic's input schema).
Event time to live (in minutes). Must be a number between 1 and 1440.
Date or datetime (in UTC, e.g. '2018-11-30T11:59:59+00:00' or '2018-11-30') after which the event subscription would expire. By default, there is no expiration for the event subscription.
A space-separated list of event types. Example: Microsoft.Storage.BlobCreated Microsoft.Storage.BlobDeleted. To subscribe to all default event types, do not specify any value for this argument.
A space-separated list of labels to associate with this event subscription.
Maximum number of delivery attempts. Must be a number between 1 and 30.
Maximum number of events in a batch. Must be a number between 1 and 5000.
Preferred batch size in kilobytes. Must be a number between 1 and 1024.
An optional string to filter events for an event subscription based on a prefix. Wildcard characters are not supported.
Specify to indicate whether the subject fields should be compared in a case sensitive manner. True if flag present.
An optional string to filter events for an event subscription based on a suffix. Wildcard characters are not supported.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az eventgrid partner topic event-subscription delete
Delete an event subscription of a partner topic.
az eventgrid partner topic event-subscription delete --name
--partner-topic-name
--resource-group
[--yes]
Examples
Delete an event subscription for an Event Grid partner topic.
az eventgrid partner topic event-subscription delete --name es1 \
-g rg1 --partner-topic-name partnertopic1 \
Required Parameters
Name of the event subscription.
Name of the partner topic.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az eventgrid partner topic event-subscription delete (eventgrid extension)
Command group 'az eventgrid' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Delete an event subscription of a partner topic.
az eventgrid partner topic event-subscription delete --name
--partner-topic-name
--resource-group
Examples
Delete an event subscription for an Event Grid partner topic.
az eventgrid partner topic event-subscription delete --name es1 \
-g rg1 --partner-topic-name partnertopic1 \
Required Parameters
Name of the event subscription.
Name of the partner topic.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az eventgrid partner topic event-subscription list
List event subscriptions of a specific partner topic.
az eventgrid partner topic event-subscription list --partner-topic-name
--resource-group
[--odata-query]
Examples
List all event subscriptions created for an Event Grid partner topic.
az eventgrid partner topic event-subscription list -g rg1 --partner-topic-name partnertopic1
Required Parameters
Name of the partner topic.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The OData query used for filtering the list results. Filtering is currently allowed on the Name property only. The supported operations include: CONTAINS, eq (for equal), ne (for not equal), AND, OR and NOT.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az eventgrid partner topic event-subscription list (eventgrid extension)
Command group 'az eventgrid' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List event subscriptions of a specific partner topic.
az eventgrid partner topic event-subscription list --partner-topic-name
--resource-group
[--odata-query]
Examples
List all event subscriptions created for an Event Grid partner topic.
az eventgrid partner topic event-subscription list -g rg1 --partner-topic-name partnertopic1
Required Parameters
Name of the partner topic.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The query used to filter the results using OData syntax.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az eventgrid partner topic event-subscription show
Get the details of an event subscription of a partner topic.
az eventgrid partner topic event-subscription show --name
--partner-topic-name
--resource-group
[--include-attrib-secret {false, true}]
[--include-full-endpoint-url {false, true}]
Examples
Show the details of an event subscription for an Event Grid partner topic.
az eventgrid partner topic event-subscription show --name es1 \
-g rg1 --partner-topic-name partnertopic1
Show the details of an event subscription for an Event Grid partner topic and include static delivery attribute secrets
az eventgrid partner topic event-subscription show --name es1 \
-g rg1 --partner-topic-name partnertopic1 --include-static-delivery-attribute-secret
Required Parameters
Name of the event subscription.
Name of the partner topic.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Indicate whether any static delivery attribute secrets should be returned. True if flag present.
Specify to indicate whether the full endpoint URL should be returned. True if flag present.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az eventgrid partner topic event-subscription show (eventgrid extension)
Command group 'az eventgrid' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Get the details of an event subscription of a partner topic.
az eventgrid partner topic event-subscription show --name
--partner-topic-name
--resource-group
[--include-full-endpoint-url {false, true}]
Examples
Show the details of an event subscription for an Event Grid partner topic.
az eventgrid partner topic event-subscription show --name es1 \
-g rg1 --partner-topic-name partnertopic1
Required Parameters
Name of the event subscription.
Name of the partner topic.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Specify to indicate whether the full endpoint URL should be returned. True if flag present.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az eventgrid partner topic event-subscription update
Update an event subscription of a partner topic.
az eventgrid partner topic event-subscription update --name
--partner-topic-name
--resource-group
[--advanced-filter]
[--deadletter-endpoint]
[--delivery-attribute-mapping]
[--enable-advanced-filtering-on-arrays {false, true}]
[--endpoint]
[--endpoint-type {azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook}]
[--included-event-types]
[--labels]
[--qttl]
[--subject-begins-with]
[--subject-ends-with]
Examples
Update an event subscription for an Event Grid partner topic to specify a new endpoint.
az eventgrid partner topic event-subscription update --name es1 \
-g rg1 --partner-topic-name partnertopic1 --endpoint https://contoso.azurewebsites.net/api/f1?code=code
Update an event subscription for an Event Grid partner topic to specify a new subject-ends-with filter.
az eventgrid partner topic event-subscription update --name es2 \
-g rg1 --partner-topic-name partnertopic1 \
--subject-ends-with .jpg
Update an event subscription for an Event Grid partner topic to specify a new endpoint and a new subject-ends-with filter a new list of included event types.
az eventgrid partner topic event-subscription update --name es3 \
-g rg1 --partner-topic-name partnertopic1 \
--subject-ends-with .png \
--endpoint https://contoso.azurewebsites.net/api/f1?code=code
--included-event-types Microsoft.Storage.BlobCreated Microsoft.Storage.BlobDeleted
Update an event subscription for an Azure Event Grid partner topic, to include a deadletter destination.
az eventgrid partner topic event-subscription update --name es2 \
-g rg1 --partner-topic-name partnertopic1 \
--deadletter-endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/sa1/blobServices/default/containers/blobcontainer1
Update an event subscription for an Azure Event Grid partner topic, using advanced filters.
az eventgrid partner topic event-subscription update --name es3 \
-g rg1 --partner-topic-name partnertopic1 \
--endpoint https://contoso.azurewebsites.net/api/f1?code=code
--advanced-filter data.blobType StringIn BlockBlob
--advanced-filter data.url StringBeginsWith https://myaccount.blob.core.windows.net
Update an event subscription for an Event Grid partner topic using Storage Queue as destination with message ttl at 5 mins
az eventgrid partner topic event-subscription update -n es1 \
-g rg1 --partner-topic-name partnertopic1 \
--endpoint-type storagequeue \
--endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/sa1/queueservices/default/queues/q1 \
--storage-queue-msg-ttl 300
Update an event subscription for an Event Grid partner topic with advanced filtering on arrays enabled
az eventgrid partner topic event-subscription update -n es1 \
-g rg1 --partner-topic-name partnertopic1 \
--endpoint-type storagequeue \
--endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/sa1/queueservices/default/queues/q1 \
--enable-advanced-filtering-on-arrays true
Required Parameters
Name of the event subscription.
Name of the partner topic.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
An advanced filter enables filtering of events based on a specific event property.
Usage: --advanced-filter KEY[.INNERKEY] FILTEROPERATOR VALUE [VALUE ...]
StringIn: --advanced-filter data.Color StringIn Blue Red Orange Yellow
StringNotIn: --advanced-filter data.Color StringNotIn Blue Red Orange Yellow
StringContains: --advanced-filter subject StringContains Blue Red
StringNotContains: --advanced-filter subject StringNotContains Blue Red
StringBeginsWith: --advanced-filter subject StringBeginsWith Blue Red
StringNotBeginsWith: --advanced-filter subject StringNotBeginsWith Blue Red
StringEndsWith: --advanced-filter subject StringEndsWith img png jpg
StringNotEndsWith: --advanced-filter subject StringNotEndsWith img png jpg
NumberIn: --advanced-filter data.property1 NumberIn 5 10 20
NumberInRange --advanced-filter data.property1 NumberInRange 5,10 20,30 40,50
NumberNotIn: --advanced-filter data.property2 NumberNotIn 100 200 300
NumberNotInRange: --advanced-filter data.property2 NumberNotInRange 100,110 200,210 300,310
NumberLessThan: --advanced-filter data.property3 NumberLessThan 100
NumberLessThanOrEquals: --advanced-filter data.property2 NumberLessThanOrEquals 100
NumberGreaterThan: --advanced-filter data.property3 NumberGreaterThan 100
NumberGreaterThanOrEquals: --advanced-filter data.property2 NumberGreaterThanOrEquals 100
BoolEquals: --advanced-filter data.property3 BoolEquals true
IsNullOrUndefined: --advanced-filter data.property3 IsNullOrUndefined
IsNotNull: --advanced-filter data.property3 IsNotNull
Multiple advanced filters can be specified by using more than one --advanced-filter
argument.
The Azure resource ID of an Azure Storage blob container destination where EventGrid should deadletter undeliverable events for this event subscription.
Add delivery attribute mapping to send additional information via HTTP headers when delivering events. This attribute is valid for all destination types except StorageQueue. Multiple attributes can be specified by using more than one --delivery-attribute-mapping
argument.
Usage: --delivery-attribute-mapping attribute-name attribute-type attribute-value [attribute-is-secret] Static Attribute Mapping: --delivery-attribute-mapping somename static somevalue Static Attribute Mapping: --delivery-attribute-mapping somename static somevalue false Static Attribute Mapping: --delivery-attribute-mapping somename static somevalue true Dynamic Attribute Mapping: --delivery-attribute-mapping somename dynamic somevalue Both Static and Dynamic: --delivery-attribute-mapping somename dynamic somevalue --delivery-attribute-mapping somename2 static somevalue.
Allows advanced filters to be evaluated against an array of values instead of expecting a singular value.
Endpoint where EventGrid should deliver events matching this event subscription. For webhook endpoint type, this should be the corresponding webhook URL. For other endpoint types, this should be the Azure resource identifier of the endpoint. It is expected that the destination endpoint to be already created and available for use before executing any Event Grid command.
The type of the destination endpoint.
A space-separated list of event types (e.g., Microsoft.Storage.BlobCreated and Microsoft.Storage.BlobDeleted). In order to subscribe to all default event types, do not specify any value for this argument. For event grid topics, event types are customer defined. For Azure events, e.g., Storage Accounts, IoT Hub, etc., you can query their event types using this CLI command 'az eventgrid topic-type list-event-types'.
A space-separated list of labels to associate with this event subscription.
Storage queue message time to live in seconds.
An optional string to filter events for an event subscription based on a prefix. Wildcard characters are not supported.
An optional string to filter events for an event subscription based on a suffix. Wildcard characters are not supported.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az eventgrid partner topic event-subscription update (eventgrid extension)
Command group 'az eventgrid' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Update an event subscription of a partner topic.
az eventgrid partner topic event-subscription update --name
--partner-topic-name
--resource-group
[--advanced-filter]
[--deadletter-endpoint]
[--endpoint]
[--endpoint-type {azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook}]
[--included-event-types]
[--labels]
[--subject-begins-with]
[--subject-ends-with]
Examples
Update an event subscription for an Event Grid partner topic to specify a new endpoint.
az eventgrid partner topic event-subscription update --name es1 \
-g rg1 --partner-topic-name partnertopic1 --endpoint https://contoso.azurewebsites.net/api/f1?code=code
Update an event subscription for an Event Grid partner topic to specify a new subject-ends-with filter.
az eventgrid partner topic event-subscription update --name es2 \
-g rg1 --partner-topic-name partnertopic1 \
--subject-ends-with .jpg
Update an event subscription for an Event Grid partner topic to specify a new endpoint and a new subject-ends-with filter a new list of included event types.
az eventgrid partner topic event-subscription update --name es3 \
-g rg1 --partner-topic-name partnertopic1 \
--subject-ends-with .png \
--endpoint https://contoso.azurewebsites.net/api/f1?code=code
--included-event-types Microsoft.Storage.BlobCreated Microsoft.Storage.BlobDeleted
Update an event subscription for an Azure Event Grid partner topic, to include a deadletter destination.
az eventgrid partner topic event-subscription update --name es2 \
-g rg1 --partner-topic-name partnertopic1 \
--deadletter-endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/sa1/blobServices/default/containers/blobcontainer1
Update an event subscription for an Azure Event Grid partner topic, using advanced filters.
az eventgrid partner topic event-subscription update --name es3 \
-g rg1 --partner-topic-name partnertopic1 \
--endpoint https://contoso.azurewebsites.net/api/f1?code=code
--advanced-filter data.blobType StringIn BlockBlob
--advanced-filter data.url StringBeginsWith https://myaccount.blob.core.windows.net
Required Parameters
Name of the event subscription.
Name of the partner topic.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
An advanced filter enables filtering of events based on a specific event property.
Usage: --advanced-filter KEY[.INNERKEY] FILTEROPERATOR VALUE [VALUE ...]
StringIn: --advanced-filter data.Color StringIn Blue Red Orange Yellow
StringNotIn: --advanced-filter data.Color StringNotIn Blue Red Orange Yellow
StringContains: --advanced-filter subject StringContains Blue Red
StringBeginsWith: --advanced-filter subject StringBeginsWith Blue Red
StringEndsWith: --advanced-filter subject StringEndsWith img png jpg
NumberIn: --advanced-filter data.property1 NumberIn 5 10 20
NumberNotIn: --advanced-filter data.property2 NumberNotIn 100 200 300
NumberLessThan: --advanced-filter data.property3 NumberLessThan 100
NumberLessThanOrEquals: --advanced-filter data.property2 NumberLessThanOrEquals 100
NumberGreaterThan: --advanced-filter data.property3 NumberGreaterThan 100
NumberGreaterThanOrEquals: --advanced-filter data.property2 NumberGreaterThanOrEquals 100
BoolEquals: --advanced-filter data.property3 BoolEquals true
Multiple advanced filters can be specified by using more than one --advanced-filter
argument.
The Azure resource ID of an Azure Storage blob container destination where EventGrid should deadletter undeliverable events for this event subscription.
Endpoint where EventGrid should deliver events matching this event subscription. For webhook endpoint type, this should be the corresponding webhook URL. For other endpoint types, this should be the Azure resource identifier of the endpoint.
The type of the destination endpoint.
A space-separated list of event types. Example: Microsoft.Storage.BlobCreated Microsoft.Storage.BlobDeleted. To subscribe to all default event types, do not specify any value for this argument.
A space-separated list of labels to associate with this event subscription.
An optional string to filter events for an event subscription based on a prefix. Wildcard characters are not supported.
An optional string to filter events for an event subscription based on a suffix. Wildcard characters are not supported.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.