【问题标题】:AWS Systems Manager: Enumerate a StringList Parameter in State Manager DocumentAWS Systems Manager:枚举状态管理器文档中的 StringList 参数
【发布时间】: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


    【解决方案1】:

    根据 AWS 支持,目前这是不可能的。无法在文档本身的 StringList 中枚举任何值。

    【讨论】:

      猜你喜欢
      • 2018-04-21
      • 1970-01-01
      • 2019-02-15
      • 2020-01-15
      • 2019-04-02
      • 2021-05-18
      • 1970-01-01
      • 2020-07-22
      • 2021-04-15
      相关资源
      最近更新 更多