UNPKG

@pulumi/github

Version:

A Pulumi package for creating and managing github cloud resources.

74 lines 3.05 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.OrganizationSecurityManager = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as github from "@pulumi/github"; * * const someTeam = new github.Team("some_team", { * name: "SomeTeam", * description: "Some cool team", * }); * const someTeamOrganizationSecurityManager = new github.OrganizationSecurityManager("some_team", {teamSlug: someTeam.slug}); * ``` * * ## Import * * GitHub Security Manager Teams can be imported using the GitHub team ID e.g. * * ```sh * $ pulumi import github:index/organizationSecurityManager:OrganizationSecurityManager core 1234567 * ``` */ class OrganizationSecurityManager extends pulumi.CustomResource { /** * Get an existing OrganizationSecurityManager 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 OrganizationSecurityManager(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of OrganizationSecurityManager. 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'] === OrganizationSecurityManager.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["teamSlug"] = state ? state.teamSlug : undefined; } else { const args = argsOrState; if ((!args || args.teamSlug === undefined) && !opts.urn) { throw new Error("Missing required property 'teamSlug'"); } resourceInputs["teamSlug"] = args ? args.teamSlug : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(OrganizationSecurityManager.__pulumiType, name, resourceInputs, opts); } } exports.OrganizationSecurityManager = OrganizationSecurityManager; /** @internal */ OrganizationSecurityManager.__pulumiType = 'github:index/organizationSecurityManager:OrganizationSecurityManager'; //# sourceMappingURL=organizationSecurityManager.js.map