UserArgs

data class UserArgs(val accessString: Output<String>? = null, val authenticationMode: Output<UserAuthenticationModeArgs>? = null, val engine: Output<String>? = null, val noPasswordRequired: Output<Boolean>? = null, val passwords: Output<List<String>>? = null, val tags: Output<Map<String, String>>? = null, val userId: Output<String>? = null, val userName: Output<String>? = null) : ConvertibleToJava<UserArgs>

Provides an ElastiCache user resource.

Note: All arguments including the username and passwords will be stored in the raw state as plain-text.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.elasticache.User("test", {
userId: "testUserId",
userName: "testUserName",
accessString: "on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember",
engine: "redis",
passwords: ["password123456789"],
});
import pulumi
import pulumi_aws as aws
test = aws.elasticache.User("test",
user_id="testUserId",
user_name="testUserName",
access_string="on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember",
engine="redis",
passwords=["password123456789"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var test = new Aws.ElastiCache.User("test", new()
{
UserId = "testUserId",
UserName = "testUserName",
AccessString = "on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember",
Engine = "redis",
Passwords = new[]
{
"password123456789",
},
});
});
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.NewUser(ctx, "test", &elasticache.UserArgs{
UserId: pulumi.String("testUserId"),
UserName: pulumi.String("testUserName"),
AccessString: pulumi.String("on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember"),
Engine: pulumi.String("redis"),
Passwords: pulumi.StringArray{
pulumi.String("password123456789"),
},
})
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.aws.elasticache.User;
import com.pulumi.aws.elasticache.UserArgs;
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) {
var test = new User("test", UserArgs.builder()
.userId("testUserId")
.userName("testUserName")
.accessString("on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember")
.engine("redis")
.passwords("password123456789")
.build());
}
}
resources:
test:
type: aws:elasticache:User
properties:
userId: testUserId
userName: testUserName
accessString: on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember
engine: redis
passwords:
- password123456789
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.elasticache.User("test", {
userId: "testUserId",
userName: "testUserName",
accessString: "on ~* +@all",
engine: "redis",
authenticationMode: {
type: "iam",
},
});
import pulumi
import pulumi_aws as aws
test = aws.elasticache.User("test",
user_id="testUserId",
user_name="testUserName",
access_string="on ~* +@all",
engine="redis",
authentication_mode={
"type": "iam",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var test = new Aws.ElastiCache.User("test", new()
{
UserId = "testUserId",
UserName = "testUserName",
AccessString = "on ~* +@all",
Engine = "redis",
AuthenticationMode = new Aws.ElastiCache.Inputs.UserAuthenticationModeArgs
{
Type = "iam",
},
});
});
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.NewUser(ctx, "test", &elasticache.UserArgs{
UserId: pulumi.String("testUserId"),
UserName: pulumi.String("testUserName"),
AccessString: pulumi.String("on ~* +@all"),
Engine: pulumi.String("redis"),
AuthenticationMode: &elasticache.UserAuthenticationModeArgs{
Type: pulumi.String("iam"),
},
})
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.aws.elasticache.User;
import com.pulumi.aws.elasticache.UserArgs;
import com.pulumi.aws.elasticache.inputs.UserAuthenticationModeArgs;
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) {
var test = new User("test", UserArgs.builder()
.userId("testUserId")
.userName("testUserName")
.accessString("on ~* +@all")
.engine("redis")
.authenticationMode(UserAuthenticationModeArgs.builder()
.type("iam")
.build())
.build());
}
}
resources:
test:
type: aws:elasticache:User
properties:
userId: testUserId
userName: testUserName
accessString: on ~* +@all
engine: redis
authenticationMode:
type: iam
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.elasticache.User("test", {
userId: "testUserId",
userName: "testUserName",
accessString: "on ~* +@all",
engine: "redis",
authenticationMode: {
type: "password",
passwords: [
"password1",
"password2",
],
},
});
import pulumi
import pulumi_aws as aws
test = aws.elasticache.User("test",
user_id="testUserId",
user_name="testUserName",
access_string="on ~* +@all",
engine="redis",
authentication_mode={
"type": "password",
"passwords": [
"password1",
"password2",
],
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var test = new Aws.ElastiCache.User("test", new()
{
UserId = "testUserId",
UserName = "testUserName",
AccessString = "on ~* +@all",
Engine = "redis",
AuthenticationMode = new Aws.ElastiCache.Inputs.UserAuthenticationModeArgs
{
Type = "password",
Passwords = new[]
{
"password1",
"password2",
},
},
});
});
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.NewUser(ctx, "test", &elasticache.UserArgs{
UserId: pulumi.String("testUserId"),
UserName: pulumi.String("testUserName"),
AccessString: pulumi.String("on ~* +@all"),
Engine: pulumi.String("redis"),
AuthenticationMode: &elasticache.UserAuthenticationModeArgs{
Type: pulumi.String("password"),
Passwords: pulumi.StringArray{
pulumi.String("password1"),
pulumi.String("password2"),
},
},
})
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.aws.elasticache.User;
import com.pulumi.aws.elasticache.UserArgs;
import com.pulumi.aws.elasticache.inputs.UserAuthenticationModeArgs;
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) {
var test = new User("test", UserArgs.builder()
.userId("testUserId")
.userName("testUserName")
.accessString("on ~* +@all")
.engine("redis")
.authenticationMode(UserAuthenticationModeArgs.builder()
.type("password")
.passwords(
"password1",
"password2")
.build())
.build());
}
}
resources:
test:
type: aws:elasticache:User
properties:
userId: testUserId
userName: testUserName
accessString: on ~* +@all
engine: redis
authenticationMode:
type: password
passwords:
- password1
- password2

Import

Using pulumi import, import ElastiCache users using the user_id. For example:

$ pulumi import aws:elasticache/user:User my_user userId1

Constructors

Link copied to clipboard
constructor(accessString: Output<String>? = null, authenticationMode: Output<UserAuthenticationModeArgs>? = null, engine: Output<String>? = null, noPasswordRequired: Output<Boolean>? = null, passwords: Output<List<String>>? = null, tags: Output<Map<String, String>>? = null, userId: Output<String>? = null, userName: Output<String>? = null)

Properties

Link copied to clipboard
val accessString: Output<String>? = null

Access permissions string used for this user. See Specifying Permissions Using an Access String for more details.

Link copied to clipboard

Denotes the user's authentication properties. Detailed below.

Link copied to clipboard
val engine: Output<String>? = null

The current supported values are redis, valkey (case insensitive).

Link copied to clipboard
val noPasswordRequired: Output<Boolean>? = null

Indicates a password is not required for this user.

Link copied to clipboard
val passwords: Output<List<String>>? = null

Passwords used for this user. You can create up to two passwords for each user.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A list of tags to be added to this resource. A tag is a key-value pair.

Link copied to clipboard
val userId: Output<String>? = null

The ID of the user.

Link copied to clipboard
val userName: Output<String>? = null

The username of the user. The following arguments are optional:

Functions

Link copied to clipboard
open override fun toJava(): UserArgs