Class ServerlessCacheProps.Builder
java.lang.Object
software.amazon.awscdk.services.elasticache.alpha.ServerlessCacheProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ServerlessCacheProps>
- Enclosing interface:
ServerlessCacheProps
@Stability(Experimental)
public static final class ServerlessCacheProps.Builder
extends Object
implements software.amazon.jsii.Builder<ServerlessCacheProps>
A builder for
ServerlessCacheProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbackup
(BackupSettings backup) Sets the value ofServerlessCacheProps.getBackup()
build()
Builds the configured instance.cacheUsageLimits
(CacheUsageLimitsProperty cacheUsageLimits) Sets the value ofServerlessCacheProps.getCacheUsageLimits()
description
(String description) Sets the value ofServerlessCacheProps.getDescription()
engine
(CacheEngine engine) Sets the value ofServerlessCacheProps.getEngine()
Sets the value ofServerlessCacheProps.getKmsKey()
securityGroups
(List<? extends ISecurityGroup> securityGroups) Sets the value ofServerlessCacheProps.getSecurityGroups()
serverlessCacheName
(String serverlessCacheName) Sets the value ofServerlessCacheProps.getServerlessCacheName()
userGroup
(IUserGroup userGroup) Sets the value ofServerlessCacheProps.getUserGroup()
Sets the value ofServerlessCacheProps.getVpc()
vpcSubnets
(SubnetSelection vpcSubnets) Sets the value ofServerlessCacheProps.getVpcSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
vpc
Sets the value ofServerlessCacheProps.getVpc()
- Parameters:
vpc
- The VPC to place the cache in. This parameter is required.- Returns:
this
-
backup
Sets the value ofServerlessCacheProps.getBackup()
- Parameters:
backup
- Backup configuration.- Returns:
this
-
cacheUsageLimits
@Stability(Experimental) public ServerlessCacheProps.Builder cacheUsageLimits(CacheUsageLimitsProperty cacheUsageLimits) Sets the value ofServerlessCacheProps.getCacheUsageLimits()
- Parameters:
cacheUsageLimits
- Usage limits for the cache.- Returns:
this
-
description
Sets the value ofServerlessCacheProps.getDescription()
- Parameters:
description
- A description for the cache.- Returns:
this
-
engine
Sets the value ofServerlessCacheProps.getEngine()
- Parameters:
engine
- The cache engine combined with the version Enum options: VALKEY_DEFAULT, VALKEY_7, VALKEY_8, REDIS_DEFAULT, MEMCACHED_DEFAULT The default options bring the latest versions available.- Returns:
this
-
kmsKey
Sets the value ofServerlessCacheProps.getKmsKey()
- Parameters:
kmsKey
- KMS key for encryption.- Returns:
this
-
securityGroups
@Stability(Experimental) public ServerlessCacheProps.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofServerlessCacheProps.getSecurityGroups()
- Parameters:
securityGroups
- Security groups for the cache.- Returns:
this
-
serverlessCacheName
@Stability(Experimental) public ServerlessCacheProps.Builder serverlessCacheName(String serverlessCacheName) Sets the value ofServerlessCacheProps.getServerlessCacheName()
- Parameters:
serverlessCacheName
- Name for the serverless cache.- Returns:
this
-
userGroup
Sets the value ofServerlessCacheProps.getUserGroup()
- Parameters:
userGroup
- User group for access control.- Returns:
this
-
vpcSubnets
Sets the value ofServerlessCacheProps.getVpcSubnets()
- Parameters:
vpcSubnets
- Which subnets to place the cache in.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ServerlessCacheProps>
- Returns:
- a new instance of
ServerlessCacheProps
- Throws:
NullPointerException
- if any required attribute was not provided
-