如果在单个任务中sql server创建失败,如何避免创建资源组?

编程入门 行业动态 更新时间:2024-10-24 10:14:15
本文介绍了如果在单个任务中sql server创建失败,如何避免创建资源组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在逻辑应用程序中使用功能应用程序 在功能应用程序中通过azure rest调用我在创建资源组的一个任务中创建资源组,服务器和db ,服务器和db 如果有任何失败,它应该回滚或不创建前一步骤。我的问题是在资源创建后它将创建服务器,而服务器创建时间如果它有任何资源组不应创建的例外情况

解决方案

最好是在你的情况下使用手臂模板,你需要创建手臂模板:

逻辑应用程序中的异常处理: www.middleway.eu / error-handling-within-azure-logic-apps /

in logic app am using function app In function app through azure rest call am creating resource group , server and db in one task am creating resource group , server and db if anything fails it should rollback or not to create previous step my question is after resource creation it going to create server while server creation time if it got any exception that resource group should not create

解决方案

Hi,

The best is to use arm template in your case, you need to create arm template :

docs.microsoft/en-us/azure/azure-resource-manager/vs-azure-tools-resource-groups-deployment-projects-create-deploy

david-obrien/2018/05/azure-arm-sql/

After creating the templates you can use following action in logic app highlighted in orange in below screenshot.

But, if don't want to make any change with existing setup, then use scope shape for exception handling in logic apps and in the catch block you can delete the resource group using the shape higlighted in yellow:

Exception handling in logic apps:www.middleway.eu/error-handling-within-azure-logic-apps/

更多推荐

如果在单个任务中sql server创建失败,如何避免创建资源组?

本文发布于:2023-10-18 10:46:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1504006.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:资源   sql   server

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!