Skip to main content

NotIn

Vasyl MartyniukLess than 1 minute

Check if the value (left expression) is not in the array of values or IP address range. This condition type performs the literal comparison. It takes into consideration the value type also. That is why, for example, the numeric value 3 is not a part of the array with string values '3' and '7'.

{
  "Condition": {
    "NotIn": {
      "${USER.user_email}": [
        "john@mydomain.com",
        "jully@anotherdomain.com"
      ]
    }
  }
}

The NotIn condition type can also be used to check if user's IP address is not within certain CIRD IP range. For example the following condition checks if user's IP between IPs 172.1.0.0 - 172.1.255.255.

{
  "Condition": {
    "NotIn": {
      "${USER.ip}": "(*ip)172.1.0.0/16"
    }
  }
}

It is important to emphasize that if you provide CIRD annotation, you have to explicitly typecast it to (*ip) to let AAM know that you mean actually the IP range.