class UserBase
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.ElastiCache.Alpha.UserBase |
![]() | github.com/aws/aws-cdk-go/awscdkelasticachealpha/v2#UserBase |
![]() | software.amazon.awscdk.services.elasticache.alpha.UserBase |
![]() | aws_cdk.aws_elasticache_alpha.UserBase |
![]() | @aws-cdk/aws-elasticache-alpha ยป UserBase |
Implements
IConstruct
, IDependable
, IResource
, 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
Resource
Props
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 by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that 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
Removal
Policy
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 UserBaseAttributes
object.
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.