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 -n

Name of the event subscription.

--partner-topic-name

Name of the partner topic.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--aad-tenant-id --azure-active-directory-tenant-id

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.

--advanced-filter

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.

--azure-active-directory-application-id-or-uri

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.

--deadletter-endpoint

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.

--delivery-attribute-mapping

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.

--enable-advanced-filtering-on-arrays --enable-af-arr

Allows advanced filters to be evaluated against an array of values instead of expecting a singular value.

Accepted values: false, true
--endpoint

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.

--endpoint-type

The type of the destination endpoint.

Accepted values: azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook
Default value: webhook
--event-delivery-schema

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).

Accepted values: cloudeventschemav1_0, custominputschema, eventgridschema
--event-ttl

Event time to live (in minutes). Must be a number between 1 and 1440.

Default value: 1440
--expiration-date

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.

--included-event-types

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'.

--labels

A space-separated list of labels to associate with this event subscription.

--max-delivery-attempts

Maximum number of delivery attempts. Must be a number between 1 and 30.

Default value: 30
--max-events-per-batch

Maximum number of events in a batch. Must be a number between 1 and 5000.

--preferred-batch-size-in-kilobytes

Preferred batch size in kilobytes. Must be a number between 1 and 1024.

--qttl --storage-queue-msg-ttl

Storage queue message time to live in seconds.

--subject-begins-with

An optional string to filter events for an event subscription based on a prefix. Wildcard characters are not supported.

--subject-case-sensitive

Specify to indicate whether the subject fields should be compared in a case sensitive manner. True if flag present.

Accepted values: false, true
Default value: False
--subject-ends-with

An optional string to filter events for an event subscription based on a suffix. Wildcard characters are not supported.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az eventgrid partner topic event-subscription create (eventgrid extension)

Preview

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 -n

Name of the event subscription.

--partner-topic-name

Name of the partner topic.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--advanced-filter

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.

--azure-active-directory-application-id-or-uri

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.

--azure-active-directory-tenant-id

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.

--deadletter-endpoint

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

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.

--endpoint-type

The type of the destination endpoint.

Accepted values: azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook
Default value: webhook
--event-delivery-schema

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).

Accepted values: cloudeventschemav1_0, custominputschema, eventgridschema
--event-ttl

Event time to live (in minutes). Must be a number between 1 and 1440.

Default value: 1440
--expiration-date

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.

--included-event-types

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.

--labels

A space-separated list of labels to associate with this event subscription.

--max-delivery-attempts

Maximum number of delivery attempts. Must be a number between 1 and 30.

Default value: 30
--max-events-per-batch

Maximum number of events in a batch. Must be a number between 1 and 5000.

--preferred-batch-size-in-kilobytes

Preferred batch size in kilobytes. Must be a number between 1 and 1024.

--subject-begins-with

An optional string to filter events for an event subscription based on a prefix. Wildcard characters are not supported.

--subject-case-sensitive

Specify to indicate whether the subject fields should be compared in a case sensitive manner. True if flag present.

Accepted values: false, true
Default value: False
--subject-ends-with

An optional string to filter events for an event subscription based on a suffix. Wildcard characters are not supported.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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 -n

Name of the event subscription.

--partner-topic-name

Name of the partner topic.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az eventgrid partner topic event-subscription delete (eventgrid extension)

Preview

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 -n

Name of the event subscription.

--partner-topic-name

Name of the partner topic.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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

--partner-topic-name

Name of the partner topic.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--odata-query

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
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az eventgrid partner topic event-subscription list (eventgrid extension)

Preview

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

--partner-topic-name

Name of the partner topic.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--odata-query

The query used to filter the results using OData syntax.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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 -n

Name of the event subscription.

--partner-topic-name

Name of the partner topic.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--include-attrib-secret --include-static-delivery-attribute-secret

Indicate whether any static delivery attribute secrets should be returned. True if flag present.

Accepted values: false, true
Default value: False
--include-full-endpoint-url

Specify to indicate whether the full endpoint URL should be returned. True if flag present.

Accepted values: false, true
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az eventgrid partner topic event-subscription show (eventgrid extension)

Preview

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 -n

Name of the event subscription.

--partner-topic-name

Name of the partner topic.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--include-full-endpoint-url

Specify to indicate whether the full endpoint URL should be returned. True if flag present.

Accepted values: false, true
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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 -n

Name of the event subscription.

--partner-topic-name

Name of the partner topic.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--advanced-filter

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.

--deadletter-endpoint

The Azure resource ID of an Azure Storage blob container destination where EventGrid should deadletter undeliverable events for this event subscription.

--delivery-attribute-mapping

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.

--enable-advanced-filtering-on-arrays --enable-af-arr

Allows advanced filters to be evaluated against an array of values instead of expecting a singular value.

Accepted values: false, true
--endpoint

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.

--endpoint-type

The type of the destination endpoint.

Accepted values: azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook
Default value: webhook
--included-event-types

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'.

--labels

A space-separated list of labels to associate with this event subscription.

--qttl --storage-queue-msg-ttl

Storage queue message time to live in seconds.

--subject-begins-with

An optional string to filter events for an event subscription based on a prefix. Wildcard characters are not supported.

--subject-ends-with

An optional string to filter events for an event subscription based on a suffix. Wildcard characters are not supported.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az eventgrid partner topic event-subscription update (eventgrid extension)

Preview

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 -n

Name of the event subscription.

--partner-topic-name

Name of the partner topic.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--advanced-filter

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.

--deadletter-endpoint

The Azure resource ID of an Azure Storage blob container destination where EventGrid should deadletter undeliverable events for this event subscription.

--endpoint

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.

--endpoint-type

The type of the destination endpoint.

Accepted values: azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook
Default value: webhook
--included-event-types

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.

--labels

A space-separated list of labels to associate with this event subscription.

--subject-begins-with

An optional string to filter events for an event subscription based on a prefix. Wildcard characters are not supported.

--subject-ends-with

An optional string to filter events for an event subscription based on a suffix. Wildcard characters are not supported.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.