The built-in function Fn::Any checks the values in an array. If one of the values is evaluated to true, true is returned. If none of the values are evaluated to true, false is returned.
Declaration
JSON
{ "Fn::Any": [value_1, value_2, ...] }YAML
Syntax for the full function name:
Fn::Any: value_1, value_2, ...Syntax for the short form:
!Any [value_1, value_2, ... ]
Parameters
value: Required. This parameter specifies the value in the array. All data types are supported. For example, you can set the value parameter to true, false, 1, and 0. 1 and 0 are used as logical values.
Return value
true or false.
Examples
Example 1
Fn::Any: true, trueIn this example,
trueis returned.Example 2
Fn::Any: true, falseIn this example,
trueis returned.Example 3
Fn::Any: false, falseIn this example,
falseis returned.Example 4
Fn::Any: 1, 1In this example,
trueis returned.Example 5
Fn::Any: 0, 0In this example,
falseis returned.