Class ServerlessCacheAttributes.Builder
java.lang.Object
software.amazon.awscdk.services.elasticache.alpha.ServerlessCacheAttributes.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ServerlessCacheAttributes>
- Enclosing interface:
ServerlessCacheAttributes
@Stability(Experimental)
public static final class ServerlessCacheAttributes.Builder
extends Object
implements software.amazon.jsii.Builder<ServerlessCacheAttributes>
A builder for
ServerlessCacheAttributes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbackupArnsToRestore
(List<String> backupArnsToRestore) Sets the value ofServerlessCacheAttributes.getBackupArnsToRestore()
build()
Builds the configured instance.engine
(CacheEngine engine) Sets the value ofServerlessCacheAttributes.getEngine()
Sets the value ofServerlessCacheAttributes.getKmsKey()
securityGroups
(List<? extends ISecurityGroup> securityGroups) Sets the value ofServerlessCacheAttributes.getSecurityGroups()
serverlessCacheArn
(String serverlessCacheArn) Sets the value ofServerlessCacheAttributes.getServerlessCacheArn()
serverlessCacheName
(String serverlessCacheName) Sets the value ofServerlessCacheAttributes.getServerlessCacheName()
Sets the value ofServerlessCacheAttributes.getSubnets()
userGroup
(IUserGroup userGroup) Sets the value ofServerlessCacheAttributes.getUserGroup()
Sets the value ofServerlessCacheAttributes.getVpc()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
backupArnsToRestore
@Stability(Experimental) public ServerlessCacheAttributes.Builder backupArnsToRestore(List<String> backupArnsToRestore) Sets the value ofServerlessCacheAttributes.getBackupArnsToRestore()
- Parameters:
backupArnsToRestore
- The ARNs of backups restored in the cache.- Returns:
this
-
engine
Sets the value ofServerlessCacheAttributes.getEngine()
- Parameters:
engine
- The cache engine used by this cache.- Returns:
this
-
kmsKey
Sets the value ofServerlessCacheAttributes.getKmsKey()
- Parameters:
kmsKey
- The KMS key used for encryption.- Returns:
this
-
securityGroups
@Stability(Experimental) public ServerlessCacheAttributes.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofServerlessCacheAttributes.getSecurityGroups()
- Parameters:
securityGroups
- The security groups associated with this cache.- Returns:
this
-
serverlessCacheArn
@Stability(Experimental) public ServerlessCacheAttributes.Builder serverlessCacheArn(String serverlessCacheArn) Sets the value ofServerlessCacheAttributes.getServerlessCacheArn()
- Parameters:
serverlessCacheArn
- The ARN of the serverless cache. One ofserverlessCacheName
orserverlessCacheArn
is required.- Returns:
this
-
serverlessCacheName
@Stability(Experimental) public ServerlessCacheAttributes.Builder serverlessCacheName(String serverlessCacheName) Sets the value ofServerlessCacheAttributes.getServerlessCacheName()
- Parameters:
serverlessCacheName
- The name of the serverless cache. One ofserverlessCacheName
orserverlessCacheArn
is required.- Returns:
this
-
subnets
@Stability(Experimental) public ServerlessCacheAttributes.Builder subnets(List<? extends ISubnet> subnets) Sets the value ofServerlessCacheAttributes.getSubnets()
- Parameters:
subnets
- The subnets this cache is deployed in.- Returns:
this
-
userGroup
Sets the value ofServerlessCacheAttributes.getUserGroup()
- Parameters:
userGroup
- The user group associated with this cache.- Returns:
this
-
vpc
Sets the value ofServerlessCacheAttributes.getVpc()
- Parameters:
vpc
- The VPC this cache is deployed in.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ServerlessCacheAttributes>
- Returns:
- a new instance of
ServerlessCacheAttributes
- Throws:
NullPointerException
- if any required attribute was not provided
-