UNPKG

@pulumi/github

Version:

A Pulumi package for creating and managing github cloud resources.

113 lines 5.75 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.EnterpriseActionsRunnerGroup = 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. * You must have admin access to an enterprise to use this resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as github from "@pulumi/github"; * * const enterprise = github.getEnterprise({ * slug: "my-enterprise", * }); * const enterpriseOrganization = new github.EnterpriseOrganization("enterprise_organization", { * enterpriseId: enterprise.then(enterprise => enterprise.id), * name: "my-organization", * billingEmail: "octocat@octo.cat", * adminLogins: ["octocat"], * }); * const example = new github.EnterpriseActionsRunnerGroup("example", { * name: "my-awesome-runner-group", * enterpriseSlug: enterprise.then(enterprise => enterprise.slug), * allowsPublicRepositories: true, * visibility: "selected", * selectedOrganizationIds: [enterpriseOrganization.databaseId], * restrictedToWorkflows: true, * selectedWorkflows: ["my-organization/my-repo/.github/workflows/cool-workflow.yaml@refs/tags/v1"], * }); * ``` * * ## Import * * This resource can be imported using the enterprise slug and the ID of the runner group: * * ```sh * $ pulumi import github:index/enterpriseActionsRunnerGroup:EnterpriseActionsRunnerGroup test enterprise-slug/42 * ``` */ class EnterpriseActionsRunnerGroup extends pulumi.CustomResource { /** * Get an existing EnterpriseActionsRunnerGroup 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 EnterpriseActionsRunnerGroup(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of EnterpriseActionsRunnerGroup. 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'] === EnterpriseActionsRunnerGroup.__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["enterpriseSlug"] = state ? state.enterpriseSlug : undefined; resourceInputs["etag"] = state ? state.etag : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["restrictedToWorkflows"] = state ? state.restrictedToWorkflows : undefined; resourceInputs["runnersUrl"] = state ? state.runnersUrl : undefined; resourceInputs["selectedOrganizationIds"] = state ? state.selectedOrganizationIds : undefined; resourceInputs["selectedOrganizationsUrl"] = state ? state.selectedOrganizationsUrl : undefined; resourceInputs["selectedWorkflows"] = state ? state.selectedWorkflows : undefined; resourceInputs["visibility"] = state ? state.visibility : undefined; } else { const args = argsOrState; if ((!args || args.enterpriseSlug === undefined) && !opts.urn) { throw new Error("Missing required property 'enterpriseSlug'"); } if ((!args || args.visibility === undefined) && !opts.urn) { throw new Error("Missing required property 'visibility'"); } resourceInputs["allowsPublicRepositories"] = args ? args.allowsPublicRepositories : undefined; resourceInputs["enterpriseSlug"] = args ? args.enterpriseSlug : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["restrictedToWorkflows"] = args ? args.restrictedToWorkflows : undefined; resourceInputs["selectedOrganizationIds"] = args ? args.selectedOrganizationIds : undefined; resourceInputs["selectedWorkflows"] = args ? args.selectedWorkflows : undefined; resourceInputs["visibility"] = args ? args.visibility : undefined; resourceInputs["default"] = undefined /*out*/; resourceInputs["etag"] = undefined /*out*/; resourceInputs["runnersUrl"] = undefined /*out*/; resourceInputs["selectedOrganizationsUrl"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(EnterpriseActionsRunnerGroup.__pulumiType, name, resourceInputs, opts); } } exports.EnterpriseActionsRunnerGroup = EnterpriseActionsRunnerGroup; /** @internal */ EnterpriseActionsRunnerGroup.__pulumiType = 'github:index/enterpriseActionsRunnerGroup:EnterpriseActionsRunnerGroup'; //# sourceMappingURL=enterpriseActionsRunnerGroup.js.map