FraudDetector / Client / create_rule
create_rule#
- FraudDetector.Client.create_rule(**kwargs)#
Creates a rule for use with the specified detector.
See also: AWS API Documentation
Request Syntax
response = client.create_rule( ruleId='string', detectorId='string', description='string', expression='string', language='DETECTORPL', outcomes=[ 'string', ], tags=[ { 'key': 'string', 'value': 'string' }, ] )
- Parameters:
ruleId (string) –
[REQUIRED]
The rule ID.
detectorId (string) –
[REQUIRED]
The detector ID for the rule’s parent detector.
description (string) – The rule description.
expression (string) –
[REQUIRED]
The rule expression.
language (string) –
[REQUIRED]
The language of the rule.
outcomes (list) –
[REQUIRED]
The outcome or outcomes returned when the rule expression matches.
(string) –
tags (list) –
A collection of key and value pairs.
(dict) –
A key and value pair.
key (string) – [REQUIRED]
A tag key.
value (string) – [REQUIRED]
A value assigned to a tag key.
- Return type:
dict
- Returns:
Response Syntax
{ 'rule': { 'detectorId': 'string', 'ruleId': 'string', 'ruleVersion': 'string' } }
Response Structure
(dict) –
rule (dict) –
The created rule.
detectorId (string) –
The detector for which the rule is associated.
ruleId (string) –
The rule ID.
ruleVersion (string) –
The rule version.
Exceptions