Class TeamMembership
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.
Example Usage
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
// Add a user to the organization
var membershipForSomeUser = new Github.Membership("membershipForSomeUser", new Github.MembershipArgs
{
Role = "member",
Username = "SomeUser",
});
var someTeam = new Github.Team("someTeam", new Github.TeamArgs
{
Description = "Some cool team",
});
var someTeamMembership = new Github.TeamMembership("someTeamMembership", new Github.TeamMembershipArgs
{
Role = "member",
TeamId = someTeam.Id,
Username = "SomeUser",
});
}
}
Inherited Members
Namespace: Pulumi.Github
Assembly: Pulumi.Github.dll
Syntax
public class TeamMembership : CustomResource
Constructors
View SourceTeamMembership(String, TeamMembershipArgs, CustomResourceOptions)
Create a TeamMembership resource with the given unique name, arguments, and options.
Declaration
public TeamMembership(string name, TeamMembershipArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| TeamMembershipArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceEtag
Declaration
public Output<string> Etag { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Role
The role of the user within the team.
Must be one of member or maintainer. Defaults to member.
Declaration
public Output<string> Role { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
TeamId
The GitHub team id
Declaration
public Output<string> TeamId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Username
The user to add to the team.
Declaration
public Output<string> Username { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, TeamMembershipState, CustomResourceOptions)
Get an existing TeamMembership resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static TeamMembership Get(string name, Input<string> id, TeamMembershipState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| TeamMembershipState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| TeamMembership |