UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

360 lines • 12.2 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Launch = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * 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 * ``` */ 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, id, state, opts) { return new Launch(name, state, { ...opts, id: id }); } /** * 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) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Launch.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["createdTime"] = state?.createdTime; resourceInputs["description"] = state?.description; resourceInputs["executions"] = state?.executions; resourceInputs["groups"] = state?.groups; resourceInputs["lastUpdatedTime"] = state?.lastUpdatedTime; resourceInputs["metricMonitors"] = state?.metricMonitors; resourceInputs["name"] = state?.name; resourceInputs["project"] = state?.project; resourceInputs["randomizationSalt"] = state?.randomizationSalt; resourceInputs["region"] = state?.region; resourceInputs["scheduledSplitsConfig"] = state?.scheduledSplitsConfig; resourceInputs["status"] = state?.status; resourceInputs["statusReason"] = state?.statusReason; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["type"] = state?.type; } else { const args = argsOrState; if (args?.groups === undefined && !opts.urn) { throw new Error("Missing required property 'groups'"); } if (args?.project === undefined && !opts.urn) { throw new Error("Missing required property 'project'"); } resourceInputs["description"] = args?.description; resourceInputs["groups"] = args?.groups; resourceInputs["metricMonitors"] = args?.metricMonitors; resourceInputs["name"] = args?.name; resourceInputs["project"] = args?.project; resourceInputs["randomizationSalt"] = args?.randomizationSalt; resourceInputs["region"] = args?.region; resourceInputs["scheduledSplitsConfig"] = args?.scheduledSplitsConfig; resourceInputs["tags"] = args?.tags; resourceInputs["arn"] = undefined /*out*/; resourceInputs["createdTime"] = undefined /*out*/; resourceInputs["executions"] = undefined /*out*/; resourceInputs["lastUpdatedTime"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["statusReason"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; resourceInputs["type"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Launch.__pulumiType, name, resourceInputs, opts); } } exports.Launch = Launch; /** @internal */ Launch.__pulumiType = 'aws:evidently/launch:Launch'; //# sourceMappingURL=launch.js.map