Skip to content
v2.278.0

CfnBackupPlanProps Struct ​

Properties for defining a CfnBackupPlan.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_backup as backup } from 'aws-cdk-lib';

declare const backupOptions: any;
const cfnBackupPlanProps: backup.CfnBackupPlanProps = {
  backupPlan: {
    backupPlanName: 'backupPlanName',
    backupPlanRule: [{
      ruleName: 'ruleName',
      targetBackupVault: 'targetBackupVault',

      // the properties below are optional
      completionWindowMinutes: 123,
      copyActions: [{
        destinationBackupVaultArn: 'destinationBackupVaultArn',

        // the properties below are optional
        lifecycle: {
          deleteAfterDays: 123,
          moveToColdStorageAfterDays: 123,
          optInToArchiveForSupportedResources: false,
        },
      }],
      enableContinuousBackup: false,
      indexActions: [{
        resourceTypes: ['resourceTypes'],
      }],
      lifecycle: {
        deleteAfterDays: 123,
        moveToColdStorageAfterDays: 123,
        optInToArchiveForSupportedResources: false,
      },
      recoveryPointTags: {
        recoveryPointTagsKey: 'recoveryPointTags',
      },
      scanActions: [{
        malwareScanner: 'malwareScanner',
        scanMode: 'scanMode',
      }],
      scheduleExpression: 'scheduleExpression',
      scheduleExpressionTimezone: 'scheduleExpressionTimezone',
      startWindowMinutes: 123,
      targetLogicallyAirGappedBackupVaultArn: 'targetLogicallyAirGappedBackupVaultArn',
    }],

    // the properties below are optional
    advancedBackupSettings: [{
      backupOptions: backupOptions,
      resourceType: 'resourceType',
    }],
    scanSettings: [{
      malwareScanner: 'malwareScanner',
      resourceTypes: ['resourceTypes'],
      scannerRoleArn: 'scannerRoleArn',
    }],
  },

  // the properties below are optional
  backupPlanTags: {
    backupPlanTagsKey: 'backupPlanTags',
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_backup as backup

# backup_options: Any

cfn_backup_plan_props = backup.CfnBackupPlanProps(
    backup_plan=backup.CfnBackupPlan.BackupPlanResourceTypeProperty(
        backup_plan_name="backupPlanName",
        backup_plan_rule=[backup.CfnBackupPlan.BackupRuleResourceTypeProperty(
            rule_name="ruleName",
            target_backup_vault="targetBackupVault",

            # the properties below are optional
            completion_window_minutes=123,
            copy_actions=[backup.CfnBackupPlan.CopyActionResourceTypeProperty(
                destination_backup_vault_arn="destinationBackupVaultArn",

                # the properties below are optional
                lifecycle=backup.CfnBackupPlan.LifecycleResourceTypeProperty(
                    delete_after_days=123,
                    move_to_cold_storage_after_days=123,
                    opt_in_to_archive_for_supported_resources=False
                )
            )],
            enable_continuous_backup=False,
            index_actions=[backup.CfnBackupPlan.IndexActionsResourceTypeProperty(
                resource_types=["resourceTypes"]
            )],
            lifecycle=backup.CfnBackupPlan.LifecycleResourceTypeProperty(
                delete_after_days=123,
                move_to_cold_storage_after_days=123,
                opt_in_to_archive_for_supported_resources=False
            ),
            recovery_point_tags={
                "recovery_point_tags_key": "recoveryPointTags"
            },
            scan_actions=[backup.CfnBackupPlan.ScanActionResourceTypeProperty(
                malware_scanner="malwareScanner",
                scan_mode="scanMode"
            )],
            schedule_expression="scheduleExpression",
            schedule_expression_timezone="scheduleExpressionTimezone",
            start_window_minutes=123,
            target_logically_air_gapped_backup_vault_arn="targetLogicallyAirGappedBackupVaultArn"
        )],

        # the properties below are optional
        advanced_backup_settings=[backup.CfnBackupPlan.AdvancedBackupSettingResourceTypeProperty(
            backup_options=backup_options,
            resource_type="resourceType"
        )],
        scan_settings=[backup.CfnBackupPlan.ScanSettingResourceTypeProperty(
            malware_scanner="malwareScanner",
            resource_types=["resourceTypes"],
            scanner_role_arn="scannerRoleArn"
        )]
    ),

    # the properties below are optional
    backup_plan_tags={
        "backup_plan_tags_key": "backupPlanTags"
    }
)
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.backup.*;

Object backupOptions;

CfnBackupPlanProps cfnBackupPlanProps = CfnBackupPlanProps.builder()
        .backupPlan(BackupPlanResourceTypeProperty.builder()
                .backupPlanName("backupPlanName")
                .backupPlanRule(List.of(BackupRuleResourceTypeProperty.builder()
                        .ruleName("ruleName")
                        .targetBackupVault("targetBackupVault")

                        // the properties below are optional
                        .completionWindowMinutes(123)
                        .copyActions(List.of(CopyActionResourceTypeProperty.builder()
                                .destinationBackupVaultArn("destinationBackupVaultArn")

                                // the properties below are optional
                                .lifecycle(LifecycleResourceTypeProperty.builder()
                                        .deleteAfterDays(123)
                                        .moveToColdStorageAfterDays(123)
                                        .optInToArchiveForSupportedResources(false)
                                        .build())
                                .build()))
                        .enableContinuousBackup(false)
                        .indexActions(List.of(IndexActionsResourceTypeProperty.builder()
                                .resourceTypes(List.of("resourceTypes"))
                                .build()))
                        .lifecycle(LifecycleResourceTypeProperty.builder()
                                .deleteAfterDays(123)
                                .moveToColdStorageAfterDays(123)
                                .optInToArchiveForSupportedResources(false)
                                .build())
                        .recoveryPointTags(Map.of(
                                "recoveryPointTagsKey", "recoveryPointTags"))
                        .scanActions(List.of(ScanActionResourceTypeProperty.builder()
                                .malwareScanner("malwareScanner")
                                .scanMode("scanMode")
                                .build()))
                        .scheduleExpression("scheduleExpression")
                        .scheduleExpressionTimezone("scheduleExpressionTimezone")
                        .startWindowMinutes(123)
                        .targetLogicallyAirGappedBackupVaultArn("targetLogicallyAirGappedBackupVaultArn")
                        .build()))

                // the properties below are optional
                .advancedBackupSettings(List.of(AdvancedBackupSettingResourceTypeProperty.builder()
                        .backupOptions(backupOptions)
                        .resourceType("resourceType")
                        .build()))
                .scanSettings(List.of(ScanSettingResourceTypeProperty.builder()
                        .malwareScanner("malwareScanner")
                        .resourceTypes(List.of("resourceTypes"))
                        .scannerRoleArn("scannerRoleArn")
                        .build()))
                .build())

        // the properties below are optional
        .backupPlanTags(Map.of(
                "backupPlanTagsKey", "backupPlanTags"))
        .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.AWS.Backup;

var backupOptions;

var cfnBackupPlanProps = new CfnBackupPlanProps {
    BackupPlan = new BackupPlanResourceTypeProperty {
        BackupPlanName = "backupPlanName",
        BackupPlanRule = new [] { new BackupRuleResourceTypeProperty {
            RuleName = "ruleName",
            TargetBackupVault = "targetBackupVault",

            // the properties below are optional
            CompletionWindowMinutes = 123,
            CopyActions = new [] { new CopyActionResourceTypeProperty {
                DestinationBackupVaultArn = "destinationBackupVaultArn",

                // the properties below are optional
                Lifecycle = new LifecycleResourceTypeProperty {
                    DeleteAfterDays = 123,
                    MoveToColdStorageAfterDays = 123,
                    OptInToArchiveForSupportedResources = false
                }
            } },
            EnableContinuousBackup = false,
            IndexActions = new [] { new IndexActionsResourceTypeProperty {
                ResourceTypes = new [] { "resourceTypes" }
            } },
            Lifecycle = new LifecycleResourceTypeProperty {
                DeleteAfterDays = 123,
                MoveToColdStorageAfterDays = 123,
                OptInToArchiveForSupportedResources = false
            },
            RecoveryPointTags = new Dictionary<string, string> {
                { "recoveryPointTagsKey", "recoveryPointTags" }
            },
            ScanActions = new [] { new ScanActionResourceTypeProperty {
                MalwareScanner = "malwareScanner",
                ScanMode = "scanMode"
            } },
            ScheduleExpression = "scheduleExpression",
            ScheduleExpressionTimezone = "scheduleExpressionTimezone",
            StartWindowMinutes = 123,
            TargetLogicallyAirGappedBackupVaultArn = "targetLogicallyAirGappedBackupVaultArn"
        } },

        // the properties below are optional
        AdvancedBackupSettings = new [] { new AdvancedBackupSettingResourceTypeProperty {
            BackupOptions = backupOptions,
            ResourceType = "resourceType"
        } },
        ScanSettings = new [] { new ScanSettingResourceTypeProperty {
            MalwareScanner = "malwareScanner",
            ResourceTypes = new [] { "resourceTypes" },
            ScannerRoleArn = "scannerRoleArn"
        } }
    },

    // the properties below are optional
    BackupPlanTags = new Dictionary<string, string> {
        { "backupPlanTagsKey", "backupPlanTags" }
    }
};
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"

var backupOptions interface{}

cfnBackupPlanProps := &CfnBackupPlanProps{
	BackupPlan: &BackupPlanResourceTypeProperty{
		BackupPlanName: jsii.String("backupPlanName"),
		BackupPlanRule: []interface{}{
			&BackupRuleResourceTypeProperty{
				RuleName: jsii.String("ruleName"),
				TargetBackupVault: jsii.String("targetBackupVault"),

				// the properties below are optional
				CompletionWindowMinutes: jsii.Number(123),
				CopyActions: []interface{}{
					&CopyActionResourceTypeProperty{
						DestinationBackupVaultArn: jsii.String("destinationBackupVaultArn"),

						// the properties below are optional
						Lifecycle: &LifecycleResourceTypeProperty{
							DeleteAfterDays: jsii.Number(123),
							MoveToColdStorageAfterDays: jsii.Number(123),
							OptInToArchiveForSupportedResources: jsii.Boolean(false),
						},
					},
				},
				EnableContinuousBackup: jsii.Boolean(false),
				IndexActions: []interface{}{
					&IndexActionsResourceTypeProperty{
						ResourceTypes: []*string{
							jsii.String("resourceTypes"),
						},
					},
				},
				Lifecycle: &LifecycleResourceTypeProperty{
					DeleteAfterDays: jsii.Number(123),
					MoveToColdStorageAfterDays: jsii.Number(123),
					OptInToArchiveForSupportedResources: jsii.Boolean(false),
				},
				RecoveryPointTags: map[string]*string{
					"recoveryPointTagsKey": jsii.String("recoveryPointTags"),
				},
				ScanActions: []interface{}{
					&ScanActionResourceTypeProperty{
						MalwareScanner: jsii.String("malwareScanner"),
						ScanMode: jsii.String("scanMode"),
					},
				},
				ScheduleExpression: jsii.String("scheduleExpression"),
				ScheduleExpressionTimezone: jsii.String("scheduleExpressionTimezone"),
				StartWindowMinutes: jsii.Number(123),
				TargetLogicallyAirGappedBackupVaultArn: jsii.String("targetLogicallyAirGappedBackupVaultArn"),
			},
		},

		// the properties below are optional
		AdvancedBackupSettings: []interface{}{
			&AdvancedBackupSettingResourceTypeProperty{
				BackupOptions: backupOptions,
				ResourceType: jsii.String("resourceType"),
			},
		},
		ScanSettings: []interface{}{
			&ScanSettingResourceTypeProperty{
				MalwareScanner: jsii.String("malwareScanner"),
				ResourceTypes: []*string{
					jsii.String("resourceTypes"),
				},
				ScannerRoleArn: jsii.String("scannerRoleArn"),
			},
		},
	},

	// the properties below are optional
	BackupPlanTags: map[string]*string{
		"backupPlanTagsKey": jsii.String("backupPlanTags"),
	},
}

Properties ​

backupPlanIResolvable | CfnBackupPlan.BackupPlanResourceTypePropertybackup_plantyping.Union[IResolvable, BackupPlanResourceTypeProperty]backupPlanIResolvableBackupPlanIResolvableBackupPlaninterface{} required #
Uniquely identifies the backup plan to be associated with the selection of resources.
backupPlanTagsoptional{ [key: string]: string }backup_plan_tagsoptionaltyping.Mapping[str, str]backupPlanTagsoptionalMap<String, String>BackupPlanTagsoptionalIDictionary<string, string>BackupPlanTagsoptional*map[string]*string #
The tags to assign to the backup plan.