@statsig/pulumi-statsig
Version:
A Pulumi package for creating and managing Statsig resources.
140 lines • 10.1 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.Experiment = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* 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)
*/
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, id, state, opts) {
return new Experiment(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* 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) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Experiment.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["allocation"] = state ? state.allocation : undefined;
resourceInputs["allocationDuration"] = state ? state.allocationDuration : undefined;
resourceInputs["analysisEndTime"] = state ? state.analysisEndTime : undefined;
resourceInputs["analyticsType"] = state ? state.analyticsType : undefined;
resourceInputs["assignmentSourceExperimentName"] = state ? state.assignmentSourceExperimentName : undefined;
resourceInputs["assignmentSourceName"] = state ? state.assignmentSourceName : undefined;
resourceInputs["benjaminiHochbergPerMetric"] = state ? state.benjaminiHochbergPerMetric : undefined;
resourceInputs["benjaminiHochbergPerVariant"] = state ? state.benjaminiHochbergPerVariant : undefined;
resourceInputs["benjaminiPrimaryMetricsOnly"] = state ? state.benjaminiPrimaryMetricsOnly : undefined;
resourceInputs["bonferroniCorrection"] = state ? state.bonferroniCorrection : undefined;
resourceInputs["bonferroniCorrectionPerMetric"] = state ? state.bonferroniCorrectionPerMetric : undefined;
resourceInputs["cohortWaitUntilEndToInclude"] = state ? state.cohortWaitUntilEndToInclude : undefined;
resourceInputs["cohortedAnalysisDuration"] = state ? state.cohortedAnalysisDuration : undefined;
resourceInputs["cohortedMetricsMatureAfterEnd"] = state ? state.cohortedMetricsMatureAfterEnd : undefined;
resourceInputs["controlGroupId"] = state ? state.controlGroupId : undefined;
resourceInputs["creatorEmail"] = state ? state.creatorEmail : undefined;
resourceInputs["creatorId"] = state ? state.creatorId : undefined;
resourceInputs["defaultConfidenceInterval"] = state ? state.defaultConfidenceInterval : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["duration"] = state ? state.duration : undefined;
resourceInputs["fixedAnalysisDuration"] = state ? state.fixedAnalysisDuration : undefined;
resourceInputs["groups"] = state ? state.groups : undefined;
resourceInputs["hypothesis"] = state ? state.hypothesis : undefined;
resourceInputs["idType"] = state ? state.idType : undefined;
resourceInputs["isAnalysisOnly"] = state ? state.isAnalysisOnly : undefined;
resourceInputs["launchedGroupId"] = state ? state.launchedGroupId : undefined;
resourceInputs["layerId"] = state ? state.layerId : undefined;
resourceInputs["links"] = state ? state.links : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["primaryMetricTags"] = state ? state.primaryMetricTags : undefined;
resourceInputs["primaryMetrics"] = state ? state.primaryMetrics : undefined;
resourceInputs["scheduledReloadHour"] = state ? state.scheduledReloadHour : undefined;
resourceInputs["scheduledReloadType"] = state ? state.scheduledReloadType : undefined;
resourceInputs["secondaryIdtype"] = state ? state.secondaryIdtype : undefined;
resourceInputs["secondaryMetricTags"] = state ? state.secondaryMetricTags : undefined;
resourceInputs["secondaryMetrics"] = state ? state.secondaryMetrics : undefined;
resourceInputs["sequentialTesting"] = state ? state.sequentialTesting : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["targetApps"] = state ? state.targetApps : undefined;
resourceInputs["targetExposures"] = state ? state.targetExposures : undefined;
resourceInputs["targetingGateId"] = state ? state.targetingGateId : undefined;
resourceInputs["team"] = state ? state.team : undefined;
}
else {
const args = argsOrState;
resourceInputs["allocation"] = args ? args.allocation : undefined;
resourceInputs["allocationDuration"] = args ? args.allocationDuration : undefined;
resourceInputs["analysisEndTime"] = args ? args.analysisEndTime : undefined;
resourceInputs["analyticsType"] = args ? args.analyticsType : undefined;
resourceInputs["assignmentSourceExperimentName"] = args ? args.assignmentSourceExperimentName : undefined;
resourceInputs["assignmentSourceName"] = args ? args.assignmentSourceName : undefined;
resourceInputs["benjaminiHochbergPerMetric"] = args ? args.benjaminiHochbergPerMetric : undefined;
resourceInputs["benjaminiHochbergPerVariant"] = args ? args.benjaminiHochbergPerVariant : undefined;
resourceInputs["benjaminiPrimaryMetricsOnly"] = args ? args.benjaminiPrimaryMetricsOnly : undefined;
resourceInputs["bonferroniCorrection"] = args ? args.bonferroniCorrection : undefined;
resourceInputs["bonferroniCorrectionPerMetric"] = args ? args.bonferroniCorrectionPerMetric : undefined;
resourceInputs["cohortWaitUntilEndToInclude"] = args ? args.cohortWaitUntilEndToInclude : undefined;
resourceInputs["cohortedAnalysisDuration"] = args ? args.cohortedAnalysisDuration : undefined;
resourceInputs["cohortedMetricsMatureAfterEnd"] = args ? args.cohortedMetricsMatureAfterEnd : undefined;
resourceInputs["controlGroupId"] = args ? args.controlGroupId : undefined;
resourceInputs["creatorEmail"] = args ? args.creatorEmail : undefined;
resourceInputs["creatorId"] = args ? args.creatorId : undefined;
resourceInputs["defaultConfidenceInterval"] = args ? args.defaultConfidenceInterval : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["duration"] = args ? args.duration : undefined;
resourceInputs["fixedAnalysisDuration"] = args ? args.fixedAnalysisDuration : undefined;
resourceInputs["groups"] = args ? args.groups : undefined;
resourceInputs["hypothesis"] = args ? args.hypothesis : undefined;
resourceInputs["idType"] = args ? args.idType : undefined;
resourceInputs["isAnalysisOnly"] = args ? args.isAnalysisOnly : undefined;
resourceInputs["launchedGroupId"] = args ? args.launchedGroupId : undefined;
resourceInputs["layerId"] = args ? args.layerId : undefined;
resourceInputs["links"] = args ? args.links : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["primaryMetricTags"] = args ? args.primaryMetricTags : undefined;
resourceInputs["primaryMetrics"] = args ? args.primaryMetrics : undefined;
resourceInputs["scheduledReloadHour"] = args ? args.scheduledReloadHour : undefined;
resourceInputs["scheduledReloadType"] = args ? args.scheduledReloadType : undefined;
resourceInputs["secondaryIdtype"] = args ? args.secondaryIdtype : undefined;
resourceInputs["secondaryMetricTags"] = args ? args.secondaryMetricTags : undefined;
resourceInputs["secondaryMetrics"] = args ? args.secondaryMetrics : undefined;
resourceInputs["sequentialTesting"] = args ? args.sequentialTesting : undefined;
resourceInputs["status"] = args ? args.status : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["targetApps"] = args ? args.targetApps : undefined;
resourceInputs["targetExposures"] = args ? args.targetExposures : undefined;
resourceInputs["targetingGateId"] = args ? args.targetingGateId : undefined;
resourceInputs["team"] = args ? args.team : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Experiment.__pulumiType, name, resourceInputs, opts);
}
}
exports.Experiment = Experiment;
/** @internal */
Experiment.__pulumiType = 'statsig:index/experiment:Experiment';
//# sourceMappingURL=experiment.js.map