1. Packages
  2. FusionAuth
  3. API Docs
  4. getUser
FusionAuth v4.0.1 published on Saturday, Sep 30, 2023 by Theo Gravity

fusionauth.getUser

Explore with Pulumi AI

fusionauth logo
FusionAuth v4.0.1 published on Saturday, Sep 30, 2023 by Theo Gravity

    # User Data Source

    This data source can be used to fetch information about a specific user.

    Users API

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using Fusionauth = Pulumi.Fusionauth;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Fusionauth.GetUser.Invoke(new()
        {
            Username = "foo@example.com",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/theogravity/pulumi-fusionauth/sdk/v3/go/fusionauth"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := fusionauth.GetUser(ctx, &fusionauth.GetUserArgs{
    			Username: pulumi.StringRef("foo@example.com"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.fusionauth.FusionauthFunctions;
    import com.pulumi.fusionauth.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 = FusionauthFunctions.getUser(GetUserArgs.builder()
                .username("foo@example.com")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_fusionauth as fusionauth
    
    example = fusionauth.get_user(username="foo@example.com")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as fusionauth from "@pulumi/fusionauth";
    
    const example = fusionauth.getUser({
        username: "foo@example.com",
    });
    
    variables:
      example:
        fn::invoke:
          Function: fusionauth:getUser
          Arguments:
            username: foo@example.com
    

    Using getUser

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getUser(args: GetUserArgs, opts?: InvokeOptions): Promise<GetUserResult>
    function getUserOutput(args: GetUserOutputArgs, opts?: InvokeOptions): Output<GetUserResult>
    def get_user(tenant_id: Optional[str] = None,
                 user_id: Optional[str] = None,
                 username: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetUserResult
    def get_user_output(tenant_id: Optional[pulumi.Input[str]] = None,
                 user_id: Optional[pulumi.Input[str]] = None,
                 username: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetUserResult]
    func GetUser(ctx *Context, args *GetUserArgs, opts ...InvokeOption) (*GetUserResult, error)
    func GetUserOutput(ctx *Context, args *GetUserOutputArgs, opts ...InvokeOption) GetUserResultOutput

    > Note: This function is named GetUser in the Go SDK.

    public static class GetUser 
    {
        public static Task<GetUserResult> InvokeAsync(GetUserArgs args, InvokeOptions? opts = null)
        public static Output<GetUserResult> Invoke(GetUserInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: fusionauth:index/getUser:getUser
      arguments:
        # arguments dictionary

    The following arguments are supported:

    TenantId string
    The Id of the tenant used to scope this API request.
    UserId string
    The Id of the user. Either user_id or username must be specified.
    Username string
    The username of the user. Either user_id or username must be specified.
    TenantId string
    The Id of the tenant used to scope this API request.
    UserId string
    The Id of the user. Either user_id or username must be specified.
    Username string
    The username of the user. Either user_id or username must be specified.
    tenantId String
    The Id of the tenant used to scope this API request.
    userId String
    The Id of the user. Either user_id or username must be specified.
    username String
    The username of the user. Either user_id or username must be specified.
    tenantId string
    The Id of the tenant used to scope this API request.
    userId string
    The Id of the user. Either user_id or username must be specified.
    username string
    The username of the user. Either user_id or username must be specified.
    tenant_id str
    The Id of the tenant used to scope this API request.
    user_id str
    The Id of the user. Either user_id or username must be specified.
    username str
    The username of the user. Either user_id or username must be specified.
    tenantId String
    The Id of the tenant used to scope this API request.
    userId String
    The Id of the user. Either user_id or username must be specified.
    username String
    The username of the user. Either user_id or username must be specified.

    getUser Result

    The following output properties are available:

    Active bool
    True if the user is active. False if the user has been deactivated. Deactivated users will not be able to login.
    BirthDate string
    An ISO-8601 formatted date of the user’s birthdate such as YYYY-MM-DD.
    Data string
    A JSON serialised string that can hold any information about the user.
    Email string
    The user’s email address.
    Expiry int
    The expiration instant of the user’s account. An expired user is not permitted to login.
    FirstName string
    The first name of the user.
    FullName string
    The user’s full name.
    Id string
    The provider-assigned unique ID for this managed resource.
    ImageUrl string
    The URL that points to an image file that is the user’s profile image.
    LastName string
    The user’s last name.
    MiddleName string
    The user’s middle name.
    MobilePhone string
    The user’s mobile phone number.
    ParentEmail string
    The email address of the user’s parent or guardian.
    PasswordChangeRequired bool
    Indicates that the user’s password needs to be changed during their next login attempt.
    PreferredLanguages List<string>
    An array of locale strings that give, in order, the user’s preferred languages.
    TenantId string
    Timezone string
    The user’s preferred timezone.
    UserId string
    Username string
    UsernameStatus string
    The current status of the username. This is used if you are moderating usernames via CleanSpeak.
    Active bool
    True if the user is active. False if the user has been deactivated. Deactivated users will not be able to login.
    BirthDate string
    An ISO-8601 formatted date of the user’s birthdate such as YYYY-MM-DD.
    Data string
    A JSON serialised string that can hold any information about the user.
    Email string
    The user’s email address.
    Expiry int
    The expiration instant of the user’s account. An expired user is not permitted to login.
    FirstName string
    The first name of the user.
    FullName string
    The user’s full name.
    Id string
    The provider-assigned unique ID for this managed resource.
    ImageUrl string
    The URL that points to an image file that is the user’s profile image.
    LastName string
    The user’s last name.
    MiddleName string
    The user’s middle name.
    MobilePhone string
    The user’s mobile phone number.
    ParentEmail string
    The email address of the user’s parent or guardian.
    PasswordChangeRequired bool
    Indicates that the user’s password needs to be changed during their next login attempt.
    PreferredLanguages []string
    An array of locale strings that give, in order, the user’s preferred languages.
    TenantId string
    Timezone string
    The user’s preferred timezone.
    UserId string
    Username string
    UsernameStatus string
    The current status of the username. This is used if you are moderating usernames via CleanSpeak.
    active Boolean
    True if the user is active. False if the user has been deactivated. Deactivated users will not be able to login.
    birthDate String
    An ISO-8601 formatted date of the user’s birthdate such as YYYY-MM-DD.
    data String
    A JSON serialised string that can hold any information about the user.
    email String
    The user’s email address.
    expiry Integer
    The expiration instant of the user’s account. An expired user is not permitted to login.
    firstName String
    The first name of the user.
    fullName String
    The user’s full name.
    id String
    The provider-assigned unique ID for this managed resource.
    imageUrl String
    The URL that points to an image file that is the user’s profile image.
    lastName String
    The user’s last name.
    middleName String
    The user’s middle name.
    mobilePhone String
    The user’s mobile phone number.
    parentEmail String
    The email address of the user’s parent or guardian.
    passwordChangeRequired Boolean
    Indicates that the user’s password needs to be changed during their next login attempt.
    preferredLanguages List<String>
    An array of locale strings that give, in order, the user’s preferred languages.
    tenantId String
    timezone String
    The user’s preferred timezone.
    userId String
    username String
    usernameStatus String
    The current status of the username. This is used if you are moderating usernames via CleanSpeak.
    active boolean
    True if the user is active. False if the user has been deactivated. Deactivated users will not be able to login.
    birthDate string
    An ISO-8601 formatted date of the user’s birthdate such as YYYY-MM-DD.
    data string
    A JSON serialised string that can hold any information about the user.
    email string
    The user’s email address.
    expiry number
    The expiration instant of the user’s account. An expired user is not permitted to login.
    firstName string
    The first name of the user.
    fullName string
    The user’s full name.
    id string
    The provider-assigned unique ID for this managed resource.
    imageUrl string
    The URL that points to an image file that is the user’s profile image.
    lastName string
    The user’s last name.
    middleName string
    The user’s middle name.
    mobilePhone string
    The user’s mobile phone number.
    parentEmail string
    The email address of the user’s parent or guardian.
    passwordChangeRequired boolean
    Indicates that the user’s password needs to be changed during their next login attempt.
    preferredLanguages string[]
    An array of locale strings that give, in order, the user’s preferred languages.
    tenantId string
    timezone string
    The user’s preferred timezone.
    userId string
    username string
    usernameStatus string
    The current status of the username. This is used if you are moderating usernames via CleanSpeak.
    active bool
    True if the user is active. False if the user has been deactivated. Deactivated users will not be able to login.
    birth_date str
    An ISO-8601 formatted date of the user’s birthdate such as YYYY-MM-DD.
    data str
    A JSON serialised string that can hold any information about the user.
    email str
    The user’s email address.
    expiry int
    The expiration instant of the user’s account. An expired user is not permitted to login.
    first_name str
    The first name of the user.
    full_name str
    The user’s full name.
    id str
    The provider-assigned unique ID for this managed resource.
    image_url str
    The URL that points to an image file that is the user’s profile image.
    last_name str
    The user’s last name.
    middle_name str
    The user’s middle name.
    mobile_phone str
    The user’s mobile phone number.
    parent_email str
    The email address of the user’s parent or guardian.
    password_change_required bool
    Indicates that the user’s password needs to be changed during their next login attempt.
    preferred_languages Sequence[str]
    An array of locale strings that give, in order, the user’s preferred languages.
    tenant_id str
    timezone str
    The user’s preferred timezone.
    user_id str
    username str
    username_status str
    The current status of the username. This is used if you are moderating usernames via CleanSpeak.
    active Boolean
    True if the user is active. False if the user has been deactivated. Deactivated users will not be able to login.
    birthDate String
    An ISO-8601 formatted date of the user’s birthdate such as YYYY-MM-DD.
    data String
    A JSON serialised string that can hold any information about the user.
    email String
    The user’s email address.
    expiry Number
    The expiration instant of the user’s account. An expired user is not permitted to login.
    firstName String
    The first name of the user.
    fullName String
    The user’s full name.
    id String
    The provider-assigned unique ID for this managed resource.
    imageUrl String
    The URL that points to an image file that is the user’s profile image.
    lastName String
    The user’s last name.
    middleName String
    The user’s middle name.
    mobilePhone String
    The user’s mobile phone number.
    parentEmail String
    The email address of the user’s parent or guardian.
    passwordChangeRequired Boolean
    Indicates that the user’s password needs to be changed during their next login attempt.
    preferredLanguages List<String>
    An array of locale strings that give, in order, the user’s preferred languages.
    tenantId String
    timezone String
    The user’s preferred timezone.
    userId String
    username String
    usernameStatus String
    The current status of the username. This is used if you are moderating usernames via CleanSpeak.

    Package Details

    Repository
    fusionauth theogravity/pulumi-fusionauth
    License
    MIT
    Notes
    This Pulumi package is based on the fusionauth Terraform Provider.
    fusionauth logo
    FusionAuth v4.0.1 published on Saturday, Sep 30, 2023 by Theo Gravity