[英]How to delete and rename subscription filters that have already been created in the Azure Service Bus Namespace?
I have created a Service Bus Namespace in Azure using the ARM template.我使用 ARM 模板在 Azure 中创建了一个服务总线命名空间。 In that I have created multiple topics and subscriptions along with filters.
为此,我创建了多个主题和订阅以及过滤器。
"type": "Microsoft.ServiceBus/namespaces/topics/subscriptions/rules",
"apiVersion": "2021-06-01-preview",
"name": "[concat(parameters('servicebus_name'), '/XXXXXXXXXXXXX/XXXXXXXXXXXXX/XXXXXXXXXXXXX')]",
"location": "[parameters('location')]",
"dependsOn": [
"[resourceId('Microsoft.ServiceBus/namespaces/topics/subscriptions', parameters('servicebus_name'), 'XXXXXXXXXXXXX', 'XXXXXXXXXXXXX')]",
"[resourceId('Microsoft.ServiceBus/namespaces/topics', parameters('servicebus_name'), 'XXXXXXXXXXXXX)]",
"[resourceId('Microsoft.ServiceBus/namespaces', parameters('servicebus_name'))]"
],
"properties": {
"action": {},
"filterType": "CorrelationFilter",
"correlationFilter": {
"label": "XXXXXXXXXXXXX"
}
}
}
I tried to delete the few filters by removing the code from the ARM template.我试图通过从 ARM 模板中删除代码来删除少数过滤器。 But still, those filters will exist in the Azure portal.
但是,这些过滤器仍将存在于 Azure 门户中。 and also tried to rename the few filters by changing the names of the filters, but the names couldn't be changed.
并且还尝试通过更改过滤器的名称来重命名少数过滤器,但是无法更改名称。
I want to delete a few filters and rename a few filters (Filter Type: Correlation Filter).我想删除几个过滤器并重命名几个过滤器(过滤器类型:相关过滤器)。
Is it possible to delete the filters and rename the filters using the ARM template?是否可以使用 ARM 模板删除过滤器并重命名过滤器?
Note: I don't want to use complete deployment mode to deploy the Service Bus ARM template.注意:我不想使用完全部署模式来部署服务总线 ARM 模板。
Approach-1:方法一:
Is it possible to delete the filters and rename the filters using the ARM template?是否可以使用 ARM 模板删除过滤器并重命名过滤器?
In my view Yes, it's possible.在我看来,是的,这是可能的。 Please try to modify existing resources using ARM template as mentioned below.
请尝试使用 ARM 模板修改现有资源,如下所述。
Export the template from the Azure Portal.从 Azure 门户导出模板。
Then download it locally.然后下载到本地。
Then modify it to update settings for filters.然后修改它以更新过滤器的设置。
NOTE: ARM will not recreate the existing resource, if it was already specified in the template.注意:ARM 不会重新创建现有资源,如果它已在模板中指定。 Only its update the resource if the property values for a resource are changed.
如果资源的属性值发生变化,它只会更新资源。 refer document .
参考文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.