Open rachelxj-ms opened 1 month ago
Hi @rachelxj-ms,
2.55.0 is not the latest Azure CLI(2.64.0).
If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.
Thank you for opening this issue, we will look into it.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @jfggdl.
Describe the bug
I create a custom topic, create a webhook eventgrid subscription, I added 2 delivery properties.
But when I use az eventgrid event-subscription update to enable DQL on the eventgrid, those delivery properties got deleted.
Related command
az eventgrid event-subscription update --name test2 --source-resource-id "/subscriptions/a77a2c76a66c/resourceGroups/test/providers/Microsoft.EventGrid/topics/topic0927" --deadletter-identity-endpoint "/subscriptions/a77a2c76a66c/resourceGroups/search/providers/Microsoft.Storage/storageAccounts/*/blobServices/default/containers/event-grid" --deadletter-identity systemassigned --endpoint "https://.azurewebsites.net/api/updates"
Errors
delivery properties got deleted.
Issue script & Debug output
msal.telemetry: Generate or reuse correlation_id: 8a21392f-4645-40a5-908c-a125d1359700 cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/********a77a2c76a66c/resourceGroups/test/providers/Microsoft.EventGrid/topics/topic0927/providers/Microsoft.EventGrid/eventSubscriptions/test2?api-version=2021-10-15-preview' cli.azure.cli.core.sdk.policies: Request method: 'PATCH' cli.azure.cli.core.sdk.policies: Request headers: cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json' cli.azure.cli.core.sdk.policies: 'Content-Length': '959' cli.azure.cli.core.sdk.policies: 'Accept': 'application/json' cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': '8ac67e13-8495-11ef-87b3-010101010000' cli.azure.cli.core.sdk.policies: 'CommandName': 'eventgrid event-subscription update' cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--name --source-resource-id --deadletter-identity-endpoint --deadletter-identity --endpoint --delivery-attribute-mapping --delivery-attribute-mapping --debug' cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.55.0 (MSI) azsdk-python-mgmt-eventgrid/10.2.0b2 Python/3.11.5 (Windows-10-10.0.26100-SP0)' cli.azure.cli.core.sdk.policies: 'Authorization': '**' cli.azure.cli.core.sdk.policies: Request body: cli.azure.cli.core.sdk.policies: {"destination": {"endpointType": "WebHook", "properties": {"endpointUrl": "https://.azurewebsites.net/api/updates", "maxEventsPerBatch": 1, "preferredBatchSizeInKilobytes": 64, "deliveryAttributeMappings": [{"name": "test", "type": "Static", "properties": {"value": "value", "isSecret": true}}, {"name": "test2", "type": "Static", "properties": {"value": "value2", "isSecret": true}}]}}, "filter": {"subjectBeginsWith": "", "subjectEndsWith": "", "enableAdvancedFilteringOnArrays": true}, "eventDeliverySchema": "EventGridSchema", "retryPolicy": {"maxDeliveryAttempts": 30, "eventTimeToLiveInMinutes": 1440}, "deadLetterWithResourceIdentity": {"identity": {"type": "SystemAssigned"}, "deadLetterDestination": {"endpointType": "StorageBlob", "properties": {"resourceId": "/subscriptions/*b-a77a2c76a66c/resourceGroups/search/providers/Microsoft.Storage/storageAccounts/**", "blobContainerName": "event-grid"}}}} urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443 urllib3.connectionpool: https://management.azure.com:443 "PATCH /subscriptions/*a77a2c76a66c/resourceGroups/test/providers/Microsoft.EventGrid/topics/topic0927/providers/Microsoft.EventGrid/eventSubscriptions/test2?api-version=2021-10-15-preview HTTP/1.1" 201 1378 cli.azure.cli.core.sdk.policies: Response status: 201 cli.azure.cli.core.sdk.policies: Response headers: cli.azure.cli.core.sdk.policies: 'Cache-Control': 'no-cache' cli.azure.cli.core.sdk.policies: 'Pragma': 'no-cache' cli.azure.cli.core.sdk.policies: 'Content-Length': '1378' cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json; charset=utf-8' cli.azure.cli.core.sdk.policies: 'Expires': '-1' cli.azure.cli.core.sdk.policies: 'Retry-After': '10' cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
Expected behavior
in PATCH request, those attributes need to be preserved.
Environment Summary
azure-cli 2.65.0
core 2.65.0 telemetry 1.1.0
Extensions: ai-examples 0.2.5 ml 2.30.1 ssh 2.0.5
Dependencies: msal 1.31.0 azure-mgmt-resource 23.1.1
Additional context
No response