Jump to Content

New API Documentation - Developer Preview Available

We are excited to announce the developer preview of our new API documentation for AWS SDK for JavaScript v3. Please follow instructions on the landing page to leave us your feedback.

Class BatchEvaluateFeatureCommandProtected

This operation assigns feature variation to user sessions. For each user session, you pass in an entityID that represents the user. Evidently then checks the evaluation rules and assigns the variation.

The first rules that are evaluated are the override rules. If the user's entityID matches an override rule, the user is served the variation specified by that rule.

Next, if there is a launch of the feature, the user might be assigned to a variation in the launch. The chance of this depends on the percentage of users that are allocated to that launch. If the user is enrolled in the launch, the variation they are served depends on the allocation of the various feature variations used for the launch.

If the user is not assigned to a launch, and there is an ongoing experiment for this feature, the user might be assigned to a variation in the experiment. The chance of this depends on the percentage of users that are allocated to that experiment. If the user is enrolled in the experiment, the variation they are served depends on the allocation of the various feature variations used for the experiment.

If the user is not assigned to a launch or experiment, they are served the default variation.

Example

Use a bare-bones client and the command you need to make an API call.

import { EvidentlyClient, BatchEvaluateFeatureCommand } from "@aws-sdk/client-evidently"; // ES Modules import
// const { EvidentlyClient, BatchEvaluateFeatureCommand } = require("@aws-sdk/client-evidently"); // CommonJS import
const client = new EvidentlyClient(config);
const input = { // BatchEvaluateFeatureRequest
project: "STRING_VALUE", // required
requests: [ // EvaluationRequestsList // required
{ // EvaluationRequest
feature: "STRING_VALUE", // required
entityId: "STRING_VALUE", // required
evaluationContext: "STRING_VALUE",
},
],
};
const command = new BatchEvaluateFeatureCommand(input);
const response = await client.send(command);
// { // BatchEvaluateFeatureResponse
// results: [ // EvaluationResultsList
// { // EvaluationResult
// project: "STRING_VALUE",
// feature: "STRING_VALUE", // required
// variation: "STRING_VALUE",
// value: { // VariableValue Union: only one key present
// boolValue: true || false,
// stringValue: "STRING_VALUE",
// longValue: Number("long"),
// doubleValue: Number("double"),
// },
// entityId: "STRING_VALUE", // required
// reason: "STRING_VALUE",
// details: "STRING_VALUE",
// },
// ],
// };

Param

BatchEvaluateFeatureCommandInput

Returns

BatchEvaluateFeatureCommandOutput

See

Throws

AccessDeniedException (client fault)

You do not have sufficient permissions to perform this action.

Throws

ResourceNotFoundException (client fault)

The request references a resource that does not exist.

Throws

ThrottlingException (client fault)

The request was denied because of request throttling. Retry the request.

Throws

ValidationException (client fault)

The value of a parameter in the request caused an error.

Throws

EvidentlyServiceException

Base exception class for all service exceptions from Evidently service.

Hierarchy

Constructors

Properties

Methods