# CfnServerlessCacheProps

Properties for defining a `CfnServerlessCache`.

Extends: CfnServerlessCacheProps
Used as props by: CfnServerlessCache

- Source: Generated code
- Type last changed: v2.273.0 · 8 Oct 2026

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_elasticache as elasticache } from 'aws-cdk-lib';
const cfnServerlessCacheProps: elasticache.CfnServerlessCacheProps = {
  engine: 'engine',
  serverlessCacheName: 'serverlessCacheName',

  // the properties below are optional
  cacheUsageLimits: {
    dataStorage: {
      unit: 'unit',

      // the properties below are optional
      maximum: 123,
      minimum: 123,
    },
    ecpuPerSecond: {
      maximum: 123,
      minimum: 123,
    },
  },
  connectionType: 'connectionType',
  dailySnapshotTime: 'dailySnapshotTime',
  description: 'description',
  endpoint: {
    address: 'address',
    port: 'port',
  },
  finalSnapshotName: 'finalSnapshotName',
  kmsKeyId: 'kmsKeyId',
  majorEngineVersion: 'majorEngineVersion',
  networkType: 'networkType',
  readerEndpoint: {
    address: 'address',
    port: 'port',
  },
  securityGroupIds: ['securityGroupIds'],
  snapshotArnsToRestore: ['snapshotArnsToRestore'],
  snapshotRetentionLimit: 123,
  subnetIds: ['subnetIds'],
  tags: [{
    key: 'key',
    value: 'value',
  }],
  userGroupId: 'userGroupId',
};
```

## Properties

- `cacheUsageLimits`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnServerlessCache.CacheUsageLimitsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticache.CfnServerlessCache.CacheUsageLimitsProperty.html) — The cache usage limit for the serverless cache.

- `connectionType`: string — The connection type for the serverless cache.

  Valid values are vpc or public.

- `dailySnapshotTime`: string — The daily time that a cache snapshot will be created.

  Default is NULL, i.e. snapshots will not be created at a specific time on a daily basis. Available for Valkey, Redis OSS and Serverless Memcached only.

- `description`: string — A description of the serverless cache.

- `endpoint`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnServerlessCache.EndpointProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticache.CfnServerlessCache.EndpointProperty.html) — Represents the information required for client programs to connect to a cache node.

  This value is read-only.

- `engine`: string (required) — The engine the serverless cache is compatible with.

- `finalSnapshotName`: string — The name of the final snapshot taken of a cache before the cache is deleted.

- `kmsKeyId`: string | [IKeyRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_kms.IKeyRef.html) — The ID of the AWS Key Management Service (KMS) key that is used to encrypt data at rest in the serverless cache.

- `majorEngineVersion`: string — The version number of the engine the serverless cache is compatible with.

- `networkType`: string — The network type for the serverless cache.

  Valid values are ipv4, ipv6, or dual_stack.

- `readerEndpoint`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnServerlessCache.EndpointProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticache.CfnServerlessCache.EndpointProperty.html) — Represents the information required for client programs to connect to a cache node.

  This value is read-only.

- `securityGroupIds`: string | [ISecurityGroupRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ec2.ISecurityGroupRef.html)[] — The IDs of the EC2 security groups associated with the serverless cache.

- `serverlessCacheName`: string (required) — The unique identifier of the serverless cache.

- `snapshotArnsToRestore`: string[] — The ARN of the snapshot from which to restore data into the new cache.

- `snapshotRetentionLimit`: number — The current setting for the number of serverless cache snapshots the system will retain.

  Available for Valkey, Redis OSS and Serverless Memcached only.

- `subnetIds`: string | [ISubnetRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ec2.ISubnetRef.html)[] — If no subnet IDs are given and your VPC is in us-west-1, then ElastiCache will select 2 default subnets across AZs in your VPC.

  For all other Regions, if no subnet IDs are given then ElastiCache will select 3 default subnets across AZs in your default VPC.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — A list of tags to be added to this resource.

- `userGroupId`: string | [IUserGroupRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_elasticache.IUserGroupRef.html) — The identifier of the user group associated with the serverless cache.

  Available for Valkey and Redis OSS only. Default is NULL.
