{
  "AWSTemplateFormatVersion" : "2010-09-09",
 
  "Description" : "AWS CloudFormation Sample Template Parameter_Validate: Sample template showing how to validate and type 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 between 5 and 20 characters"
    },

    "StringWithAllowedValues" : {
      "Type" : "String",
      "Default" : "t2.small",
      "AllowedValues" : [ "t1.micro", "t2.nano", "t2.micro", "t2.small", "t2.medium", "t2.large", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "c1.medium", "c1.xlarge", "c3.large", "c3.xlarge", "c3.2xlarge", "c3.4xlarge", "c3.8xlarge", "c4.large", "c4.xlarge", "c4.2xlarge", "c4.4xlarge", "c4.8xlarge", "g2.2xlarge", "g2.8xlarge", "r3.large", "r3.xlarge", "r3.2xlarge", "r3.4xlarge", "r3.8xlarge", "i2.xlarge", "i2.2xlarge", "i2.4xlarge", "i2.8xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "hi1.4xlarge", "hs1.8xlarge", "cr1.8xlarge", "cc2.8xlarge", "cg1.4xlarge"]
,
      "Description" : "Enter a valid EC2 instance type. Default is t2.small",
      "ConstraintDescription" : "must a valid EC2 instance type"
    },

    "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"
    },

    "KeyName" : {
      "Description" : "EC2 Key Pair",
      "Type" : "AWS::EC2::KeyPair::KeyName",
      "ConstraintDescription" : "must be the name of an existing EC2 KeyPair."
    },

    "TypedList" : {
      "Description" : "List of subnet IDs",
      "Type" : "List<AWS::EC2::Subnet::Id>",
      "ConstraintDescription" : "must be a list of subnets in a Virtual Private Cloud (VPC)."
    }
  },

  "Resources" : {
    "DummyResource" : {
      "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" }
    },
    "KeyName" : {
      "Value" : {"Ref" : "KeyName" }
    }
  }
}
