aws.memorydb.User
Explore with Pulumi AI
Provides a MemoryDB User.
More information about users and ACL-s can be found in the MemoryDB User Guide.
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";
import * as random from "@pulumi/random";
const example = new random.index.Password("example", {length: 16});
const exampleUser = new aws.memorydb.User("example", {
userName: "my-user",
accessString: "on ~* &* +@all",
authenticationMode: {
type: "password",
passwords: [example.result],
},
});
import pulumi
import pulumi_aws as aws
import pulumi_random as random
example = random.index.Password("example", length=16)
example_user = aws.memorydb.User("example",
user_name="my-user",
access_string="on ~* &* +@all",
authentication_mode={
"type": "password",
"passwords": [example["result"]],
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/memorydb"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := random.NewPassword(ctx, "example", &random.PasswordArgs{
Length: 16,
})
if err != nil {
return err
}
_, err = memorydb.NewUser(ctx, "example", &memorydb.UserArgs{
UserName: pulumi.String("my-user"),
AccessString: pulumi.String("on ~* &* +@all"),
AuthenticationMode: &memorydb.UserAuthenticationModeArgs{
Type: pulumi.String("password"),
Passwords: pulumi.StringArray{
example.Result,
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var example = new Random.Index.Password("example", new()
{
Length = 16,
});
var exampleUser = new Aws.MemoryDb.User("example", new()
{
UserName = "my-user",
AccessString = "on ~* &* +@all",
AuthenticationMode = new Aws.MemoryDb.Inputs.UserAuthenticationModeArgs
{
Type = "password",
Passwords = new[]
{
example.Result,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.password;
import com.pulumi.random.PasswordArgs;
import com.pulumi.aws.memorydb.User;
import com.pulumi.aws.memorydb.UserArgs;
import com.pulumi.aws.memorydb.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 example = new Password("example", PasswordArgs.builder()
.length(16)
.build());
var exampleUser = new User("exampleUser", UserArgs.builder()
.userName("my-user")
.accessString("on ~* &* +@all")
.authenticationMode(UserAuthenticationModeArgs.builder()
.type("password")
.passwords(example.result())
.build())
.build());
}
}
resources:
example:
type: random:password
properties:
length: 16
exampleUser:
type: aws:memorydb:User
name: example
properties:
userName: my-user
accessString: on ~* &* +@all
authenticationMode:
type: password
passwords:
- ${example.result}
Create User Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new User(name: string, args: UserArgs, opts?: CustomResourceOptions);
@overload
def User(resource_name: str,
args: UserArgs,
opts: Optional[ResourceOptions] = None)
@overload
def User(resource_name: str,
opts: Optional[ResourceOptions] = None,
access_string: Optional[str] = None,
authentication_mode: Optional[UserAuthenticationModeArgs] = None,
user_name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
func NewUser(ctx *Context, name string, args UserArgs, opts ...ResourceOption) (*User, error)
public User(string name, UserArgs args, CustomResourceOptions? opts = null)
type: aws:memorydb:User
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var exampleuserResourceResourceFromMemorydbuser = new Aws.MemoryDb.User("exampleuserResourceResourceFromMemorydbuser", new()
{
AccessString = "string",
AuthenticationMode = new Aws.MemoryDb.Inputs.UserAuthenticationModeArgs
{
Type = "string",
PasswordCount = 0,
Passwords = new[]
{
"string",
},
},
UserName = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := memorydb.NewUser(ctx, "exampleuserResourceResourceFromMemorydbuser", &memorydb.UserArgs{
AccessString: pulumi.String("string"),
AuthenticationMode: &memorydb.UserAuthenticationModeArgs{
Type: pulumi.String("string"),
PasswordCount: pulumi.Int(0),
Passwords: pulumi.StringArray{
pulumi.String("string"),
},
},
UserName: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var exampleuserResourceResourceFromMemorydbuser = new User("exampleuserResourceResourceFromMemorydbuser", UserArgs.builder()
.accessString("string")
.authenticationMode(UserAuthenticationModeArgs.builder()
.type("string")
.passwordCount(0)
.passwords("string")
.build())
.userName("string")
.tags(Map.of("string", "string"))
.build());
exampleuser_resource_resource_from_memorydbuser = aws.memorydb.User("exampleuserResourceResourceFromMemorydbuser",
access_string="string",
authentication_mode={
"type": "string",
"password_count": 0,
"passwords": ["string"],
},
user_name="string",
tags={
"string": "string",
})
const exampleuserResourceResourceFromMemorydbuser = new aws.memorydb.User("exampleuserResourceResourceFromMemorydbuser", {
accessString: "string",
authenticationMode: {
type: "string",
passwordCount: 0,
passwords: ["string"],
},
userName: "string",
tags: {
string: "string",
},
});
type: aws:memorydb:User
properties:
accessString: string
authenticationMode:
passwordCount: 0
passwords:
- string
type: string
tags:
string: string
userName: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The User resource accepts the following input properties:
- Access
String string - Access permissions string used for this user.
- Authentication
Mode UserAuthentication Mode - Denotes the user's authentication properties. Detailed below.
- User
Name string Name of the MemoryDB user. Up to 40 characters.
The following arguments are optional:
- Dictionary<string, string>
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- Access
String string - Access permissions string used for this user.
- Authentication
Mode UserAuthentication Mode Args - Denotes the user's authentication properties. Detailed below.
- User
Name string Name of the MemoryDB user. Up to 40 characters.
The following arguments are optional:
- map[string]string
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- access
String String - Access permissions string used for this user.
- authentication
Mode UserAuthentication Mode - Denotes the user's authentication properties. Detailed below.
- user
Name String Name of the MemoryDB user. Up to 40 characters.
The following arguments are optional:
- Map<String,String>
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- access
String string - Access permissions string used for this user.
- authentication
Mode UserAuthentication Mode - Denotes the user's authentication properties. Detailed below.
- user
Name string Name of the MemoryDB user. Up to 40 characters.
The following arguments are optional:
- {[key: string]: string}
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- access_
string str - Access permissions string used for this user.
- authentication_
mode UserAuthentication Mode Args - Denotes the user's authentication properties. Detailed below.
- user_
name str Name of the MemoryDB user. Up to 40 characters.
The following arguments are optional:
- Mapping[str, str]
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- access
String String - Access permissions string used for this user.
- authentication
Mode Property Map - Denotes the user's authentication properties. Detailed below.
- user
Name String Name of the MemoryDB user. Up to 40 characters.
The following arguments are optional:
- Map<String>
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Outputs
All input properties are implicitly available as output properties. Additionally, the User resource produces the following output properties:
- Arn string
- ARN of the user.
- Id string
- The provider-assigned unique ID for this managed resource.
- Minimum
Engine stringVersion - Minimum engine version supported for the user.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- ARN of the user.
- Id string
- The provider-assigned unique ID for this managed resource.
- Minimum
Engine stringVersion - Minimum engine version supported for the user.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- ARN of the user.
- id String
- The provider-assigned unique ID for this managed resource.
- minimum
Engine StringVersion - Minimum engine version supported for the user.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- ARN of the user.
- id string
- The provider-assigned unique ID for this managed resource.
- minimum
Engine stringVersion - Minimum engine version supported for the user.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn str
- ARN of the user.
- id str
- The provider-assigned unique ID for this managed resource.
- minimum_
engine_ strversion - Minimum engine version supported for the user.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- ARN of the user.
- id String
- The provider-assigned unique ID for this managed resource.
- minimum
Engine StringVersion - Minimum engine version supported for the user.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
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,
authentication_mode: Optional[UserAuthenticationModeArgs] = None,
minimum_engine_version: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, 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.
- Access
String string - Access permissions string used for this user.
- Arn string
- ARN of the user.
- Authentication
Mode UserAuthentication Mode - Denotes the user's authentication properties. Detailed below.
- Minimum
Engine stringVersion - Minimum engine version supported for the user.
- Dictionary<string, string>
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - User
Name string Name of the MemoryDB user. Up to 40 characters.
The following arguments are optional:
- Access
String string - Access permissions string used for this user.
- Arn string
- ARN of the user.
- Authentication
Mode UserAuthentication Mode Args - Denotes the user's authentication properties. Detailed below.
- Minimum
Engine stringVersion - Minimum engine version supported for the user.
- map[string]string
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - User
Name string Name of the MemoryDB user. Up to 40 characters.
The following arguments are optional:
- access
String String - Access permissions string used for this user.
- arn String
- ARN of the user.
- authentication
Mode UserAuthentication Mode - Denotes the user's authentication properties. Detailed below.
- minimum
Engine StringVersion - Minimum engine version supported for the user.
- Map<String,String>
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - user
Name String Name of the MemoryDB user. Up to 40 characters.
The following arguments are optional:
- access
String string - Access permissions string used for this user.
- arn string
- ARN of the user.
- authentication
Mode UserAuthentication Mode - Denotes the user's authentication properties. Detailed below.
- minimum
Engine stringVersion - Minimum engine version supported for the user.
- {[key: string]: string}
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - user
Name string Name of the MemoryDB user. Up to 40 characters.
The following arguments are optional:
- access_
string str - Access permissions string used for this user.
- arn str
- ARN of the user.
- authentication_
mode UserAuthentication Mode Args - Denotes the user's authentication properties. Detailed below.
- minimum_
engine_ strversion - Minimum engine version supported for the user.
- Mapping[str, str]
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - user_
name str Name of the MemoryDB user. Up to 40 characters.
The following arguments are optional:
- access
String String - Access permissions string used for this user.
- arn String
- ARN of the user.
- authentication
Mode Property Map - Denotes the user's authentication properties. Detailed below.
- minimum
Engine StringVersion - Minimum engine version supported for the user.
- Map<String>
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - user
Name String Name of the MemoryDB user. Up to 40 characters.
The following arguments are optional:
Supporting Types
UserAuthenticationMode, UserAuthenticationModeArgs
- Type string
- Specifies the authentication type. Valid values are:
password
oriam
. - Password
Count int - Number of passwords belonging to the user if
type
is set topassword
. - Passwords List<string>
- Set of passwords used for authentication if
type
is set topassword
. You can create up to two passwords for each user.
- Type string
- Specifies the authentication type. Valid values are:
password
oriam
. - Password
Count int - Number of passwords belonging to the user if
type
is set topassword
. - Passwords []string
- Set of passwords used for authentication if
type
is set topassword
. You can create up to two passwords for each user.
- type String
- Specifies the authentication type. Valid values are:
password
oriam
. - password
Count Integer - Number of passwords belonging to the user if
type
is set topassword
. - passwords List<String>
- Set of passwords used for authentication if
type
is set topassword
. You can create up to two passwords for each user.
- type string
- Specifies the authentication type. Valid values are:
password
oriam
. - password
Count number - Number of passwords belonging to the user if
type
is set topassword
. - passwords string[]
- Set of passwords used for authentication if
type
is set topassword
. You can create up to two passwords for each user.
- type str
- Specifies the authentication type. Valid values are:
password
oriam
. - password_
count int - Number of passwords belonging to the user if
type
is set topassword
. - passwords Sequence[str]
- Set of passwords used for authentication if
type
is set topassword
. You can create up to two passwords for each user.
- type String
- Specifies the authentication type. Valid values are:
password
oriam
. - password
Count Number - Number of passwords belonging to the user if
type
is set topassword
. - passwords List<String>
- Set of passwords used for authentication if
type
is set topassword
. You can create up to two passwords for each user.
Import
Using pulumi import
, import a user using the user_name
. For example:
$ pulumi import aws:memorydb/user:User example my-user
The passwords
are not available for imported resources, as this information cannot be read back from the MemoryDB API.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.