test_segment_pattern

CloudWatchEvidently.Client.test_segment_pattern(**kwargs)

Use this operation to test a rules pattern that you plan to use to create an audience segment. For more information about segments, see CreateSegment.

See also: AWS API Documentation

Request Syntax

response = client.test_segment_pattern(
    pattern='string',
    payload='string'
)
Parameters
  • pattern (string) --

    [REQUIRED]

    The pattern to test.

  • payload (string) --

    [REQUIRED]

    A sample evaluationContext JSON block to test against the specified pattern.

Return type

dict

Returns

Response Syntax

{
    'match': True|False
}

Response Structure

  • (dict) --

    • match (boolean) --

      Returns true if the pattern matches the payload.

Exceptions

  • CloudWatchEvidently.Client.exceptions.ThrottlingException
  • CloudWatchEvidently.Client.exceptions.ValidationException
  • CloudWatchEvidently.Client.exceptions.AccessDeniedException