forked from AHinMaine/AWSCloudFormation-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathParameter_Validate.template
67 lines (63 loc) · 2.08 KB
/
Parameter_Validate.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "AWS CloudFormation Sample Template Parameter_Validate: Sample template showing how to validate string and numeric parameters. This template does not create any billable AWS Resources.",
"Parameters" : {
"NumberWithRange" : {
"Type" : "Number",
"MinValue" : "1",
"MaxValue" : "10",
"Default" : "2",
"Description" : "Enter a number between 1 and 10, default is 2"
},
"NumberWithAllowedValues" : {
"Type" : "Number",
"Default" : "2",
"AllowedValues" : ["1", "2", "3", "10", "20"],
"Description" : "Enter 1,2,3,10 or 20, default is 2"
},
"StringWithLength" : {
"Type" : "String",
"Default" : "Hello World",
"MaxLength" : "20",
"MinLength" : "5",
"Description" : "Enter a string, between 5 and 20 characters in length",
"ConstraintDescription" : "must have beteen 5 and 20 characters"
},
"StringWithAllowedValues" : {
"Type" : "String",
"Default" : "t1.micro",
"AllowedValues" : ["t1.micro", "m1.small"],
"Description" : "Enter t1.micro, m1.small, default is t1.micro"
},
"StringWithRegex" : {
"Type" : "String",
"Default" : "Hello",
"AllowedPattern" : "[A-Za-z0-9]+",
"MaxLength" : "10",
"Description" : "Enter a string with alpha-numeric characters only",
"ConstraintDescription" : "must only contain upper and lower case letters and numbers"
}
},
"Resources" : {
"myWaitHandle" : {
"Type" : "AWS::CloudFormation::WaitConditionHandle"
}
},
"Outputs" : {
"NumberWithRange" : {
"Value" : {"Ref" : "NumberWithRange" }
},
"NumberWithAllowedValues" : {
"Value" : {"Ref" : "NumberWithAllowedValues" }
},
"StringWithLength" : {
"Value" : {"Ref" : "StringWithLength" }
},
"StringWithAllowedValue" : {
"Value" : {"Ref" : "StringWithAllowedValues" }
},
"StringWithRegex" : {
"Value" : {"Ref" : "StringWithRegex" }
}
}
}