使用Azure CLI更新EventGrid主题以设置死信目标

使用Azure CLI更新EventGrid主题以设置死信目标,azure,azure-eventgrid,azure-cloud-shell,Azure,Azure Eventgrid,Azure Cloud Shell,我将按照说明向现有EventGrid订阅中添加一个--死信端点 进程失败,出现错误:事件订阅不存在。 我错过了什么?: 蔚蓝云壳 执行的命令: 结果:事件订阅不存在。 编辑1:取得了一些进展 此命令有助于列出所需的部分: 上述响应中的硬编码值如下: 但这会导致另一个错误: 关于这个问题的想法?关于这个问题,请按如下方式更新脚本 sourceid=$(az eventgrid system-topic show --name egtop-dev -g TEST_DEV --q

我将按照说明向现有EventGrid订阅中添加一个
--死信端点

进程失败,出现错误:
事件订阅不存在。

我错过了什么?:

  • 蔚蓝云壳
  • 执行的命令:
  • 结果:
    事件订阅不存在。

编辑1:取得了一些进展

  • 此命令有助于列出所需的部分:
  • 上述响应中的硬编码值如下:
  • 但这会导致另一个错误:

关于这个问题的想法?

关于这个问题,请按如下方式更新脚本

sourceid=$(az eventgrid system-topic show --name egtop-dev -g TEST_DEV --query source --output tsv) 

storageid=$(az storage account show --name stgdev --resource-group TEST_DEV --query id --output tsv)

az eventgrid event-subscription update \
--name egsub-dev \
--source-resource-id $sourceid\
--deadletter-endpoint $storageid/blobServices/default/containers/$containername
az eventgrid event-subscription list --topic-type "Microsoft.Storage.StorageAccounts" --location southcentralus
az eventgrid event-subscription update --name egsub-dev --source-resource-id /subscriptions/$subscription/resourceGroups/$resourceGroup/providers/Microsoft.Storage/storageAccounts/storageAccountThatTriggersEventGrid/providers/Microsoft.EventGrid/eventSubscriptions/egsub-dev --deadletter-endpoint $storageid/blobServices/default/containers/$containername
No registered resource provider found for location 'southcentralus' and API version '2020-10-15-preview' for type 'storageAccounts'. The supported api-versions are '2021-04-01, 2021-02-01, 2021-01-01, 2020-08-01-preview, 2019-06-01, 2019-04-01, 2018-11-01, 2018-07-01, 2018-03-01-preview, 2018-02-01, 2017-10-01, 2017-06-01, 2016-12-01, 2016-05-01, 2016-01-01, 2015-06-15, 2015-05-01-preview'. The supported locations are 'eastus, eastus2, westus, westeurope, eastasia, southeastasia, japaneast, japanwest, northcentralus, southcentralus, centralus, northeurope, brazilsouth, australiaeast, australiasoutheast, southindia, centralindia, westindia, canadaeast, canadacentral, westus2, westcentralus, uksouth, ukwest, koreacentral, koreasouth, francecentral, australiacentral, southafricanorth, uaenorth, switzerlandnorth, germanywestcentral, norwayeast, westus3, jioindiawest'.
sourceid=$(az eventgrid system-topic show --name egtop-dev -g TEST_DEV --query source --output tsv) 

storageid=$(az storage account show --name stgdev --resource-group TEST_DEV --query id --output tsv)

az eventgrid event-subscription update \
--name egsub-dev \
--source-resource-id $sourceid\
--deadletter-endpoint $storageid/blobServices/default/containers/$containername