@pulumiverse/sentry
Version:
A Pulumi package for creating and managing Sentry resources.
115 lines • 5.24 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.SentryProject = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Sentry Project resource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as sentry from "@pulumiverse/sentry";
*
* // Create a project
* const _default = new sentry.SentryProject("default", {
* organization: "my-organization",
* teams: [
* "my-first-team",
* "my-second-team",
* ],
* name: "Web App",
* slug: "web-app",
* platform: "javascript",
* resolveAge: 720,
* });
* ```
*
* ## Import
*
* import using the organization and team slugs from the URL:
*
* https://sentry.io/settings/[org-slug]/projects/[project-slug]/
*
* ```sh
* $ pulumi import sentry:index/sentryProject:SentryProject default org-slug/project-slug
* ```
*/
class SentryProject extends pulumi.CustomResource {
/**
* Get an existing SentryProject 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 SentryProject(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of SentryProject. 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'] === SentryProject.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["color"] = state ? state.color : undefined;
resourceInputs["digestsMaxDelay"] = state ? state.digestsMaxDelay : undefined;
resourceInputs["digestsMinDelay"] = state ? state.digestsMinDelay : undefined;
resourceInputs["features"] = state ? state.features : undefined;
resourceInputs["internalId"] = state ? state.internalId : undefined;
resourceInputs["isBookmarked"] = state ? state.isBookmarked : undefined;
resourceInputs["isPublic"] = state ? state.isPublic : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["organization"] = state ? state.organization : undefined;
resourceInputs["platform"] = state ? state.platform : undefined;
resourceInputs["projectId"] = state ? state.projectId : undefined;
resourceInputs["resolveAge"] = state ? state.resolveAge : undefined;
resourceInputs["slug"] = state ? state.slug : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["team"] = state ? state.team : undefined;
resourceInputs["teams"] = state ? state.teams : undefined;
}
else {
const args = argsOrState;
if ((!args || args.organization === undefined) && !opts.urn) {
throw new Error("Missing required property 'organization'");
}
resourceInputs["digestsMaxDelay"] = args ? args.digestsMaxDelay : undefined;
resourceInputs["digestsMinDelay"] = args ? args.digestsMinDelay : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["organization"] = args ? args.organization : undefined;
resourceInputs["platform"] = args ? args.platform : undefined;
resourceInputs["resolveAge"] = args ? args.resolveAge : undefined;
resourceInputs["slug"] = args ? args.slug : undefined;
resourceInputs["team"] = args ? args.team : undefined;
resourceInputs["teams"] = args ? args.teams : undefined;
resourceInputs["color"] = undefined /*out*/;
resourceInputs["features"] = undefined /*out*/;
resourceInputs["internalId"] = undefined /*out*/;
resourceInputs["isBookmarked"] = undefined /*out*/;
resourceInputs["isPublic"] = undefined /*out*/;
resourceInputs["projectId"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(SentryProject.__pulumiType, name, resourceInputs, opts);
}
}
exports.SentryProject = SentryProject;
/** @internal */
SentryProject.__pulumiType = 'sentry:index/sentryProject:SentryProject';
//# sourceMappingURL=sentryProject.js.map