The built-in function Fn::EachMemberIn returns true if each member in a list matches at least one member in another list, and returns false if not.
Declaration
JSON
{ "Fn::EachMemberIn": [ [ value1_1, value1_2, ... ], [ value2_1, value2_2, ... ] ] }
YAML
Syntax for the full function name:
Fn::EachMemberIn: - - value1_1 - value1_2 - ... - - value2_1 - value2_2 - ...
Syntax for the short form:
!EachMemberIn [[value1_1, value1_2, ...],[value2_1, value2_2, ...],...]
Parameters
value1_1, value1_2,...
: Required. This parameter specifies the first list.value2_1, value2_2,...
: Required. This parameter specifies the second list.
Return value
true or false.
Examples
Fn::EachMemberIn: - - 1 - 2 - 3 - - 1 - 2 - 3 - 3 - 4
In this example,
true
is returned.Fn::EachMemberIn: - - 1 - 2 - 3 - - 1 - 2 - 4
In this example,
false
is returned.