Skip to content

Commit a7d2b0e

Browse files
author
awstools
committed
feat(client-evidently): This release adds support for the client-side evaluation - powered by AWS AppConfig feature.
1 parent a6fb5eb commit a7d2b0e

File tree

6 files changed

+243
-45
lines changed

6 files changed

+243
-45
lines changed

clients/client-evidently/src/Evidently.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -377,11 +377,11 @@ export class Evidently extends EvidentlyClient {
377377
* users in Europe, or Firefox browser users in Europe who also fit other criteria that your application collects,
378378
* such as age.</p>
379379
* <p>Using a segment in an experiment limits that experiment to evaluate only the users who match the segment
380-
* criteria. Using one or more segments in a launch allow you to define different traffic splits for the different
380+
* criteria. Using one or more segments in a launch allows you to define different traffic splits for the different
381381
* audience segments.</p>
382382
*
383383
* <p>For more information about segment pattern syntax, see
384-
* <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Evidently-segments-syntax.html">
384+
* <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Evidently-segments.html#CloudWatch-Evidently-segments-syntax.html">
385385
* Segment rule pattern syntax</a>.</p>
386386
*
387387
* <p>The pattern that you define for a segment is matched against the value of <code>evaluationContext</code>, which
@@ -670,7 +670,10 @@ export class Evidently extends EvidentlyClient {
670670

671671
/**
672672
* <p>Retrieves the results of a running or completed experiment. No results are available until
673-
* there have been 100 events for each variation and at least 10 minutes have passed since the start of the experiment.</p>
673+
* there have been 100 events for each variation and at least 10 minutes have passed since the start of the experiment.
674+
* To increase the statistical power, Evidently performs an additional offline p-value analysis at the end of the experiment.
675+
* Offline p-value analysis can detect statistical significance in some cases where the anytime p-values used during
676+
* the experiment do not find statistical significance.</p>
674677
* <p>Experiment
675678
* results are available up to 63 days after the start of the experiment. They are not available after that because
676679
* of CloudWatch data retention policies.</p>

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ export interface CreateSegmentCommandOutput extends CreateSegmentResponse, __Met
3333
* users in Europe, or Firefox browser users in Europe who also fit other criteria that your application collects,
3434
* such as age.</p>
3535
* <p>Using a segment in an experiment limits that experiment to evaluate only the users who match the segment
36-
* criteria. Using one or more segments in a launch allow you to define different traffic splits for the different
36+
* criteria. Using one or more segments in a launch allows you to define different traffic splits for the different
3737
* audience segments.</p>
3838
*
3939
* <p>For more information about segment pattern syntax, see
40-
* <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Evidently-segments-syntax.html">
40+
* <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Evidently-segments.html#CloudWatch-Evidently-segments-syntax.html">
4141
* Segment rule pattern syntax</a>.</p>
4242
*
4343
* <p>The pattern that you define for a segment is matched against the value of <code>evaluationContext</code>, which

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ export interface GetExperimentResultsCommandOutput extends GetExperimentResultsR
2929

3030
/**
3131
* <p>Retrieves the results of a running or completed experiment. No results are available until
32-
* there have been 100 events for each variation and at least 10 minutes have passed since the start of the experiment.</p>
32+
* there have been 100 events for each variation and at least 10 minutes have passed since the start of the experiment.
33+
* To increase the statistical power, Evidently performs an additional offline p-value analysis at the end of the experiment.
34+
* Offline p-value analysis can detect statistical significance in some cases where the anytime p-values used during
35+
* the experiment do not find statistical significance.</p>
3336
* <p>Experiment
3437
* results are available up to 63 days after the start of the experiment. They are not available after that because
3538
* of CloudWatch data retention policies.</p>

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

+94-2
Original file line numberDiff line numberDiff line change
@@ -1412,6 +1412,28 @@ export interface CreateLaunchResponse {
14121412
launch: Launch | undefined;
14131413
}
14141414

1415+
/**
1416+
* <p>Use this parameter to configure client-side evaluation for your project. Client-side evaluation allows your application to assign
1417+
* variations to user
1418+
* sessions locally instead of by calling the <a href="https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_EvaluateFeature.html">EvaluateFeature</a> operation to assign the
1419+
* variations. This mitigates the latency and availability risks that come with an API call.</p>
1420+
* <p>
1421+
* <code>ProjectAppConfigResource</code> is a structure that defines the configuration of how your application
1422+
* integrates with AppConfig to run client-side evaluation.</p>
1423+
*/
1424+
export interface ProjectAppConfigResourceConfig {
1425+
/**
1426+
* <p>The ID of the AppConfig application to use for client-side evaluation. </p>
1427+
*/
1428+
applicationId?: string;
1429+
1430+
/**
1431+
* <p>The ID of the AppConfig environment to use for client-side evaluation. This must be an
1432+
* environment that is within the application that you specify for <code>applicationId</code>.</p>
1433+
*/
1434+
environmentId?: string;
1435+
}
1436+
14151437
/**
14161438
* <p>If the project stores evaluation events in an Amazon S3 bucket, this structure
14171439
* stores the bucket name and bucket prefix.</p>
@@ -1465,6 +1487,21 @@ export interface CreateProjectRequest {
14651487
*/
14661488
dataDelivery?: ProjectDataDeliveryConfig;
14671489

1490+
/**
1491+
* <p>Use this parameter if the project will use <i>client-side evaluation powered by AppConfig</i>. Client-side
1492+
* evaluation allows your application to assign variations to user
1493+
* sessions locally instead of by calling the <a href="https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_EvaluateFeature.html">EvaluateFeature</a> operation. This
1494+
* mitigates the latency and availability risks that come with an API call. For more information,
1495+
* see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Evidently-client-side-evaluation.html">
1496+
* Client-side evaluation - powered by AppConfig.</a>
1497+
* </p>
1498+
* <p>This parameter is a structure that
1499+
* contains information about the AppConfig application and environment that will be used as for client-side evaluation.</p>
1500+
* <p>To create a project that uses client-side evaluation, you must have the
1501+
* <code>evidently:ExportProjectAsConfiguration</code> permission.</p>
1502+
*/
1503+
appConfigResource?: ProjectAppConfigResourceConfig;
1504+
14681505
/**
14691506
* <p>Assigns one or more tags (key-value pairs) to the project.</p>
14701507
* <p>Tags can help you organize and categorize your resources. You can also use them to scope user
@@ -1478,6 +1515,28 @@ export interface CreateProjectRequest {
14781515
tags?: Record<string, string>;
14791516
}
14801517

1518+
/**
1519+
* <p>This is a structure that defines the configuration of how your application
1520+
* integrates with AppConfig to run client-side evaluation.</p>
1521+
*/
1522+
export interface ProjectAppConfigResource {
1523+
/**
1524+
* <p>The ID of the AppConfig application to use for client-side evaluation. </p>
1525+
*/
1526+
applicationId: string | undefined;
1527+
1528+
/**
1529+
* <p>The ID of the AppConfig environment to use for client-side evaluation. This must be an
1530+
* environment that is within the application that you specify for <code>applicationId</code>.</p>
1531+
*/
1532+
environmentId: string | undefined;
1533+
1534+
/**
1535+
* <p>The ID of the AppConfig profile to use for client-side evaluation. </p>
1536+
*/
1537+
configurationProfileId: string | undefined;
1538+
}
1539+
14811540
/**
14821541
* <p>If the project stores evaluation events in an Amazon S3 bucket, this structure
14831542
* stores the bucket name and bucket prefix.</p>
@@ -1585,6 +1644,12 @@ export interface Project {
15851644
*/
15861645
dataDelivery?: ProjectDataDelivery;
15871646

1647+
/**
1648+
* <p>This structure defines the configuration of how your application
1649+
* integrates with AppConfig to run client-side evaluation.</p>
1650+
*/
1651+
appConfigResource?: ProjectAppConfigResource;
1652+
15881653
/**
15891654
* <p>The list of tag keys and values associated with this project.</p>
15901655
*/
@@ -1606,7 +1671,7 @@ export interface CreateSegmentRequest {
16061671

16071672
/**
16081673
* <p>The pattern to use for the segment. For more information about pattern syntax,
1609-
* see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Evidently-segments-syntax.html">
1674+
* see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Evidently-segments.html#CloudWatch-Evidently-segments-syntax.html">
16101675
* Segment rule pattern syntax</a>.</p>
16111676
*/
16121677
pattern: __LazyJsonString | string | undefined;
@@ -1646,7 +1711,9 @@ export interface Segment {
16461711
name: string | undefined;
16471712

16481713
/**
1649-
* <p/>
1714+
* <p>The pattern that defines the attributes to use to evalute whether a user session will be in the segment.
1715+
* For more information about the pattern syntax, see
1716+
* <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Evidently-segments.html">Segment rule pattern syntax</a>.</p>
16501717
*/
16511718
pattern: __LazyJsonString | string | undefined;
16521719

@@ -2750,6 +2817,17 @@ export interface UpdateProjectRequest {
27502817
*/
27512818
project: string | undefined;
27522819

2820+
/**
2821+
* <p>Use this parameter if the project will use client-side evaluation powered by AppConfig. Client-side
2822+
* evaluation allows your application to assign variations to user
2823+
* sessions locally instead of by calling the <a href="https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_EvaluateFeature.html">EvaluateFeature</a> operation. This
2824+
* mitigates the latency and availability risks that come with an API call. allows
2825+
* you to</p>
2826+
* <p>This parameter is a structure that
2827+
* contains information about the AppConfig application that will be used for client-side evaluation.</p>
2828+
*/
2829+
appConfigResource?: ProjectAppConfigResourceConfig;
2830+
27532831
/**
27542832
* <p>An optional description of the project.</p>
27552833
*/
@@ -3249,6 +3327,13 @@ export const CreateLaunchResponseFilterSensitiveLog = (obj: CreateLaunchResponse
32493327
...obj,
32503328
});
32513329

3330+
/**
3331+
* @internal
3332+
*/
3333+
export const ProjectAppConfigResourceConfigFilterSensitiveLog = (obj: ProjectAppConfigResourceConfig): any => ({
3334+
...obj,
3335+
});
3336+
32523337
/**
32533338
* @internal
32543339
*/
@@ -3270,6 +3355,13 @@ export const CreateProjectRequestFilterSensitiveLog = (obj: CreateProjectRequest
32703355
...obj,
32713356
});
32723357

3358+
/**
3359+
* @internal
3360+
*/
3361+
export const ProjectAppConfigResourceFilterSensitiveLog = (obj: ProjectAppConfigResource): any => ({
3362+
...obj,
3363+
});
3364+
32733365
/**
32743366
* @internal
32753367
*/

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

+33
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ import {
115115
OnlineAbConfig,
116116
OnlineAbDefinition,
117117
Project,
118+
ProjectAppConfigResource,
119+
ProjectAppConfigResourceConfig,
118120
ProjectDataDelivery,
119121
ProjectDataDeliveryConfig,
120122
ProjectSummary,
@@ -297,6 +299,9 @@ export const serializeAws_restJson1CreateProjectCommand = async (
297299
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/projects";
298300
let body: any;
299301
body = JSON.stringify({
302+
...(input.appConfigResource != null && {
303+
appConfigResource: serializeAws_restJson1ProjectAppConfigResourceConfig(input.appConfigResource, context),
304+
}),
300305
...(input.dataDelivery != null && {
301306
dataDelivery: serializeAws_restJson1ProjectDataDeliveryConfig(input.dataDelivery, context),
302307
}),
@@ -1151,6 +1156,9 @@ export const serializeAws_restJson1UpdateProjectCommand = async (
11511156
resolvedPath = __resolvedPath(resolvedPath, input, "project", () => input.project!, "{project}", false);
11521157
let body: any;
11531158
body = JSON.stringify({
1159+
...(input.appConfigResource != null && {
1160+
appConfigResource: serializeAws_restJson1ProjectAppConfigResourceConfig(input.appConfigResource, context),
1161+
}),
11541162
...(input.description != null && { description: input.description }),
11551163
});
11561164
return new __HttpRequest({
@@ -3475,6 +3483,16 @@ const serializeAws_restJson1OnlineAbConfig = (input: OnlineAbConfig, context: __
34753483
};
34763484
};
34773485

3486+
const serializeAws_restJson1ProjectAppConfigResourceConfig = (
3487+
input: ProjectAppConfigResourceConfig,
3488+
context: __SerdeContext
3489+
): any => {
3490+
return {
3491+
...(input.applicationId != null && { applicationId: input.applicationId }),
3492+
...(input.environmentId != null && { environmentId: input.environmentId }),
3493+
};
3494+
};
3495+
34783496
const serializeAws_restJson1ProjectDataDeliveryConfig = (
34793497
input: ProjectDataDeliveryConfig,
34803498
context: __SerdeContext
@@ -4057,6 +4075,10 @@ const deserializeAws_restJson1Project = (output: any, context: __SerdeContext):
40574075
return {
40584076
activeExperimentCount: __expectLong(output.activeExperimentCount),
40594077
activeLaunchCount: __expectLong(output.activeLaunchCount),
4078+
appConfigResource:
4079+
output.appConfigResource != null
4080+
? deserializeAws_restJson1ProjectAppConfigResource(output.appConfigResource, context)
4081+
: undefined,
40604082
arn: __expectString(output.arn),
40614083
createdTime:
40624084
output.createdTime != null
@@ -4080,6 +4102,17 @@ const deserializeAws_restJson1Project = (output: any, context: __SerdeContext):
40804102
} as any;
40814103
};
40824104

4105+
const deserializeAws_restJson1ProjectAppConfigResource = (
4106+
output: any,
4107+
context: __SerdeContext
4108+
): ProjectAppConfigResource => {
4109+
return {
4110+
applicationId: __expectString(output.applicationId),
4111+
configurationProfileId: __expectString(output.configurationProfileId),
4112+
environmentId: __expectString(output.environmentId),
4113+
} as any;
4114+
};
4115+
40834116
const deserializeAws_restJson1ProjectDataDelivery = (output: any, context: __SerdeContext): ProjectDataDelivery => {
40844117
return {
40854118
cloudWatchLogs:

0 commit comments

Comments
 (0)