我目前正在从这里引用AWS示例: https://s3-us-west-2.amazonaws.com/cloudformation-templates-us-west-2/AutoScalingMultiAZWithNotifications.template
"Subnets" : {
"Type" : "List<AWS::EC2::Subnet::Id>",
"Description" : "The list of SubnetIds in your Virtual Private Cloud (VPC)"
}
然后使用
{ "Ref" : "Subnets" }
同样对于我使用的用例:
"Zone" : {
"Type" : "List<'land','raw'>", // Can this be replaced by static List so user can select multiple options
"Description" : "The list of landing zone for raw data",
}
然后用作
{ "Ref" : "Zone" }
我收到的错误是无法识别类型:列表&lt;'land','raw'&gt;
是否有一个很好的例子来引用静态列表作为输入参数
答案 0 :(得分:0)
我相信你想要实现的目标是不可能的。甚至没有"List<String>"
类型,只有CommaDelimitedList
,您无法选择具有多个条目的选择框。
答案 1 :(得分:0)
看看是否有帮助 https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html
"Parameters" : {
"InstanceTypeParameter" : {
"Type" : "String",
"Default" : "t2.micro",
"AllowedValues" : ["t2.micro", "m1.small", "m1.large"],
"Description" : "Enter t2.micro, m1.small, or m1.large. Default is t2.micro."
}
}
AllowedValues是静态列表