Class CfnBackupPlan

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

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-22T22:42:47.873Z") @Stability(Stable) public class CfnBackupPlan extends CfnResource implements IInspectable, ITaggableV2
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)
                                         .optInToArchiveForSupportedResources(false)
                                         .build())
                                 .build()))
                         .enableContinuousBackup(false)
                         .lifecycle(LifecycleResourceTypeProperty.builder()
                                 .deleteAfterDays(123)
                                 .moveToColdStorageAfterDays(123)
                                 .optInToArchiveForSupportedResources(false)
                                 .build())
                         .recoveryPointTags(Map.of(
                                 "recoveryPointTagsKey", "recoveryPointTags"))
                         .scheduleExpression("scheduleExpression")
                         .scheduleExpressionTimezone("scheduleExpressionTimezone")
                         .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();
 

See Also:
  • 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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnBackupPlanProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). 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.

    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • 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 IResolvable value)
      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.
    • getBackupPlanTags

      @Stability(Stable) @Nullable public Map<String,String> getBackupPlanTags()
      The tags to assign to the backup plan.
    • setBackupPlanTags

      @Stability(Stable) public void setBackupPlanTags(@Nullable Map<String,String> value)
      The tags to assign to the backup plan.