UNPKG

@statsig/pulumi-statsig

Version:

A Pulumi package for creating and managing Statsig resources.

80 lines 4.23 kB
"use strict"; // *** 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.EntityProperty = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * This resource allows you to configure entity properties for your Statsig project. * * To learn more about entity properties, see [Entity Properties Documentation](https://docs.statsig.com/statsig-warehouse-native/features/entity-properties/) * * To learn more about the API powering this resource, see [Experiments API Documentation](https://docs.statsig.com/console-api/experiments) * * > Note: This resource is only available for [Warehouse Native](https://docs.statsig.com/statsig-warehouse-native/introduction/) projects */ class EntityProperty extends pulumi.CustomResource { /** * Get an existing EntityProperty 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 EntityProperty(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of EntityProperty. 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'] === EntityProperty.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["idTypeMappings"] = state ? state.idTypeMappings : undefined; resourceInputs["isReadOnly"] = state ? state.isReadOnly : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["owner"] = state ? state.owner : undefined; resourceInputs["sql"] = state ? state.sql : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["timestampAsDay"] = state ? state.timestampAsDay : undefined; resourceInputs["timestampColumn"] = state ? state.timestampColumn : undefined; } else { const args = argsOrState; if ((!args || args.idTypeMappings === undefined) && !opts.urn) { throw new Error("Missing required property 'idTypeMappings'"); } if ((!args || args.sql === undefined) && !opts.urn) { throw new Error("Missing required property 'sql'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["idTypeMappings"] = args ? args.idTypeMappings : undefined; resourceInputs["isReadOnly"] = args ? args.isReadOnly : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["sql"] = args ? args.sql : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["timestampAsDay"] = args ? args.timestampAsDay : undefined; resourceInputs["timestampColumn"] = args ? args.timestampColumn : undefined; resourceInputs["owner"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(EntityProperty.__pulumiType, name, resourceInputs, opts); } } exports.EntityProperty = EntityProperty; /** @internal */ EntityProperty.__pulumiType = 'statsig:index/entityProperty:EntityProperty'; //# sourceMappingURL=entityProperty.js.map