Skip to content
v2.277.0

BackupProps Struct ​

Backup configuration for DocumentDB databases.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_docdb as docdb } from 'aws-cdk-lib';
const backupProps: docdb.BackupProps = {
  retention: cdk.Duration.minutes(30),

  // the properties below are optional
  preferredWindow: 'preferredWindow',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_docdb as docdb

backup_props = docdb.BackupProps(
    retention=cdk.Duration.minutes(30),

    # the properties below are optional
    preferred_window="preferredWindow"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.docdb.*;

BackupProps backupProps = BackupProps.builder()
        .retention(Duration.minutes(30))

        // the properties below are optional
        .preferredWindow("preferredWindow")
        .build();
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;
using Amazon.CDK.AWS.DocDB;

var backupProps = new BackupProps {
    Retention = Duration.Minutes(30),

    // the properties below are optional
    PreferredWindow = "preferredWindow"
};
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 cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

backupProps := &BackupProps{
	Retention: cdk.Duration_Minutes(jsii.Number(30)),

	// the properties below are optional
	PreferredWindow: jsii.String("preferredWindow"),
}

Properties ​

preferredWindowoptionalstringpreferred_windowoptionalstrpreferredWindowoptionalStringPreferredWindowoptionalstringPreferredWindowoptional*string#
A daily time range in 24-hours UTC format in which backups preferably execute.

Default: a 30-minute window selected at random from an 8-hour block of time for each AWS Region. To see the time blocks available, see https://docs.aws.amazon.com/documentdb/latest/developerguide/backup-restore.db-cluster-snapshots.html#backup-restore.backup-window

Must be at least 30 minutes long.

Example: '01:00-02:00'

retentionDurationretentionDurationretentionDurationRetentionDurationRetentionDurationrequired#
How many days to retain the backup.