Skip to main content

CONTAINS_ALL

CONTAINS_ALL:
arg: { arg } # required
search: { search } # required

Description

The CONTAINS_ALL operation checks if a searchable value (arg) contains every item from a given collection (search). This is useful for ensuring that a set of required values are all present.

  • When arg is Text or Bytes, it checks if all substrings from the search collection are present.
  • When arg is a List or Set, it checks if all elements from the search collection are present.

Parameters

  • arg (Operation<Text | Bytes | List | Set>, required):
    • The value to be searched within (the haystack).
  • search (Operation<List | Set>, required):
    • A collection of items that must all be found in arg.

Return Type

Boolean

Examples

  1. Ensuring a security group name contains both "prod" and "web" tags:

    CONTAINS_ALL:
    arg:
    FIELD:
    path: Name
    search:
    LIST:
    itemType: TEXT
    items: ["prod", "web"]