Experimental
@aws-cdk/aws-elasticache-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
ServerlessCacheAttributes Struct
Attributes that can be specified when importing a ServerlessCache.
| Stability | Experimental |
|---|---|
| Source | lib/serverless-cache.ts |
Example
ts
declare const securityGroup: ec2.SecurityGroup;
const importedServerlessCache = elasticache.ServerlessCache.fromServerlessCacheAttributes(this, 'ImportedServerlessCache', {
serverlessCacheName: 'my-serverless-cache',
securityGroups: [securityGroup],
});
python
# security_group: ec2.SecurityGroup
imported_serverless_cache = elasticache.ServerlessCache.from_serverless_cache_attributes(self, "ImportedServerlessCache",
serverless_cache_name="my-serverless-cache",
security_groups=[security_group]
)
java
SecurityGroup securityGroup;
IServerlessCache importedServerlessCache = ServerlessCache.fromServerlessCacheAttributes(this, "ImportedServerlessCache", ServerlessCacheAttributes.builder()
.serverlessCacheName("my-serverless-cache")
.securityGroups(List.of(securityGroup))
.build());
csharp
// Install: dotnet add package Amazon.CDK.AWS.ElastiCache.Alpha
SecurityGroup securityGroup;
var importedServerlessCache = ServerlessCache.FromServerlessCacheAttributes(this, "ImportedServerlessCache", new ServerlessCacheAttributes {
ServerlessCacheName = "my-serverless-cache",
SecurityGroups = new [] { securityGroup }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdkelasticachealpha/v2
var securityGroup SecurityGroup
importedServerlessCache := elasticache.ServerlessCache_FromServerlessCacheAttributes(this, jsii.String("ImportedServerlessCache"), &ServerlessCacheAttributes{
ServerlessCacheName: jsii.String("my-serverless-cache"),
SecurityGroups: []ISecurityGroup{
securityGroup,
},
})
Properties
backupArnsToRestoreoptionalstring[]backup_arns_to_restoreoptionaltyping.List[str]backupArnsToRestoreoptionalList<String>BackupArnsToRestoreoptionalstring[]BackupArnsToRestoreoptional*[]*string #The ARNs of backups restored in the cache.
Default: backups are unknown
engineoptionalCacheEngineengineoptionalCacheEngineengineoptionalCacheEngineEngineoptionalCacheEngineEngineoptionalCacheEngine #The cache engine used by this cache.
Default: engine type is unknown
The KMS key used for encryption.
Default: encryption key is unknown
securityGroupsoptionalISecurityGroup[]security_groupsoptionaltyping.List[ISecurityGroup]securityGroupsoptionalList<ISecurityGroup>SecurityGroupsoptionalISecurityGroup[]SecurityGroupsoptional*[]ISecurityGroup #The security groups associated with this cache.
Default: security groups are unknown
serverlessCacheArnoptionalstringserverless_cache_arnoptionalstrserverlessCacheArnoptionalStringServerlessCacheArnoptionalstringServerlessCacheArnoptional*string #The ARN of the serverless cache.
Default: derived from serverlessCacheName
One of serverlessCacheName or serverlessCacheArn is required.
serverlessCacheNameoptionalstringserverless_cache_nameoptionalstrserverlessCacheNameoptionalStringServerlessCacheNameoptionalstringServerlessCacheNameoptional*string #The name of the serverless cache.
Default: derived from serverlessCacheArn
One of serverlessCacheName or serverlessCacheArn is required.
subnetsoptionalISubnet[]subnetsoptionaltyping.List[ISubnet]subnetsoptionalList<ISubnet>SubnetsoptionalISubnet[]Subnetsoptional*[]ISubnet #The subnets this cache is deployed in.
Default: subnets are unknown
userGroupoptionalIUserGroupuser_groupoptionalIUserGroupuserGroupoptionalIUserGroupUserGroupoptionalIUserGroupUserGroupoptionalIUserGroup #The user group associated with this cache.
Default: user group is unknown