Class CfnBackupPlan
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
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();
-
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 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.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnBackupPlan(Construct scope, String id, CfnBackupPlanProps props) Create a newAWS::Backup::BackupPlan.protectedCfnBackupPlan(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnBackupPlan(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionAn 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.To help organize your resources, you can assign your own metadata to the resources that you create.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) To help organize your resources, you can assign your own metadata to the resources that you create.voidsetBackupPlanTags(IResolvable value) To help organize your resources, you can assign your own metadata to the resources that you create.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods 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.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 Construct scope, @NotNull String id, @NotNull CfnBackupPlanProps props) Create a newAWS::Backup::BackupPlan.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
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.
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
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
Uniquely identifies the backup plan to be associated with the selection of resources. -
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
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
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.
-