我想要一个正则表达式来确保用户为参数提供 2 个元素,即 List
AvailabilityZones:
Description: List of Availability Zones to use for the subnets in the VPC. Only
two Availability Zones are used for this deployment, and the logical order of
your selections is preserved.
Type: List<AWS::EC2::AvailabilityZone::Name>
AllowedPattern: "(([a-zA-Z]+)-([a-zA-Z]+)-([0-9a-z]+))"
ConstraintDescription: Two Availability Zones must be added.
上述模式不验证 2 个条目。有人可以帮助分享如何有效地处理这种情况。