AWS CloudFormation
User Guide (API Version 2010-05-15)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

Properties Declaration

Properties are declared in the Properties section of a resource. In addition, outputs declared in the Outputs section follow the rules for a property.

A Properties section is declared for each resource immediately after the resource Type declaration. Multiple properties are separated by a comma. Each property is declared with a double-quoted name, a single colon, and the value for the property.

Property values can be literal strings, lists of strings, parameter references, pseudo references, or the value returned by a function. When a property value is a literal string, the value is enclosed in double quotes. If a value is the result of a list of any kind, it is enclosed in brackets ("[ ]"). If a value is the result of an intrinsic function or reference, it is enclosed in braces ("{ }"). These rules apply when you combine literals, lists, references, and functions to obtain a value.

The following example shows several ways to declare a property.

"Properties" : {
    "MyString" : "one-string-value",
    "MyLiteralList" : [ "first-value", "second-value" ],
    "MyReferenceForOneValue" :  { "Ref" : "MyLogicalResourceName" } ,
    "MyFunctionResultWithFunctionParams" : {
        "Fn::Join" : [ "%", [ "Key=", { "Ref" : "MyParameter" } ] ] }
}