/
models_0.ts
3915 lines (3359 loc) · 107 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,
LazyJsonString as __LazyJsonString,
} from "@aws-sdk/smithy-client";
import { EvidentlyServiceException as __BaseException } from "./EvidentlyServiceException";
/**
* <p>You do not have sufficient permissions to perform this action. </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>This structure assigns a feature variation to one user session.</p>
*/
export interface EvaluationRequest {
/**
* <p>The name of the feature being evaluated.</p>
*/
feature: string | undefined;
/**
* <p>An internal ID that represents a unique user session of the application. This
* <code>entityID</code> is checked against any override rules assigned for this
* feature.</p>
*/
entityId: string | undefined;
/**
* <p>A JSON block of attributes that you can optionally pass in. This JSON block is included
* in the evaluation events sent to Evidently from the user session. </p>
*/
evaluationContext?: __LazyJsonString | string;
}
export interface BatchEvaluateFeatureRequest {
/**
* <p>The name or ARN of the project that contains the feature being evaluated.</p>
*/
project: string | undefined;
/**
* <p>An array of structures, where each structure assigns a feature variation to one user session.</p>
*/
requests: EvaluationRequest[] | undefined;
}
/**
* <p>The value assigned to a feature variation. This structure must contain exactly one
* field. It can be <code>boolValue</code>, <code>doubleValue</code>, <code>longValue</code>, or
* <code>stringValue</code>.</p>
*/
export type VariableValue =
| VariableValue.BoolValueMember
| VariableValue.DoubleValueMember
| VariableValue.LongValueMember
| VariableValue.StringValueMember
| VariableValue.$UnknownMember;
export namespace VariableValue {
/**
* <p>If this feature uses the Boolean variation type, this field contains the Boolean value of
* this variation.</p>
*/
export interface BoolValueMember {
boolValue: boolean;
stringValue?: never;
longValue?: never;
doubleValue?: never;
$unknown?: never;
}
/**
* <p>If this feature uses the string variation type, this field contains the string value of
* this variation.</p>
*/
export interface StringValueMember {
boolValue?: never;
stringValue: string;
longValue?: never;
doubleValue?: never;
$unknown?: never;
}
/**
* <p>If this feature uses the long variation type, this field contains the long value of
* this variation.</p>
*/
export interface LongValueMember {
boolValue?: never;
stringValue?: never;
longValue: number;
doubleValue?: never;
$unknown?: never;
}
/**
* <p>If this feature uses the double integer variation type, this field contains the double integer value of
* this variation.</p>
*/
export interface DoubleValueMember {
boolValue?: never;
stringValue?: never;
longValue?: never;
doubleValue: number;
$unknown?: never;
}
export interface $UnknownMember {
boolValue?: never;
stringValue?: never;
longValue?: never;
doubleValue?: never;
$unknown: [string, any];
}
export interface Visitor<T> {
boolValue: (value: boolean) => T;
stringValue: (value: string) => T;
longValue: (value: number) => T;
doubleValue: (value: number) => T;
_: (name: string, value: any) => T;
}
export const visit = <T>(value: VariableValue, visitor: Visitor<T>): T => {
if (value.boolValue !== undefined) return visitor.boolValue(value.boolValue);
if (value.stringValue !== undefined) return visitor.stringValue(value.stringValue);
if (value.longValue !== undefined) return visitor.longValue(value.longValue);
if (value.doubleValue !== undefined) return visitor.doubleValue(value.doubleValue);
return visitor._(value.$unknown[0], value.$unknown[1]);
};
}
/**
* <p>This structure displays the results of one feature evaluation assignment to one user
* session.</p>
*/
export interface EvaluationResult {
/**
* <p>The name or ARN of the project that contains the feature being evaluated.</p>
*/
project?: string;
/**
* <p>The name of the feature being evaluated.</p>
*/
feature: string | undefined;
/**
* <p>The name of the variation that was served to the user session.</p>
*/
variation?: string;
/**
* <p>The value assigned to this variation to differentiate it from the other variations of this feature.</p>
*/
value?: VariableValue;
/**
* <p>An internal ID that represents a unique user session of the application.</p>
*/
entityId: string | undefined;
/**
* <p>Specifies the reason that the user session was assigned this variation. Possible values
* include <code>DEFAULT</code>, meaning the user was served the default variation;
* <code>LAUNCH_RULE_MATCH</code>, if the user session was enrolled in a launch; or
* <code>EXPERIMENT_RULE_MATCH</code>, if the user session was enrolled in an
* experiment.</p>
*/
reason?: string;
/**
* <p>If this user was assigned to a launch or experiment, this field lists the launch or experiment name.</p>
*/
details?: __LazyJsonString | string;
}
export interface BatchEvaluateFeatureResponse {
/**
* <p>An array of structures, where each structure displays the results of one feature evaluation
* assignment to one user session.</p>
*/
results?: EvaluationResult[];
}
/**
* <p>The request references a resource that does not exist.</p>
*/
export class ResourceNotFoundException extends __BaseException {
readonly name: "ResourceNotFoundException" = "ResourceNotFoundException";
readonly $fault: "client" = "client";
/**
* <p>The ID of the resource that caused the exception.</p>
*/
resourceId?: string;
/**
* <p>The type of the resource that is associated with the error.</p>
*/
resourceType?: string;
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>) {
super({
name: "ResourceNotFoundException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
this.resourceId = opts.resourceId;
this.resourceType = opts.resourceType;
}
}
/**
* <p>The request was denied because of request throttling. Retry the request.</p>
*/
export class ThrottlingException extends __BaseException {
readonly name: "ThrottlingException" = "ThrottlingException";
readonly $fault: "client" = "client";
/**
* <p>The ID of the service that is associated with the error.</p>
*/
serviceCode?: string;
/**
* <p>The ID of the service quota that was exceeded.</p>
*/
quotaCode?: string;
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<ThrottlingException, __BaseException>) {
super({
name: "ThrottlingException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ThrottlingException.prototype);
this.serviceCode = opts.serviceCode;
this.quotaCode = opts.quotaCode;
}
}
/**
* <p>A structure containing an error name and message.</p>
*/
export interface ValidationExceptionField {
/**
* <p>The error name.</p>
*/
name: string | undefined;
/**
* <p>The error message.</p>
*/
message: string | undefined;
}
export enum ValidationExceptionReason {
CANNOT_PARSE = "cannotParse",
FIELD_VALIDATION_FAILED = "fieldValidationFailed",
OTHER = "other",
UNKNOWN_OPERATION = "unknownOperation",
}
/**
* <p>The value of a parameter in the request caused an error.</p>
*/
export class ValidationException extends __BaseException {
readonly name: "ValidationException" = "ValidationException";
readonly $fault: "client" = "client";
/**
* <p>A reason for the error.</p>
*/
reason?: ValidationExceptionReason | string;
/**
* <p>The parameter that caused the exception.</p>
*/
fieldList?: ValidationExceptionField[];
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>) {
super({
name: "ValidationException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ValidationException.prototype);
this.reason = opts.reason;
this.fieldList = opts.fieldList;
}
}
export enum ChangeDirectionEnum {
DECREASE = "DECREASE",
INCREASE = "INCREASE",
}
/**
* <p>A structure containing the CloudWatch Logs log group where the project stores evaluation
* events.</p>
*/
export interface CloudWatchLogsDestination {
/**
* <p>The name of the log group where the project stores evaluation
* events.</p>
*/
logGroup?: string;
}
/**
* <p>A structure containing the CloudWatch Logs log group where the project stores evaluation
* events.</p>
*/
export interface CloudWatchLogsDestinationConfig {
/**
* <p>The name of the log group where the project stores evaluation
* events.</p>
*/
logGroup?: string;
}
/**
* <p>A resource was in an inconsistent state during an update or a deletion.</p>
*/
export class ConflictException extends __BaseException {
readonly name: "ConflictException" = "ConflictException";
readonly $fault: "client" = "client";
/**
* <p>The ID of the resource that caused the exception.</p>
*/
resourceId?: string;
/**
* <p>The type of the resource that is associated with the error.</p>
*/
resourceType?: string;
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<ConflictException, __BaseException>) {
super({
name: "ConflictException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ConflictException.prototype);
this.resourceId = opts.resourceId;
this.resourceType = opts.resourceType;
}
}
/**
* <p>This structure defines a metric that you want to use to evaluate the variations
* during a launch or experiment.</p>
*/
export interface MetricDefinitionConfig {
/**
* <p>A name for the metric.</p>
*/
name: string | undefined;
/**
* <p>The entity, such as a user or session, that does an action that causes a metric
* value to be recorded. An example is <code>userDetails.userID</code>.</p>
*/
entityIdKey: string | undefined;
/**
* <p>The value that is tracked to produce the metric.</p>
*/
valueKey: string | undefined;
/**
* <p>The EventBridge event pattern that defines how the metric is recorded.</p>
* <p>For more information about EventBridge event patterns, see
* <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html">Amazon EventBridge event patterns</a>.</p>
*/
eventPattern?: __LazyJsonString | string;
/**
* <p>A label for the units that the metric is measuring.</p>
*/
unitLabel?: string;
}
/**
* <p>Use this structure to tell Evidently whether higher or lower values are desired for a metric that is
* used in an experiment.</p>
*/
export interface MetricGoalConfig {
/**
* <p>A structure that contains details about the metric.</p>
*/
metricDefinition: MetricDefinitionConfig | undefined;
/**
* <p>
* <code>INCREASE</code> means that a variation with a higher number for this metric is performing
* better.</p>
* <p>
* <code>DECREASE</code> means that a variation with a lower number for this metric is performing
* better.</p>
*/
desiredChange?: ChangeDirectionEnum | string;
}
/**
* <p>A structure that contains the configuration of which variation to use as the "control"
* version. The "control" version is used for comparison with other variations. This structure
* also specifies how much experiment traffic is allocated to each variation.</p>
*/
export interface OnlineAbConfig {
/**
* <p>The name of the variation that is to be the default variation that the other variations are compared to.</p>
*/
controlTreatmentName?: string;
/**
* <p>A set of key-value pairs. The keys are variation names, and the values are the portion
* of experiment traffic to be assigned to that variation. Specify the traffic portion in
* thousandths of a percent, so 20,000 for a variation would allocate 20% of the experiment
* traffic to that variation.</p>
*/
treatmentWeights?: Record<string, number>;
}
/**
* <p>A structure that defines one treatment in an experiment. A treatment is a variation of the feature
* that you are including in the experiment.</p>
*/
export interface TreatmentConfig {
/**
* <p>A name for this treatment.</p>
*/
name: string | undefined;
/**
* <p>A description for this treatment.</p>
*/
description?: string;
/**
* <p>The feature that this experiment is testing.</p>
*/
feature: string | undefined;
/**
* <p>The name of the variation to use as this treatment in the experiment.</p>
*/
variation: string | undefined;
}
export interface CreateExperimentRequest {
/**
* <p>The name or ARN of the project that you want to create the new experiment in.</p>
*/
project: string | undefined;
/**
* <p>A name for the new experiment.</p>
*/
name: string | undefined;
/**
* <p>An optional description of the experiment.</p>
*/
description?: string;
/**
* <p>An array of structures that describe the configuration of each feature variation used in the experiment.</p>
*/
treatments: TreatmentConfig[] | undefined;
/**
* <p>An array of structures that defines the metrics used for the experiment, and whether a higher
* or lower value for each metric is the goal.</p>
*/
metricGoals: MetricGoalConfig[] | undefined;
/**
* <p>When Evidently assigns a particular user session to an experiment, it must use a randomization ID
* to determine which variation the user session is served. This randomization ID is a combination of the entity ID
* and <code>randomizationSalt</code>. If you omit <code>randomizationSalt</code>, Evidently uses
* the experiment name as the <code>randomizationSalt</code>.</p>
*/
randomizationSalt?: string;
/**
* <p>The portion of the available audience that you want to allocate to this experiment, in thousandths of a percent. The available audience
* is the total audience minus the audience that you have allocated to overrides or current launches of
* this feature.</p>
* <p>This is represented in thousandths of a percent. For example, specify 10,000 to allocate 10% of the available audience.</p>
*/
samplingRate?: number;
/**
* <p>A structure that contains the configuration of which variation to use as the "control"
* version. tThe "control" version is used for comparison with other variations. This structure
* also specifies how much experiment traffic is allocated to each variation.</p>
*/
onlineAbConfig?: OnlineAbConfig;
/**
* <p>Specifies an audience <i>segment</i> to use in the experiment. When a segment is used in an experiment, only
* user sessions that match the segment pattern are used in the experiment.</p>
*/
segment?: string;
/**
* <p>Assigns one or more tags (key-value pairs) to the experiment.</p>
* <p>Tags can help you organize and categorize your resources. You can also use them to scope user
* permissions by granting a user
* permission to access or change only resources with certain tag values.</p>
* <p>Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.</p>
*
* <p>You can associate as many as 50 tags with an experiment.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a>.</p>
*/
tags?: Record<string, string>;
}
/**
* <p>This structure contains the date and time that the experiment started and ended.</p>
*/
export interface ExperimentExecution {
/**
* <p>The date and time that the experiment started.</p>
*/
startedTime?: Date;
/**
* <p>The date and time that the experiment ended.</p>
*/
endedTime?: Date;
}
/**
* <p>This structure defines a metric that is being used to evaluate the variations
* during a launch or experiment.</p>
*/
export interface MetricDefinition {
/**
* <p>The name of the metric.</p>
*/
name?: string;
/**
* <p>The entity, such as a user or session, that does an action that causes a metric
* value to be recorded.</p>
*/
entityIdKey?: string;
/**
* <p>The value that is tracked to produce the metric.</p>
*/
valueKey?: string;
/**
* <p>The EventBridge event pattern that defines how the metric is recorded.</p>
* <p>For more information about EventBridge event patterns, see
* <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html">Amazon EventBridge event patterns</a>.</p>
*/
eventPattern?: __LazyJsonString | string;
/**
* <p>The label for the units that the metric is measuring.</p>
*/
unitLabel?: string;
}
/**
* <p>A structure that tells Evidently whether higher or lower values are desired for a metric that is
* used in an experiment.</p>
*/
export interface MetricGoal {
/**
* <p>A structure that contains details about the metric.</p>
*/
metricDefinition: MetricDefinition | undefined;
/**
* <p>
* <code>INCREASE</code> means that a variation with a higher number for this metric is performing
* better.</p>
* <p>
* <code>DECREASE</code> means that a variation with a lower number for this metric is performing
* better.</p>
*/
desiredChange?: ChangeDirectionEnum | string;
}
/**
* <p>A structure that contains the configuration of which variation to use as the "control"
* version. The "control" version is used for comparison with other variations. This structure
* also specifies how much experiment traffic is allocated to each variation.</p>
*/
export interface OnlineAbDefinition {
/**
* <p>The name of the variation that is the default variation that the other variations are compared to.</p>
*/
controlTreatmentName?: string;
/**
* <p>A set of key-value pairs. The keys are variation names, and the values are the portion
* of experiment traffic to be assigned to that variation. The traffic portion is specified in
* thousandths of a percent, so 20,000 for a variation would allocate 20% of the experiment
* traffic to that variation.</p>
*/
treatmentWeights?: Record<string, number>;
}
/**
* <p>This structure contains the time and date that Evidently completed the analysis of the experiment.</p>
*/
export interface ExperimentSchedule {
/**
* <p>The time and date that Evidently completed the analysis of the experiment.</p>
*/
analysisCompleteTime?: Date;
}
export enum ExperimentStatus {
CANCELLED = "CANCELLED",
COMPLETED = "COMPLETED",
CREATED = "CREATED",
RUNNING = "RUNNING",
UPDATING = "UPDATING",
}
/**
* <p>A structure that defines one treatment in an experiment. A treatment is a variation of the feature
* that you are including in the experiment.</p>
*/
export interface Treatment {
/**
* <p>The name of this treatment.</p>
*/
name: string | undefined;
/**
* <p>The description of the treatment.</p>
*/
description?: string;
/**
* <p>The feature variation used for this treatment. This is a key-value pair. The key is the
* feature name, and the value is the variation name.</p>
*/
featureVariations?: Record<string, string>;
}
export enum ExperimentType {
ONLINE_AB_EXPERIMENT = "aws.evidently.onlineab",
}
/**
* <p>A structure containing the configuration details of an experiment.</p>
*/
export interface Experiment {
/**
* <p>The ARN of the experiment.</p>
*/
arn: string | undefined;
/**
* <p>The name of the experiment.</p>
*/
name: string | undefined;
/**
* <p>The name or ARN of the project that contains this experiment.</p>
*/
project?: string;
/**
* <p>The current state of the experiment.</p>
*/
status: ExperimentStatus | string | undefined;
/**
* <p>If the experiment was stopped, this is the string that was entered by the person who
* stopped the experiment, to explain why it was stopped.</p>
*/
statusReason?: string;
/**
* <p>A description of the experiment.</p>
*/
description?: string;
/**
* <p>The date and time that the experiment is first created.</p>
*/
createdTime: Date | undefined;
/**
* <p>The date and time that the experiment was most recently updated.</p>
*/
lastUpdatedTime: Date | undefined;
/**
* <p>A structure that contains the time and date that Evidently completed the analysis of the experiment.</p>
*/
schedule?: ExperimentSchedule;
/**
* <p>A structure that contains the date and time that the experiment started and ended.</p>
*/
execution?: ExperimentExecution;
/**
* <p>An array of structures that describe the configuration of each feature variation used in the experiment.</p>
*/
treatments?: Treatment[];
/**
* <p>An array of structures that defines the metrics used for the experiment, and whether a higher
* or lower value for each metric is the goal.</p>
*/
metricGoals?: MetricGoal[];
/**
* <p>This value is used when Evidently assigns a particular user session to the experiment. It
* helps create a randomization ID to determine which variation the user session is served. This
* randomization ID is a combination of the entity ID and <code>randomizationSalt</code>.</p>
*/
randomizationSalt?: string;
/**
* <p>In thousandths of a percent, the amount of the available audience that is allocated to this experiment.
* The available audience
* is the total audience minus the audience that you have allocated to overrides or current launches of
* this feature.</p>
* <p>This is represented in thousandths of a percent, so a value of 10,000 is 10% of the available audience.</p>
*/
samplingRate?: number;
/**
* <p>The audience segment being used for the experiment, if a segment is being used.</p>
*/
segment?: string;
/**
* <p>The type of this experiment. Currently, this value must be <code>aws.experiment.onlineab</code>.</p>
*/
type: ExperimentType | string | undefined;
/**
* <p>A structure that contains the configuration of which variation to use as the "control"
* version. The "control" version is used for comparison with other variations. This structure
* also specifies how much experiment traffic is allocated to each variation.</p>
*/
onlineAbDefinition?: OnlineAbDefinition;
/**
* <p>The list of tag keys and values associated with this experiment.</p>
*/
tags?: Record<string, string>;
}
export interface CreateExperimentResponse {
/**
* <p>A structure containing the configuration details of the experiment
* that you created.</p>
*/
experiment: Experiment | undefined;
}
/**
* <p>The request would cause a service quota to be exceeded.</p>
*/
export class ServiceQuotaExceededException extends __BaseException {
readonly name: "ServiceQuotaExceededException" = "ServiceQuotaExceededException";
readonly $fault: "client" = "client";
/**
* <p>The ID of the resource that caused the exception.</p>
*/
resourceId?: string;
/**
* <p>The type of the resource that is associated with the error.</p>
*/
resourceType?: string;
/**
* <p>The ID of the service that is associated with the error.</p>
*/
serviceCode?: string;
/**
* <p>The ID of the service quota that was exceeded.</p>
*/
quotaCode?: string;
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<ServiceQuotaExceededException, __BaseException>) {
super({
name: "ServiceQuotaExceededException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
this.resourceId = opts.resourceId;
this.resourceType = opts.resourceType;
this.serviceCode = opts.serviceCode;
this.quotaCode = opts.quotaCode;
}
}
export enum FeatureEvaluationStrategy {
ALL_RULES = "ALL_RULES",
DEFAULT_VARIATION = "DEFAULT_VARIATION",
}
/**
* <p>This structure contains the name and variation value of one variation of a feature.</p>
*/
export interface VariationConfig {
/**
* <p>The name of the variation.</p>
*/
name: string | undefined;
/**
* <p>The value assigned to this variation.</p>
*/
value: VariableValue | undefined;
}
export interface CreateFeatureRequest {
/**
* <p>The name or ARN of the project that is to contain the new feature.</p>
*/
project: string | undefined;
/**
* <p>The name for the new feature.</p>
*/
name: string | undefined;
/**
* <p>Specify <code>ALL_RULES</code> to activate the traffic allocation specified by any
* ongoing launches or experiments. Specify <code>DEFAULT_VARIATION</code> to serve the default
* variation to all users instead.</p>
*/
evaluationStrategy?: FeatureEvaluationStrategy | string;
/**
* <p>An optional description of the feature.</p>
*/
description?: string;
/**
* <p>An array of structures that contain the configuration of the feature's different variations.</p>
*/
variations: VariationConfig[] | undefined;
/**
* <p>The name of the variation to use as the default variation. The default
* variation is served to users who are not allocated to any ongoing launches
* or experiments of this feature.</p>
* <p>This variation must also be listed in the <code>variations</code> structure.</p>
* <p>If you omit <code>defaultVariation</code>, the first variation listed in
* the <code>variations</code> structure is used as the default variation.</p>
*/
defaultVariation?: string;
/**
* <p>Assigns one or more tags (key-value pairs) to the feature.</p>
* <p>Tags can help you organize and categorize your resources. You can also use them to scope user
* permissions by granting a user
* permission to access or change only resources with certain tag values.</p>
* <p>Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.</p>
*
* <p>You can associate as many as 50 tags with a feature.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a>.</p>
*/
tags?: Record<string, string>;
/**
* <p>Specify users that should always be served a specific variation of a feature. Each user
* is specified by a key-value pair . For each key, specify a user by entering their user ID,
* account ID, or some other identifier. For the value, specify the name of the variation that
* they are to be served.</p>
*/
entityOverrides?: Record<string, string>;
}
/**
* <p>A structure that contains the information about an evaluation rule for this feature,
* if it is used in a launch or experiment.</p>
*/
export interface EvaluationRule {
/**
* <p>The name of the experiment or launch.</p>
*/
name?: string;
/**
* <p>This value is <code>aws.evidently.splits</code> if this is an evaluation rule for a launch, and it is
* <code>aws.evidently.onlineab</code> if this is an evaluation rule for an experiment.</p>
*/
type: string | undefined;
}
export enum FeatureStatus {
AVAILABLE = "AVAILABLE",
UPDATING = "UPDATING",
}
export enum VariationValueType {
BOOLEAN = "BOOLEAN",
DOUBLE = "DOUBLE",
LONG = "LONG",
STRING = "STRING",
}
/**
* <p>This structure contains the name and variation value of one variation of a feature.</p>
*/
export interface Variation {
/**
* <p>The name of the variation.</p>
*/
name?: string;
/**
* <p>The value assigned to this variation.</p>
*/
value?: VariableValue;
}
/**
* <p>This structure contains information about one Evidently feature in your account.</p>
*/
export interface Feature {
/**
* <p>The ARN of the feature.</p>
*/
arn: string | undefined;
/**
* <p>The name of the feature.</p>
*/
name: string | undefined;
/**
* <p>The name or ARN of the project that contains the feature.</p>
*/
project?: string;
/**
* <p>The current state of the feature.</p>
*/
status: FeatureStatus | string | undefined;
/**
* <p>The date and time that the feature is created.</p>
*/
createdTime: Date | undefined;
/**
* <p>The date and time that the feature was most recently updated.</p>
*/
lastUpdatedTime: Date | undefined;
/**
* <p>The description of the feature.</p>
*/
description?: string;
/**
* <p>If this value is <code>ALL_RULES</code>, the traffic allocation specified by