@pulumiverse/sentry
Version:
A Pulumi package for creating and managing Sentry resources.
96 lines • 4.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.SentryOrganizationMember = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as sentry from "@pulumiverse/sentry";
*
* // Create an organization member
* const johnDoe = new sentry.SentryOrganizationMember("john_doe", {
* organization: "my-organization",
* email: "test@example.com",
* role: "member",
* teams: ["my-team"],
* });
* ```
*
* ## Import
*
* import using the organization, membership id from the URL:
*
* https://sentry.io/settings/[org-slug]/members/[member-id]/
*
* ```sh
* $ pulumi import sentry:index/sentryOrganizationMember:SentryOrganizationMember john_doe org-slug/member-id
* ```
*/
class SentryOrganizationMember extends pulumi.CustomResource {
/**
* Get an existing SentryOrganizationMember 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 SentryOrganizationMember(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of SentryOrganizationMember. 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'] === SentryOrganizationMember.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["email"] = state ? state.email : undefined;
resourceInputs["expired"] = state ? state.expired : undefined;
resourceInputs["internalId"] = state ? state.internalId : undefined;
resourceInputs["organization"] = state ? state.organization : undefined;
resourceInputs["pending"] = state ? state.pending : undefined;
resourceInputs["role"] = state ? state.role : undefined;
resourceInputs["teams"] = state ? state.teams : undefined;
}
else {
const args = argsOrState;
if ((!args || args.email === undefined) && !opts.urn) {
throw new Error("Missing required property 'email'");
}
if ((!args || args.organization === undefined) && !opts.urn) {
throw new Error("Missing required property 'organization'");
}
if ((!args || args.role === undefined) && !opts.urn) {
throw new Error("Missing required property 'role'");
}
resourceInputs["email"] = args ? args.email : undefined;
resourceInputs["organization"] = args ? args.organization : undefined;
resourceInputs["role"] = args ? args.role : undefined;
resourceInputs["teams"] = args ? args.teams : undefined;
resourceInputs["expired"] = undefined /*out*/;
resourceInputs["internalId"] = undefined /*out*/;
resourceInputs["pending"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(SentryOrganizationMember.__pulumiType, name, resourceInputs, opts);
}
}
exports.SentryOrganizationMember = SentryOrganizationMember;
/** @internal */
SentryOrganizationMember.__pulumiType = 'sentry:index/sentryOrganizationMember:SentryOrganizationMember';
//# sourceMappingURL=sentryOrganizationMember.js.map