create_rule
¶
create_rule(
rule_id: identifier,
detector_id: identifier,
expression: ruleExpression,
language: Language,
outcomes: NonEmptyListOfStrings,
*,
config_overrides: Optional[FraudDetectorClientConfig] = None,
description: Optional[description] = None,
tags: Optional[tagList] = None,
) -> CreateRuleResult
Creates a rule for use with the specified detector.
Parameters:
-
rule_id(identifier) –The rule ID.
-
detector_id(identifier) –The detector ID for the rule's parent detector.
-
description(Optional[description], default:None) –The rule description.
-
expression(ruleExpression) –The rule expression.
-
language(Language) –The language of the rule.
-
outcomes(NonEmptyListOfStrings) –The outcome or outcomes returned when the rule expression matches.
-
tags(Optional[tagList], default:None) –A collection of key and value pairs.
Raises:
-
AccessDeniedException–An exception indicating Amazon Fraud Detector does not have the needed permissions. This can occur if you submit a request, such as
PutExternalModel, that specifies a role that is not in your account. -
InternalServerException–An exception indicating an internal server error.
-
ThrottlingException–An exception indicating a throttling error.
-
ValidationException–An exception indicating a specified value is not allowed.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_frauddetector/_services/fraud_detector.py
991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 | |