AWS v6.77.1 published on Friday, Apr 18, 2025 by Pulumi
aws.elasticache.getUser
Explore with Pulumi AI
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 dictionaryThe following arguments are supported:
- User
Id string - Identifier for the user.
 - Access
String string - String for what access a user possesses within the associated ElastiCache replication groups or clusters.
 - Authentication
Modes List<GetUser Authentication Mode>  - Engine string
 - No
Password boolRequired  - Passwords List<string>
 - User
Name string - User name of the user.
 
- User
Id string - Identifier for the user.
 - Access
String string - String for what access a user possesses within the associated ElastiCache replication groups or clusters.
 - Authentication
Modes []GetUser Authentication Mode  - Engine string
 - No
Password boolRequired  - Passwords []string
 - User
Name string - User name of the user.
 
- user
Id String - Identifier for the user.
 - access
String String - String for what access a user possesses within the associated ElastiCache replication groups or clusters.
 - authentication
Modes List<GetUser Authentication Mode>  - engine String
 - no
Password BooleanRequired  - passwords List<String>
 - user
Name String - User name of the user.
 
- user
Id string - Identifier for the user.
 - access
String string - String for what access a user possesses within the associated ElastiCache replication groups or clusters.
 - authentication
Modes GetUser Authentication Mode[]  - engine string
 - no
Password booleanRequired  - passwords string[]
 - user
Name 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[GetUser Authentication Mode]  - engine str
 - no_
password_ boolrequired  - passwords Sequence[str]
 - user_
name str - User name of the user.
 
- user
Id String - Identifier for the user.
 - access
String String - String for what access a user possesses within the associated ElastiCache replication groups or clusters.
 - authentication
Modes List<Property Map> - engine String
 - no
Password BooleanRequired  - passwords List<String>
 - user
Name 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.
 - User
Id string - Identifier for the user.
 - Access
String string - String for what access a user possesses within the associated ElastiCache replication groups or clusters.
 - Authentication
Modes List<GetUser Authentication Mode>  - Engine string
 - No
Password boolRequired  - Passwords List<string>
 - User
Name string - User name of the user.
 
- Id string
 - The provider-assigned unique ID for this managed resource.
 - User
Id string - Identifier for the user.
 - Access
String string - String for what access a user possesses within the associated ElastiCache replication groups or clusters.
 - Authentication
Modes []GetUser Authentication Mode  - Engine string
 - No
Password boolRequired  - Passwords []string
 - User
Name string - User name of the user.
 
- id String
 - The provider-assigned unique ID for this managed resource.
 - user
Id String - Identifier for the user.
 - access
String String - String for what access a user possesses within the associated ElastiCache replication groups or clusters.
 - authentication
Modes List<GetUser Authentication Mode>  - engine String
 - no
Password BooleanRequired  - passwords List<String>
 - user
Name String - User name of the user.
 
- id string
 - The provider-assigned unique ID for this managed resource.
 - user
Id string - Identifier for the user.
 - access
String string - String for what access a user possesses within the associated ElastiCache replication groups or clusters.
 - authentication
Modes GetUser Authentication Mode[]  - engine string
 - no
Password booleanRequired  - passwords string[]
 - user
Name 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[GetUser Authentication Mode]  - engine str
 - no_
password_ boolrequired  - passwords Sequence[str]
 - user_
name str - User name of the user.
 
- id String
 - The provider-assigned unique ID for this managed resource.
 - user
Id String - Identifier for the user.
 - access
String String - String for what access a user possesses within the associated ElastiCache replication groups or clusters.
 - authentication
Modes List<Property Map> - engine String
 - no
Password BooleanRequired  - passwords List<String>
 - user
Name String - User name of the user.
 
Supporting Types
GetUserAuthenticationMode   
- Password
Count int - Type string
 
- Password
Count int - Type string
 
- password
Count Integer - type String
 
- password
Count number - type string
 
- password_
count int - type str
 
- password
Count Number - type String
 
Package Details
- Repository
 - AWS Classic pulumi/pulumi-aws
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
awsTerraform Provider.