UNPKG

@pulumi/github

Version:

A Pulumi package for creating and managing github cloud resources.

98 lines 4.8 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.ActionsRunnerGroup = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * This resource allows you to create and manage GitHub Actions runner groups within your GitHub enterprise organizations. * You must have admin access to an organization to use this resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as github from "@pulumi/github"; * * const example = new github.Repository("example", {name: "my-repository"}); * const exampleActionsRunnerGroup = new github.ActionsRunnerGroup("example", { * name: example.name, * visibility: "selected", * selectedRepositoryIds: [example.repoId], * }); * ``` * * ## Import * * This resource can be imported using the ID of the runner group: * * ```sh * $ pulumi import github:index/actionsRunnerGroup:ActionsRunnerGroup test 7 * ``` */ class ActionsRunnerGroup extends pulumi.CustomResource { /** * Get an existing ActionsRunnerGroup 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 ActionsRunnerGroup(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ActionsRunnerGroup. 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'] === ActionsRunnerGroup.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["allowsPublicRepositories"] = state ? state.allowsPublicRepositories : undefined; resourceInputs["default"] = state ? state.default : undefined; resourceInputs["etag"] = state ? state.etag : undefined; resourceInputs["inherited"] = state ? state.inherited : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["restrictedToWorkflows"] = state ? state.restrictedToWorkflows : undefined; resourceInputs["runnersUrl"] = state ? state.runnersUrl : undefined; resourceInputs["selectedRepositoriesUrl"] = state ? state.selectedRepositoriesUrl : undefined; resourceInputs["selectedRepositoryIds"] = state ? state.selectedRepositoryIds : undefined; resourceInputs["selectedWorkflows"] = state ? state.selectedWorkflows : undefined; resourceInputs["visibility"] = state ? state.visibility : undefined; } else { const args = argsOrState; if ((!args || args.visibility === undefined) && !opts.urn) { throw new Error("Missing required property 'visibility'"); } resourceInputs["allowsPublicRepositories"] = args ? args.allowsPublicRepositories : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["restrictedToWorkflows"] = args ? args.restrictedToWorkflows : undefined; resourceInputs["selectedRepositoryIds"] = args ? args.selectedRepositoryIds : undefined; resourceInputs["selectedWorkflows"] = args ? args.selectedWorkflows : undefined; resourceInputs["visibility"] = args ? args.visibility : undefined; resourceInputs["default"] = undefined /*out*/; resourceInputs["etag"] = undefined /*out*/; resourceInputs["inherited"] = undefined /*out*/; resourceInputs["runnersUrl"] = undefined /*out*/; resourceInputs["selectedRepositoriesUrl"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ActionsRunnerGroup.__pulumiType, name, resourceInputs, opts); } } exports.ActionsRunnerGroup = ActionsRunnerGroup; /** @internal */ ActionsRunnerGroup.__pulumiType = 'github:index/actionsRunnerGroup:ActionsRunnerGroup'; //# sourceMappingURL=actionsRunnerGroup.js.map