Class ServerlessCache

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.elasticache.alpha.ServerlessCacheBase
software.amazon.awscdk.services.elasticache.alpha.ServerlessCache
All Implemented Interfaces:
IResource, IConnectable, IServerlessCache, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)", date="2025-10-01T17:47:05.834Z") @Stability(Experimental) public class ServerlessCache extends ServerlessCacheBase
(experimental) A serverless ElastiCache cache.

Example:

 Vpc vpc;
 ServerlessCache serverlessCache = ServerlessCache.Builder.create(this, "ServerlessCache")
         .engine(CacheEngine.VALKEY_LATEST)
         .backup(BackupSettings.builder()
                 // set a backup name before deleting a cache
                 .backupNameBeforeDeletion("my-final-backup-name")
                 .build())
         .vpc(vpc)
         .build();
 
  • Field Details

    • PROPERTY_INJECTION_ID

      @Stability(Experimental) public static final String PROPERTY_INJECTION_ID
      (experimental) Uniquely identifies this class.
  • Constructor Details

    • ServerlessCache

      protected ServerlessCache(software.amazon.jsii.JsiiObjectRef objRef)
    • ServerlessCache

      protected ServerlessCache(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • ServerlessCache

      @Stability(Experimental) public ServerlessCache(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ServerlessCacheProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromServerlessCacheArn

      @Stability(Experimental) @NotNull public static IServerlessCache fromServerlessCacheArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String serverlessCacheArn)
      (experimental) Import an existing serverless cache by ARN.

      Parameters:
      scope - The parent creating construct (usually this). This parameter is required.
      id - The construct's name. This parameter is required.
      serverlessCacheArn - The ARN of the existing serverless cache. This parameter is required.
    • fromServerlessCacheAttributes

      @Stability(Experimental) @NotNull public static IServerlessCache fromServerlessCacheAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ServerlessCacheAttributes attrs)
      (experimental) Import an existing serverless cache using attributes.

      Parameters:
      scope - The parent creating construct (usually this). This parameter is required.
      id - The construct's name. This parameter is required.
      attrs - A ServerlessCacheAttributes object. This parameter is required.
    • fromServerlessCacheName

      @Stability(Experimental) @NotNull public static IServerlessCache fromServerlessCacheName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String serverlessCacheName)
      (experimental) Import an existing serverless cache by name.

      Parameters:
      scope - The parent creating construct (usually this). This parameter is required.
      id - The construct's name. This parameter is required.
      serverlessCacheName - The name of the existing serverless cache. This parameter is required.
    • isServerlessCache

      @Stability(Experimental) @NotNull public static Boolean isServerlessCache(@NotNull Object x)
      (experimental) Return whether the given object is a ServerlessCache.

      Parameters:
      x - This parameter is required.
    • getConnections

      @Stability(Experimental) @NotNull public Connections getConnections()
      (experimental) Access to network connections.
      Specified by:
      getConnections in interface IConnectable
      Specified by:
      getConnections in class ServerlessCacheBase
    • getServerlessCacheArn

      @Stability(Experimental) @NotNull public String getServerlessCacheArn()
      (experimental) The ARN of the serverless cache.
      Specified by:
      getServerlessCacheArn in interface IServerlessCache
      Specified by:
      getServerlessCacheArn in class ServerlessCacheBase
    • getServerlessCacheEndpointAddress

      @Stability(Experimental) @NotNull public String getServerlessCacheEndpointAddress()
      (experimental) The endpoint address of the serverless cache.
    • getServerlessCacheEndpointPort

      @Stability(Experimental) @NotNull public String getServerlessCacheEndpointPort()
      (experimental) The endpoint port of the serverless cache.
    • getServerlessCacheName

      @Stability(Experimental) @NotNull public String getServerlessCacheName()
      (experimental) The name of the serverless cache.
      Specified by:
      getServerlessCacheName in interface IServerlessCache
      Specified by:
      getServerlessCacheName in class ServerlessCacheBase
    • getServerlessCacheReaderEndpointAddress

      @Stability(Experimental) @NotNull public String getServerlessCacheReaderEndpointAddress()
      (experimental) The reader endpoint address of the serverless cache.
    • getServerlessCacheReaderEndpointPort

      @Stability(Experimental) @NotNull public String getServerlessCacheReaderEndpointPort()
      (experimental) The reader endpoint port of the serverless cache.
    • getServerlessCacheStatus

      @Stability(Experimental) @NotNull public String getServerlessCacheStatus()
      (experimental) The current status of the serverless cache Can be 'CREATING', 'AVAILABLE', 'DELETING', 'CREATE-FAILED', 'MODIFYING'.
    • getBackupArnsToRestore

      @Stability(Experimental) @Nullable public List<String> getBackupArnsToRestore()
      (experimental) The ARNs of backups restored in the cache.
      Specified by:
      getBackupArnsToRestore in interface IServerlessCache
      Specified by:
      getBackupArnsToRestore in class ServerlessCacheBase
    • getEngine

      @Stability(Experimental) @Nullable public CacheEngine getEngine()
      (experimental) The cache engine used by this cache.
      Specified by:
      getEngine in interface IServerlessCache
      Specified by:
      getEngine in class ServerlessCacheBase
    • getKmsKey

      @Stability(Experimental) @Nullable public IKey getKmsKey()
      (experimental) The KMS key used for encryption.
      Specified by:
      getKmsKey in interface IServerlessCache
      Specified by:
      getKmsKey in class ServerlessCacheBase
    • getSecurityGroups

      @Stability(Experimental) @Nullable public List<ISecurityGroup> getSecurityGroups()
      (experimental) The security groups associated with this cache.
      Specified by:
      getSecurityGroups in interface IServerlessCache
      Specified by:
      getSecurityGroups in class ServerlessCacheBase
    • getSubnets

      @Stability(Experimental) @Nullable public List<ISubnet> getSubnets()
      (experimental) The subnets this cache is deployed in.
      Specified by:
      getSubnets in interface IServerlessCache
      Specified by:
      getSubnets in class ServerlessCacheBase
    • getUserGroup

      @Stability(Experimental) @Nullable public IUserGroup getUserGroup()
      (experimental) The user group associated with this cache.
      Specified by:
      getUserGroup in interface IServerlessCache
      Specified by:
      getUserGroup in class ServerlessCacheBase
    • getVpc

      @Stability(Experimental) @Nullable public IVpc getVpc()
      (experimental) The VPC this cache is deployed in.
      Specified by:
      getVpc in interface IServerlessCache
      Specified by:
      getVpc in class ServerlessCacheBase