There is a command group 'az_eventgrid_event subscription'. This group of commands could 'manage event subscriptions'. The group of commands has global parameter '--debug' which means 'Increase logging verbosity to show all debug logs.'. The group of commands has global parameter '--help -h' which means 'Show this help message and exit.'. The group of commands has global parameter '--only-show-errors' which means 'Only show errors, suppressing warnings.'. The group of commands has global parameter '--output -o' which means 'Output format.'. The group of commands has global parameter '--query' which means 'JMESPath query string. See <a href="http://jmespath.org/">http://jmespath.org/</a> for more information and examples.'. The group of commands has global parameter '--subscription' which means 'Name or ID of subscription. You can configure the default subscription using `az account set -s NAME_OR_ID`.'. The group of commands has global parameter '--verbose' which means 'Increase logging verbosity. Use --debug for full debug logs.'. This group contains a child command 'az_eventgrid_event subscription_create'.The syntax is: az eventgrid event-subscription create --name
                                       [--advanced-filter]
                                       [--azure-active-directory-application-id-or-uri]
                                       [--azure-active-directory-tenant-id]
                                       [--deadletter-endpoint]
                                       [--deadletter-identity {systemassigned}]
                                       [--deadletter-identity-endpoint]
                                       [--delivery-identity {systemassigned}]
                                       [--delivery-identity-endpoint]
                                       [--delivery-identity-endpoint-type {azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook}]
                                       [--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]
                                       [--source-resource-id]
                                       [--subject-begins-with]
                                       [--subject-case-sensitive {false, true}]
                                       [--subject-ends-with]. The 1th example of the child command would be to use it to 'create a new event subscription for an event grid topic  using default filters', the syntax is: az eventgrid event-subscription create --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1 \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code. The 2th example of the child command would be to use it to 'create a new event subscription for an azure subscription subscription  using default filters', the syntax is: az eventgrid event-subscription create --name es2 \
    --source-resource-id /subscriptions/{SubID} \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code. The 3th example of the child command would be to use it to 'create a new event subscription for a resource group  using default filters', the syntax is: az eventgrid event-subscription create --name es3 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG} \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code. The 4th example of the child command would be to use it to 'create a new event subscription for a storage account  using default filters', the syntax is: az eventgrid event-subscription create --name es3 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/s1"  \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code. The 5th example of the child command would be to use it to 'create a new event subscription for a storage account  using advanced filters', the syntax is: az eventgrid event-subscription create  --name es3 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/s1" \
    --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. The 6th example of the child command would be to use it to 'create a new event subscription for an azure subscription  with a filter specifying a subject prefix', the syntax is: az eventgrid event-subscription create --name es4 \
    --source-resource-id /subscriptions/{SubID} \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code \
    --subject-begins-with mysubject_prefix. The 7th example of the child command would be to use it to 'create a new event subscription for a resource group  with a filter specifying a subject suffix', the syntax is: az eventgrid event-subscription create --name es5 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG} \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code \
    --subject-ends-with mysubject_suffix. The 8th example of the child command would be to use it to 'create a new event subscription for an azure subscription  using default filters  and an eventhub as a destination', the syntax is: az eventgrid event-subscription create --name es2 \
    --source-resource-id /subscriptions/{SubID} \
    --endpoint-type eventhub \
    --endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/n1/eventhubs/EH1. The 9th example of the child command would be to use it to 'create a new event subscription for an azure subscription  using default filters  and an azure storage queue as a destination', the syntax is: az eventgrid event-subscription create --name es2 \
    --source-resource-id /subscriptions/{SubID} \
    --endpoint-type storagequeue \
    --endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/sa1/queueservices/default/queues/q1. The 10th example of the child command would be to use it to 'create a new event subscription for an azure subscription  using default filters  and an azure servicebusqueue as a destination', the syntax is: az eventgrid event-subscription create --name es2 \
    --source-resource-id /subscriptions/{SubID} \
    --endpoint-type servicebusqueue \
    --endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.ServiceBus/namespaces/ns1/queues/queue1. The 11th example of the child command would be to use it to 'create a new event subscription for an event grid domain  using default filters  and cloudevent v 1 0 as the delivery schema', the syntax is: az eventgrid event-subscription create --name es2 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/d1 \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code \
    --event-delivery-schema cloudeventschemav1_0. The 12th example of the child command would be to use it to 'create a new event subscription for a storage account  with a deadletter destination and custom retry policy of maximum 10 delivery attempts and an event ttl of 2 hours  whichever happens earlier', the syntax is: az eventgrid event-subscription create --name es2 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/s1" \
    --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. The 13th example of the child command would be to use it to 'create a new event subscription for a domain topic', the syntax is: az eventgrid event-subscription create --name es2 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/domain1/topics/t1" \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code. The 14th example of the child command would be to use it to 'create a new event subscription  for a storage account  with an expiration date', the syntax is: az eventgrid event-subscription create --name es2 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/sa1" \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code
    --expiration-date "2018-10-31". The 15th example of the child command would be to use it to 'create a new event subscription for an event grid topic  using azure active directory enabled webhook as a destination', the syntax is: az eventgrid event-subscription create --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1 \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code
    --azure-active-directory-tenant-id azureactivedirectorytenantid
    --azure-active-directory-application-id-or-uri azureactivedirectoryapplicationidoruri. The 16th example of the child command would be to use it to 'create a new event subscription for an event grid topic  using azure function as destination', the syntax is: az eventgrid event-subscription create --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1 \
    --endpoint /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Web/sites/{functionappname}/functions/{functionname} --endpoint-type azurefunction. The 17th example of the child command would be to use it to 'create a new event subscription for an event grid topic  using eventhub with systemassigned msi identity as destination and with deadletter with msi identity', the syntax is: az eventgrid event-subscription create --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1 \
    --delivery-identity-endpoint-type eventhub --delivery-identity systemassigned --delivery-identity-endpoint /subscriptions/{SubId2|}/resourceGroups/{RG2}/providers/Microsoft.eventhub/namespaces/{EventHubNamespace}/eventhubs/{EventhubName} \
    --deadletter-identity-endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/s2/blobServices/default/containers/blobcontainer1 --deadletter-identity systemassigned -n {EventSubscriptionName}. The parameter '--name -n' is required. It is used to name of the event subscription.. The parameter '--advanced-filter' is optional. an advanced filter enables filtering of events based on a specific event property.. The parameter '--azure-active-directory-application-id-or-uri' is optional. 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 parameter '--azure-active-directory-tenant-id' is optional. 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 parameter '--deadletter-endpoint' is optional. the azure resource id of an azure storage blob container destination where eventgrid should deadletter undeliverable events for this event subscription.. The parameter '--deadletter-identity' is optional. the identity type of the deadletter destination resource.. The parameter '--deadletter-identity-endpoint' is optional. the azure resource id of an azure storage blob container destination with identity where eventgrid should deadletter undeliverable events for this event subscription.. The parameter '--delivery-identity' is optional. the identity type of the delivery destination resource (e.g., storage queue, or eventhub).. The parameter '--delivery-identity-endpoint' is optional. endpoint with identity 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 parameter '--delivery-identity-endpoint-type' is optional. the type of the destination endpoint with resource identity.. The parameter '--endpoint' is optional. 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 parameter '--endpoint-type' is optional. the type of the destination endpoint.. The parameter '--event-delivery-schema' is optional. 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).. The parameter '--event-ttl' is optional. event time to live (in minutes). must be a number between 1 and 1440.. The parameter '--expiration-date' is optional. 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.. The parameter '--included-event-types' is optional. 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.. The parameter '--labels' is optional. a space-separated list of labels to associate with this event subscription.. The parameter '--max-delivery-attempts' is optional. maximum number of delivery attempts. must be a number between 1 and 30.. The parameter '--max-events-per-batch' is optional. maximum number of events in a batch. must be a number between 1 and 5000.. The parameter '--preferred-batch-size-in-kilobytes' is optional. preferred batch size in kilobytes. must be a number between 1 and 1024.. The parameter '--source-resource-id' is optional. fully qualified identifier of the azure resource to which the event subscription needs to be created.. The parameter '--subject-begins-with' is optional. an optional string to filter events for an event subscription based on a prefix. wildcard characters are not supported.. The parameter '--subject-case-sensitive' is optional. specify to indicate whether the subject fields should be compared in a case sensitive manner. true if flag present.. The parameter '--subject-ends-with' is optional. an optional string to filter events for an event subscription based on a suffix. wildcard characters are not supported.. 