[英]AWS SSM Document Automation loop
I am writing an AWS SSM Document Automation that will check resource status and send an email with report, so that a user can fix potential errors.我正在编写一个 AWS SSM Document Automation,它将检查资源状态并发送带有报告的 email,以便用户可以修复潜在错误。 The thing is I want document to wait for some time, check status again and if it's not valid then send an email again.
问题是我希望文档等待一段时间,再次检查状态,如果它无效,则再次发送 email。
Document Steps:文件步骤:
Is it even possible to make a loop in AWS SSM Document Automation?甚至可以在 AWS SSM Document Automation 中创建一个循环吗? If it is, then how to manage its number of iterations?
如果是,那么如何管理它的迭代次数? Can I modify initial input parameters values?
我可以修改初始输入参数值吗?
I know that I can just invoke step functions and make a loop there(or just do everything step functions), but I want to avoid deploying more resources than necessary.我知道我可以只调用阶跃函数并在那里进行循环(或只执行所有阶跃函数),但我想避免部署不必要的资源。
in conclusion, SSM Document Automation does not provide loop.总之,SSM 文档自动化不提供循环。
but, you can make a conditional branching so you can do step 1, 2, 3, 5
.但是,您可以进行条件分支,以便执行第 1、2、3、5
step 1, 2, 3, 5
。 If you want to make wait for Xminutes, you should use aws:executeScript
in Automation Document Action.如果您想等待 Xminutes,您应该在自动化文档操作中使用
aws:executeScript
。
The most important thing is you can not go back to step 1. you should make the endpoint in the Document.最重要的是您不能 go 回到步骤 1。您应该在 Document 中制作端点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.