@pulumi/github
Version:
A Pulumi package for creating and managing github cloud resources.
103 lines • 4.49 kB
JavaScript
// *** 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.Team = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Provides a GitHub team resource.
*
* This resource allows you to add/remove teams from your organization. When applied,
* a new team will be created. When destroyed, that team will be removed.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as github from "@pulumi/github";
*
* // Add a team to the organization
* const someTeam = new github.Team("some_team", {
* name: "some-team",
* description: "Some cool team",
* privacy: "closed",
* });
* ```
*
* ## Import
*
* GitHub Teams can be imported using the GitHub team ID or name e.g.
*
* ```sh
* $ pulumi import github:index/team:Team core 1234567
* ```
*
* ```sh
* $ pulumi import github:index/team:Team core Administrators
* ```
*/
class Team extends pulumi.CustomResource {
/**
* Get an existing Team 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 Team(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Team. 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'] === Team.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["createDefaultMaintainer"] = state ? state.createDefaultMaintainer : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["etag"] = state ? state.etag : undefined;
resourceInputs["ldapDn"] = state ? state.ldapDn : undefined;
resourceInputs["membersCount"] = state ? state.membersCount : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["nodeId"] = state ? state.nodeId : undefined;
resourceInputs["parentTeamId"] = state ? state.parentTeamId : undefined;
resourceInputs["parentTeamReadId"] = state ? state.parentTeamReadId : undefined;
resourceInputs["parentTeamReadSlug"] = state ? state.parentTeamReadSlug : undefined;
resourceInputs["privacy"] = state ? state.privacy : undefined;
resourceInputs["slug"] = state ? state.slug : undefined;
}
else {
const args = argsOrState;
resourceInputs["createDefaultMaintainer"] = args ? args.createDefaultMaintainer : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["ldapDn"] = args ? args.ldapDn : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["parentTeamId"] = args ? args.parentTeamId : undefined;
resourceInputs["parentTeamReadId"] = args ? args.parentTeamReadId : undefined;
resourceInputs["parentTeamReadSlug"] = args ? args.parentTeamReadSlug : undefined;
resourceInputs["privacy"] = args ? args.privacy : undefined;
resourceInputs["etag"] = undefined /*out*/;
resourceInputs["membersCount"] = undefined /*out*/;
resourceInputs["nodeId"] = undefined /*out*/;
resourceInputs["slug"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Team.__pulumiType, name, resourceInputs, opts);
}
}
exports.Team = Team;
/** @internal */
Team.__pulumiType = 'github:index/team:Team';
//# sourceMappingURL=team.js.map
;