/
models_0.ts
5597 lines (4747 loc) · 119 KB
/
models_0.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// smithy-typescript generated code
import { ExceptionOptionType as __ExceptionOptionType, SENSITIVE_STRING } from "@aws-sdk/smithy-client";
import { FraudDetectorServiceException as __BaseException } from "./FraudDetectorServiceException";
/**
* <p>An exception indicating Amazon Fraud Detector does not have the needed permissions. This can occur if you submit a request, such as <code>PutExternalModel</code>, that specifies a role that is not in your account.</p>
*/
export class AccessDeniedException extends __BaseException {
readonly name: "AccessDeniedException" = "AccessDeniedException";
readonly $fault: "client" = "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<AccessDeniedException, __BaseException>) {
super({
name: "AccessDeniedException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, AccessDeniedException.prototype);
}
}
/**
* <p>The log odds metric details.</p>
*
* <p>Account Takeover Insights (ATI) model uses event variables from the login data you
* provide to continuously calculate a set of variables (aggregated variables) based on historical events. For example, your ATI model might calculate the number of times an user has logged in using the same IP address.
* In this case, event variables used to derive the aggregated variables are <code>IP address</code> and <code>user</code>.</p>
*/
export interface AggregatedLogOddsMetric {
/**
* <p>
* The names of all the variables.
* </p>
*/
variableNames: string[] | undefined;
/**
* <p>
* The relative importance of the variables in the list to the other event variable.
* </p>
*/
aggregatedVariablesImportance: number | undefined;
}
/**
* <p>
* The details of the impact of aggregated variables on the prediction score. </p>
*
* <p>Account Takeover Insights (ATI) model uses the login data you
* provide to continuously calculate a set of variables (aggregated variables) based on historical events. For example, the model might calculate the number of times an user has logged in using the same IP address.
* In this case, event variables used to derive the aggregated variables are <code>IP address</code> and <code>user</code>.</p>
*/
export interface AggregatedVariablesImpactExplanation {
/**
* <p>
* The names of all the event variables that were used to derive the aggregated variables.
* </p>
*/
eventVariableNames?: string[];
/**
* <p>
* The relative impact of the aggregated variables in terms of magnitude on the prediction scores.
* </p>
*/
relativeImpact?: string;
/**
* <p>
* The raw, uninterpreted value represented as log-odds of the fraud. These values are usually between -10 to +10, but range from -infinity to +infinity.</p>
* <ul>
* <li>
* <p>A positive value indicates that the variables drove the risk score up.</p>
* </li>
* <li>
* <p>A negative value indicates that the variables drove the risk score down.</p>
* </li>
* </ul>
*/
logOddsImpact?: number;
}
/**
* <p>The details of the relative importance of the aggregated variables.</p>
*
* <p>Account Takeover Insights (ATI) model uses event variables from the login data you
* provide to continuously calculate a set of variables (aggregated variables) based on historical events. For example, your ATI model might calculate the number of times an user has logged in using the same IP address.
* In this case, event variables used to derive the aggregated variables are <code>IP address</code> and <code>user</code>.</p>
*/
export interface AggregatedVariablesImportanceMetrics {
/**
* <p>
* List of variables' metrics.
* </p>
*/
logOddsMetrics?: AggregatedLogOddsMetric[];
}
export enum AsyncJobStatus {
CANCELED = "CANCELED",
CANCEL_IN_PROGRESS = "CANCEL_IN_PROGRESS",
COMPLETE = "COMPLETE",
FAILED = "FAILED",
IN_PROGRESS = "IN_PROGRESS",
IN_PROGRESS_INITIALIZING = "IN_PROGRESS_INITIALIZING",
}
/**
* <p>
* The Account Takeover Insights (ATI) model performance metrics data points.
* </p>
*/
export interface ATIMetricDataPoint {
/**
* <p>
* The challenge rate. This indicates the percentage of login events that the model recommends to challenge such as
* one-time password, multi-factor authentication, and investigations.
* </p>
*/
cr?: number;
/**
* <p>
* The anomaly discovery rate. This metric quantifies the percentage of anomalies that can be detected by the model at the selected score threshold.
* A lower score threshold increases the percentage of anomalies captured by the model, but would also require challenging a larger percentage of
* login events, leading to a higher customer friction.
* </p>
*/
adr?: number;
/**
* <p>
* The model's threshold that specifies an acceptable fraud capture rate. For example, a threshold of 500 means any model score 500 or above is
* labeled as fraud.
* </p>
*/
threshold?: number;
/**
* <p>
* The account takeover discovery rate. This metric quantifies the percentage of account compromise events that can be detected by the model at the selected score threshold.
* This metric is only available if 50 or more entities with at-least one labeled account takeover event is present in the ingested dataset.
* </p>
*/
atodr?: number;
}
/**
* <p>
* The Account Takeover Insights (ATI) model performance score.
* </p>
*/
export interface ATIModelPerformance {
/**
* <p>
* The anomaly separation index (ASI) score. This metric summarizes the overall ability of the model to separate anomalous activities from the normal behavior. Depending on the business, a
* large fraction of these anomalous activities can be malicious and correspond to the account takeover attacks. A model with no separability power will have the lowest possible
* ASI score of 0.5, whereas the a model with a high separability power will have the highest possible ASI score of 1.0
* </p>
*/
asi?: number;
}
/**
* <p>
* The Account Takeover Insights (ATI) model training metric details.
* </p>
*/
export interface ATITrainingMetricsValue {
/**
* <p>
* The model's performance metrics data points.
* </p>
*/
metricDataPoints?: ATIMetricDataPoint[];
/**
* <p>
* The model's overall performance scores.
* </p>
*/
modelPerformance?: ATIModelPerformance;
}
/**
* <p>A key and value pair. </p>
*/
export interface Tag {
/**
* <p>A tag key.</p>
*/
key: string | undefined;
/**
* <p>A value assigned to a tag key.</p>
*/
value: string | undefined;
}
/**
* <p>A variable in the list of variables for the batch create variable request.</p>
*/
export interface VariableEntry {
/**
* <p>The name of the variable.</p>
*/
name?: string;
/**
* <p>The data type of the variable.</p>
*/
dataType?: string;
/**
* <p>The data source of the variable.</p>
*/
dataSource?: string;
/**
* <p>The default value of the variable.</p>
*/
defaultValue?: string;
/**
* <p>The description of the variable.</p>
*/
description?: string;
/**
* <p>The type of the variable. For more information see <a href="https://docs.aws.amazon.com/frauddetector/latest/ug/create-a-variable.html#variable-types">Variable types</a>.</p>
* <p>Valid Values: <code>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 </code>
* </p>
*/
variableType?: string;
}
export interface BatchCreateVariableRequest {
/**
* <p>The list of variables for the batch create variable request.</p>
*/
variableEntries: VariableEntry[] | undefined;
/**
* <p>A collection of key and value pairs.</p>
*/
tags?: Tag[];
}
/**
* <p>Provides the error of the batch create variable API.</p>
*/
export interface BatchCreateVariableError {
/**
* <p>The name.</p>
*/
name?: string;
/**
* <p>The error code. </p>
*/
code?: number;
/**
* <p>The error message.</p>
*/
message?: string;
}
export interface BatchCreateVariableResult {
/**
* <p>Provides the errors for the <code>BatchCreateVariable</code> request.</p>
*/
errors?: BatchCreateVariableError[];
}
/**
* <p>An exception indicating an internal server error.</p>
*/
export class InternalServerException extends __BaseException {
readonly name: "InternalServerException" = "InternalServerException";
readonly $fault: "server" = "server";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<InternalServerException, __BaseException>) {
super({
name: "InternalServerException",
$fault: "server",
...opts,
});
Object.setPrototypeOf(this, InternalServerException.prototype);
}
}
/**
* <p>An exception indicating a throttling error.</p>
*/
export class ThrottlingException extends __BaseException {
readonly name: "ThrottlingException" = "ThrottlingException";
readonly $fault: "client" = "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<ThrottlingException, __BaseException>) {
super({
name: "ThrottlingException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ThrottlingException.prototype);
}
}
/**
* <p>An exception indicating a specified value is not allowed.</p>
*/
export class ValidationException extends __BaseException {
readonly name: "ValidationException" = "ValidationException";
readonly $fault: "client" = "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>) {
super({
name: "ValidationException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ValidationException.prototype);
}
}
export interface BatchGetVariableRequest {
/**
* <p>The list of variable names to get.</p>
*/
names: string[] | undefined;
}
/**
* <p>Provides the error of the batch get variable API.</p>
*/
export interface BatchGetVariableError {
/**
* <p>The error name. </p>
*/
name?: string;
/**
* <p>The error code. </p>
*/
code?: number;
/**
* <p>The error message.</p>
*/
message?: string;
}
export enum DataSource {
EVENT = "EVENT",
EXTERNAL_MODEL_SCORE = "EXTERNAL_MODEL_SCORE",
MODEL_SCORE = "MODEL_SCORE",
}
export enum DataType {
BOOLEAN = "BOOLEAN",
FLOAT = "FLOAT",
INTEGER = "INTEGER",
STRING = "STRING",
}
/**
* <p>The variable.</p>
*/
export interface Variable {
/**
* <p>The name of the variable.</p>
*/
name?: string;
/**
* <p>The data type of the variable. For more information see <a href="https://docs.aws.amazon.com/frauddetector/latest/ug/create-a-variable.html#variable-types">Variable types</a>.</p>
*/
dataType?: DataType | string;
/**
* <p>The data source of the variable.</p>
*/
dataSource?: DataSource | string;
/**
* <p>The default value of the variable.</p>
*/
defaultValue?: string;
/**
* <p>The description of the variable. </p>
*/
description?: string;
/**
* <p>The variable type of the variable.</p>
* <p>Valid Values: <code>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 </code>
* </p>
*/
variableType?: string;
/**
* <p>The time when variable was last updated.</p>
*/
lastUpdatedTime?: string;
/**
* <p>The time when the variable was created.</p>
*/
createdTime?: string;
/**
* <p>The ARN of the variable.</p>
*/
arn?: string;
}
export interface BatchGetVariableResult {
/**
* <p>The returned variables.</p>
*/
variables?: Variable[];
/**
* <p>The errors from the request.</p>
*/
errors?: BatchGetVariableError[];
}
export interface CancelBatchImportJobRequest {
/**
* <p> The ID of an in-progress batch import job to cancel. </p>
* <p>Amazon Fraud Detector will throw an error if the batch import job is in <code>FAILED</code>, <code>CANCELED</code>, or <code>COMPLETED</code> state.</p>
*/
jobId: string | undefined;
}
export interface CancelBatchImportJobResult {}
/**
* <p>An exception indicating the specified resource was not found.</p>
*/
export class ResourceNotFoundException extends __BaseException {
readonly name: "ResourceNotFoundException" = "ResourceNotFoundException";
readonly $fault: "client" = "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>) {
super({
name: "ResourceNotFoundException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
}
}
export interface CancelBatchPredictionJobRequest {
/**
* <p>The ID of the batch prediction job to cancel.</p>
*/
jobId: string | undefined;
}
export interface CancelBatchPredictionJobResult {}
export interface CreateBatchImportJobRequest {
/**
* <p>The ID of the batch import job. The ID cannot be of a past job, unless the job exists in <code>CREATE_FAILED</code> state.</p>
*/
jobId: string | undefined;
/**
* <p>The URI that points to the Amazon S3 location of your data file.</p>
*/
inputPath: string | undefined;
/**
* <p>The URI that points to the Amazon S3 location for storing your results. </p>
*/
outputPath: string | undefined;
/**
* <p>The name of the event type.</p>
*/
eventTypeName: string | undefined;
/**
* <p>The ARN of the IAM role created for Amazon S3 bucket that holds your data file.</p>
* <p>The IAM role must have read permissions to your input S3 bucket and write permissions to your output S3 bucket.
* For more information about bucket permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-policies-s3.html">User policy examples</a> in the
* <i>Amazon S3 User Guide</i>.</p>
*/
iamRoleArn: string | undefined;
/**
* <p>A collection of key-value pairs associated with this request. </p>
*/
tags?: Tag[];
}
export interface CreateBatchImportJobResult {}
export interface CreateBatchPredictionJobRequest {
/**
* <p>The ID of the batch prediction job.</p>
*/
jobId: string | undefined;
/**
* <p>The Amazon S3 location of your training file.</p>
*/
inputPath: string | undefined;
/**
* <p>The Amazon S3 location of your output file.</p>
*/
outputPath: string | undefined;
/**
* <p>The name of the event type.</p>
*/
eventTypeName: string | undefined;
/**
* <p>The name of the detector.</p>
*/
detectorName: string | undefined;
/**
* <p>The detector version.</p>
*/
detectorVersion?: string;
/**
* <p>The ARN of the IAM role to use for this job request.</p>
* <p>The IAM Role must have read permissions to your input S3 bucket and write permissions to your output S3 bucket.
* For more information about bucket permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-policies-s3.html">User policy examples</a> in the
* <i>Amazon S3 User Guide</i>.</p>
*/
iamRoleArn: string | undefined;
/**
* <p>A collection of key and value pairs.</p>
*/
tags?: Tag[];
}
export interface CreateBatchPredictionJobResult {}
export enum ModelTypeEnum {
ACCOUNT_TAKEOVER_INSIGHTS = "ACCOUNT_TAKEOVER_INSIGHTS",
ONLINE_FRAUD_INSIGHTS = "ONLINE_FRAUD_INSIGHTS",
TRANSACTION_FRAUD_INSIGHTS = "TRANSACTION_FRAUD_INSIGHTS",
}
/**
* <p>The model version.</p>
*/
export interface ModelVersion {
/**
* <p>The model ID.</p>
*/
modelId: string | undefined;
/**
* <p>The model type.</p>
*/
modelType: ModelTypeEnum | string | undefined;
/**
* <p>The model version number.</p>
*/
modelVersionNumber: string | undefined;
/**
* <p>The model version ARN.</p>
*/
arn?: string;
}
export enum RuleExecutionMode {
ALL_MATCHED = "ALL_MATCHED",
FIRST_MATCHED = "FIRST_MATCHED",
}
/**
* <p>A rule.</p>
*/
export interface Rule {
/**
* <p>The detector for which the rule is associated.</p>
*/
detectorId: string | undefined;
/**
* <p>The rule ID.</p>
*/
ruleId: string | undefined;
/**
* <p>The rule version.</p>
*/
ruleVersion: string | undefined;
}
export interface CreateDetectorVersionRequest {
/**
* <p>The ID of the detector under which you want to create a new version.</p>
*/
detectorId: string | undefined;
/**
* <p>The description of the detector version.</p>
*/
description?: string;
/**
* <p>The Amazon Sagemaker model endpoints to include in the detector version.</p>
*/
externalModelEndpoints?: string[];
/**
* <p>The rules to include in the detector version.</p>
*/
rules: Rule[] | undefined;
/**
* <p>The model versions to include in the detector version.</p>
*/
modelVersions?: ModelVersion[];
/**
* <p>The rule execution mode for the rules included in the detector version.</p>
* <p>You can define and edit the rule mode at the detector version level, when it is in draft status.</p>
* <p>If you specify <code>FIRST_MATCHED</code>, Amazon Fraud Detector evaluates rules sequentially, first to last, stopping at the first matched rule. Amazon Fraud dectector then provides the outcomes for that single rule.</p>
* <p>If you specifiy <code>ALL_MATCHED</code>, Amazon Fraud Detector evaluates all rules and returns the outcomes for all matched rules. </p>
* <p>The default behavior is <code>FIRST_MATCHED</code>.</p>
*/
ruleExecutionMode?: RuleExecutionMode | string;
/**
* <p>A collection of key and value pairs.</p>
*/
tags?: Tag[];
}
export enum DetectorVersionStatus {
ACTIVE = "ACTIVE",
DRAFT = "DRAFT",
INACTIVE = "INACTIVE",
}
export interface CreateDetectorVersionResult {
/**
* <p>The ID for the created version's parent detector.</p>
*/
detectorId?: string;
/**
* <p>The ID for the created detector. </p>
*/
detectorVersionId?: string;
/**
* <p>The status of the detector version.</p>
*/
status?: DetectorVersionStatus | string;
}
export interface CreateModelRequest {
/**
* <p>The model ID.</p>
*/
modelId: string | undefined;
/**
* <p>The model type. </p>
*/
modelType: ModelTypeEnum | string | undefined;
/**
* <p>The model description. </p>
*/
description?: string;
/**
* <p>The name of the event type.</p>
*/
eventTypeName: string | undefined;
/**
* <p>A collection of key and value pairs.</p>
*/
tags?: Tag[];
}
export interface CreateModelResult {}
/**
* <p>Details for the external events data used for model version training.</p>
*/
export interface ExternalEventsDetail {
/**
* <p>The Amazon S3 bucket location for the data.</p>
*/
dataLocation: string | undefined;
/**
* <p>The ARN of the role that provides Amazon Fraud Detector access to the data location.</p>
*/
dataAccessRoleArn: string | undefined;
}
/**
* <p>The start and stop time of the ingested events.</p>
*/
export interface IngestedEventsTimeWindow {
/**
* <p>Timestamp of the first ingensted event.</p>
*/
startTime: string | undefined;
/**
* <p>Timestamp of the final ingested event.</p>
*/
endTime: string | undefined;
}
/**
* <p>The details of the ingested event.</p>
*/
export interface IngestedEventsDetail {
/**
* <p>The start and stop time of the ingested events.</p>
*/
ingestedEventsTimeWindow: IngestedEventsTimeWindow | undefined;
}
export enum UnlabeledEventsTreatment {
FRAUD = "FRAUD",
IGNORE = "IGNORE",
LEGIT = "LEGIT",
}
/**
* <p>The label schema.</p>
*/
export interface LabelSchema {
/**
* <p>The label mapper maps the Amazon Fraud Detector supported model classification labels (<code>FRAUD</code>, <code>LEGIT</code>) to the appropriate event type labels. For example, if "<code>FRAUD</code>" and "<code>LEGIT</code>" are Amazon Fraud Detector supported labels, this mapper could be: <code>{"FRAUD" => ["0"]</code>, <code>"LEGIT" => ["1"]}</code> or <code>{"FRAUD" => ["false"]</code>, <code>"LEGIT" => ["true"]}</code> or <code>{"FRAUD" => ["fraud", "abuse"]</code>, <code>"LEGIT" => ["legit", "safe"]}</code>. The value part of the mapper is a list, because you may have multiple label variants from your event type for a single Amazon Fraud Detector label.
* </p>
*/
labelMapper?: Record<string, string[]>;
/**
* <p>The action to take for unlabeled events.</p>
*/
unlabeledEventsTreatment?: UnlabeledEventsTreatment | string;
}
/**
* <p>The training data schema.</p>
*/
export interface TrainingDataSchema {
/**
* <p>The training data schema variables.</p>
*/
modelVariables: string[] | undefined;
/**
* <p>The label schema.</p>
*/
labelSchema?: LabelSchema;
}
export enum TrainingDataSourceEnum {
EXTERNAL_EVENTS = "EXTERNAL_EVENTS",
INGESTED_EVENTS = "INGESTED_EVENTS",
}
export interface CreateModelVersionRequest {
/**
* <p>The model ID. </p>
*/
modelId: string | undefined;
/**
* <p>The model type.</p>
*/
modelType: ModelTypeEnum | string | undefined;
/**
* <p>The training data source location in Amazon S3. </p>
*/
trainingDataSource: TrainingDataSourceEnum | string | undefined;
/**
* <p>The training data schema.</p>
*/
trainingDataSchema: TrainingDataSchema | undefined;
/**
* <p>Details of the external events data used for model version training. Required if <code>trainingDataSource</code> is <code>EXTERNAL_EVENTS</code>.</p>
*/
externalEventsDetail?: ExternalEventsDetail;
/**
* <p>Details of the ingested events data used for model version training. Required if <code>trainingDataSource</code> is <code>INGESTED_EVENTS</code>.</p>
*/
ingestedEventsDetail?: IngestedEventsDetail;
/**
* <p>A collection of key and value pairs.</p>
*/
tags?: Tag[];
}
export interface CreateModelVersionResult {
/**
* <p>The model ID.</p>
*/
modelId?: string;
/**
* <p>The model type.</p>
*/
modelType?: ModelTypeEnum | string;
/**
* <p>The model version number of the model version created.</p>
*/
modelVersionNumber?: string;
/**
* <p>The model version status. </p>
*/
status?: string;
}
export enum Language {
DETECTORPL = "DETECTORPL",
}
export interface CreateRuleRequest {
/**
* <p>The rule ID.</p>
*/
ruleId: string | undefined;
/**
* <p>The detector ID for the rule's parent detector.</p>
*/
detectorId: string | undefined;
/**
* <p>The rule description.</p>
*/
description?: string;
/**
* <p>The rule expression.</p>
*/
expression: string | undefined;
/**
* <p>The language of the rule.</p>
*/
language: Language | string | undefined;
/**
* <p>The outcome or outcomes returned when the rule expression matches.</p>
*/
outcomes: string[] | undefined;
/**
* <p>A collection of key and value pairs.</p>
*/
tags?: Tag[];
}
export interface CreateRuleResult {
/**
* <p>The created rule.</p>
*/
rule?: Rule;
}
export interface CreateVariableRequest {
/**
* <p>The name of the variable.</p>
*/
name: string | undefined;
/**
* <p>The data type.</p>
*/
dataType: DataType | string | undefined;
/**
* <p>The source of the data.</p>
*/
dataSource: DataSource | string | undefined;
/**
* <p>The default value for the variable when no value is received.</p>
*/
defaultValue: string | undefined;
/**
* <p>The description.</p>
*/
description?: string;
/**
* <p>The variable type. For more information see <a href="https://docs.aws.amazon.com/frauddetector/latest/ug/create-a-variable.html#variable-types">Variable types</a>.
* </p>
* <p>Valid Values: <code>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</code>
* </p>
*/
variableType?: string;
/**
* <p>A collection of key and value pairs.</p>
*/
tags?: Tag[];
}
export interface CreateVariableResult {}
export interface DeleteBatchImportJobRequest {
/**
* <p>The ID of the batch import job to delete. </p>
*/
jobId: string | undefined;
}
export interface DeleteBatchImportJobResult {}
export interface DeleteBatchPredictionJobRequest {
/**
* <p>The ID of the batch prediction job to delete.</p>
*/
jobId: string | undefined;
}
export interface DeleteBatchPredictionJobResult {}
/**
* <p>An exception indicating there was a conflict during a delete operation.</p>
*/
export class ConflictException extends __BaseException {
readonly name: "ConflictException" = "ConflictException";
readonly $fault: "client" = "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<ConflictException, __BaseException>) {
super({
name: "ConflictException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ConflictException.prototype);
}
}
export interface DeleteDetectorRequest {
/**
* <p>The ID of the detector to delete.</p>
*/
detectorId: string | undefined;
}
export interface DeleteDetectorResult {}
export interface DeleteDetectorVersionRequest {
/**
* <p>The ID of the parent detector for the detector version to delete.</p>
*/
detectorId: string | undefined;
/**
* <p>The ID of the detector version to delete.</p>
*/
detectorVersionId: string | undefined;
}
export interface DeleteDetectorVersionResult {}