Class CfnBackupPlan
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.backup.CfnBackupPlan
- All Implemented Interfaces:
IInspectable,ITaggableV2,IBackupPlanRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-29T11:15:33.152Z")
@Stability(Stable)
public class CfnBackupPlan
extends CfnResource
implements IInspectable, IBackupPlanRef, 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)
.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"))
.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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceSpecifies an object containing resource type and backup options.static interfaceSpecifies an object containing properties used to create a backup plan.static interfaceSpecifies an object containing properties used to schedule a task to back up a selection of resources.static final classA fluent builder forCfnBackupPlan.static interfaceCopies backups created by a backup rule to another vault.static interfaceSpecifies index actions.static interfaceSpecifies an object containing an array ofTransitionobjects that determine how long in days before a recovery point transitions to cold storage or is deleted.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.backup.IBackupPlanRef
IBackupPlanRef.Jsii$Default, IBackupPlanRef.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnBackupPlan(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnBackupPlan(software.amazon.jsii.JsiiObjectRef objRef) CfnBackupPlan(software.constructs.Construct scope, String id, CfnBackupPlanProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IBackupPlanReffromBackupPlanArn(software.constructs.Construct scope, String id, String arn) Creates a new IBackupPlanRef from an ARN.static IBackupPlanReffromBackupPlanId(software.constructs.Construct scope, String id, String backupPlanId) Creates a new IBackupPlanRef from a backupPlanId.An Amazon Resource Name (ARN) that uniquely identifies a backup plan;Uniquely identifies a backup plan.Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long.Uniquely identifies the backup plan to be associated with the selection of resources.A reference to a BackupPlan resource.The tags to assign to the backup plan.Tag Manager which manages the tags for this resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetBackupPlan(IResolvable value) Uniquely identifies the backup plan to be associated with the selection of resources.voidUniquely identifies the backup plan to be associated with the selection of resources.voidsetBackupPlanTags(Map<String, String> value) The tags to assign to the backup plan.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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
-
fromBackupPlanArn
@Stability(Stable) @NotNull public static IBackupPlanRef fromBackupPlanArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String arn) Creates a new IBackupPlanRef from an ARN.- Parameters:
scope- This parameter is required.id- This parameter is required.arn- This parameter is required.
-
fromBackupPlanId
@Stability(Stable) @NotNull public static IBackupPlanRef fromBackupPlanId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String backupPlanId) Creates a new IBackupPlanRef from a backupPlanId.- Parameters:
scope- This parameter is required.id- This parameter is required.backupPlanId- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
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
Uniquely identifies a backup plan. -
getAttrVersionId
Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long.Version Ids cannot be edited.
-
getBackupPlanRef
A reference to a BackupPlan resource.- Specified by:
getBackupPlanRefin interfaceIBackupPlanRef
-
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getBackupPlan
Uniquely identifies the backup plan to be associated with the selection of resources.Returns union: either
IResolvableorCfnBackupPlan.BackupPlanResourceTypeProperty -
setBackupPlan
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
The tags to assign to the backup plan. -
setBackupPlanTags
The tags to assign to the backup plan.
-