FraudDetector / Client / get_rules



Get all rules for a detector (paginated) if ruleId and ruleVersion are not specified. Gets all rules for the detector and the ruleId if present (paginated). Gets a specific rule if both the ruleId and the ruleVersion are specified.

This is a paginated API. Providing null maxResults results in retrieving maximum of 100 records per page. If you provide maxResults the value must be between 50 and 100. To get the next page result, a provide a pagination token from GetRulesResult as part of your request. Null pagination token fetches the records from the beginning.

See also: AWS API Documentation

Request Syntax

response = client.get_rules(
  • ruleId (string) – The rule ID.

  • detectorId (string) –


    The detector ID.

  • ruleVersion (string) – The rule version.

  • nextToken (string) – The next page token.

  • maxResults (integer) – The maximum number of rules to return for the request.

Return type:



Response Syntax

    'ruleDetails': [
            'ruleId': 'string',
            'description': 'string',
            'detectorId': 'string',
            'ruleVersion': 'string',
            'expression': 'string',
            'language': 'DETECTORPL',
            'outcomes': [
            'lastUpdatedTime': 'string',
            'createdTime': 'string',
            'arn': 'string'
    'nextToken': 'string'

Response Structure

  • (dict) –

    • ruleDetails (list) –

      The details of the requested rule.

      • (dict) –

        The details of the rule.

        • ruleId (string) –

          The rule ID.

        • description (string) –

          The rule description.

        • detectorId (string) –

          The detector for which the rule is associated.

        • ruleVersion (string) –

          The rule version.

        • expression (string) –

          The rule expression.

        • language (string) –

          The rule language.

        • outcomes (list) –

          The rule outcomes.

          • (string) –

        • lastUpdatedTime (string) –

          Timestamp of the last time the rule was updated.

        • createdTime (string) –

          The timestamp of when the rule was created.

        • arn (string) –

          The rule ARN.

    • nextToken (string) –

      The next page token to be used in subsequent requests.


  • FraudDetector.Client.exceptions.ValidationException

  • FraudDetector.Client.exceptions.ResourceNotFoundException

  • FraudDetector.Client.exceptions.InternalServerException

  • FraudDetector.Client.exceptions.ThrottlingException

  • FraudDetector.Client.exceptions.AccessDeniedException