create_variable
¶
create_variable(
name: string,
data_type: DataType,
data_source: DataSource,
default_value: string,
*,
config_overrides: Optional[FraudDetectorClientConfig] = None,
description: Optional[string] = None,
variable_type: Optional[string] = None,
tags: Optional[tagList] = None,
) -> CreateVariableResult
Creates a variable.
Parameters:
-
name(string) –The name of the variable.
-
data_type(DataType) –The data type of the variable.
-
data_source(DataSource) –The source of the data.
-
default_value(string) –The default value for the variable when no value is received.
-
description(Optional[string], default:None) –The description.
-
variable_type(Optional[string], default:None) –The variable type. For more information see Variable types.
Valid Values:
AUTH_CODE | AVS | BILLING_ADDRESS_L1 | BILLING_ADDRESS_L2 | BILLING_CITY | BILLING_COUNTRY | BILLING_NAME | BILLING_PHONE | BILLING_STATE | BILLING_ZIP | CARD_BIN | CATEGORICAL | CURRENCY_CODE | EMAIL_ADDRESS | FINGERPRINT | FRAUD_LABEL | FREE_FORM_TEXT | IP_ADDRESS | NUMERIC | ORDER_ID | PAYMENT_TYPE | PHONE_NUMBER | PRICE | PRODUCT_CATEGORY | SHIPPING_ADDRESS_L1 | SHIPPING_ADDRESS_L2 | SHIPPING_CITY | SHIPPING_COUNTRY | SHIPPING_NAME | SHIPPING_PHONE | SHIPPING_STATE | SHIPPING_ZIP | USERAGENT -
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
1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 | |