我正在使用CF模板创建一个AWS Stack,其中我的InstanceHostname限制为最大。在“ AllowedPattern”中使用正则表达式15个字符(普通字母和数字):
"InstanceHostname": {
"Type": "String",
"AllowedPattern": "^((?![0-9]{1,15}$)[a-zA-Z0-9-]{1,15}$)?$",
"ConstraintDescription": "The EC2 instance hostname must be 15 characters or less and must not...",
"Description": "A custom name for the EC2 instance…."
},
在“指定堆栈详细信息”页面上输入主机名时,是否可以使用“ AllowedPattern”正则表达式验证触发器?现在,只有在两页之前选择“创建堆栈”,验证才会进行。