class UserBase
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ElastiCache.Alpha.UserBase |
Go | github.com/aws/aws-cdk-go/awscdkelasticachealpha/v2#UserBase |
Java | software.amazon.awscdk.services.elasticache.alpha.UserBase |
Python | aws_cdk.aws_elasticache_alpha.UserBase |
TypeScript (source) | @aws-cdk/aws-elasticache-alpha ยป UserBase |
Implements
IConstruct, IDependable, IResource, IEnvironment, IUser
Extends
Resource
Implemented by
Iam, No, Password
Base class for ElastiCache users.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as elasticache_alpha from '@aws-cdk/aws-elasticache-alpha';
const userBase = elasticache_alpha.UserBase.fromUserArn(this, 'MyUserBase', 'userArn');
Initializer
new UserBase(scope: Construct, id: string, props?: ResourceProps)
Parameters
- scope
Construct - id
string - props
ResourceProps
Properties
| Name | Type | Description |
|---|---|---|
| env | Resource | The environment this resource belongs to. |
| node | Node | The tree node. |
| stack | Stack | The stack in which this resource is defined. |
| user | string | The user's ARN. |
| user | string | The user's ID. |
| engine? | User | The engine for the user. |
| user | string | The user's name. |
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
node
Type:
Node
The tree node.
stack
Type:
Stack
The stack in which this resource is defined.
userArn
Type:
string
The user's ARN.
userId
Type:
string
The user's ID.
engine?
Type:
User
(optional)
The engine for the user.
userName?
Type:
string
(optional)
The user's name.
Methods
| Name | Description |
|---|---|
| apply | Apply the given removal policy to this resource. |
| to | Returns a string representation of this construct. |
| static from | Import an existing user by ARN. |
| static from | Import an existing user using attributes. |
| static from | Import an existing user by ID. |
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
RemovalPolicy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN).
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.
static fromUserArn(scope, id, userArn)
public static fromUserArn(scope: Construct, id: string, userArn: string): IUser
Parameters
- scope
Constructโ The parent creating construct (usuallythis). - id
stringโ The construct's name. - userArn
stringโ The ARN of the existing user.
Returns
Import an existing user by ARN.
static fromUserAttributes(scope, id, attrs)
public static fromUserAttributes(scope: Construct, id: string, attrs: UserBaseAttributes): IUser
Parameters
- scope
Constructโ The parent creating construct (usuallythis). - id
stringโ The construct's name. - attrs
Userโ ABase Attributes UserBaseAttributesobject.
Returns
Import an existing user using attributes.
static fromUserId(scope, id, userId)
public static fromUserId(scope: Construct, id: string, userId: string): IUser
Parameters
- scope
Constructโ The parent creating construct (usuallythis). - id
stringโ The construct's name. - userId
stringโ The ID of the existing user.
Returns
Import an existing user by ID.

.NET
Go
Java
Python
TypeScript (