import * as pulumi from "@pulumi/pulumi"; /** * Provides a GitHub team membership resource. * * This resource allows you to add/remove users from teams in your organization. When applied, * the user will be added to the team. If the user hasn't accepted their invitation to the * organization, they won't be part of the team until they do. When * destroyed, the user will be removed from the team. * * > **Note** This resource is not compatible with `github.TeamMembers`. Use either `github.TeamMembers` or `github.TeamMembership`. * * > **Note** Organization owners may not be set as "members" of a team; they may only be set as "maintainers". Attempting to set an organization owner as a "member" of a team may result in a `pulumi preview` diff that changes their status back to "maintainer". * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as github from "@pulumi/github"; * * // Add a user to the organization * const membershipForSomeUser = new github.Membership("membership_for_some_user", { * username: "SomeUser", * role: "member", * }); * const someTeam = new github.Team("some_team", { * name: "SomeTeam", * description: "Some cool team", * }); * const someTeamMembership = new github.TeamMembership("some_team_membership", { * teamId: someTeam.id, * username: "SomeUser", * role: "member", * }); * ``` * * ## Import * * GitHub Team Membership can be imported using an ID made up of `teamid:username` or `teamname:username`, e.g. * * ```sh * $ pulumi import github:index/teamMembership:TeamMembership member 1234567:someuser * ``` * * ```sh * $ pulumi import github:index/teamMembership:TeamMembership member Administrators:someuser * ``` */ export declare class TeamMembership extends pulumi.CustomResource { /** * Get an existing TeamMembership 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: string, id: pulumi.Input, state?: TeamMembershipState, opts?: pulumi.CustomResourceOptions): TeamMembership; /** * Returns true if the given object is an instance of TeamMembership. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is TeamMembership; readonly etag: pulumi.Output; /** * The role of the user within the team. * Must be one of `member` or `maintainer`. Defaults to `member`. */ readonly role: pulumi.Output; /** * The GitHub team id or the GitHub team slug */ readonly teamId: pulumi.Output; /** * The user to add to the team. */ readonly username: pulumi.Output; /** * Create a TeamMembership resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: TeamMembershipArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering TeamMembership resources. */ export interface TeamMembershipState { etag?: pulumi.Input; /** * The role of the user within the team. * Must be one of `member` or `maintainer`. Defaults to `member`. */ role?: pulumi.Input; /** * The GitHub team id or the GitHub team slug */ teamId?: pulumi.Input; /** * The user to add to the team. */ username?: pulumi.Input; } /** * The set of arguments for constructing a TeamMembership resource. */ export interface TeamMembershipArgs { /** * The role of the user within the team. * Must be one of `member` or `maintainer`. Defaults to `member`. */ role?: pulumi.Input; /** * The GitHub team id or the GitHub team slug */ teamId: pulumi.Input; /** * The user to add to the team. */ username: pulumi.Input; }