gpt4 book ai didi

amazon-web-services - 在 Cloudformation 脚本中对 CommaDelimitedList 类型的参数强制执行 AllowedPattern

转载 作者:行者123 更新时间:2023-12-02 21:13:12 25 4
gpt4 key购买 nike

我试图在我的参数上使用正则表达式强制执行允许的模式,但是当我尝试构建我的堆栈时,我收到以下错误消息:

Template validation error: Template error: Parameter 'myParam' AllowedPattern must be on a parameter of type String

这是我的参数定义:

"myParam": {
"Description": "this is my param",
"Type": "CommaDelimitedList",
"AllowedPattern": "\\+[0-9\\-\\ ]+",
"MinLength": "1"
}

最佳答案

我相信你不能在 CommaDelimitedList 上执行正则表达式。正则表达式只能应用于字符串。

CommaDelimitedList – 用逗号分隔的文字字符串数组

关于amazon-web-services - 在 Cloudformation 脚本中对 CommaDelimitedList 类型的参数强制执行 AllowedPattern,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32339584/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com