Skip to content
v2.277.0

Experimental

@aws-cdk/aws-elasticache-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

BackupSettings Struct ​

Backup configuration for ServerlessCache.

Example ​

ts
declare const vpc: ec2.Vpc;

const serverlessCache = new elasticache.ServerlessCache(this, 'ServerlessCache', {
  engine: elasticache.CacheEngine.VALKEY_LATEST,
  backup: {
    // set a backup name before deleting a cache
    backupNameBeforeDeletion: "my-final-backup-name",
  },
  vpc,
});
python
# vpc: ec2.Vpc


serverless_cache = elasticache.ServerlessCache(self, "ServerlessCache",
    engine=elasticache.CacheEngine.VALKEY_LATEST,
    backup=elasticache.BackupSettings(
        # set a backup name before deleting a cache
        backup_name_before_deletion="my-final-backup-name"
    ),
    vpc=vpc
)
java
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();
csharp
// Install: dotnet add package Amazon.CDK.AWS.ElastiCache.Alpha
Vpc vpc;


var serverlessCache = new ServerlessCache(this, "ServerlessCache", new ServerlessCacheProps {
    Engine = CacheEngine.VALKEY_LATEST,
    Backup = new BackupSettings {
        // set a backup name before deleting a cache
        BackupNameBeforeDeletion = "my-final-backup-name"
    },
    Vpc = vpc
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdkelasticachealpha/v2
var vpc Vpc


serverlessCache := elasticache.NewServerlessCache(this, jsii.String("ServerlessCache"), &ServerlessCacheProps{
	Engine: elasticache.CacheEngine_VALKEY_LATEST(),
	Backup: &BackupSettings{
		// set a backup name before deleting a cache
		BackupNameBeforeDeletion: jsii.String("my-final-backup-name"),
	},
	Vpc: Vpc,
})

Properties ​

backupArnsToRestoreoptionalstring[]backup_arns_to_restoreoptionaltyping.List[str]backupArnsToRestoreoptionalList<String>BackupArnsToRestoreoptionalstring[]BackupArnsToRestoreoptional*[]*string#
ARNs of backups from which to restore data into the new cache.

Default: Create a new cache with no existing data

backupNameBeforeDeletionoptionalstringbackup_name_before_deletionoptionalstrbackupNameBeforeDeletionoptionalStringBackupNameBeforeDeletionoptionalstringBackupNameBeforeDeletionoptional*string#
Name for the final backup taken before deletion.

Default: No final backup

backupRetentionLimitoptionalnumberbackup_retention_limitoptionalint | floatbackupRetentionLimitoptionalNumberBackupRetentionLimitoptionaldoubleBackupRetentionLimitoptional*float64#
Number of days to retain backups (1-35).

Default: Backups are not retained

backupTimeoptionalSchedulebackup_timeoptionalSchedulebackupTimeoptionalScheduleBackupTimeoptionalScheduleBackupTimeoptionalSchedule#
Automated daily backup UTC time.

Default: No automated backups