UNPKG

@pulumiverse/sentry

Version:

A Pulumi package for creating and managing Sentry resources.

106 lines 4.76 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.SentryKey = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Sentry Key resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as sentry from "@pulumiverse/sentry"; * * // Create a key * const _default = new sentry.SentryKey("default", { * organization: "my-organization", * project: "web-app", * name: "My Key", * }); * ``` * * ## Import * * import using the organization, project slugs and key id from the URL: * * https://sentry.io/settings/[org-slug]/projects/[project-slug]/keys/[key-id]/ * * ```sh * $ pulumi import sentry:index/sentryKey:SentryKey default org-slug/project-slug/key-id * ``` */ class SentryKey extends pulumi.CustomResource { /** * Get an existing SentryKey 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 SentryKey(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of SentryKey. 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'] === SentryKey.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["dsnCsp"] = state ? state.dsnCsp : undefined; resourceInputs["dsnPublic"] = state ? state.dsnPublic : undefined; resourceInputs["dsnSecret"] = state ? state.dsnSecret : undefined; resourceInputs["isActive"] = state ? state.isActive : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["organization"] = state ? state.organization : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["public"] = state ? state.public : undefined; resourceInputs["rateLimitCount"] = state ? state.rateLimitCount : undefined; resourceInputs["rateLimitWindow"] = state ? state.rateLimitWindow : undefined; resourceInputs["secret"] = state ? state.secret : undefined; } else { const args = argsOrState; if ((!args || args.organization === undefined) && !opts.urn) { throw new Error("Missing required property 'organization'"); } if ((!args || args.project === undefined) && !opts.urn) { throw new Error("Missing required property 'project'"); } resourceInputs["name"] = args ? args.name : undefined; resourceInputs["organization"] = args ? args.organization : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["rateLimitCount"] = args ? args.rateLimitCount : undefined; resourceInputs["rateLimitWindow"] = args ? args.rateLimitWindow : undefined; resourceInputs["dsnCsp"] = undefined /*out*/; resourceInputs["dsnPublic"] = undefined /*out*/; resourceInputs["dsnSecret"] = undefined /*out*/; resourceInputs["isActive"] = undefined /*out*/; resourceInputs["projectId"] = undefined /*out*/; resourceInputs["public"] = undefined /*out*/; resourceInputs["secret"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["dsnSecret", "secret"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(SentryKey.__pulumiType, name, resourceInputs, opts); } } exports.SentryKey = SentryKey; /** @internal */ SentryKey.__pulumiType = 'sentry:index/sentryKey:SentryKey'; //# sourceMappingURL=sentryKey.js.map