IntrinsicFunctions
Helpers that will create AWS Intrinsic Functions
Kind: global namespace
- IntrinsicFunctions :
object- .fnAnd(...condition) ⇒
string - .fnBase64(str, options) ⇒
function|string - .fnEquals(v1, v2) ⇒
function|string - .fnFindInMap(mapName, topLevelKey, secondLevelKey, options) ⇒
function|string - .fnGetArtifactAtt(artifactName, attributeName, options) ⇒
function|string - .fnGetAtt(logicalId, attributeName, options) ⇒
function|string - .fnGetAZs(region, options) ⇒
function|string - .fnGetParam(artifactName, JSONFileName, keyName, options) ⇒
function|string - .fnIf(conditionName, trueValue, falseValue, options) ⇒
function|string - .fnImportValue(sharedValue, options) ⇒
function|string - .fnJoin(arr, options) ⇒
function|string - .fnNot(condition, options) ⇒
function|string - .fnOr(...condition) ⇒
function|string - .fnSelect(index, ...str, options) ⇒
function|string - .fnSplit(delimiter, str, options) ⇒
function|string - .fnSub(str, options) ⇒
function|string - .ref(logicalId, options) ⇒
function|String
- .fnAnd(...condition) ⇒
fnAnd(...condition)
Fn::And definition
Kind: static method of IntrinsicFunctions
| Param | Type | Description |
|---|---|---|
| ...condition | string |
Any number of conditions |
fnBase64(str, options)
Fn::Base64 definition
Kind: static method of IntrinsicFunctions
| Param | Type | Description |
|---|---|---|
| str | string |
The string to evaluate |
| options | Object |
Passed in by Handlebars |
fnEquals(v1, v2)
Fn::Equals definition
Kind: static method of IntrinsicFunctions
| Param | Type | Description |
|---|---|---|
| v1 | string |
first value to compare |
| v2 | string |
second value to compare |
fnFindInMap(mapName, topLevelKey, secondLevelKey, options)
Fn::FindInMap definition
Kind: static method of IntrinsicFunctions
| Param | Type | Description |
|---|---|---|
| mapName | string |
logicalId of the map in the template |
| topLevelKey | string |
The top-level key name. Its value is a list of key-value pairs |
| secondLevelKey | string |
The second-level key name, which is set to one of the keys from the list assigned to TopLevelKey |
| options | Object |
options for creting the logicalId reference |
fnGetArtifactAtt(artifactName, attributeName, options)
Fn::GetArtifactAtt definition
Kind: static method of IntrinsicFunctions
| Param | Type | Description |
|---|---|---|
| artifactName | string |
The name of the input artifact. You must declare this artifact as input for the associated action. |
| attributeName | string |
The name of the artifact attribute whose value you want to retrieve. For details about each artifact attribute, see the following Attributes section. |
| options | Object |
options for creting the logicalId reference |
fnGetAtt(logicalId, attributeName, options)
Fn::GetAtt definition
Kind: static method of IntrinsicFunctions
| Param | Type | Description |
|---|---|---|
| logicalId | string |
resource that contains the attribute you want |
| attributeName | string |
name of the resource-specific attribute whose value you want |
| options | Object |
options for creting the logicalId reference |
fnGetAZs(region, options)
Fn::GetAZs definition
Kind: static method of IntrinsicFunctions
| Param | Type | Description |
|---|---|---|
| region | string |
name of the region |
| options | Object |
options passed by handlebars |
fnGetParam(artifactName, JSONFileName, keyName, options)
Fn::GetParam definition
Kind: static method of IntrinsicFunctions
| Param | Type | Description |
|---|---|---|
| artifactName | string |
The name of the artifact, which must be included as an input artifact for the associated action |
| JSONFileName | string |
The name of a JSON file that is contained in the artifact |
| keyName | string |
The name of the key whose value you want to retrieve |
| options | Object |
options for creting the logicalId reference |
fnIf(conditionName, trueValue, falseValue, options)
Fn::If definition
Kind: static method of IntrinsicFunctions
| Param | Type | Description |
|---|---|---|
| conditionName | string |
Name of the condition to reference |
| trueValue | string |
value to use if condition is true |
| falseValue | string |
value to use if condition is false |
| options | Object |
options passed by handlebars |
fnImportValue(sharedValue, options)
Fn::ImportValue definition
Kind: static method of IntrinsicFunctions
| Param | Type | Description |
|---|---|---|
| sharedValue | string |
name of the shared value |
| options | Object |
options passed by handlebars |
fnJoin(arr, options)
Fn::Join definition
Kind: static method of IntrinsicFunctions
| Param | Type | Description |
|---|---|---|
| arr | array | string | string |
if one parameter, it will be used as the array. If multiple, they will be joined to form the array. |
| options | Object |
options passed by handlebars |
Example
{{fnJoin "," (ref "Parameter1") }}
Example
{{fnJoin "," (fnGetAZs (ref "AWS::Region")) }}
Example
{{fnJoin "," "one" (ref "Parameter") "three"}}
fnNot(condition, options)
Fn::Not definition
Kind: static method of IntrinsicFunctions
| Param | Type | Description |
|---|---|---|
| condition | string |
condition to evaluate |
| options | Object |
options passed by handlebars |
Example
{{fnNot "Condition1"}}
Example
{{fnNot (fnEquals (ref "ParameterName") "value") }}
fnOr(...condition)
Fn::Or definition
Kind: static method of IntrinsicFunctions
| Param | Type | Description |
|---|---|---|
| ...condition | string |
One to many conditions |
fnSelect(index, ...str, options)
Fn::Select definition
Kind: static method of IntrinsicFunctions
| Param | Type | Description |
|---|---|---|
| index | Number |
array member to pick |
| ...str | string |
strings to select from |
| options | Object |
options passed by handlebars |
Example
{{fnSelect 0 (ref "ParameterList")}}
Example
{{fnSelect 0 "value1" "value2"}}
fnSplit(delimiter, str, options)
Fn::Split definition
Kind: static method of IntrinsicFunctions
| Param | Type | Description |
|---|---|---|
| delimiter | string |
A string value that determines where the source string is divided |
| str | string |
A string |
| options | Object |
options passed by handlebars |
Example
{{fnSplit ":" "split:me"}}
fnSub(str, options)
Fn::Sub definition
Kind: static method of IntrinsicFunctions
| Param | Type | Description |
|---|---|---|
| str | string |
String with replacement variables defined |
| options | Object |
options passed by handlebars |
| options.hash | Object |
all named parameters will be used for the variableMap |
Example
{{fnSub "The current region is ${AWS::Region"}}
Example
{{fnSub "Use this URL ${Url}" Url=(partial "buildUrl") }}
ref(logicalId, options)
Ref definition
Kind: static method of IntrinsicFunctions
| Param | Type | Default | Description |
|---|---|---|---|
| logicalId | string |
The logicalId to reference | |
| options | Object |
passed by handlebars | |
| [options.hash] | Object |
Named parameters used for ref options | |
| [options.hash.scope] | Boolean |
true |
Whether to scope the logicalId or not |
Example
{{ref "Parameter1"}}
Example
{{ref "Parameter2" scope=false}}