@Generated(value="jsii-pacmak/1.60.0 (build ebcefe6)", date="2022-06-22T23:28:03.346Z") public class CfnBackupPlan extends CfnResource implements IInspectable
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();
Modifier and Type | Class and Description |
---|---|
static interface |
CfnBackupPlan.AdvancedBackupSettingResourceTypeProperty
Specifies an object containing resource type and backup options.
|
static interface |
CfnBackupPlan.BackupPlanResourceTypeProperty
Specifies an object containing properties used to create a backup plan.
|
static interface |
CfnBackupPlan.BackupRuleResourceTypeProperty
Specifies an object containing properties used to schedule a task to back up a selection of resources.
|
static class |
CfnBackupPlan.Builder
A fluent builder for
CfnBackupPlan . |
static interface |
CfnBackupPlan.CopyActionResourceTypeProperty
Copies backups created by a backup rule to another vault.
|
static interface |
CfnBackupPlan.LifecycleResourceTypeProperty
Specifies an object containing an array of `Transition` objects that determine how long in days before a recovery point transitions to cold storage or is deleted.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnBackupPlan(Construct scope,
java.lang.String id,
CfnBackupPlanProps props)
Create a new `AWS::Backup::BackupPlan`.
|
protected |
CfnBackupPlan(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnBackupPlan(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrBackupPlanArn()
An Amazon Resource Name (ARN) that uniquely identifies a backup plan;
|
java.lang.String |
getAttrBackupPlanId()
Uniquely identifies a backup plan.
|
java.lang.String |
getAttrVersionId()
Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long.
|
java.lang.Object |
getBackupPlan()
Uniquely identifies the backup plan to be associated with the selection of resources.
|
java.lang.Object |
getBackupPlanTags()
To help organize your resources, you can assign your own metadata to the resources that you create.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setBackupPlan(CfnBackupPlan.BackupPlanResourceTypeProperty value)
Uniquely identifies the backup plan to be associated with the selection of resources.
|
void |
setBackupPlan(IResolvable value)
Uniquely identifies the backup plan to be associated with the selection of resources.
|
void |
setBackupPlanTags(IResolvable value)
To help organize your resources, you can assign your own metadata to the resources that you create.
|
void |
setBackupPlanTags(java.util.Map<java.lang.String,java.lang.String> value)
To help organize your resources, you can assign your own metadata to the resources that you create.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnBackupPlan(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnBackupPlan(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnBackupPlan(Construct scope, java.lang.String id, CfnBackupPlanProps props)
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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrBackupPlanArn()
for example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50
.
public java.lang.String getAttrBackupPlanId()
public java.lang.String getAttrVersionId()
Version Ids cannot be edited.
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.Object getBackupPlan()
public void setBackupPlan(CfnBackupPlan.BackupPlanResourceTypeProperty value)
public void setBackupPlan(IResolvable value)
public java.lang.Object getBackupPlanTags()
Each tag is a key-value pair. The specified tags are assigned to all backups created with this plan.
public void setBackupPlanTags(IResolvable value)
Each tag is a key-value pair. The specified tags are assigned to all backups created with this plan.
public void setBackupPlanTags(java.util.Map<java.lang.String,java.lang.String> value)
Each tag is a key-value pair. The specified tags are assigned to all backups created with this plan.