Class CfnBackupPlan

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:49.609Z") @Stability(Stable) public class CfnBackupPlan extends CfnResource implements IInspectable
A CloudFormation AWS::Backup::BackupPlan.

Contains an optional backup plan display name and an array of BackupRule objects, each of which specifies a backup rule. Each rule in a backup plan is a separate scheduled task and can back up a different selection of AWS resources.

For a sample AWS CloudFormation template, see the AWS Backup Developer Guide .

Example:

 // 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;
 CfnBackupPlan cfnBackupPlan = CfnBackupPlan.Builder.create(this, "MyCfnBackupPlan")
         .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)
                                         .build())
                                 .build()))
                         .enableContinuousBackup(false)
                         .lifecycle(LifecycleResourceTypeProperty.builder()
                                 .deleteAfterDays(123)
                                 .moveToColdStorageAfterDays(123)
                                 .build())
                         .recoveryPointTags(Map.of(
                                 "recoveryPointTagsKey", "recoveryPointTags"))
                         .scheduleExpression("scheduleExpression")
                         .startWindowMinutes(123)
                         .build()))
                 // the properties below are optional
                 .advancedBackupSettings(List.of(AdvancedBackupSettingResourceTypeProperty.builder()
                         .backupOptions(backupOptions)
                         .resourceType("resourceType")
                         .build()))
                 .build())
         // the properties below are optional
         .backupPlanTags(Map.of(
                 "backupPlanTagsKey", "backupPlanTags"))
         .build();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnBackupPlan

      protected CfnBackupPlan(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnBackupPlan

      protected CfnBackupPlan(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnBackupPlan

      @Stability(Stable) public CfnBackupPlan(@NotNull Construct scope, @NotNull String id, @NotNull CfnBackupPlanProps props)
      Create a new AWS::Backup::BackupPlan.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
      This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector -
      • tree inspector to collect and process attributes.
      This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrBackupPlanArn

      @Stability(Stable) @NotNull public String getAttrBackupPlanArn()
      An Amazon Resource Name (ARN) that uniquely identifies a backup plan;

      for example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50 .

    • getAttrBackupPlanId

      @Stability(Stable) @NotNull public String getAttrBackupPlanId()
      Uniquely identifies a backup plan.
    • getAttrVersionId

      @Stability(Stable) @NotNull public String getAttrVersionId()
      Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long.

      Version Ids cannot be edited.

    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getBackupPlan

      @Stability(Stable) @NotNull public Object getBackupPlan()
      Uniquely identifies the backup plan to be associated with the selection of resources.
    • setBackupPlan

      @Stability(Stable) public void setBackupPlan(@NotNull CfnBackupPlan.BackupPlanResourceTypeProperty value)
      Uniquely identifies the backup plan to be associated with the selection of resources.
    • setBackupPlan

      @Stability(Stable) public void setBackupPlan(@NotNull IResolvable value)
      Uniquely identifies the backup plan to be associated with the selection of resources.
    • getBackupPlanTags

      @Stability(Stable) @Nullable public Object getBackupPlanTags()
      To help organize your resources, you can assign your own metadata to the resources that you create.

      Each tag is a key-value pair. The specified tags are assigned to all backups created with this plan.

    • setBackupPlanTags

      @Stability(Stable) public void setBackupPlanTags(@Nullable IResolvable value)
      To help organize your resources, you can assign your own metadata to the resources that you create.

      Each tag is a key-value pair. The specified tags are assigned to all backups created with this plan.

    • setBackupPlanTags

      @Stability(Stable) public void setBackupPlanTags(@Nullable Map<String,String> value)
      To help organize your resources, you can assign your own metadata to the resources that you create.

      Each tag is a key-value pair. The specified tags are assigned to all backups created with this plan.