Class Membership
Provides a GitHub membership resource.
This resource allows you to add/remove users from your organization. When applied, an invitation will be sent to the user to become part of the organization. When destroyed, either the invitation will be cancelled or the user will be removed.
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",
});
}
}
Inherited Members
Namespace: Pulumi.Github
Assembly: Pulumi.Github.dll
Syntax
public class Membership : CustomResource
Constructors
View SourceMembership(String, MembershipArgs, CustomResourceOptions)
Create a Membership resource with the given unique name, arguments, and options.
Declaration
public Membership(string name, MembershipArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| MembershipArgs | 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 organization.
Must be one of member or admin. Defaults to member.
Declaration
public Output<string> Role { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Username
The user to add to the organization.
Declaration
public Output<string> Username { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, MembershipState, CustomResourceOptions)
Get an existing Membership resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Membership Get(string name, Input<string> id, MembershipState 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. |
| MembershipState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Membership |