1. Packages
  2. AWS
  3. API Docs
  4. elasticache
  5. getUser
AWS v6 v6.83.2 published on Thursday, Nov 20, 2025 by Pulumi
aws-v6 logo
AWS v6 v6.83.2 published on Thursday, Nov 20, 2025 by Pulumi

    Use this data source to get information about an ElastiCache User.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const bar = aws.elasticache.getUser({
        userId: "example",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    bar = aws.elasticache.get_user(user_id="example")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := elasticache.LookupUser(ctx, &elasticache.LookupUserArgs{
    			UserId: "example",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var bar = Aws.ElastiCache.GetUser.Invoke(new()
        {
            UserId = "example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.elasticache.ElasticacheFunctions;
    import com.pulumi.aws.elasticache.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 bar = ElasticacheFunctions.getUser(GetUserArgs.builder()
                .userId("example")
                .build());
    
        }
    }
    
    variables:
      bar:
        fn::invoke:
          function: aws:elasticache:getUser
          arguments:
            userId: example
    

    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(access_string: Optional[str] = None,
                 authentication_modes: Optional[Sequence[GetUserAuthenticationMode]] = None,
                 engine: Optional[str] = None,
                 no_password_required: Optional[bool] = None,
                 passwords: Optional[Sequence[str]] = None,
                 user_id: Optional[str] = None,
                 user_name: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetUserResult
    def get_user_output(access_string: Optional[pulumi.Input[str]] = None,
                 authentication_modes: Optional[pulumi.Input[Sequence[pulumi.Input[GetUserAuthenticationModeArgs]]]] = None,
                 engine: Optional[pulumi.Input[str]] = None,
                 no_password_required: Optional[pulumi.Input[bool]] = None,
                 passwords: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 user_id: Optional[pulumi.Input[str]] = None,
                 user_name: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetUserResult]
    func LookupUser(ctx *Context, args *LookupUserArgs, opts ...InvokeOption) (*LookupUserResult, error)
    func LookupUserOutput(ctx *Context, args *LookupUserOutputArgs, opts ...InvokeOption) LookupUserResultOutput

    > Note: This function is named LookupUser 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)
    public static Output<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
    
    fn::invoke:
      function: aws:elasticache/getUser:getUser
      arguments:
        # arguments dictionary

    The following arguments are supported:

    UserId string
    Identifier for the user.
    AccessString string
    String for what access a user possesses within the associated ElastiCache replication groups or clusters.
    AuthenticationModes List<GetUserAuthenticationMode>
    Engine string
    NoPasswordRequired bool
    Passwords List<string>
    UserName string
    User name of the user.
    UserId string
    Identifier for the user.
    AccessString string
    String for what access a user possesses within the associated ElastiCache replication groups or clusters.
    AuthenticationModes []GetUserAuthenticationMode
    Engine string
    NoPasswordRequired bool
    Passwords []string
    UserName string
    User name of the user.
    userId String
    Identifier for the user.
    accessString String
    String for what access a user possesses within the associated ElastiCache replication groups or clusters.
    authenticationModes List<GetUserAuthenticationMode>
    engine String
    noPasswordRequired Boolean
    passwords List<String>
    userName String
    User name of the user.
    userId string
    Identifier for the user.
    accessString string
    String for what access a user possesses within the associated ElastiCache replication groups or clusters.
    authenticationModes GetUserAuthenticationMode[]
    engine string
    noPasswordRequired boolean
    passwords string[]
    userName string
    User name of the user.
    user_id str
    Identifier for the user.
    access_string str
    String for what access a user possesses within the associated ElastiCache replication groups or clusters.
    authentication_modes Sequence[GetUserAuthenticationMode]
    engine str
    no_password_required bool
    passwords Sequence[str]
    user_name str
    User name of the user.
    userId String
    Identifier for the user.
    accessString String
    String for what access a user possesses within the associated ElastiCache replication groups or clusters.
    authenticationModes List<Property Map>
    engine String
    noPasswordRequired Boolean
    passwords List<String>
    userName String
    User name of the user.

    getUser Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    UserId string
    Identifier for the user.
    AccessString string
    String for what access a user possesses within the associated ElastiCache replication groups or clusters.
    AuthenticationModes List<GetUserAuthenticationMode>
    Engine string
    NoPasswordRequired bool
    Passwords List<string>
    UserName string
    User name of the user.
    Id string
    The provider-assigned unique ID for this managed resource.
    UserId string
    Identifier for the user.
    AccessString string
    String for what access a user possesses within the associated ElastiCache replication groups or clusters.
    AuthenticationModes []GetUserAuthenticationMode
    Engine string
    NoPasswordRequired bool
    Passwords []string
    UserName string
    User name of the user.
    id String
    The provider-assigned unique ID for this managed resource.
    userId String
    Identifier for the user.
    accessString String
    String for what access a user possesses within the associated ElastiCache replication groups or clusters.
    authenticationModes List<GetUserAuthenticationMode>
    engine String
    noPasswordRequired Boolean
    passwords List<String>
    userName String
    User name of the user.
    id string
    The provider-assigned unique ID for this managed resource.
    userId string
    Identifier for the user.
    accessString string
    String for what access a user possesses within the associated ElastiCache replication groups or clusters.
    authenticationModes GetUserAuthenticationMode[]
    engine string
    noPasswordRequired boolean
    passwords string[]
    userName string
    User name of the user.
    id str
    The provider-assigned unique ID for this managed resource.
    user_id str
    Identifier for the user.
    access_string str
    String for what access a user possesses within the associated ElastiCache replication groups or clusters.
    authentication_modes Sequence[GetUserAuthenticationMode]
    engine str
    no_password_required bool
    passwords Sequence[str]
    user_name str
    User name of the user.
    id String
    The provider-assigned unique ID for this managed resource.
    userId String
    Identifier for the user.
    accessString String
    String for what access a user possesses within the associated ElastiCache replication groups or clusters.
    authenticationModes List<Property Map>
    engine String
    noPasswordRequired Boolean
    passwords List<String>
    userName String
    User name of the user.

    Supporting Types

    GetUserAuthenticationMode

    passwordCount Integer
    type String
    passwordCount number
    type string
    passwordCount Number
    type String

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws-v6 logo
    AWS v6 v6.83.2 published on Thursday, Nov 20, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate