Resource: awsEvidentlyLaunch
Provides a CloudWatch Evidently Launch 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.evidentlyLaunch.EvidentlyLaunch(this, "example", {
groups: [
{
feature: "${aws_evidently_feature.example.name}",
name: "Variation1",
variation: "Variation1",
},
],
name: "example",
project: "${aws_evidently_project.example.name}",
scheduledSplitsConfig: {
steps: [
{
groupWeights: {
variation1: 0,
},
startTime: "2024-01-07 01:43:59+00:00",
},
],
},
});
With description
/*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.evidentlyLaunch.EvidentlyLaunch(this, "example", {
description: "example description",
groups: [
{
feature: "${aws_evidently_feature.example.name}",
name: "Variation1",
variation: "Variation1",
},
],
name: "example",
project: "${aws_evidently_project.example.name}",
scheduledSplitsConfig: {
steps: [
{
groupWeights: {
variation1: 0,
},
startTime: "2024-01-07 01:43:59+00:00",
},
],
},
});
With multiple groups
/*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.evidentlyLaunch.EvidentlyLaunch(this, "example", {
groups: [
{
description: "first-group",
feature: "${aws_evidently_feature.example.name}",
name: "Variation1",
variation: "Variation1",
},
{
description: "second-group",
feature: "${aws_evidently_feature.example.name}",
name: "Variation2",
variation: "Variation2",
},
],
name: "example",
project: "${aws_evidently_project.example.name}",
scheduledSplitsConfig: {
steps: [
{
groupWeights: {
variation1: 0,
variation2: 0,
},
startTime: "2024-01-07 01:43:59+00:00",
},
],
},
});
With metric_monitors
/*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.evidentlyLaunch.EvidentlyLaunch(this, "example", {
groups: [
{
feature: "${aws_evidently_feature.example.name}",
name: "Variation1",
variation: "Variation1",
},
],
metricMonitors: [
{
metricDefinition: {
entityIdKey: "entity_id_key1",
eventPattern: '{"Price":[{"numeric":[">",11,"<=",22]}]}',
name: "name1",
unitLabel: "unit_label1",
valueKey: "value_key1",
},
},
{
metricDefinition: {
entityIdKey: "entity_id_key2",
eventPattern: '{"Price":[{"numeric":[">",9,"<=",19]}]}',
name: "name2",
unitLabel: "unit_label2",
valueKey: "value_key2",
},
},
],
name: "example",
project: "${aws_evidently_project.example.name}",
scheduledSplitsConfig: {
steps: [
{
groupWeights: {
variation1: 0,
},
startTime: "2024-01-07 01:43:59+00:00",
},
],
},
});
With randomization_salt
/*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.evidentlyLaunch.EvidentlyLaunch(this, "example", {
groups: [
{
feature: "${aws_evidently_feature.example.name}",
name: "Variation1",
variation: "Variation1",
},
],
name: "example",
project: "${aws_evidently_project.example.name}",
randomizationSalt: "example randomization salt",
scheduledSplitsConfig: {
steps: [
{
groupWeights: {
variation1: 0,
},
startTime: "2024-01-07 01:43:59+00:00",
},
],
},
});
With multiple steps
/*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.evidentlyLaunch.EvidentlyLaunch(this, "example", {
groups: [
{
feature: "${aws_evidently_feature.example.name}",
name: "Variation1",
variation: "Variation1",
},
{
feature: "${aws_evidently_feature.example.name}",
name: "Variation2",
variation: "Variation2",
},
],
name: "example",
project: "${aws_evidently_project.example.name}",
scheduledSplitsConfig: {
steps: [
{
groupWeights: {
variation1: 15,
variation2: 10,
},
startTime: "2024-01-07 01:43:59+00:00",
},
{
groupWeights: {
variation1: 20,
variation2: 25,
},
startTime: "2024-01-08 01:43:59+00:00",
},
],
},
});
With segment 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.evidentlyLaunch.EvidentlyLaunch(this, "example", {
groups: [
{
feature: "${aws_evidently_feature.example.name}",
name: "Variation1",
variation: "Variation1",
},
{
feature: "${aws_evidently_feature.example.name}",
name: "Variation2",
variation: "Variation2",
},
],
name: "example",
project: "${aws_evidently_project.example.name}",
scheduledSplitsConfig: {
steps: [
{
groupWeights: {
variation1: 0,
variation2: 0,
},
segmentOverrides: [
{
evaluationOrder: 1,
segment: "${aws_evidently_segment.example.name}",
weights: {
variation2: 10000,
},
},
{
evaluationOrder: 2,
segment: "${aws_evidently_segment.example.name}",
weights: {
variation1: 40000,
variation2: 30000,
},
},
],
startTime: "2024-01-08 01:43:59+00:00",
},
],
},
});
Argument Reference
The following arguments are supported:
description
- (Optional) Specifies the description of the launch.groups
- (Required) One or up to five blocks that contain the feature and variations that are to be used for the launch. Detailed below.metricMonitors
- (Optional) One or up to three blocks that define the metrics that will be used to monitor the launch performance. Detailed below.name
- (Required) The name for the new launch. Minimum length of1
. Maximum length of127
.project
- (Required) The name or ARN of the project that is to contain the new launch.randomizationSalt
- (Optional) When Evidently assigns a particular user session to a launch, 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 randomizationSalt. If you omit randomizationSalt, Evidently uses the launch name as the randomizationSalt.scheduledSplitsConfig
- (Optional) A block that defines the traffic allocation percentages among the feature variations during each step of the launch. Detailed below.tags
- (Optional) Tags to apply to the launch. If configured with a providerdefaultTags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
groups
The groups
block supports the following arguments:
description
- (Optional) Specifies the description of the launch group.feature
- (Required) Specifies the name of the feature that the launch is using.name
- (Required) Specifies the name of the lahnch group.variation
- (Required) Specifies the feature variation to use for this launch group.
metricMonitors
The metricMonitors
block supports the following arguments:
metricDefinition
- (Required) A block that defines the metric. Detailed below.
metricDefinition
The metricDefinition
block supports the following arguments:
entityIdKey
- (Required) Specifies the entity, such as a user or session, that does an action that causes a metric value to be recorded. An example isuserDetailsUserId
.eventPattern
- (Required) Specifies The EventBridge event pattern that defines how the metric is recorded.name
- (Required) Specifies the name for the metric.unitLabel
- (Optional) Specifies a label for the units that the metric is measuring.valueKey
- (Required) Specifies the value that is tracked to produce the metric.
scheduledSplitsConfig
The scheduledSplitsConfig
block supports the following arguments:
steps
- (Required) One or up to six blocks that define the traffic allocation percentages among the feature variations during each step of the launch. This also defines the start time of each step. Detailed below.
steps
The steps
block supports the following arguments:
groupWeights
- (Required) The traffic allocation percentages among the feature variations during one step of a launch. This is a set of key-value pairs. The keys are variation names. The values represent the percentage of traffic to allocate to that variation during this step. For more information, refer to the AWS documentation for ScheduledSplitConfig groupWeights.segmentOverrides
- (Required) One or up to six blocks that specify different traffic splits for one or more audience segments. A segment is a portion of your audience that share one or more characteristics. Examples could be Chrome browser users, users in Europe, or Firefox browser users in Europe who also fit other criteria that your application collects, such as age. Detailed below.startTime
- (Required) Specifies the date and time that this step of the launch starts.
segmentOverrides
evaluationOrder
- (Required) Specifies a number indicating the order to use to evaluate segment overrides, if there are more than one. Segment overrides with lower numbers are evaluated first.segment
- (Required) The name or ARN of the segment to use.weights
- (Required) The traffic allocation percentages among the feature variations to assign to this segment. This is a set of key-value pairs. The keys are variation names. The values represent the amount of traffic to allocate to that variation for this segment. This is expressed in thousandths of a percent, so a weight of 50000 represents 50% of traffic.
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 launch.createdTime
- The date and time that the launch is created.execution
- A block that contains information about the start and end times of the launch. Detailed belowid
- The launchname
and the projectname
orarn
separated by a colon (:
).lastUpdatedTime
- The date and time that the launch was most recently updated.status
- The current state of the launch. Valid values arecreated
,updating
,running
,completed
, andcancelled
.statusReason
- If the launch was stopped, this is the string that was entered by the person who stopped the launch, to explain why it was stopped.tagsAll
- A map of tags assigned to the resource, including those inherited from the providerdefaultTags
configuration block.type
- The type of launch.
execution
The execution
block supports the following attributes:
endedTime
- The date and time that the launch ended.startedTime
- The date and time that the launch started.
Import
CloudWatch Evidently Launch can be imported using the name
of the launch and name
or arn
of the hosting CloudWatch Evidently Project separated by a :
, e.g. with the name
of the launch and arn
of the project,
$ terraform import aws_evidently_launch.example exampleLaunchName:arn:aws:evidently:us-east-1:123456789012:project/exampleProjectName
e.g. with the name
of the launch and name
of the project,