Class BackupResource
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.backup.BackupResource
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-21T06:34:03.919Z")
@Stability(Stable)
public class BackupResource
extends software.amazon.jsii.JsiiObject
A resource to backup.
Example:
BackupPlan plan; Vpc vpc; ITable myTable = Table.fromTableName(this, "Table", "myTableName"); DatabaseInstance myDatabaseInstance = DatabaseInstance.Builder.create(this, "DatabaseInstance") .engine(DatabaseInstanceEngine.mysql(MySqlInstanceEngineProps.builder().version(MysqlEngineVersion.VER_8_0_26).build())) .vpc(vpc) .build(); DatabaseCluster myDatabaseCluster = DatabaseCluster.Builder.create(this, "DatabaseCluster") .engine(DatabaseClusterEngine.auroraMysql(AuroraMysqlClusterEngineProps.builder().version(AuroraMysqlEngineVersion.VER_2_08_1).build())) .credentials(Credentials.fromGeneratedSecret("clusteradmin")) .instanceProps(InstanceProps.builder() .vpc(vpc) .build()) .build(); ServerlessCluster myServerlessCluster = ServerlessCluster.Builder.create(this, "ServerlessCluster") .engine(DatabaseClusterEngine.AURORA_POSTGRESQL) .parameterGroup(ParameterGroup.fromParameterGroupName(this, "ParameterGroup", "default.aurora-postgresql11")) .vpc(vpc) .build(); Construct myCoolConstruct = new Construct(this, "MyCoolConstruct"); plan.addSelection("Selection", BackupSelectionOptions.builder() .resources(List.of(BackupResource.fromDynamoDbTable(myTable), BackupResource.fromRdsDatabaseInstance(myDatabaseInstance), BackupResource.fromRdsDatabaseCluster(myDatabaseCluster), BackupResource.fromRdsServerlessCluster(myServerlessCluster), BackupResource.fromTag("stage", "prod"), BackupResource.fromConstruct(myCoolConstruct))) .build());
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
ModifierConstructorDescriptionBackupResource
(String resource) BackupResource
(String resource, TagCondition tagCondition) BackupResource
(String resource, TagCondition tagCondition, software.constructs.Construct construct) protected
BackupResource
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
BackupResource
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic BackupResource
A list of ARNs or match patterns such asarn:aws:ec2:us-east-1:123456789012:volume/*
.static BackupResource
fromConstruct
(software.constructs.Construct construct) Adds all supported resources in a construct.static BackupResource
fromDynamoDbTable
(ITable table) A DynamoDB table.static BackupResource
fromEc2Instance
(IInstance instance) An EC2 instance.static BackupResource
fromEfsFileSystem
(IFileSystem fileSystem) An EFS file system.static BackupResource
fromRdsDatabaseCluster
(IDatabaseCluster cluster) A RDS database cluter.static BackupResource
fromRdsDatabaseInstance
(IDatabaseInstance instance) A RDS database instance.static BackupResource
An Aurora database instance.static BackupResource
A tag condition.static BackupResource
fromTag
(String key, String value, TagOperation operation) A tag condition.software.constructs.Construct
A construct.A resource.A condition on a tag.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
BackupResource
protected BackupResource(software.amazon.jsii.JsiiObjectRef objRef) -
BackupResource
protected BackupResource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
BackupResource
@Stability(Stable) public BackupResource(@Nullable String resource, @Nullable TagCondition tagCondition, @Nullable software.constructs.Construct construct) - Parameters:
resource
-tagCondition
-construct
-
-
BackupResource
@Stability(Stable) public BackupResource(@Nullable String resource, @Nullable TagCondition tagCondition) - Parameters:
resource
-tagCondition
-
-
BackupResource
- Parameters:
resource
-
-
BackupResource
@Stability(Stable) public BackupResource()
-
-
Method Details
-
fromArn
A list of ARNs or match patterns such asarn:aws:ec2:us-east-1:123456789012:volume/*
.- Parameters:
arn
- This parameter is required.
-
fromConstruct
@Stability(Stable) @NotNull public static BackupResource fromConstruct(@NotNull software.constructs.Construct construct) Adds all supported resources in a construct.- Parameters:
construct
- The construct containing resources to backup. This parameter is required.
-
fromDynamoDbTable
A DynamoDB table.- Parameters:
table
- This parameter is required.
-
fromEc2Instance
@Stability(Stable) @NotNull public static BackupResource fromEc2Instance(@NotNull IInstance instance) An EC2 instance.- Parameters:
instance
- This parameter is required.
-
fromEfsFileSystem
@Stability(Stable) @NotNull public static BackupResource fromEfsFileSystem(@NotNull IFileSystem fileSystem) An EFS file system.- Parameters:
fileSystem
- This parameter is required.
-
fromRdsDatabaseCluster
@Stability(Stable) @NotNull public static BackupResource fromRdsDatabaseCluster(@NotNull IDatabaseCluster cluster) A RDS database cluter.- Parameters:
cluster
- This parameter is required.
-
fromRdsDatabaseInstance
@Stability(Stable) @NotNull public static BackupResource fromRdsDatabaseInstance(@NotNull IDatabaseInstance instance) A RDS database instance.- Parameters:
instance
- This parameter is required.
-
fromRdsServerlessCluster
@Stability(Stable) @NotNull public static BackupResource fromRdsServerlessCluster(@NotNull IServerlessCluster cluster) An Aurora database instance.- Parameters:
cluster
- This parameter is required.
-
fromTag
@Stability(Stable) @NotNull public static BackupResource fromTag(@NotNull String key, @NotNull String value, @Nullable TagOperation operation) A tag condition.- Parameters:
key
- This parameter is required.value
- This parameter is required.operation
-
-
fromTag
@Stability(Stable) @NotNull public static BackupResource fromTag(@NotNull String key, @NotNull String value) A tag condition.- Parameters:
key
- This parameter is required.value
- This parameter is required.
-
getConstruct
@Stability(Stable) @Nullable public software.constructs.Construct getConstruct()A construct. -
getResource
A resource. -
getTagCondition
A condition on a tag.
-