import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Create and manage an Experiment Center experiment. (EA only) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * * const loginUi = new auth0.ExperimentFeatureFlag("login_ui", { * parameters: [{ * name: "show_new_login", * type: "boolean", * value: "false", * }], * variations: [ * { * name: "control", * }, * { * overrides: [{ * name: "show_new_login", * type: "boolean", * value: "true", * }], * name: "new-login", * }, * ], * name: "new-login-ui", * description: "Controls whether the new login UI is shown.", * status: "active", * }); * // Percentage strategy: split traffic between variations by weight. * const percentage = new auth0.Experiment("percentage", { * allocations: [ * { * variationId: loginUi.variationIds.control, * isControl: true, * weight: 50, * }, * { * variationId: loginUi.variationIds["new-login"], * isControl: false, * weight: 50, * }, * ], * name: "login-ui-percentage-test", * description: "Show the new login UI to half of the traffic.", * featureFlagId: loginUi.id, * authenticationFlow: "authentication", * allocationStrategy: "percentage", * status: "draft", * }); * const usTraffic = new auth0.ExperimentSegment("us_traffic", { * rules: [{ * match: { * country: { * contains: ["US"], * }, * }, * }], * name: "us-traffic", * }); * // Segment strategy: route each segment to a variation; other traffic gets the * // fallback allocation. * const segment = new auth0.Experiment("segment", { * allocations: [ * { * variationId: loginUi.variationIds.control, * isControl: true, * segmentId: usTraffic.id, * priority: 1, * }, * { * variationId: loginUi.variationIds["new-login"], * isControl: false, * isFallback: true, * }, * ], * name: "login-ui-segment-test", * description: "Keep US traffic on the current login UI and show the new UI elsewhere.", * featureFlagId: loginUi.id, * authenticationFlow: "mfa_challenge", * allocationStrategy: "segment", * status: "draft", * }); * ``` */ export declare class Experiment extends pulumi.CustomResource { /** * Get an existing Experiment 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, state?: ExperimentState, opts?: pulumi.CustomResourceOptions): Experiment; /** * Check whether an existing Experiment resource with the given ID exists. * * @param id The _unique_ provider ID of the resource to check. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static exists(id: pulumi.Input, state?: ExperimentState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of Experiment. 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 Experiment; /** * The traffic allocation strategy. One of percentage, segment. Changing this replaces the experiment. */ readonly allocationStrategy: pulumi.Output; /** * The ordered traffic allocations. At least one is required when configured. Removing all allocations replaces the experiment. */ readonly allocations: pulumi.Output; /** * The authentication flow targeted by the experiment. One of authentication, mfa*enrollment, mfa*challenge, password*reset, passkey*enrollment, all. */ readonly authenticationFlow: pulumi.Output; /** * The ISO 8601 formatted date the experiment was created. */ readonly createdAt: pulumi.Output; /** * The current ramp level, if levels are configured. */ readonly currentLevel: pulumi.Output; /** * The configuration source for an Auth0-managed feature flag. One of tenant, flag. Removing it replaces the experiment. */ readonly defaultConfig: pulumi.Output; /** * Description of the experiment. */ readonly description: pulumi.Output; /** * Fields that the API reports as editable. */ readonly editableFields: pulumi.Output; /** * The ISO 8601 formatted date the experiment was completed. */ readonly endedAt: pulumi.Output; /** * The ID of the feature flag evaluated by this experiment. Changing this replaces the experiment. */ readonly featureFlagId: pulumi.Output; /** * The name of the feature flag evaluated by this experiment. */ readonly featureFlagName: pulumi.Output; /** * The snapshot of the feature flag. */ readonly featureFlagSnapshot: pulumi.Output; /** * Whether the experiment is ready to activate. */ readonly isValid: pulumi.Output; /** * The ordered ramp levels. Only for the percentage strategy. Removing them replaces the experiment. */ readonly levels: pulumi.Output; /** * The name of the experiment. */ readonly name: pulumi.Output; /** * The ISO 8601 formatted date the experiment was first activated. */ readonly startedAt: pulumi.Output; /** * The lifecycle status of the experiment. One of draft, active, paused, completed, archived. A non-draft status on creation is applied internally after the experiment is created as a draft. If the status update fails, Terraform marks the entire resource tainted and plans to replace it on the next apply. An active experiment cannot be deleted. */ readonly status: pulumi.Output; /** * The ISO 8601 formatted date the experiment was updated. */ readonly updatedAt: pulumi.Output; /** * Create a Experiment 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: ExperimentArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Experiment resources. */ export interface ExperimentState { /** * The traffic allocation strategy. One of percentage, segment. Changing this replaces the experiment. */ allocationStrategy?: pulumi.Input; /** * The ordered traffic allocations. At least one is required when configured. Removing all allocations replaces the experiment. */ allocations?: pulumi.Input[] | undefined>; /** * The authentication flow targeted by the experiment. One of authentication, mfa*enrollment, mfa*challenge, password*reset, passkey*enrollment, all. */ authenticationFlow?: pulumi.Input; /** * The ISO 8601 formatted date the experiment was created. */ createdAt?: pulumi.Input; /** * The current ramp level, if levels are configured. */ currentLevel?: pulumi.Input; /** * The configuration source for an Auth0-managed feature flag. One of tenant, flag. Removing it replaces the experiment. */ defaultConfig?: pulumi.Input; /** * Description of the experiment. */ description?: pulumi.Input; /** * Fields that the API reports as editable. */ editableFields?: pulumi.Input[] | undefined>; /** * The ISO 8601 formatted date the experiment was completed. */ endedAt?: pulumi.Input; /** * The ID of the feature flag evaluated by this experiment. Changing this replaces the experiment. */ featureFlagId?: pulumi.Input; /** * The name of the feature flag evaluated by this experiment. */ featureFlagName?: pulumi.Input; /** * The snapshot of the feature flag. */ featureFlagSnapshot?: pulumi.Input; /** * Whether the experiment is ready to activate. */ isValid?: pulumi.Input; /** * The ordered ramp levels. Only for the percentage strategy. Removing them replaces the experiment. */ levels?: pulumi.Input[] | undefined>; /** * The name of the experiment. */ name?: pulumi.Input; /** * The ISO 8601 formatted date the experiment was first activated. */ startedAt?: pulumi.Input; /** * The lifecycle status of the experiment. One of draft, active, paused, completed, archived. A non-draft status on creation is applied internally after the experiment is created as a draft. If the status update fails, Terraform marks the entire resource tainted and plans to replace it on the next apply. An active experiment cannot be deleted. */ status?: pulumi.Input; /** * The ISO 8601 formatted date the experiment was updated. */ updatedAt?: pulumi.Input; } /** * The set of arguments for constructing a Experiment resource. */ export interface ExperimentArgs { /** * The traffic allocation strategy. One of percentage, segment. Changing this replaces the experiment. */ allocationStrategy: pulumi.Input; /** * The ordered traffic allocations. At least one is required when configured. Removing all allocations replaces the experiment. */ allocations?: pulumi.Input[] | undefined>; /** * The authentication flow targeted by the experiment. One of authentication, mfa*enrollment, mfa*challenge, password*reset, passkey*enrollment, all. */ authenticationFlow: pulumi.Input; /** * The configuration source for an Auth0-managed feature flag. One of tenant, flag. Removing it replaces the experiment. */ defaultConfig?: pulumi.Input; /** * Description of the experiment. */ description?: pulumi.Input; /** * The ID of the feature flag evaluated by this experiment. Changing this replaces the experiment. */ featureFlagId: pulumi.Input; /** * The ordered ramp levels. Only for the percentage strategy. Removing them replaces the experiment. */ levels?: pulumi.Input[] | undefined>; /** * The name of the experiment. */ name?: pulumi.Input; /** * The lifecycle status of the experiment. One of draft, active, paused, completed, archived. A non-draft status on creation is applied internally after the experiment is created as a draft. If the status update fails, Terraform marks the entire resource tainted and plans to replace it on the next apply. An active experiment cannot be deleted. */ status?: pulumi.Input; } //# sourceMappingURL=experiment.d.ts.map