aws logo
AWS Classic v5.29.0, Feb 1 23

aws.elasticache.User

Provides an ElastiCache user resource.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var test = new Aws.ElastiCache.User("test", new()
    {
        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",
        },
        UserId = "testUserId",
        UserName = "testUserName",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/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{
			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"),
			},
			UserId:   pulumi.String("testUserId"),
			UserName: pulumi.String("testUserName"),
		})
		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()        
            .accessString("on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember")
            .engine("REDIS")
            .passwords("password123456789")
            .userId("testUserId")
            .userName("testUserName")
            .build());

    }
}
import pulumi
import pulumi_aws as aws

test = aws.elasticache.User("test",
    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"],
    user_id="testUserId",
    user_name="testUserName")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const test = new aws.elasticache.User("test", {
    accessString: "on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember",
    engine: "REDIS",
    passwords: ["password123456789"],
    userId: "testUserId",
    userName: "testUserName",
});
resources:
  test:
    type: aws:elasticache:User
    properties:
      accessString: on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember
      engine: REDIS
      passwords:
        - password123456789
      userId: testUserId
      userName: testUserName

Create User Resource

new User(name: string, args: UserArgs, opts?: CustomResourceOptions);
@overload
def User(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         access_string: Optional[str] = None,
         arn: Optional[str] = None,
         engine: Optional[str] = None,
         no_password_required: Optional[bool] = None,
         passwords: Optional[Sequence[str]] = None,
         tags: Optional[Mapping[str, str]] = None,
         user_id: Optional[str] = None,
         user_name: Optional[str] = None)
@overload
def User(resource_name: str,
         args: UserArgs,
         opts: Optional[ResourceOptions] = None)
func NewUser(ctx *Context, name string, args UserArgs, opts ...ResourceOption) (*User, error)
public User(string name, UserArgs args, CustomResourceOptions? opts = null)
public User(String name, UserArgs args)
public User(String name, UserArgs args, CustomResourceOptions options)
type: aws:elasticache:User
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args UserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args UserArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args UserArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args UserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args UserArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

User Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The User resource accepts the following input properties:

AccessString string

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

Engine string

The current supported value is REDIS.

UserId string

The ID of the user.

UserName string

The username of the user.

Arn string

The ARN of the created ElastiCache User.

NoPasswordRequired bool

Indicates a password is not required for this user.

Passwords List<string>

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

Tags Dictionary<string, string>

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

AccessString string

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

Engine string

The current supported value is REDIS.

UserId string

The ID of the user.

UserName string

The username of the user.

Arn string

The ARN of the created ElastiCache User.

NoPasswordRequired bool

Indicates a password is not required for this user.

Passwords []string

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

Tags map[string]string

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

accessString String

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

engine String

The current supported value is REDIS.

userId String

The ID of the user.

userName String

The username of the user.

arn String

The ARN of the created ElastiCache User.

noPasswordRequired Boolean

Indicates a password is not required for this user.

passwords List<String>

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

tags Map<String,String>

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

accessString string

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

engine string

The current supported value is REDIS.

userId string

The ID of the user.

userName string

The username of the user.

arn string

The ARN of the created ElastiCache User.

noPasswordRequired boolean

Indicates a password is not required for this user.

passwords string[]

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

tags {[key: string]: string}

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

access_string str

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

engine str

The current supported value is REDIS.

user_id str

The ID of the user.

user_name str

The username of the user.

arn str

The ARN of the created ElastiCache User.

no_password_required bool

Indicates a password is not required for this user.

passwords Sequence[str]

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

tags Mapping[str, str]

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

accessString String

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

engine String

The current supported value is REDIS.

userId String

The ID of the user.

userName String

The username of the user.

arn String

The ARN of the created ElastiCache User.

noPasswordRequired Boolean

Indicates a password is not required for this user.

passwords List<String>

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

tags Map<String>

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

Outputs

All input properties are implicitly available as output properties. Additionally, the User resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

TagsAll Dictionary<string, string>
Id string

The provider-assigned unique ID for this managed resource.

TagsAll map[string]string
id String

The provider-assigned unique ID for this managed resource.

tagsAll Map<String,String>
id string

The provider-assigned unique ID for this managed resource.

tagsAll {[key: string]: string}
id str

The provider-assigned unique ID for this managed resource.

tags_all Mapping[str, str]
id String

The provider-assigned unique ID for this managed resource.

tagsAll Map<String>

Look up Existing User Resource

Get an existing User resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: UserState, opts?: CustomResourceOptions): User
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access_string: Optional[str] = None,
        arn: Optional[str] = None,
        engine: Optional[str] = None,
        no_password_required: Optional[bool] = None,
        passwords: Optional[Sequence[str]] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        user_id: Optional[str] = None,
        user_name: Optional[str] = None) -> User
func GetUser(ctx *Context, name string, id IDInput, state *UserState, opts ...ResourceOption) (*User, error)
public static User Get(string name, Input<string> id, UserState? state, CustomResourceOptions? opts = null)
public static User get(String name, Output<String> id, UserState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AccessString string

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

Arn string

The ARN of the created ElastiCache User.

Engine string

The current supported value is REDIS.

NoPasswordRequired bool

Indicates a password is not required for this user.

Passwords List<string>

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

Tags Dictionary<string, string>

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

TagsAll Dictionary<string, string>
UserId string

The ID of the user.

UserName string

The username of the user.

AccessString string

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

Arn string

The ARN of the created ElastiCache User.

Engine string

The current supported value is REDIS.

NoPasswordRequired bool

Indicates a password is not required for this user.

Passwords []string

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

Tags map[string]string

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

TagsAll map[string]string
UserId string

The ID of the user.

UserName string

The username of the user.

accessString String

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

arn String

The ARN of the created ElastiCache User.

engine String

The current supported value is REDIS.

noPasswordRequired Boolean

Indicates a password is not required for this user.

passwords List<String>

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

tags Map<String,String>

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

tagsAll Map<String,String>
userId String

The ID of the user.

userName String

The username of the user.

accessString string

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

arn string

The ARN of the created ElastiCache User.

engine string

The current supported value is REDIS.

noPasswordRequired boolean

Indicates a password is not required for this user.

passwords string[]

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

tags {[key: string]: string}

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

tagsAll {[key: string]: string}
userId string

The ID of the user.

userName string

The username of the user.

access_string str

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

arn str

The ARN of the created ElastiCache User.

engine str

The current supported value is REDIS.

no_password_required bool

Indicates a password is not required for this user.

passwords Sequence[str]

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

tags Mapping[str, str]

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

tags_all Mapping[str, str]
user_id str

The ID of the user.

user_name str

The username of the user.

accessString String

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

arn String

The ARN of the created ElastiCache User.

engine String

The current supported value is REDIS.

noPasswordRequired Boolean

Indicates a password is not required for this user.

passwords List<String>

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

tags Map<String>

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

tagsAll Map<String>
userId String

The ID of the user.

userName String

The username of the user.

Import

ElastiCache users can be imported using the user_id, e.g.,

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

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.