UNPKG

@statsig/pulumi-statsig

Version:

A Pulumi package for creating and managing Statsig resources.

562 lines (561 loc) 18 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * This resource allows you to configure experiments for your Statsig project. * * To learn more about experiments, see [Experiments Documentation](https://docs.statsig.com/experiments-plus/) * * To learn more about the API powering this resource, see [Experiments API Documentation](https://docs.statsig.com/console-api/experiments) */ 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<pulumi.ID>, state?: ExperimentState, opts?: pulumi.CustomResourceOptions): Experiment; /** * 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; /** * Percent of layer allocated to this experiment */ readonly allocation: pulumi.Output<number>; /** * Warehouse Native Only - Allocation duration in days */ readonly allocationDuration: pulumi.Output<number>; /** * Warehouse Native only - end time for analysis only experiments */ readonly analysisEndTime: pulumi.Output<string>; /** * The mode of analysis for the experiment, e.g frequentist, bayesian, sprt */ readonly analyticsType: pulumi.Output<string>; /** * Name of the source experiment for assignment */ readonly assignmentSourceExperimentName: pulumi.Output<string>; /** * Source name of the assignment */ readonly assignmentSourceName: pulumi.Output<string>; /** * Is Benjamini-Hochberg procedure applied per metric? */ readonly benjaminiHochbergPerMetric: pulumi.Output<boolean>; /** * Is Benjamini-Hochberg procedure applied per variant? */ readonly benjaminiHochbergPerVariant: pulumi.Output<boolean>; /** * Is Benjamini-Hochberg procedure applied for primary metrics only? */ readonly benjaminiPrimaryMetricsOnly: pulumi.Output<boolean>; /** * Is Bonferroni correction applied per variant? */ readonly bonferroniCorrection: pulumi.Output<boolean>; /** * Is Bonferroni correction applied per metric? */ readonly bonferroniCorrectionPerMetric: pulumi.Output<boolean>; /** * Warehouse Native Only - Whether to filter to units whose experiment cohort analysis duration is complete, if cohortedAnalysisDuration exists */ readonly cohortWaitUntilEndToInclude: pulumi.Output<boolean>; /** * Warehouse Native Only - Cohorted analysis duration in days */ readonly cohortedAnalysisDuration: pulumi.Output<number>; /** * Warehouse Native Only - Allow cohort metrics to mature after experiment end */ readonly cohortedMetricsMatureAfterEnd: pulumi.Output<boolean>; /** * Optional control group ID */ readonly controlGroupId: pulumi.Output<string>; /** * The email of the creator of this experiment */ readonly creatorEmail: pulumi.Output<string>; /** * The Statsig ID of the creator of this experiment */ readonly creatorId: pulumi.Output<string>; /** * Default error margin used for results */ readonly defaultConfidenceInterval: pulumi.Output<string>; /** * A description of the new experiment */ readonly description: pulumi.Output<string>; /** * How long the experiment is expected to last in days */ readonly duration: pulumi.Output<number>; /** * Fixed analysis duration in days */ readonly fixedAnalysisDuration: pulumi.Output<number>; /** * The test groups for your experiment */ readonly groups: pulumi.Output<outputs.ExperimentGroup[]>; /** * A statement that will be tested by this experiment */ readonly hypothesis: pulumi.Output<string>; /** * The idType the experiment will be performed on */ readonly idType: pulumi.Output<string>; /** * For Warehouse Native */ readonly isAnalysisOnly: pulumi.Output<boolean>; /** * ID of the launched group, null otherwise */ readonly launchedGroupId: pulumi.Output<string>; /** * Which layer to place the experiment into. */ readonly layerId: pulumi.Output<string>; /** * Links to relevant documentation or resources */ readonly links: pulumi.Output<outputs.ExperimentLink[]>; /** * The name of the new experiment */ readonly name: pulumi.Output<string>; /** * Primary metric tags for the experiment */ readonly primaryMetricTags: pulumi.Output<string[]>; /** * Main metrics needed to evaluate your hypothesis */ readonly primaryMetrics: pulumi.Output<outputs.ExperimentPrimaryMetric[]>; /** * Warehouse Native only - UTC hour at which to run scheduled pulse loads */ readonly scheduledReloadHour: pulumi.Output<number>; /** * Warehouse Native only - reload type for scheduled reloads */ readonly scheduledReloadType: pulumi.Output<string>; /** * The secondary ID type for the experiment used in WHN for ID resolution */ readonly secondaryIdtype: pulumi.Output<string>; /** * Secondary metric tags for the experiment */ readonly secondaryMetricTags: pulumi.Output<string[]>; /** * Additional metrics to monitor that might impact the analysis or final decision of the experiment */ readonly secondaryMetrics: pulumi.Output<outputs.ExperimentSecondaryMetric[]>; /** * Apply sequential testing? */ readonly sequentialTesting: pulumi.Output<boolean>; /** * The current status of the experiment */ readonly status: pulumi.Output<string>; /** * Tags associated with the experiment */ readonly tags: pulumi.Output<string[]>; /** * Target apps assigned to this experiment */ readonly targetApps: pulumi.Output<string[]>; /** * Target exposures for the experiment */ readonly targetExposures: pulumi.Output<number>; /** * Restrict your experiment to users passing the selected feature gate */ readonly targetingGateId: pulumi.Output<string>; /** * Enterprise only */ readonly team: pulumi.Output<string>; /** * 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 { /** * Percent of layer allocated to this experiment */ allocation?: pulumi.Input<number>; /** * Warehouse Native Only - Allocation duration in days */ allocationDuration?: pulumi.Input<number>; /** * Warehouse Native only - end time for analysis only experiments */ analysisEndTime?: pulumi.Input<string>; /** * The mode of analysis for the experiment, e.g frequentist, bayesian, sprt */ analyticsType?: pulumi.Input<string>; /** * Name of the source experiment for assignment */ assignmentSourceExperimentName?: pulumi.Input<string>; /** * Source name of the assignment */ assignmentSourceName?: pulumi.Input<string>; /** * Is Benjamini-Hochberg procedure applied per metric? */ benjaminiHochbergPerMetric?: pulumi.Input<boolean>; /** * Is Benjamini-Hochberg procedure applied per variant? */ benjaminiHochbergPerVariant?: pulumi.Input<boolean>; /** * Is Benjamini-Hochberg procedure applied for primary metrics only? */ benjaminiPrimaryMetricsOnly?: pulumi.Input<boolean>; /** * Is Bonferroni correction applied per variant? */ bonferroniCorrection?: pulumi.Input<boolean>; /** * Is Bonferroni correction applied per metric? */ bonferroniCorrectionPerMetric?: pulumi.Input<boolean>; /** * Warehouse Native Only - Whether to filter to units whose experiment cohort analysis duration is complete, if cohortedAnalysisDuration exists */ cohortWaitUntilEndToInclude?: pulumi.Input<boolean>; /** * Warehouse Native Only - Cohorted analysis duration in days */ cohortedAnalysisDuration?: pulumi.Input<number>; /** * Warehouse Native Only - Allow cohort metrics to mature after experiment end */ cohortedMetricsMatureAfterEnd?: pulumi.Input<boolean>; /** * Optional control group ID */ controlGroupId?: pulumi.Input<string>; /** * The email of the creator of this experiment */ creatorEmail?: pulumi.Input<string>; /** * The Statsig ID of the creator of this experiment */ creatorId?: pulumi.Input<string>; /** * Default error margin used for results */ defaultConfidenceInterval?: pulumi.Input<string>; /** * A description of the new experiment */ description?: pulumi.Input<string>; /** * How long the experiment is expected to last in days */ duration?: pulumi.Input<number>; /** * Fixed analysis duration in days */ fixedAnalysisDuration?: pulumi.Input<number>; /** * The test groups for your experiment */ groups?: pulumi.Input<pulumi.Input<inputs.ExperimentGroup>[]>; /** * A statement that will be tested by this experiment */ hypothesis?: pulumi.Input<string>; /** * The idType the experiment will be performed on */ idType?: pulumi.Input<string>; /** * For Warehouse Native */ isAnalysisOnly?: pulumi.Input<boolean>; /** * ID of the launched group, null otherwise */ launchedGroupId?: pulumi.Input<string>; /** * Which layer to place the experiment into. */ layerId?: pulumi.Input<string>; /** * Links to relevant documentation or resources */ links?: pulumi.Input<pulumi.Input<inputs.ExperimentLink>[]>; /** * The name of the new experiment */ name?: pulumi.Input<string>; /** * Primary metric tags for the experiment */ primaryMetricTags?: pulumi.Input<pulumi.Input<string>[]>; /** * Main metrics needed to evaluate your hypothesis */ primaryMetrics?: pulumi.Input<pulumi.Input<inputs.ExperimentPrimaryMetric>[]>; /** * Warehouse Native only - UTC hour at which to run scheduled pulse loads */ scheduledReloadHour?: pulumi.Input<number>; /** * Warehouse Native only - reload type for scheduled reloads */ scheduledReloadType?: pulumi.Input<string>; /** * The secondary ID type for the experiment used in WHN for ID resolution */ secondaryIdtype?: pulumi.Input<string>; /** * Secondary metric tags for the experiment */ secondaryMetricTags?: pulumi.Input<pulumi.Input<string>[]>; /** * Additional metrics to monitor that might impact the analysis or final decision of the experiment */ secondaryMetrics?: pulumi.Input<pulumi.Input<inputs.ExperimentSecondaryMetric>[]>; /** * Apply sequential testing? */ sequentialTesting?: pulumi.Input<boolean>; /** * The current status of the experiment */ status?: pulumi.Input<string>; /** * Tags associated with the experiment */ tags?: pulumi.Input<pulumi.Input<string>[]>; /** * Target apps assigned to this experiment */ targetApps?: pulumi.Input<pulumi.Input<string>[]>; /** * Target exposures for the experiment */ targetExposures?: pulumi.Input<number>; /** * Restrict your experiment to users passing the selected feature gate */ targetingGateId?: pulumi.Input<string>; /** * Enterprise only */ team?: pulumi.Input<string>; } /** * The set of arguments for constructing a Experiment resource. */ export interface ExperimentArgs { /** * Percent of layer allocated to this experiment */ allocation?: pulumi.Input<number>; /** * Warehouse Native Only - Allocation duration in days */ allocationDuration?: pulumi.Input<number>; /** * Warehouse Native only - end time for analysis only experiments */ analysisEndTime?: pulumi.Input<string>; /** * The mode of analysis for the experiment, e.g frequentist, bayesian, sprt */ analyticsType?: pulumi.Input<string>; /** * Name of the source experiment for assignment */ assignmentSourceExperimentName?: pulumi.Input<string>; /** * Source name of the assignment */ assignmentSourceName?: pulumi.Input<string>; /** * Is Benjamini-Hochberg procedure applied per metric? */ benjaminiHochbergPerMetric?: pulumi.Input<boolean>; /** * Is Benjamini-Hochberg procedure applied per variant? */ benjaminiHochbergPerVariant?: pulumi.Input<boolean>; /** * Is Benjamini-Hochberg procedure applied for primary metrics only? */ benjaminiPrimaryMetricsOnly?: pulumi.Input<boolean>; /** * Is Bonferroni correction applied per variant? */ bonferroniCorrection?: pulumi.Input<boolean>; /** * Is Bonferroni correction applied per metric? */ bonferroniCorrectionPerMetric?: pulumi.Input<boolean>; /** * Warehouse Native Only - Whether to filter to units whose experiment cohort analysis duration is complete, if cohortedAnalysisDuration exists */ cohortWaitUntilEndToInclude?: pulumi.Input<boolean>; /** * Warehouse Native Only - Cohorted analysis duration in days */ cohortedAnalysisDuration?: pulumi.Input<number>; /** * Warehouse Native Only - Allow cohort metrics to mature after experiment end */ cohortedMetricsMatureAfterEnd?: pulumi.Input<boolean>; /** * Optional control group ID */ controlGroupId?: pulumi.Input<string>; /** * The email of the creator of this experiment */ creatorEmail?: pulumi.Input<string>; /** * The Statsig ID of the creator of this experiment */ creatorId?: pulumi.Input<string>; /** * Default error margin used for results */ defaultConfidenceInterval?: pulumi.Input<string>; /** * A description of the new experiment */ description?: pulumi.Input<string>; /** * How long the experiment is expected to last in days */ duration?: pulumi.Input<number>; /** * Fixed analysis duration in days */ fixedAnalysisDuration?: pulumi.Input<number>; /** * The test groups for your experiment */ groups?: pulumi.Input<pulumi.Input<inputs.ExperimentGroup>[]>; /** * A statement that will be tested by this experiment */ hypothesis?: pulumi.Input<string>; /** * The idType the experiment will be performed on */ idType?: pulumi.Input<string>; /** * For Warehouse Native */ isAnalysisOnly?: pulumi.Input<boolean>; /** * ID of the launched group, null otherwise */ launchedGroupId?: pulumi.Input<string>; /** * Which layer to place the experiment into. */ layerId?: pulumi.Input<string>; /** * Links to relevant documentation or resources */ links?: pulumi.Input<pulumi.Input<inputs.ExperimentLink>[]>; /** * The name of the new experiment */ name?: pulumi.Input<string>; /** * Primary metric tags for the experiment */ primaryMetricTags?: pulumi.Input<pulumi.Input<string>[]>; /** * Main metrics needed to evaluate your hypothesis */ primaryMetrics?: pulumi.Input<pulumi.Input<inputs.ExperimentPrimaryMetric>[]>; /** * Warehouse Native only - UTC hour at which to run scheduled pulse loads */ scheduledReloadHour?: pulumi.Input<number>; /** * Warehouse Native only - reload type for scheduled reloads */ scheduledReloadType?: pulumi.Input<string>; /** * The secondary ID type for the experiment used in WHN for ID resolution */ secondaryIdtype?: pulumi.Input<string>; /** * Secondary metric tags for the experiment */ secondaryMetricTags?: pulumi.Input<pulumi.Input<string>[]>; /** * Additional metrics to monitor that might impact the analysis or final decision of the experiment */ secondaryMetrics?: pulumi.Input<pulumi.Input<inputs.ExperimentSecondaryMetric>[]>; /** * Apply sequential testing? */ sequentialTesting?: pulumi.Input<boolean>; /** * The current status of the experiment */ status?: pulumi.Input<string>; /** * Tags associated with the experiment */ tags?: pulumi.Input<pulumi.Input<string>[]>; /** * Target apps assigned to this experiment */ targetApps?: pulumi.Input<pulumi.Input<string>[]>; /** * Target exposures for the experiment */ targetExposures?: pulumi.Input<number>; /** * Restrict your experiment to users passing the selected feature gate */ targetingGateId?: pulumi.Input<string>; /** * Enterprise only */ team?: pulumi.Input<string>; }