- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
CreateUserCommand
Creates a MemoryDB user. For more information, see Authenticating users with Access Contol Lists (ACLs) .
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { MemoryDBClient, CreateUserCommand } from "@aws-sdk/client-memorydb"; // ES Modules import
// const { MemoryDBClient, CreateUserCommand } = require("@aws-sdk/client-memorydb"); // CommonJS import
const client = new MemoryDBClient(config);
const input = { // CreateUserRequest
UserName: "STRING_VALUE", // required
AuthenticationMode: { // AuthenticationMode
Type: "password" || "iam",
Passwords: [ // PasswordListInput
"STRING_VALUE",
],
},
AccessString: "STRING_VALUE", // required
Tags: [ // TagList
{ // Tag
Key: "STRING_VALUE",
Value: "STRING_VALUE",
},
],
};
const command = new CreateUserCommand(input);
const response = await client.send(command);
// { // CreateUserResponse
// User: { // User
// Name: "STRING_VALUE",
// Status: "STRING_VALUE",
// AccessString: "STRING_VALUE",
// ACLNames: [ // ACLNameList
// "STRING_VALUE",
// ],
// MinimumEngineVersion: "STRING_VALUE",
// Authentication: { // Authentication
// Type: "password" || "no-password" || "iam",
// PasswordCount: Number("int"),
// },
// ARN: "STRING_VALUE",
// },
// };
CreateUserCommand Input
See CreateUserCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
AccessString Required | string | undefined | Access permissions string used for this user. |
AuthenticationMode Required | AuthenticationMode | undefined | Denotes the user's authentication properties, such as whether it requires a password to authenticate. |
UserName Required | string | undefined | The name of the user. This value must be unique as it also serves as the user identifier. |
Tags | Tag[] | undefined | A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag value, although null is accepted. |
CreateUserCommand Output
See CreateUserCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
User | User | undefined | The newly-created user. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
DuplicateUserNameFault | client | |
InvalidParameterCombinationException | client | |
InvalidParameterValueException | client | |
TagQuotaPerResourceExceeded | client | |
UserAlreadyExistsFault | client | |
UserQuotaExceededFault | client | |
MemoryDBServiceException | Base exception class for all service exceptions from MemoryDB service. |