selectionCriteria

Use this parameter to apply the new policy to a subset of log groups in the account or a data source name and type combination.

Specifying selectionCriteria is valid only when you specify SUBSCRIPTION_FILTER_POLICY, FIELD_INDEX_POLICY or TRANSFORMER_POLICYfor policyType.

  • If policyType is SUBSCRIPTION_FILTER_POLICY, the only supported selectionCriteria filter is LogGroupName NOT IN []

  • If policyType is TRANSFORMER_POLICY, the only supported selectionCriteria filter is LogGroupNamePrefix

  • If policyType is FIELD_INDEX_POLICY, the supported selectionCriteria filters are:

    • LogGroupNamePrefix

    • DataSourceName AND DataSourceType When you specify selectionCriteria for a field index policy you can use either LogGroupNamePrefix by itself or DataSourceName and DataSourceType together.

The selectionCriteria string can be up to 25KB in length. The length is determined by using its UTF-8 bytes.

Using the selectionCriteria parameter with SUBSCRIPTION_FILTER_POLICY is useful to help prevent infinite loops. For more information, see Log recursion prevention.