Class RdsBackup


  • public class RdsBackup
    extends com.pulumi.resources.CustomResource
    Provides a RDS Backup resource. For information about RDS Backup and how to use it, see [What is Backup](https://www.alibabacloud.com/help/en/rds/developer-reference/api-rds-2014-08-15-createbackup). > **NOTE:** Available since v1.149.0. ## Example Usage Basic Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.alicloud.rds.Instance; import com.pulumi.alicloud.rds.InstanceArgs; import com.pulumi.alicloud.rds.RdsBackup; import com.pulumi.alicloud.rds.RdsBackupArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var exampleInstance = new Instance("exampleInstance", InstanceArgs.builder() .engine("MySQL") .engineVersion("5.6") .instanceType("rds.mysql.t1.small") .instanceStorage("30") .instanceChargeType("Postpaid") .dbInstanceStorageType("local_ssd") .build()); var exampleRdsBackup = new RdsBackup("exampleRdsBackup", RdsBackupArgs.builder() .dbInstanceId(exampleInstance.id()) .build()); } } ``` ## Import RDS Backup can be imported using the id, e.g. ```sh $ pulumi import alicloud:rds/rdsBackup:RdsBackup example <db_instance_id>:<backup_id> ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Constructor Summary

      Constructors 
      Constructor Description
      RdsBackup​(java.lang.String name)  
      RdsBackup​(java.lang.String name, RdsBackupArgs args)  
      RdsBackup​(java.lang.String name, RdsBackupArgs args, com.pulumi.resources.CustomResourceOptions options)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> backupId()  
      com.pulumi.core.Output<java.lang.String> backupMethod()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> backupStrategy()  
      com.pulumi.core.Output<java.lang.String> backupType()  
      com.pulumi.core.Output<java.lang.String> dbInstanceId()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> dbName()  
      static RdsBackup get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, RdsBackupState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> removeFromState()  
      com.pulumi.core.Output<java.lang.String> storeStatus()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RdsBackup

        public RdsBackup​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • RdsBackup

        public RdsBackup​(java.lang.String name,
                         RdsBackupArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • RdsBackup

        public RdsBackup​(java.lang.String name,
                         RdsBackupArgs args,
                         @Nullable
                         com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • backupId

        public com.pulumi.core.Output<java.lang.String> backupId()
        Returns:
        The backup id.
      • backupMethod

        public com.pulumi.core.Output<java.lang.String> backupMethod()
        Returns:
        The type of backup that you want to perform. Default value: `Physical`. Valid values: `Logical`, `Physical` and `Snapshot`.
      • backupStrategy

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> backupStrategy()
        Returns:
        The policy that you want to use for the backup task. Valid values: * **db**: specifies to perform a database-level backup. * **instance**: specifies to perform an instance-level backup.
      • backupType

        public com.pulumi.core.Output<java.lang.String> backupType()
        Returns:
        The method that you want to use for the backup task. Default value: `Auto`. Valid values: * **Auto**: specifies to automatically perform a full or incremental backup. * **FullBackup**: specifies to perform a full backup.
      • dbInstanceId

        public com.pulumi.core.Output<java.lang.String> dbInstanceId()
        Returns:
        The db instance id.
      • dbName

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> dbName()
        Returns:
        The names of the databases whose data you want to back up. Separate the names of the databases with commas (,).
      • removeFromState

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> removeFromState()
        Returns:
        Remove form state when resource cannot be deleted. Valid values: `true` and `false`.
      • storeStatus

        public com.pulumi.core.Output<java.lang.String> storeStatus()
        Returns:
        Indicates whether the data backup file can be deleted. Valid values: `Enabled` and `Disabled`.
      • get

        public static RdsBackup get​(java.lang.String name,
                                    com.pulumi.core.Output<java.lang.String> id,
                                    @Nullable
                                    RdsBackupState state,
                                    @Nullable
                                    com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.