UNPKG

@pulumiverse/sentry

Version:

A Pulumi package for creating and managing Sentry resources.

99 lines 4.44 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.SentryOrganizationRepositoryGithub = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Sentry Github Organization Repository resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as sentry from "@pulumi/sentry"; * import * as sentry from "@pulumiverse/sentry"; * * // Retrieve the Github organization integration * const github = sentry.getSentryOrganizationIntegration({ * organization: "my-organization", * providerKey: "github", * name: "my-github-organization", * }); * const _this = new sentry.SentryOrganizationRepositoryGithub("this", { * organization: "my-organization", * integrationId: github.then(github => github.internalId), * identifier: "my-github-organization/my-github-repo", * }); * ``` * * ## Import * * import using the organization slug from the URL: * * https://sentry.io/organizations/[org-slug]/ * * [github-org] and [github-repo] are the slugs to your repo * * ```sh * $ pulumi import sentry:index/sentryOrganizationRepositoryGithub:SentryOrganizationRepositoryGithub this org-slug/github-org/github-repo * ``` */ class SentryOrganizationRepositoryGithub extends pulumi.CustomResource { /** * Get an existing SentryOrganizationRepositoryGithub 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 SentryOrganizationRepositoryGithub(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of SentryOrganizationRepositoryGithub. 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'] === SentryOrganizationRepositoryGithub.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["identifier"] = state ? state.identifier : undefined; resourceInputs["integrationId"] = state ? state.integrationId : undefined; resourceInputs["internalId"] = state ? state.internalId : undefined; resourceInputs["organization"] = state ? state.organization : undefined; } else { const args = argsOrState; if ((!args || args.identifier === undefined) && !opts.urn) { throw new Error("Missing required property 'identifier'"); } if ((!args || args.integrationId === undefined) && !opts.urn) { throw new Error("Missing required property 'integrationId'"); } if ((!args || args.organization === undefined) && !opts.urn) { throw new Error("Missing required property 'organization'"); } resourceInputs["identifier"] = args ? args.identifier : undefined; resourceInputs["integrationId"] = args ? args.integrationId : undefined; resourceInputs["organization"] = args ? args.organization : undefined; resourceInputs["internalId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(SentryOrganizationRepositoryGithub.__pulumiType, name, resourceInputs, opts); } } exports.SentryOrganizationRepositoryGithub = SentryOrganizationRepositoryGithub; /** @internal */ SentryOrganizationRepositoryGithub.__pulumiType = 'sentry:index/sentryOrganizationRepositoryGithub:SentryOrganizationRepositoryGithub'; //# sourceMappingURL=sentryOrganizationRepositoryGithub.js.map