Azure / Azure/azure-cli-extensions

az eventgrid event-subscription create command error

Open
#6,331 3 comments 1 reaction 0 assignees View on GitHub
Auto-Assign customer-reported Event Grid question Service Attention
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

### Related command
az eventgrid system-topic event-subscription create
az eventgrid event-subscription create

### Extension name (the extension in question)
az eventgrid

### Description of issue (in as much detail as possible)

In Azure Portal, we can create an event subscription for system topic with enabling dead-lettering as shown below: ([doc reference](https://learn.microsoft.com/en-us/azure/event-grid/manage-event-delivery#azure-portal))

![image](https://github.com/Azure/azure-cli-extensions/assets/95652148/372bdf09-60f3-4747-be9b-b340cd72bee8)

However, [az eventgrid system-topic event-subscription create](https://learn.microsoft.com/en-us/cli/azure/eventgrid/system-topic/event-subscription?view=azure-cli-latest#az-eventgrid-system-topic-event-subscription-create) doesn't have parameters `deadletter-identity` and `deadletter-identity-endpoint` in CLI and running results in `unrecognized arguments: --deadletter-identity-endpoint /subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Storage/storageAccounts/xxx/blobServices/default/containers/egcontainer --deadletter-identity systemassigned` error.

So followed [az eventgrid topic event-subscription create](https://learn.microsoft.com/en-us/cli/azure/eventgrid/topic/event-subscription?view=azure-cli-latest#az-eventgrid-topic-event-subscription-create) doc and ran the following command and it also resulted in error.
**Command:**
az eventgrid event-subscription create --name xxx --source-resource-id "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.EventGrid/systemTopics/xxx" --endpoint-type storagequeue --endpoint "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Storage/storageAccounts/xxx/queueservices/default/queues/xxx" --deadletter-identity-endpoint "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Storage/storageAccounts/xxx/blobServices/default/containers/egcontainer" --deadletter-identity systemassigned

**Output:**
Code: InvalidRequest
Message: This event subscription operation is not supported using this API call. Please use the proper API and try again.

Any plan for supporting deadletter-identity for system topic? These parameters are available in both [ARM template](https://learn.microsoft.com/en-us/azure/templates/microsoft.eventgrid/2021-10-15-preview/topics/eventsubscriptions?pivots=deployment-language-arm-template) as well as [Rest API](https://learn.microsoft.com/en-us/rest/api/eventgrid/controlplane-version2022-06-15/system-topic-event-subscriptions/create-or-update?tabs=HTTP).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.