UNPKG

@pulumi/github

Version:

A Pulumi package for creating and managing github cloud resources.

79 lines 3.77 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.AppInstallationRepositories = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * > **Note**: This resource is not compatible with the GitHub App Installation authentication method. * * This resource manages relationships between app installations and repositories * in your GitHub organization. * * Creating this resource installs a particular app on multiple repositories. * * The app installation and the repositories must all belong to the same * organization on GitHub. Note: you can review your organization's installations * by the following the instructions at this * [link](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/reviewing-your-organizations-installed-integrations). * * ## Import * * GitHub App Installation Repositories can be imported * using an ID made up of `installation_id`, e.g. * * ```sh * $ pulumi import github:index/appInstallationRepositories:AppInstallationRepositories some_app_repos 1234567 * ``` */ class AppInstallationRepositories extends pulumi.CustomResource { /** * Get an existing AppInstallationRepositories 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 AppInstallationRepositories(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of AppInstallationRepositories. 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'] === AppInstallationRepositories.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["installationId"] = state ? state.installationId : undefined; resourceInputs["selectedRepositories"] = state ? state.selectedRepositories : undefined; } else { const args = argsOrState; if ((!args || args.installationId === undefined) && !opts.urn) { throw new Error("Missing required property 'installationId'"); } if ((!args || args.selectedRepositories === undefined) && !opts.urn) { throw new Error("Missing required property 'selectedRepositories'"); } resourceInputs["installationId"] = args ? args.installationId : undefined; resourceInputs["selectedRepositories"] = args ? args.selectedRepositories : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AppInstallationRepositories.__pulumiType, name, resourceInputs, opts); } } exports.AppInstallationRepositories = AppInstallationRepositories; /** @internal */ AppInstallationRepositories.__pulumiType = 'github:index/appInstallationRepositories:AppInstallationRepositories'; //# sourceMappingURL=appInstallationRepositories.js.map