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

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.GithubFunctions;
import com.pulumi.github.inputs.GetMembershipArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var membershipForSomeUser = GithubFunctions.getMembership(GetMembershipArgs.builder()
.username("SomeUser")
.build());
}
}

Return

A collection of values returned by getMembership.

Parameters

argument

A collection of arguments for invoking getMembership.


suspend fun getMembership(organization: String? = null, username: String): GetMembershipResult

Return

A collection of values returned by getMembership.

Parameters

organization

The organization to check for the above username.

username

The username to lookup in the organization.

See also


Return

A collection of values returned by getMembership.

Parameters

argument

Builder for com.pulumi.github.kotlin.inputs.GetMembershipPlainArgs.

See also