# CfnServerlessCacheSnapshotProps

Properties for defining a `CfnServerlessCacheSnapshot`.

Used as props by: [CfnServerlessCacheSnapshot](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticache.CfnServerlessCacheSnapshot.html)

- Source: Generated at build time
- Type last changed: v2.268.0 · 2 Sep 2026

## Example

TypeScript:

```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 cfnServerlessCacheSnapshotProps: elasticache.CfnServerlessCacheSnapshotProps = {
  serverlessCacheName: 'serverlessCacheName',
  serverlessCacheSnapshotName: 'serverlessCacheSnapshotName',

  // the properties below are optional
  kmsKeyId: 'kmsKeyId',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

```python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_elasticache as elasticache

cfn_serverless_cache_snapshot_props = elasticache.CfnServerlessCacheSnapshotProps(
    serverless_cache_name="serverlessCacheName",
    serverless_cache_snapshot_name="serverlessCacheSnapshotName",

    # the properties below are optional
    kms_key_id="kmsKeyId",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.elasticache.*;

CfnServerlessCacheSnapshotProps cfnServerlessCacheSnapshotProps = CfnServerlessCacheSnapshotProps.builder()
        .serverlessCacheName("serverlessCacheName")
        .serverlessCacheSnapshotName("serverlessCacheSnapshotName")

        // the properties below are optional
        .kmsKeyId("kmsKeyId")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ElastiCache;

var cfnServerlessCacheSnapshotProps = new CfnServerlessCacheSnapshotProps {
    ServerlessCacheName = "serverlessCacheName",
    ServerlessCacheSnapshotName = "serverlessCacheSnapshotName",

    // the properties below are optional
    KmsKeyId = "kmsKeyId",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnServerlessCacheSnapshotProps := &CfnServerlessCacheSnapshotProps{
	ServerlessCacheName: jsii.String("serverlessCacheName"),
	ServerlessCacheSnapshotName: jsii.String("serverlessCacheSnapshotName"),

	// the properties below are optional
	KmsKeyId: jsii.String("kmsKeyId"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `kmsKeyId`: string — The Amazon Resource Name (ARN) of the AWS KMS key used to encrypt the snapshot.

  Provide the key ARN: the resource returns the key ARN on read, so supplying a bare key ID or alias for this createOnly property may be reported as drift by CloudFormation.

- `serverlessCacheName`: string (required) — The name of an existing serverless cache.

  The snapshot is created from this cache.

- `serverlessCacheSnapshotName`: string (required) — The name of the serverless cache snapshot.

  Must be unique for the customer account. This value is stored as a lowercase string.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — A list of tags to be added to the serverless cache snapshot resource.
