GetMembership

Use this data source to find out if a user is a member of your organization, as well as what role they have within it. If the user’s membership in the organization is pending their acceptance of an invite, the role they would have once they accept will be returned.

Example Usage

using Pulumi;
using Github = Pulumi.Github;

class MyStack : Stack
{
    public MyStack()
    {
        var membershipForSomeUser = Output.Create(Github.GetMembership.InvokeAsync(new Github.GetMembershipArgs
        {
            Username = "SomeUser",
        }));
    }

}

Coming soon!

import pulumi
import pulumi_github as github

membership_for_some_user = github.get_membership(username="SomeUser")
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";

const membershipForSomeUser = pulumi.output(github.getMembership({
    username: "SomeUser",
}, { async: true }));

Using GetMembership

function getMembership(args: GetMembershipArgs, opts?: InvokeOptions): Promise<GetMembershipResult>
function  get_membership(username=None, opts=None)
func LookupMembership(ctx *Context, args *LookupMembershipArgs, opts ...InvokeOption) (*LookupMembershipResult, error)

Note: This function is named LookupMembership in the Go SDK.

public static class GetMembership {
    public static Task<GetMembershipResult> InvokeAsync(GetMembershipArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Username string

The username to lookup in the organization.

Username string

The username to lookup in the organization.

username string

The username to lookup in the organization.

username str

The username to lookup in the organization.

GetMembership Result

The following output properties are available:

Etag string

An etag representing the membership object.

Id string

The provider-assigned unique ID for this managed resource.

Role string

admin or member – the role the user has within the organization.

Username string

The username.

Etag string

An etag representing the membership object.

Id string

The provider-assigned unique ID for this managed resource.

Role string

admin or member – the role the user has within the organization.

Username string

The username.

etag string

An etag representing the membership object.

id string

The provider-assigned unique ID for this managed resource.

role string

admin or member – the role the user has within the organization.

username string

The username.

etag str

An etag representing the membership object.

id str

The provider-assigned unique ID for this managed resource.

role str

admin or member – the role the user has within the organization.

username str

The username.

Package Details

Repository
https://github.com/pulumi/pulumi-github
License
Apache-2.0
Notes
This Pulumi package is based on the github Terraform Provider.