【发布时间】:2018-08-17 21:40:57
【问题描述】:
状态管理器文档允许我们定义StringList 类型的输入参数。我们如何枚举文档定义中StringList 中的每个值?
例如,想象一个StringList 输入参数,它定义了要运行的命令列表。我们如何为列表中的每个命令创建一个新的aws:runShellScript 操作?
下面的伪文档显示了我想要实现的目标 - 为 StringList 中的每个值创建一个新操作。
schemaVersion: "2.2"
description: "Updates services configured for the current role"
parameters:
ListOfCommands:
type: "StringList"
description: "A list of commands to execute"
mainSteps:
/* For $C in ListOfCommands: */
- action: "aws:runShellScript"
name: "InstallConsul"
inputs:
runCommand:
- "{{$C}}"
【问题讨论】:
标签: amazon-web-services amazon-ec2 amazon-systems-manager