Skip to content

Commit 872386c

Browse files
author
awstools
committed
feat(client-evidently): Add detail message inside GetExperimentResults API response to indicate experiment result availability
1 parent 49661ab commit 872386c

File tree

5 files changed

+34
-7
lines changed

5 files changed

+34
-7
lines changed

clients/client-evidently/src/Evidently.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,11 @@ export class Evidently extends EvidentlyClient {
550550
}
551551

552552
/**
553-
* <p>Retrieves the results of a running or completed experiment.</p>
553+
* <p>Retrieves the results of a running or completed experiment. No results are available until
554+
* there have been 100 events for each variation and at least 10 minutes have passed since the start of the experiment.</p>
555+
* <p>Experiment
556+
* results are available up to 63 days after the start of the experiment. They are not available after that because
557+
* of CloudWatch data retention policies.</p>
554558
*/
555559
public getExperimentResults(
556560
args: GetExperimentResultsCommandInput,

clients/client-evidently/src/commands/GetExperimentResultsCommand.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ export interface GetExperimentResultsCommandInput extends GetExperimentResultsRe
2323
export interface GetExperimentResultsCommandOutput extends GetExperimentResultsResponse, __MetadataBearer {}
2424

2525
/**
26-
* <p>Retrieves the results of a running or completed experiment.</p>
26+
* <p>Retrieves the results of a running or completed experiment. No results are available until
27+
* there have been 100 events for each variation and at least 10 minutes have passed since the start of the experiment.</p>
28+
* <p>Experiment
29+
* results are available up to 63 days after the start of the experiment. They are not available after that because
30+
* of CloudWatch data retention policies.</p>
2731
* @example
2832
* Use a bare-bones client and the command you need to make an API call.
2933
* ```javascript

clients/client-evidently/src/models/models_0.ts

+11-2
Original file line numberDiff line numberDiff line change
@@ -2325,7 +2325,8 @@ export interface GetExperimentResultsRequest {
23252325
startTime?: Date;
23262326

23272327
/**
2328-
* <p>The date and time that the experiment ended, if it is completed.</p>
2328+
* <p>The date and time that the experiment ended, if it is completed. This must be no longer than 30 days
2329+
* after the experiment start time.</p>
23292330
*/
23302331
endTime?: Date;
23312332

@@ -2491,6 +2492,13 @@ export interface GetExperimentResultsResponse {
24912492
* <p>The timestamps of each result returned.</p>
24922493
*/
24932494
timestamps?: Date[];
2495+
2496+
/**
2497+
* <p>If the experiment doesn't yet have enough events to provide valid results, this
2498+
* field is returned with the message <code>Not enough events to generate results</code>. If there are
2499+
* enough events to provide valid results, this field is not returned.</p>
2500+
*/
2501+
details?: string;
24942502
}
24952503

24962504
export namespace GetExperimentResultsResponse {
@@ -2569,7 +2577,8 @@ export interface StartExperimentRequest {
25692577
experiment: string | undefined;
25702578

25712579
/**
2572-
* <p>The date and time to end the experiment.</p>
2580+
* <p>The date and time to end the experiment. This must be no more than 30 days after
2581+
* the experiment starts.</p>
25732582
*/
25742583
analysisCompleteTime: Date | undefined;
25752584
}

clients/client-evidently/src/protocols/Aws_restJson1.ts

+4
Original file line numberDiff line numberDiff line change
@@ -2044,11 +2044,15 @@ export const deserializeAws_restJson1GetExperimentResultsCommand = async (
20442044
}
20452045
const contents: GetExperimentResultsCommandOutput = {
20462046
$metadata: deserializeMetadata(output),
2047+
details: undefined,
20472048
reports: undefined,
20482049
resultsData: undefined,
20492050
timestamps: undefined,
20502051
};
20512052
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2053+
if (data.details !== undefined && data.details !== null) {
2054+
contents.details = __expectString(data.details);
2055+
}
20522056
if (data.reports !== undefined && data.reports !== null) {
20532057
contents.reports = deserializeAws_restJson1ExperimentReportList(data.reports, context);
20542058
}

codegen/sdk-codegen/aws-models/evidently.json

+9-3
Original file line numberDiff line numberDiff line change
@@ -1996,7 +1996,7 @@
19961996
}
19971997
],
19981998
"traits": {
1999-
"smithy.api#documentation": "<p>Retrieves the results of a running or completed experiment.</p>",
1999+
"smithy.api#documentation": "<p>Retrieves the results of a running or completed experiment. No results are available until\n there have been 100 events for each variation and at least 10 minutes have passed since the start of the experiment.</p>\n <p>Experiment\n results are available up to 63 days after the start of the experiment. They are not available after that because\n of CloudWatch data retention policies.</p>",
20002000
"smithy.api#http": {
20012001
"method": "POST",
20022002
"uri": "/projects/{project}/experiments/{experiment}/results",
@@ -2032,7 +2032,7 @@
20322032
"endTime": {
20332033
"target": "smithy.api#Timestamp",
20342034
"traits": {
2035-
"smithy.api#documentation": "<p>The date and time that the experiment ended, if it is completed.</p>"
2035+
"smithy.api#documentation": "<p>The date and time that the experiment ended, if it is completed. This must be no longer than 30 days \n after the experiment start time.</p>"
20362036
}
20372037
},
20382038
"metricNames": {
@@ -2095,6 +2095,12 @@
20952095
"traits": {
20962096
"smithy.api#documentation": "<p>The timestamps of each result returned.</p>"
20972097
}
2098+
},
2099+
"details": {
2100+
"target": "smithy.api#String",
2101+
"traits": {
2102+
"smithy.api#documentation": "<p>If the experiment doesn't yet have enough events to provide valid results, this \n field is returned with the message <code>Not enough events to generate results</code>. If there are \n enough events to provide valid results, this field is not returned.</p>"
2103+
}
20982104
}
20992105
}
21002106
},
@@ -4135,7 +4141,7 @@
41354141
"analysisCompleteTime": {
41364142
"target": "smithy.api#Timestamp",
41374143
"traits": {
4138-
"smithy.api#documentation": "<p>The date and time to end the experiment.</p>",
4144+
"smithy.api#documentation": "<p>The date and time to end the experiment. This must be no more than 30 days after\n the experiment starts.</p>",
41394145
"smithy.api#required": {}
41404146
}
41414147
}

0 commit comments

Comments
 (0)