get User
Use this data source to retrieve information about a GitHub user.
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.GetUserArgs;
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 example = GithubFunctions.getUser(GetUserArgs.builder()
.username("example")
.build());
final var current = GithubFunctions.getUser(GetUserArgs.builder()
.username("")
.build());
ctx.export("currentGithubLogin", current.applyValue(getUserResult -> getUserResult.login()));
}
}
Content copied to clipboard
Return
A collection of values returned by getUser.
Parameters
argument
A collection of arguments for invoking getUser.
Return
A collection of values returned by getUser.
Parameters
username
The username. Use an empty string ""
to retrieve information about the currently authenticated user.
See also
Return
A collection of values returned by getUser.
Parameters
argument
Builder for com.pulumi.github.kotlin.inputs.GetUserPlainArgs.