@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
494 lines (493 loc) • 18 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Provides a CloudWatch Evidently Launch resource.
*
* > **Warning:** This resource is deprecated. Use [AWS AppConfig feature flags](https://aws.amazon.com/blogs/mt/using-aws-appconfig-feature-flags/) instead.
*
* ## Example Usage
*
* ### Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.evidently.Launch("example", {
* name: "example",
* project: exampleAwsEvidentlyProject.name,
* groups: [{
* feature: exampleAwsEvidentlyFeature.name,
* name: "Variation1",
* variation: "Variation1",
* }],
* scheduledSplitsConfig: {
* steps: [{
* groupWeights: {
* Variation1: 0,
* },
* startTime: "2024-01-07 01:43:59+00:00",
* }],
* },
* });
* ```
*
* ### With description
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.evidently.Launch("example", {
* name: "example",
* project: exampleAwsEvidentlyProject.name,
* description: "example description",
* groups: [{
* feature: exampleAwsEvidentlyFeature.name,
* name: "Variation1",
* variation: "Variation1",
* }],
* scheduledSplitsConfig: {
* steps: [{
* groupWeights: {
* Variation1: 0,
* },
* startTime: "2024-01-07 01:43:59+00:00",
* }],
* },
* });
* ```
*
* ### With multiple groups
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.evidently.Launch("example", {
* name: "example",
* project: exampleAwsEvidentlyProject.name,
* groups: [
* {
* feature: exampleAwsEvidentlyFeature.name,
* name: "Variation1",
* variation: "Variation1",
* description: "first-group",
* },
* {
* feature: exampleAwsEvidentlyFeature.name,
* name: "Variation2",
* variation: "Variation2",
* description: "second-group",
* },
* ],
* scheduledSplitsConfig: {
* steps: [{
* groupWeights: {
* Variation1: 0,
* Variation2: 0,
* },
* startTime: "2024-01-07 01:43:59+00:00",
* }],
* },
* });
* ```
*
* ### With metricMonitors
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.evidently.Launch("example", {
* name: "example",
* project: exampleAwsEvidentlyProject.name,
* groups: [{
* feature: exampleAwsEvidentlyFeature.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",
* },
* },
* ],
* scheduledSplitsConfig: {
* steps: [{
* groupWeights: {
* Variation1: 0,
* },
* startTime: "2024-01-07 01:43:59+00:00",
* }],
* },
* });
* ```
*
* ### With randomizationSalt
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.evidently.Launch("example", {
* name: "example",
* project: exampleAwsEvidentlyProject.name,
* randomizationSalt: "example randomization salt",
* groups: [{
* feature: exampleAwsEvidentlyFeature.name,
* name: "Variation1",
* variation: "Variation1",
* }],
* scheduledSplitsConfig: {
* steps: [{
* groupWeights: {
* Variation1: 0,
* },
* startTime: "2024-01-07 01:43:59+00:00",
* }],
* },
* });
* ```
*
* ### With multiple steps
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.evidently.Launch("example", {
* name: "example",
* project: exampleAwsEvidentlyProject.name,
* groups: [
* {
* feature: exampleAwsEvidentlyFeature.name,
* name: "Variation1",
* variation: "Variation1",
* },
* {
* feature: exampleAwsEvidentlyFeature.name,
* name: "Variation2",
* variation: "Variation2",
* },
* ],
* 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
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.evidently.Launch("example", {
* name: "example",
* project: exampleAwsEvidentlyProject.name,
* groups: [
* {
* feature: exampleAwsEvidentlyFeature.name,
* name: "Variation1",
* variation: "Variation1",
* },
* {
* feature: exampleAwsEvidentlyFeature.name,
* name: "Variation2",
* variation: "Variation2",
* },
* ],
* scheduledSplitsConfig: {
* steps: [{
* groupWeights: {
* Variation1: 0,
* Variation2: 0,
* },
* segmentOverrides: [
* {
* evaluationOrder: 1,
* segment: exampleAwsEvidentlySegment.name,
* weights: {
* Variation2: 10000,
* },
* },
* {
* evaluationOrder: 2,
* segment: exampleAwsEvidentlySegment.name,
* weights: {
* Variation1: 40000,
* Variation2: 30000,
* },
* },
* ],
* startTime: "2024-01-08 01:43:59+00:00",
* }],
* },
* });
* ```
*
* ## Import
*
* Import using the `name` of the launch and `arn` of the project separated by a `:`:
*
* __Using `pulumi import` to import__ CloudWatch Evidently Launch using the `name` of the launch and `name` of the project or `arn` of the hosting CloudWatch Evidently Project separated by a `:`. For example:
*
* Import using the `name` of the launch and `name` of the project separated by a `:`:
*
* ```sh
* $ pulumi import aws:evidently/launch:Launch example exampleLaunchName:exampleProjectName
* ```
* Import using the `name` of the launch and `arn` of the project separated by a `:`:
*
* ```sh
* $ pulumi import aws:evidently/launch:Launch example exampleLaunchName:arn:aws:evidently:us-east-1:123456789012:project/exampleProjectName
* ```
*/
export declare class Launch extends pulumi.CustomResource {
/**
* Get an existing Launch resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: LaunchState, opts?: pulumi.CustomResourceOptions): Launch;
/**
* Returns true if the given object is an instance of Launch. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Launch;
/**
* The ARN of the launch.
*/
readonly arn: pulumi.Output<string>;
/**
* The date and time that the launch is created.
*/
readonly createdTime: pulumi.Output<string>;
/**
* Specifies the description of the launch.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* A block that contains information about the start and end times of the launch. Detailed below
*/
readonly executions: pulumi.Output<outputs.evidently.LaunchExecution[]>;
/**
* One or up to five blocks that contain the feature and variations that are to be used for the launch. Detailed below.
*/
readonly groups: pulumi.Output<outputs.evidently.LaunchGroup[]>;
/**
* The date and time that the launch was most recently updated.
*/
readonly lastUpdatedTime: pulumi.Output<string>;
/**
* One or up to three blocks that define the metrics that will be used to monitor the launch performance. Detailed below.
*/
readonly metricMonitors: pulumi.Output<outputs.evidently.LaunchMetricMonitor[] | undefined>;
/**
* The name for the new launch. Minimum length of `1`. Maximum length of `127`.
*/
readonly name: pulumi.Output<string>;
/**
* The name or ARN of the project that is to contain the new launch.
*/
readonly project: pulumi.Output<string>;
/**
* 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.
*/
readonly randomizationSalt: pulumi.Output<string | undefined>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
readonly region: pulumi.Output<string>;
/**
* A block that defines the traffic allocation percentages among the feature variations during each step of the launch. Detailed below.
*/
readonly scheduledSplitsConfig: pulumi.Output<outputs.evidently.LaunchScheduledSplitsConfig | undefined>;
/**
* The current state of the launch. Valid values are `CREATED`, `UPDATING`, `RUNNING`, `COMPLETED`, and `CANCELLED`.
*/
readonly status: pulumi.Output<string>;
/**
* 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.
*/
readonly statusReason: pulumi.Output<string>;
/**
* Tags to apply to the launch. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
*/
readonly tagsAll: pulumi.Output<{
[key: string]: string;
}>;
/**
* The type of launch.
*/
readonly type: pulumi.Output<string>;
/**
* Create a Launch resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: LaunchArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Launch resources.
*/
export interface LaunchState {
/**
* The ARN of the launch.
*/
arn?: pulumi.Input<string>;
/**
* The date and time that the launch is created.
*/
createdTime?: pulumi.Input<string>;
/**
* Specifies the description of the launch.
*/
description?: pulumi.Input<string>;
/**
* A block that contains information about the start and end times of the launch. Detailed below
*/
executions?: pulumi.Input<pulumi.Input<inputs.evidently.LaunchExecution>[]>;
/**
* One or up to five blocks that contain the feature and variations that are to be used for the launch. Detailed below.
*/
groups?: pulumi.Input<pulumi.Input<inputs.evidently.LaunchGroup>[]>;
/**
* The date and time that the launch was most recently updated.
*/
lastUpdatedTime?: pulumi.Input<string>;
/**
* One or up to three blocks that define the metrics that will be used to monitor the launch performance. Detailed below.
*/
metricMonitors?: pulumi.Input<pulumi.Input<inputs.evidently.LaunchMetricMonitor>[]>;
/**
* The name for the new launch. Minimum length of `1`. Maximum length of `127`.
*/
name?: pulumi.Input<string>;
/**
* The name or ARN of the project that is to contain the new launch.
*/
project?: pulumi.Input<string>;
/**
* 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.
*/
randomizationSalt?: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* A block that defines the traffic allocation percentages among the feature variations during each step of the launch. Detailed below.
*/
scheduledSplitsConfig?: pulumi.Input<inputs.evidently.LaunchScheduledSplitsConfig>;
/**
* The current state of the launch. Valid values are `CREATED`, `UPDATING`, `RUNNING`, `COMPLETED`, and `CANCELLED`.
*/
status?: pulumi.Input<string>;
/**
* 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.
*/
statusReason?: pulumi.Input<string>;
/**
* Tags to apply to the launch. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
*/
tagsAll?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The type of launch.
*/
type?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Launch resource.
*/
export interface LaunchArgs {
/**
* Specifies the description of the launch.
*/
description?: pulumi.Input<string>;
/**
* One or up to five blocks that contain the feature and variations that are to be used for the launch. Detailed below.
*/
groups: pulumi.Input<pulumi.Input<inputs.evidently.LaunchGroup>[]>;
/**
* One or up to three blocks that define the metrics that will be used to monitor the launch performance. Detailed below.
*/
metricMonitors?: pulumi.Input<pulumi.Input<inputs.evidently.LaunchMetricMonitor>[]>;
/**
* The name for the new launch. Minimum length of `1`. Maximum length of `127`.
*/
name?: pulumi.Input<string>;
/**
* The name or ARN of the project that is to contain the new launch.
*/
project: pulumi.Input<string>;
/**
* 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.
*/
randomizationSalt?: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* A block that defines the traffic allocation percentages among the feature variations during each step of the launch. Detailed below.
*/
scheduledSplitsConfig?: pulumi.Input<inputs.evidently.LaunchScheduledSplitsConfig>;
/**
* Tags to apply to the launch. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}