Resource: awsEvidentlyFeature
Provides a CloudWatch Evidently Feature resource.
Example Usage
Basic
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.evidentlyFeature.EvidentlyFeature(this, "example", {
description: "example description",
name: "example",
project: "${aws_evidently_project.example.name}",
tags: {
Key1: "example Feature",
},
variations: [
{
name: "Variation1",
value: {
stringValue: "example",
},
},
],
});
With default variation
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.evidentlyFeature.EvidentlyFeature(this, "example", {
defaultVariation: "Variation2",
name: "example",
project: "${aws_evidently_project.example.name}",
variations: [
{
name: "Variation1",
value: {
stringValue: "exampleval1",
},
},
{
name: "Variation2",
value: {
stringValue: "exampleval2",
},
},
],
});
With entity overrides
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.evidentlyFeature.EvidentlyFeature(this, "example", {
entityOverrides: {
test1: "Variation1",
},
name: "example",
project: "${aws_evidently_project.example.name}",
variations: [
{
name: "Variation1",
value: {
stringValue: "exampleval1",
},
},
{
name: "Variation2",
value: {
stringValue: "exampleval2",
},
},
],
});
With evaluation strategy
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.evidentlyFeature.EvidentlyFeature(this, "example", {
entityOverrides: {
test1: "Variation1",
},
evaluationStrategy: "ALL_RULES",
name: "example",
project: "${aws_evidently_project.example.name}",
variations: [
{
name: "Variation1",
value: {
stringValue: "exampleval1",
},
},
],
});
Argument Reference
The following arguments are supported:
defaultVariation- (Optional) 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. This variation must also be listed in thevariationsstructure. If you omitdefaultVariation, the first variation listed in thevariationsstructure is used as the default variation.description- (Optional) Specifies the description of the feature.entityOverrides- (Optional) 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.evaluationStrategy- (Optional) SpecifyALL_RULESto activate the traffic allocation specified by any ongoing launches or experiments. SpecifyDEFAULT_VARIATIONto serve the default variation to all users instead.name- (Required) The name for the new feature. Minimum length of1. Maximum length of127.project- (Required) The name or ARN of the project that is to contain the new feature.tags- (Optional) Tags to apply to the feature. If configured with a providerdefaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.variations- (Required) One or more blocks that contain the configuration of the feature's different variations. Detailed below
variations
The variations block supports the following arguments:
name- (Required) The name of the variation. Minimum length of1. Maximum length of127.value- (Required) A block that specifies the value assigned to this variation. Detailed below
value
The value block supports the following arguments:
\~> NOTE: You must specify exactly one of boolValue, doubleValue, longValue, stringValue.
boolValue- (Optional) If this feature uses the Boolean variation type, this field contains the Boolean value of this variation.doubleValue- (Optional) If this feature uses the double integer variation type, this field contains the double integer value of this variation.longValue- (Optional) If this feature uses the long variation type, this field contains the long value of this variation. Minimum value of9007199254740991. Maximum value of9007199254740991.stringValue- (Optional) If this feature uses the string variation type, this field contains the string value of this variation. Minimum length of0. Maximum length of512.
Timeouts
create- (Default2M)delete- (Default2M)update- (Default2M)
Attributes Reference
In addition to all arguments above, the following attributes are exported:
arn- The ARN of the feature.createdTime- The date and time that the feature is created.evaluationRules- One or more blocks that define the evaluation rules for the feature. Detailed belowid- The featurenameand the projectnameorarnseparated by a colon (:).lastUpdatedTime- The date and time that the feature was most recently updated.status- The current state of the feature. Valid values areavailableandupdating.tagsAll- A map of tags assigned to the resource, including those inherited from the providerdefaultTagsconfiguration block.valueType- Defines the type of value used to define the different feature variations. Valid Values:string,long,double,boolean.
evaluationRules
The evaluationRules block supports the following attributes:
name- The name of the experiment or launch.type- This value isawsEvidentlySplitsif this is an evaluation rule for a launch, and it isawsEvidentlyOnlineabif this is an evaluation rule for an experiment.
Import
CloudWatch Evidently Feature can be imported using the feature name and name or arn of the hosting CloudWatch Evidently Project separated by a :, e.g.,