1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. rds
  5. BackupPolicy
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.rds.BackupPolicy

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    Provides an RDS instance backup policy resource and used to configure instance backup policy, see What is DB Backup Policy.

    NOTE: Each DB instance has a backup policy and it will be set default values when destroying the resource.

    NOTE: Available since v1.5.0.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tf-example";
    const default = alicloud.rds.getZones({
        engine: "MySQL",
        engineVersion: "5.6",
    });
    const defaultNetwork = new alicloud.vpc.Network("default", {
        vpcName: name,
        cidrBlock: "172.16.0.0/16",
    });
    const defaultSwitch = new alicloud.vpc.Switch("default", {
        vpcId: defaultNetwork.id,
        cidrBlock: "172.16.0.0/24",
        zoneId: _default.then(_default => _default.zones?.[0]?.id),
        vswitchName: name,
    });
    const instance = new alicloud.rds.Instance("instance", {
        engine: "MySQL",
        engineVersion: "5.6",
        instanceType: "rds.mysql.s1.small",
        instanceStorage: 10,
        vswitchId: defaultSwitch.id,
        instanceName: name,
    });
    const policy = new alicloud.rds.BackupPolicy("policy", {instanceId: instance.id});
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-example"
    default = alicloud.rds.get_zones(engine="MySQL",
        engine_version="5.6")
    default_network = alicloud.vpc.Network("default",
        vpc_name=name,
        cidr_block="172.16.0.0/16")
    default_switch = alicloud.vpc.Switch("default",
        vpc_id=default_network.id,
        cidr_block="172.16.0.0/24",
        zone_id=default.zones[0].id,
        vswitch_name=name)
    instance = alicloud.rds.Instance("instance",
        engine="MySQL",
        engine_version="5.6",
        instance_type="rds.mysql.s1.small",
        instance_storage=10,
        vswitch_id=default_switch.id,
        instance_name=name)
    policy = alicloud.rds.BackupPolicy("policy", instance_id=instance.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/rds"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "tf-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := rds.GetZones(ctx, &rds.GetZonesArgs{
    			Engine:        pulumi.StringRef("MySQL"),
    			EngineVersion: pulumi.StringRef("5.6"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
    			VpcId:       defaultNetwork.ID(),
    			CidrBlock:   pulumi.String("172.16.0.0/24"),
    			ZoneId:      pulumi.String(_default.Zones[0].Id),
    			VswitchName: pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		instance, err := rds.NewInstance(ctx, "instance", &rds.InstanceArgs{
    			Engine:          pulumi.String("MySQL"),
    			EngineVersion:   pulumi.String("5.6"),
    			InstanceType:    pulumi.String("rds.mysql.s1.small"),
    			InstanceStorage: pulumi.Int(10),
    			VswitchId:       defaultSwitch.ID(),
    			InstanceName:    pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = rds.NewBackupPolicy(ctx, "policy", &rds.BackupPolicyArgs{
    			InstanceId: instance.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "tf-example";
        var @default = AliCloud.Rds.GetZones.Invoke(new()
        {
            Engine = "MySQL",
            EngineVersion = "5.6",
        });
    
        var defaultNetwork = new AliCloud.Vpc.Network("default", new()
        {
            VpcName = name,
            CidrBlock = "172.16.0.0/16",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
        {
            VpcId = defaultNetwork.Id,
            CidrBlock = "172.16.0.0/24",
            ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
            VswitchName = name,
        });
    
        var instance = new AliCloud.Rds.Instance("instance", new()
        {
            Engine = "MySQL",
            EngineVersion = "5.6",
            InstanceType = "rds.mysql.s1.small",
            InstanceStorage = 10,
            VswitchId = defaultSwitch.Id,
            InstanceName = name,
        });
    
        var policy = new AliCloud.Rds.BackupPolicy("policy", new()
        {
            InstanceId = instance.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.rds.RdsFunctions;
    import com.pulumi.alicloud.rds.inputs.GetZonesArgs;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.rds.Instance;
    import com.pulumi.alicloud.rds.InstanceArgs;
    import com.pulumi.alicloud.rds.BackupPolicy;
    import com.pulumi.alicloud.rds.BackupPolicyArgs;
    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) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("tf-example");
            final var default = RdsFunctions.getZones(GetZonesArgs.builder()
                .engine("MySQL")
                .engineVersion("5.6")
                .build());
    
            var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
                .vpcName(name)
                .cidrBlock("172.16.0.0/16")
                .build());
    
            var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
                .vpcId(defaultNetwork.id())
                .cidrBlock("172.16.0.0/24")
                .zoneId(default_.zones()[0].id())
                .vswitchName(name)
                .build());
    
            var instance = new Instance("instance", InstanceArgs.builder()
                .engine("MySQL")
                .engineVersion("5.6")
                .instanceType("rds.mysql.s1.small")
                .instanceStorage("10")
                .vswitchId(defaultSwitch.id())
                .instanceName(name)
                .build());
    
            var policy = new BackupPolicy("policy", BackupPolicyArgs.builder()
                .instanceId(instance.id())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf-example
    resources:
      defaultNetwork:
        type: alicloud:vpc:Network
        name: default
        properties:
          vpcName: ${name}
          cidrBlock: 172.16.0.0/16
      defaultSwitch:
        type: alicloud:vpc:Switch
        name: default
        properties:
          vpcId: ${defaultNetwork.id}
          cidrBlock: 172.16.0.0/24
          zoneId: ${default.zones[0].id}
          vswitchName: ${name}
      instance:
        type: alicloud:rds:Instance
        properties:
          engine: MySQL
          engineVersion: '5.6'
          instanceType: rds.mysql.s1.small
          instanceStorage: '10'
          vswitchId: ${defaultSwitch.id}
          instanceName: ${name}
      policy:
        type: alicloud:rds:BackupPolicy
        properties:
          instanceId: ${instance.id}
    variables:
      default:
        fn::invoke:
          Function: alicloud:rds:getZones
          Arguments:
            engine: MySQL
            engineVersion: '5.6'
    

    Create BackupPolicy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new BackupPolicy(name: string, args: BackupPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def BackupPolicy(resource_name: str,
                     args: BackupPolicyArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def BackupPolicy(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     instance_id: Optional[str] = None,
                     high_space_usage_protection: Optional[str] = None,
                     backup_retention_period: Optional[int] = None,
                     archive_backup_keep_policy: Optional[str] = None,
                     local_log_retention_space: Optional[int] = None,
                     local_log_retention_hours: Optional[int] = None,
                     backup_time: Optional[str] = None,
                     category: Optional[str] = None,
                     compress_type: Optional[str] = None,
                     enable_backup_log: Optional[bool] = None,
                     archive_backup_keep_count: Optional[int] = None,
                     backup_interval: Optional[str] = None,
                     archive_backup_retention_period: Optional[int] = None,
                     backup_periods: Optional[Sequence[str]] = None,
                     log_backup: Optional[bool] = None,
                     log_backup_frequency: Optional[str] = None,
                     log_backup_retention_period: Optional[int] = None,
                     log_retention_period: Optional[int] = None,
                     preferred_backup_periods: Optional[Sequence[str]] = None,
                     preferred_backup_time: Optional[str] = None,
                     released_keep_policy: Optional[str] = None,
                     retention_period: Optional[int] = None)
    func NewBackupPolicy(ctx *Context, name string, args BackupPolicyArgs, opts ...ResourceOption) (*BackupPolicy, error)
    public BackupPolicy(string name, BackupPolicyArgs args, CustomResourceOptions? opts = null)
    public BackupPolicy(String name, BackupPolicyArgs args)
    public BackupPolicy(String name, BackupPolicyArgs args, CustomResourceOptions options)
    
    type: alicloud:rds:BackupPolicy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args BackupPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args BackupPolicyArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args BackupPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BackupPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BackupPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var examplebackupPolicyResourceResourceFromRdsbackupPolicy = new AliCloud.Rds.BackupPolicy("examplebackupPolicyResourceResourceFromRdsbackupPolicy", new()
    {
        InstanceId = "string",
        HighSpaceUsageProtection = "string",
        BackupRetentionPeriod = 0,
        ArchiveBackupKeepPolicy = "string",
        LocalLogRetentionSpace = 0,
        LocalLogRetentionHours = 0,
        Category = "string",
        CompressType = "string",
        EnableBackupLog = false,
        ArchiveBackupKeepCount = 0,
        BackupInterval = "string",
        ArchiveBackupRetentionPeriod = 0,
        LogBackupFrequency = "string",
        LogBackupRetentionPeriod = 0,
        PreferredBackupPeriods = new[]
        {
            "string",
        },
        PreferredBackupTime = "string",
        ReleasedKeepPolicy = "string",
    });
    
    example, err := rds.NewBackupPolicy(ctx, "examplebackupPolicyResourceResourceFromRdsbackupPolicy", &rds.BackupPolicyArgs{
    	InstanceId:                   pulumi.String("string"),
    	HighSpaceUsageProtection:     pulumi.String("string"),
    	BackupRetentionPeriod:        pulumi.Int(0),
    	ArchiveBackupKeepPolicy:      pulumi.String("string"),
    	LocalLogRetentionSpace:       pulumi.Int(0),
    	LocalLogRetentionHours:       pulumi.Int(0),
    	Category:                     pulumi.String("string"),
    	CompressType:                 pulumi.String("string"),
    	EnableBackupLog:              pulumi.Bool(false),
    	ArchiveBackupKeepCount:       pulumi.Int(0),
    	BackupInterval:               pulumi.String("string"),
    	ArchiveBackupRetentionPeriod: pulumi.Int(0),
    	LogBackupFrequency:           pulumi.String("string"),
    	LogBackupRetentionPeriod:     pulumi.Int(0),
    	PreferredBackupPeriods: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	PreferredBackupTime: pulumi.String("string"),
    	ReleasedKeepPolicy:  pulumi.String("string"),
    })
    
    var examplebackupPolicyResourceResourceFromRdsbackupPolicy = new BackupPolicy("examplebackupPolicyResourceResourceFromRdsbackupPolicy", BackupPolicyArgs.builder()
        .instanceId("string")
        .highSpaceUsageProtection("string")
        .backupRetentionPeriod(0)
        .archiveBackupKeepPolicy("string")
        .localLogRetentionSpace(0)
        .localLogRetentionHours(0)
        .category("string")
        .compressType("string")
        .enableBackupLog(false)
        .archiveBackupKeepCount(0)
        .backupInterval("string")
        .archiveBackupRetentionPeriod(0)
        .logBackupFrequency("string")
        .logBackupRetentionPeriod(0)
        .preferredBackupPeriods("string")
        .preferredBackupTime("string")
        .releasedKeepPolicy("string")
        .build());
    
    examplebackup_policy_resource_resource_from_rdsbackup_policy = alicloud.rds.BackupPolicy("examplebackupPolicyResourceResourceFromRdsbackupPolicy",
        instance_id="string",
        high_space_usage_protection="string",
        backup_retention_period=0,
        archive_backup_keep_policy="string",
        local_log_retention_space=0,
        local_log_retention_hours=0,
        category="string",
        compress_type="string",
        enable_backup_log=False,
        archive_backup_keep_count=0,
        backup_interval="string",
        archive_backup_retention_period=0,
        log_backup_frequency="string",
        log_backup_retention_period=0,
        preferred_backup_periods=["string"],
        preferred_backup_time="string",
        released_keep_policy="string")
    
    const examplebackupPolicyResourceResourceFromRdsbackupPolicy = new alicloud.rds.BackupPolicy("examplebackupPolicyResourceResourceFromRdsbackupPolicy", {
        instanceId: "string",
        highSpaceUsageProtection: "string",
        backupRetentionPeriod: 0,
        archiveBackupKeepPolicy: "string",
        localLogRetentionSpace: 0,
        localLogRetentionHours: 0,
        category: "string",
        compressType: "string",
        enableBackupLog: false,
        archiveBackupKeepCount: 0,
        backupInterval: "string",
        archiveBackupRetentionPeriod: 0,
        logBackupFrequency: "string",
        logBackupRetentionPeriod: 0,
        preferredBackupPeriods: ["string"],
        preferredBackupTime: "string",
        releasedKeepPolicy: "string",
    });
    
    type: alicloud:rds:BackupPolicy
    properties:
        archiveBackupKeepCount: 0
        archiveBackupKeepPolicy: string
        archiveBackupRetentionPeriod: 0
        backupInterval: string
        backupRetentionPeriod: 0
        category: string
        compressType: string
        enableBackupLog: false
        highSpaceUsageProtection: string
        instanceId: string
        localLogRetentionHours: 0
        localLogRetentionSpace: 0
        logBackupFrequency: string
        logBackupRetentionPeriod: 0
        preferredBackupPeriods:
            - string
        preferredBackupTime: string
        releasedKeepPolicy: string
    

    BackupPolicy Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The BackupPolicy resource accepts the following input properties:

    InstanceId string
    The Id of instance that can run database.
    ArchiveBackupKeepCount int
    Instance archive backup keep count. Valid when the enable_backup_log is true and instance is mysql local disk. When archive_backup_keep_policy is ByMonth Valid values: [1-31]. When archive_backup_keep_policy is ByWeek Valid values: [1-7].
    ArchiveBackupKeepPolicy string
    Instance archive backup keep policy. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values are ByMonth, ByWeek, KeepAll.
    ArchiveBackupRetentionPeriod int
    Instance archive backup retention days. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values: [30-1095], and archive_backup_retention_period must larger than backup_retention_period 730.
    BackupInterval string

    The frequency at which you want to perform a snapshot backup on the instance. Valid values:

    • -1: No backup frequencies are specified.
    • 30: A snapshot backup is performed once every 30 minutes.
    • 60: A snapshot backup is performed once every 60 minutes.
    • 120: A snapshot backup is performed once every 120 minutes.
    • 240: A snapshot backup is performed once every 240 minutes.
    • 360: A snapshot backup is performed once every 360 minutes.
    • 480: A snapshot backup is performed once every 480 minutes.
    • 720: A snapshot backup is performed once every 720 minutes.

    NOTE: Currently, the SQLServer instance does not support to modify log_backup_retention_period.

    BackupPeriods List<string>
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_period' instead.

    Deprecated: Attribute 'backup_period' has been deprecated from version 1.69.0. Use preferred_backup_period instead

    BackupRetentionPeriod int
    Instance backup retention days. Valid values: [7-730]. Default to 7. But mysql local disk is unlimited.
    BackupTime string
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_time' instead.

    Deprecated: Attribute 'backup_time' has been deprecated from version 1.69.0. Use preferred_backup_time instead

    Category string

    Whether to enable second level backup.Valid values are Flash, Standard, Note:It only takes effect when the BackupPolicyMode parameter is DataBackupPolicy.

    NOTE: You can configure a backup policy by using this parameter and the PreferredBackupPeriod parameter. For example, if you set the PreferredBackupPeriod parameter to Saturday,Sunday and the BackupInterval parameter to -1, a snapshot backup is performed on every Saturday and Sunday.If the instance runs PostgreSQL, the BackupInterval parameter is supported only when the instance is equipped with standard SSDs or enhanced SSDs (ESSDs).This parameter takes effect only when you set the BackupPolicyMode parameter to DataBackupPolicy.

    CompressType string
    The compress type of instance policy. Valid values are 1, 4, 8.
    EnableBackupLog bool
    Whether to backup instance log. Valid values are true, false, Default to true. Note: The 'Basic Edition' category Rds instance does not support setting log backup. What is Basic Edition.
    HighSpaceUsageProtection string
    Instance high space usage protection policy. Valid when the enable_backup_log is true. Valid values are Enable, Disable.
    LocalLogRetentionHours int
    Instance log backup local retention hours. Valid when the enable_backup_log is true. Valid values: [0-7*24].
    LocalLogRetentionSpace int
    Instance log backup local retention space. Valid when the enable_backup_log is true. Valid values: [0-50].
    LogBackup bool
    It has been deprecated from version 1.68.0, and use field 'enable_backup_log' instead.

    Deprecated: Attribute 'log_backup' has been deprecated from version 1.68.0. Use enable_backup_log instead

    LogBackupFrequency string
    Instance log backup frequency. Valid when the instance engine is SQLServer. Valid values are LogInterval.
    LogBackupRetentionPeriod int
    Instance log backup retention days. Valid when the enable_backup_log is 1. Valid values: [7-730]. Default to 7. It cannot be larger than backup_retention_period.
    LogRetentionPeriod int
    It has been deprecated from version 1.69.0, and use field 'log_backup_retention_period' instead.

    Deprecated: Attribute 'log_retention_period' has been deprecated from version 1.69.0. Use log_backup_retention_period instead

    PreferredBackupPeriods List<string>
    DB Instance backup period. Please set at least two days to ensure backing up at least twice a week. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    PreferredBackupTime string
    DB instance backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
    ReleasedKeepPolicy string
    The policy based on which ApsaraDB RDS retains archived backup files if the instance is released. Default value: None. Valid values:

    • None: No archived backup files are retained.
    • Lastest: Only the most recent archived backup file is retained.
    • All: All archived backup files are retained.
    RetentionPeriod int
    It has been deprecated from version 1.69.0, and use field 'backup_retention_period' instead.

    Deprecated: Attribute 'retention_period' has been deprecated from version 1.69.0. Use backup_retention_period instead

    InstanceId string
    The Id of instance that can run database.
    ArchiveBackupKeepCount int
    Instance archive backup keep count. Valid when the enable_backup_log is true and instance is mysql local disk. When archive_backup_keep_policy is ByMonth Valid values: [1-31]. When archive_backup_keep_policy is ByWeek Valid values: [1-7].
    ArchiveBackupKeepPolicy string
    Instance archive backup keep policy. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values are ByMonth, ByWeek, KeepAll.
    ArchiveBackupRetentionPeriod int
    Instance archive backup retention days. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values: [30-1095], and archive_backup_retention_period must larger than backup_retention_period 730.
    BackupInterval string

    The frequency at which you want to perform a snapshot backup on the instance. Valid values:

    • -1: No backup frequencies are specified.
    • 30: A snapshot backup is performed once every 30 minutes.
    • 60: A snapshot backup is performed once every 60 minutes.
    • 120: A snapshot backup is performed once every 120 minutes.
    • 240: A snapshot backup is performed once every 240 minutes.
    • 360: A snapshot backup is performed once every 360 minutes.
    • 480: A snapshot backup is performed once every 480 minutes.
    • 720: A snapshot backup is performed once every 720 minutes.

    NOTE: Currently, the SQLServer instance does not support to modify log_backup_retention_period.

    BackupPeriods []string
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_period' instead.

    Deprecated: Attribute 'backup_period' has been deprecated from version 1.69.0. Use preferred_backup_period instead

    BackupRetentionPeriod int
    Instance backup retention days. Valid values: [7-730]. Default to 7. But mysql local disk is unlimited.
    BackupTime string
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_time' instead.

    Deprecated: Attribute 'backup_time' has been deprecated from version 1.69.0. Use preferred_backup_time instead

    Category string

    Whether to enable second level backup.Valid values are Flash, Standard, Note:It only takes effect when the BackupPolicyMode parameter is DataBackupPolicy.

    NOTE: You can configure a backup policy by using this parameter and the PreferredBackupPeriod parameter. For example, if you set the PreferredBackupPeriod parameter to Saturday,Sunday and the BackupInterval parameter to -1, a snapshot backup is performed on every Saturday and Sunday.If the instance runs PostgreSQL, the BackupInterval parameter is supported only when the instance is equipped with standard SSDs or enhanced SSDs (ESSDs).This parameter takes effect only when you set the BackupPolicyMode parameter to DataBackupPolicy.

    CompressType string
    The compress type of instance policy. Valid values are 1, 4, 8.
    EnableBackupLog bool
    Whether to backup instance log. Valid values are true, false, Default to true. Note: The 'Basic Edition' category Rds instance does not support setting log backup. What is Basic Edition.
    HighSpaceUsageProtection string
    Instance high space usage protection policy. Valid when the enable_backup_log is true. Valid values are Enable, Disable.
    LocalLogRetentionHours int
    Instance log backup local retention hours. Valid when the enable_backup_log is true. Valid values: [0-7*24].
    LocalLogRetentionSpace int
    Instance log backup local retention space. Valid when the enable_backup_log is true. Valid values: [0-50].
    LogBackup bool
    It has been deprecated from version 1.68.0, and use field 'enable_backup_log' instead.

    Deprecated: Attribute 'log_backup' has been deprecated from version 1.68.0. Use enable_backup_log instead

    LogBackupFrequency string
    Instance log backup frequency. Valid when the instance engine is SQLServer. Valid values are LogInterval.
    LogBackupRetentionPeriod int
    Instance log backup retention days. Valid when the enable_backup_log is 1. Valid values: [7-730]. Default to 7. It cannot be larger than backup_retention_period.
    LogRetentionPeriod int
    It has been deprecated from version 1.69.0, and use field 'log_backup_retention_period' instead.

    Deprecated: Attribute 'log_retention_period' has been deprecated from version 1.69.0. Use log_backup_retention_period instead

    PreferredBackupPeriods []string
    DB Instance backup period. Please set at least two days to ensure backing up at least twice a week. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    PreferredBackupTime string
    DB instance backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
    ReleasedKeepPolicy string
    The policy based on which ApsaraDB RDS retains archived backup files if the instance is released. Default value: None. Valid values:

    • None: No archived backup files are retained.
    • Lastest: Only the most recent archived backup file is retained.
    • All: All archived backup files are retained.
    RetentionPeriod int
    It has been deprecated from version 1.69.0, and use field 'backup_retention_period' instead.

    Deprecated: Attribute 'retention_period' has been deprecated from version 1.69.0. Use backup_retention_period instead

    instanceId String
    The Id of instance that can run database.
    archiveBackupKeepCount Integer
    Instance archive backup keep count. Valid when the enable_backup_log is true and instance is mysql local disk. When archive_backup_keep_policy is ByMonth Valid values: [1-31]. When archive_backup_keep_policy is ByWeek Valid values: [1-7].
    archiveBackupKeepPolicy String
    Instance archive backup keep policy. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values are ByMonth, ByWeek, KeepAll.
    archiveBackupRetentionPeriod Integer
    Instance archive backup retention days. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values: [30-1095], and archive_backup_retention_period must larger than backup_retention_period 730.
    backupInterval String

    The frequency at which you want to perform a snapshot backup on the instance. Valid values:

    • -1: No backup frequencies are specified.
    • 30: A snapshot backup is performed once every 30 minutes.
    • 60: A snapshot backup is performed once every 60 minutes.
    • 120: A snapshot backup is performed once every 120 minutes.
    • 240: A snapshot backup is performed once every 240 minutes.
    • 360: A snapshot backup is performed once every 360 minutes.
    • 480: A snapshot backup is performed once every 480 minutes.
    • 720: A snapshot backup is performed once every 720 minutes.

    NOTE: Currently, the SQLServer instance does not support to modify log_backup_retention_period.

    backupPeriods List<String>
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_period' instead.

    Deprecated: Attribute 'backup_period' has been deprecated from version 1.69.0. Use preferred_backup_period instead

    backupRetentionPeriod Integer
    Instance backup retention days. Valid values: [7-730]. Default to 7. But mysql local disk is unlimited.
    backupTime String
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_time' instead.

    Deprecated: Attribute 'backup_time' has been deprecated from version 1.69.0. Use preferred_backup_time instead

    category String

    Whether to enable second level backup.Valid values are Flash, Standard, Note:It only takes effect when the BackupPolicyMode parameter is DataBackupPolicy.

    NOTE: You can configure a backup policy by using this parameter and the PreferredBackupPeriod parameter. For example, if you set the PreferredBackupPeriod parameter to Saturday,Sunday and the BackupInterval parameter to -1, a snapshot backup is performed on every Saturday and Sunday.If the instance runs PostgreSQL, the BackupInterval parameter is supported only when the instance is equipped with standard SSDs or enhanced SSDs (ESSDs).This parameter takes effect only when you set the BackupPolicyMode parameter to DataBackupPolicy.

    compressType String
    The compress type of instance policy. Valid values are 1, 4, 8.
    enableBackupLog Boolean
    Whether to backup instance log. Valid values are true, false, Default to true. Note: The 'Basic Edition' category Rds instance does not support setting log backup. What is Basic Edition.
    highSpaceUsageProtection String
    Instance high space usage protection policy. Valid when the enable_backup_log is true. Valid values are Enable, Disable.
    localLogRetentionHours Integer
    Instance log backup local retention hours. Valid when the enable_backup_log is true. Valid values: [0-7*24].
    localLogRetentionSpace Integer
    Instance log backup local retention space. Valid when the enable_backup_log is true. Valid values: [0-50].
    logBackup Boolean
    It has been deprecated from version 1.68.0, and use field 'enable_backup_log' instead.

    Deprecated: Attribute 'log_backup' has been deprecated from version 1.68.0. Use enable_backup_log instead

    logBackupFrequency String
    Instance log backup frequency. Valid when the instance engine is SQLServer. Valid values are LogInterval.
    logBackupRetentionPeriod Integer
    Instance log backup retention days. Valid when the enable_backup_log is 1. Valid values: [7-730]. Default to 7. It cannot be larger than backup_retention_period.
    logRetentionPeriod Integer
    It has been deprecated from version 1.69.0, and use field 'log_backup_retention_period' instead.

    Deprecated: Attribute 'log_retention_period' has been deprecated from version 1.69.0. Use log_backup_retention_period instead

    preferredBackupPeriods List<String>
    DB Instance backup period. Please set at least two days to ensure backing up at least twice a week. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    preferredBackupTime String
    DB instance backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
    releasedKeepPolicy String
    The policy based on which ApsaraDB RDS retains archived backup files if the instance is released. Default value: None. Valid values:

    • None: No archived backup files are retained.
    • Lastest: Only the most recent archived backup file is retained.
    • All: All archived backup files are retained.
    retentionPeriod Integer
    It has been deprecated from version 1.69.0, and use field 'backup_retention_period' instead.

    Deprecated: Attribute 'retention_period' has been deprecated from version 1.69.0. Use backup_retention_period instead

    instanceId string
    The Id of instance that can run database.
    archiveBackupKeepCount number
    Instance archive backup keep count. Valid when the enable_backup_log is true and instance is mysql local disk. When archive_backup_keep_policy is ByMonth Valid values: [1-31]. When archive_backup_keep_policy is ByWeek Valid values: [1-7].
    archiveBackupKeepPolicy string
    Instance archive backup keep policy. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values are ByMonth, ByWeek, KeepAll.
    archiveBackupRetentionPeriod number
    Instance archive backup retention days. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values: [30-1095], and archive_backup_retention_period must larger than backup_retention_period 730.
    backupInterval string

    The frequency at which you want to perform a snapshot backup on the instance. Valid values:

    • -1: No backup frequencies are specified.
    • 30: A snapshot backup is performed once every 30 minutes.
    • 60: A snapshot backup is performed once every 60 minutes.
    • 120: A snapshot backup is performed once every 120 minutes.
    • 240: A snapshot backup is performed once every 240 minutes.
    • 360: A snapshot backup is performed once every 360 minutes.
    • 480: A snapshot backup is performed once every 480 minutes.
    • 720: A snapshot backup is performed once every 720 minutes.

    NOTE: Currently, the SQLServer instance does not support to modify log_backup_retention_period.

    backupPeriods string[]
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_period' instead.

    Deprecated: Attribute 'backup_period' has been deprecated from version 1.69.0. Use preferred_backup_period instead

    backupRetentionPeriod number
    Instance backup retention days. Valid values: [7-730]. Default to 7. But mysql local disk is unlimited.
    backupTime string
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_time' instead.

    Deprecated: Attribute 'backup_time' has been deprecated from version 1.69.0. Use preferred_backup_time instead

    category string

    Whether to enable second level backup.Valid values are Flash, Standard, Note:It only takes effect when the BackupPolicyMode parameter is DataBackupPolicy.

    NOTE: You can configure a backup policy by using this parameter and the PreferredBackupPeriod parameter. For example, if you set the PreferredBackupPeriod parameter to Saturday,Sunday and the BackupInterval parameter to -1, a snapshot backup is performed on every Saturday and Sunday.If the instance runs PostgreSQL, the BackupInterval parameter is supported only when the instance is equipped with standard SSDs or enhanced SSDs (ESSDs).This parameter takes effect only when you set the BackupPolicyMode parameter to DataBackupPolicy.

    compressType string
    The compress type of instance policy. Valid values are 1, 4, 8.
    enableBackupLog boolean
    Whether to backup instance log. Valid values are true, false, Default to true. Note: The 'Basic Edition' category Rds instance does not support setting log backup. What is Basic Edition.
    highSpaceUsageProtection string
    Instance high space usage protection policy. Valid when the enable_backup_log is true. Valid values are Enable, Disable.
    localLogRetentionHours number
    Instance log backup local retention hours. Valid when the enable_backup_log is true. Valid values: [0-7*24].
    localLogRetentionSpace number
    Instance log backup local retention space. Valid when the enable_backup_log is true. Valid values: [0-50].
    logBackup boolean
    It has been deprecated from version 1.68.0, and use field 'enable_backup_log' instead.

    Deprecated: Attribute 'log_backup' has been deprecated from version 1.68.0. Use enable_backup_log instead

    logBackupFrequency string
    Instance log backup frequency. Valid when the instance engine is SQLServer. Valid values are LogInterval.
    logBackupRetentionPeriod number
    Instance log backup retention days. Valid when the enable_backup_log is 1. Valid values: [7-730]. Default to 7. It cannot be larger than backup_retention_period.
    logRetentionPeriod number
    It has been deprecated from version 1.69.0, and use field 'log_backup_retention_period' instead.

    Deprecated: Attribute 'log_retention_period' has been deprecated from version 1.69.0. Use log_backup_retention_period instead

    preferredBackupPeriods string[]
    DB Instance backup period. Please set at least two days to ensure backing up at least twice a week. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    preferredBackupTime string
    DB instance backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
    releasedKeepPolicy string
    The policy based on which ApsaraDB RDS retains archived backup files if the instance is released. Default value: None. Valid values:

    • None: No archived backup files are retained.
    • Lastest: Only the most recent archived backup file is retained.
    • All: All archived backup files are retained.
    retentionPeriod number
    It has been deprecated from version 1.69.0, and use field 'backup_retention_period' instead.

    Deprecated: Attribute 'retention_period' has been deprecated from version 1.69.0. Use backup_retention_period instead

    instance_id str
    The Id of instance that can run database.
    archive_backup_keep_count int
    Instance archive backup keep count. Valid when the enable_backup_log is true and instance is mysql local disk. When archive_backup_keep_policy is ByMonth Valid values: [1-31]. When archive_backup_keep_policy is ByWeek Valid values: [1-7].
    archive_backup_keep_policy str
    Instance archive backup keep policy. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values are ByMonth, ByWeek, KeepAll.
    archive_backup_retention_period int
    Instance archive backup retention days. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values: [30-1095], and archive_backup_retention_period must larger than backup_retention_period 730.
    backup_interval str

    The frequency at which you want to perform a snapshot backup on the instance. Valid values:

    • -1: No backup frequencies are specified.
    • 30: A snapshot backup is performed once every 30 minutes.
    • 60: A snapshot backup is performed once every 60 minutes.
    • 120: A snapshot backup is performed once every 120 minutes.
    • 240: A snapshot backup is performed once every 240 minutes.
    • 360: A snapshot backup is performed once every 360 minutes.
    • 480: A snapshot backup is performed once every 480 minutes.
    • 720: A snapshot backup is performed once every 720 minutes.

    NOTE: Currently, the SQLServer instance does not support to modify log_backup_retention_period.

    backup_periods Sequence[str]
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_period' instead.

    Deprecated: Attribute 'backup_period' has been deprecated from version 1.69.0. Use preferred_backup_period instead

    backup_retention_period int
    Instance backup retention days. Valid values: [7-730]. Default to 7. But mysql local disk is unlimited.
    backup_time str
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_time' instead.

    Deprecated: Attribute 'backup_time' has been deprecated from version 1.69.0. Use preferred_backup_time instead

    category str

    Whether to enable second level backup.Valid values are Flash, Standard, Note:It only takes effect when the BackupPolicyMode parameter is DataBackupPolicy.

    NOTE: You can configure a backup policy by using this parameter and the PreferredBackupPeriod parameter. For example, if you set the PreferredBackupPeriod parameter to Saturday,Sunday and the BackupInterval parameter to -1, a snapshot backup is performed on every Saturday and Sunday.If the instance runs PostgreSQL, the BackupInterval parameter is supported only when the instance is equipped with standard SSDs or enhanced SSDs (ESSDs).This parameter takes effect only when you set the BackupPolicyMode parameter to DataBackupPolicy.

    compress_type str
    The compress type of instance policy. Valid values are 1, 4, 8.
    enable_backup_log bool
    Whether to backup instance log. Valid values are true, false, Default to true. Note: The 'Basic Edition' category Rds instance does not support setting log backup. What is Basic Edition.
    high_space_usage_protection str
    Instance high space usage protection policy. Valid when the enable_backup_log is true. Valid values are Enable, Disable.
    local_log_retention_hours int
    Instance log backup local retention hours. Valid when the enable_backup_log is true. Valid values: [0-7*24].
    local_log_retention_space int
    Instance log backup local retention space. Valid when the enable_backup_log is true. Valid values: [0-50].
    log_backup bool
    It has been deprecated from version 1.68.0, and use field 'enable_backup_log' instead.

    Deprecated: Attribute 'log_backup' has been deprecated from version 1.68.0. Use enable_backup_log instead

    log_backup_frequency str
    Instance log backup frequency. Valid when the instance engine is SQLServer. Valid values are LogInterval.
    log_backup_retention_period int
    Instance log backup retention days. Valid when the enable_backup_log is 1. Valid values: [7-730]. Default to 7. It cannot be larger than backup_retention_period.
    log_retention_period int
    It has been deprecated from version 1.69.0, and use field 'log_backup_retention_period' instead.

    Deprecated: Attribute 'log_retention_period' has been deprecated from version 1.69.0. Use log_backup_retention_period instead

    preferred_backup_periods Sequence[str]
    DB Instance backup period. Please set at least two days to ensure backing up at least twice a week. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    preferred_backup_time str
    DB instance backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
    released_keep_policy str
    The policy based on which ApsaraDB RDS retains archived backup files if the instance is released. Default value: None. Valid values:

    • None: No archived backup files are retained.
    • Lastest: Only the most recent archived backup file is retained.
    • All: All archived backup files are retained.
    retention_period int
    It has been deprecated from version 1.69.0, and use field 'backup_retention_period' instead.

    Deprecated: Attribute 'retention_period' has been deprecated from version 1.69.0. Use backup_retention_period instead

    instanceId String
    The Id of instance that can run database.
    archiveBackupKeepCount Number
    Instance archive backup keep count. Valid when the enable_backup_log is true and instance is mysql local disk. When archive_backup_keep_policy is ByMonth Valid values: [1-31]. When archive_backup_keep_policy is ByWeek Valid values: [1-7].
    archiveBackupKeepPolicy String
    Instance archive backup keep policy. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values are ByMonth, ByWeek, KeepAll.
    archiveBackupRetentionPeriod Number
    Instance archive backup retention days. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values: [30-1095], and archive_backup_retention_period must larger than backup_retention_period 730.
    backupInterval String

    The frequency at which you want to perform a snapshot backup on the instance. Valid values:

    • -1: No backup frequencies are specified.
    • 30: A snapshot backup is performed once every 30 minutes.
    • 60: A snapshot backup is performed once every 60 minutes.
    • 120: A snapshot backup is performed once every 120 minutes.
    • 240: A snapshot backup is performed once every 240 minutes.
    • 360: A snapshot backup is performed once every 360 minutes.
    • 480: A snapshot backup is performed once every 480 minutes.
    • 720: A snapshot backup is performed once every 720 minutes.

    NOTE: Currently, the SQLServer instance does not support to modify log_backup_retention_period.

    backupPeriods List<String>
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_period' instead.

    Deprecated: Attribute 'backup_period' has been deprecated from version 1.69.0. Use preferred_backup_period instead

    backupRetentionPeriod Number
    Instance backup retention days. Valid values: [7-730]. Default to 7. But mysql local disk is unlimited.
    backupTime String
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_time' instead.

    Deprecated: Attribute 'backup_time' has been deprecated from version 1.69.0. Use preferred_backup_time instead

    category String

    Whether to enable second level backup.Valid values are Flash, Standard, Note:It only takes effect when the BackupPolicyMode parameter is DataBackupPolicy.

    NOTE: You can configure a backup policy by using this parameter and the PreferredBackupPeriod parameter. For example, if you set the PreferredBackupPeriod parameter to Saturday,Sunday and the BackupInterval parameter to -1, a snapshot backup is performed on every Saturday and Sunday.If the instance runs PostgreSQL, the BackupInterval parameter is supported only when the instance is equipped with standard SSDs or enhanced SSDs (ESSDs).This parameter takes effect only when you set the BackupPolicyMode parameter to DataBackupPolicy.

    compressType String
    The compress type of instance policy. Valid values are 1, 4, 8.
    enableBackupLog Boolean
    Whether to backup instance log. Valid values are true, false, Default to true. Note: The 'Basic Edition' category Rds instance does not support setting log backup. What is Basic Edition.
    highSpaceUsageProtection String
    Instance high space usage protection policy. Valid when the enable_backup_log is true. Valid values are Enable, Disable.
    localLogRetentionHours Number
    Instance log backup local retention hours. Valid when the enable_backup_log is true. Valid values: [0-7*24].
    localLogRetentionSpace Number
    Instance log backup local retention space. Valid when the enable_backup_log is true. Valid values: [0-50].
    logBackup Boolean
    It has been deprecated from version 1.68.0, and use field 'enable_backup_log' instead.

    Deprecated: Attribute 'log_backup' has been deprecated from version 1.68.0. Use enable_backup_log instead

    logBackupFrequency String
    Instance log backup frequency. Valid when the instance engine is SQLServer. Valid values are LogInterval.
    logBackupRetentionPeriod Number
    Instance log backup retention days. Valid when the enable_backup_log is 1. Valid values: [7-730]. Default to 7. It cannot be larger than backup_retention_period.
    logRetentionPeriod Number
    It has been deprecated from version 1.69.0, and use field 'log_backup_retention_period' instead.

    Deprecated: Attribute 'log_retention_period' has been deprecated from version 1.69.0. Use log_backup_retention_period instead

    preferredBackupPeriods List<String>
    DB Instance backup period. Please set at least two days to ensure backing up at least twice a week. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    preferredBackupTime String
    DB instance backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
    releasedKeepPolicy String
    The policy based on which ApsaraDB RDS retains archived backup files if the instance is released. Default value: None. Valid values:

    • None: No archived backup files are retained.
    • Lastest: Only the most recent archived backup file is retained.
    • All: All archived backup files are retained.
    retentionPeriod Number
    It has been deprecated from version 1.69.0, and use field 'backup_retention_period' instead.

    Deprecated: Attribute 'retention_period' has been deprecated from version 1.69.0. Use backup_retention_period instead

    Outputs

    All input properties are implicitly available as output properties. Additionally, the BackupPolicy resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing BackupPolicy Resource

    Get an existing BackupPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: BackupPolicyState, opts?: CustomResourceOptions): BackupPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            archive_backup_keep_count: Optional[int] = None,
            archive_backup_keep_policy: Optional[str] = None,
            archive_backup_retention_period: Optional[int] = None,
            backup_interval: Optional[str] = None,
            backup_periods: Optional[Sequence[str]] = None,
            backup_retention_period: Optional[int] = None,
            backup_time: Optional[str] = None,
            category: Optional[str] = None,
            compress_type: Optional[str] = None,
            enable_backup_log: Optional[bool] = None,
            high_space_usage_protection: Optional[str] = None,
            instance_id: Optional[str] = None,
            local_log_retention_hours: Optional[int] = None,
            local_log_retention_space: Optional[int] = None,
            log_backup: Optional[bool] = None,
            log_backup_frequency: Optional[str] = None,
            log_backup_retention_period: Optional[int] = None,
            log_retention_period: Optional[int] = None,
            preferred_backup_periods: Optional[Sequence[str]] = None,
            preferred_backup_time: Optional[str] = None,
            released_keep_policy: Optional[str] = None,
            retention_period: Optional[int] = None) -> BackupPolicy
    func GetBackupPolicy(ctx *Context, name string, id IDInput, state *BackupPolicyState, opts ...ResourceOption) (*BackupPolicy, error)
    public static BackupPolicy Get(string name, Input<string> id, BackupPolicyState? state, CustomResourceOptions? opts = null)
    public static BackupPolicy get(String name, Output<String> id, BackupPolicyState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ArchiveBackupKeepCount int
    Instance archive backup keep count. Valid when the enable_backup_log is true and instance is mysql local disk. When archive_backup_keep_policy is ByMonth Valid values: [1-31]. When archive_backup_keep_policy is ByWeek Valid values: [1-7].
    ArchiveBackupKeepPolicy string
    Instance archive backup keep policy. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values are ByMonth, ByWeek, KeepAll.
    ArchiveBackupRetentionPeriod int
    Instance archive backup retention days. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values: [30-1095], and archive_backup_retention_period must larger than backup_retention_period 730.
    BackupInterval string

    The frequency at which you want to perform a snapshot backup on the instance. Valid values:

    • -1: No backup frequencies are specified.
    • 30: A snapshot backup is performed once every 30 minutes.
    • 60: A snapshot backup is performed once every 60 minutes.
    • 120: A snapshot backup is performed once every 120 minutes.
    • 240: A snapshot backup is performed once every 240 minutes.
    • 360: A snapshot backup is performed once every 360 minutes.
    • 480: A snapshot backup is performed once every 480 minutes.
    • 720: A snapshot backup is performed once every 720 minutes.

    NOTE: Currently, the SQLServer instance does not support to modify log_backup_retention_period.

    BackupPeriods List<string>
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_period' instead.

    Deprecated: Attribute 'backup_period' has been deprecated from version 1.69.0. Use preferred_backup_period instead

    BackupRetentionPeriod int
    Instance backup retention days. Valid values: [7-730]. Default to 7. But mysql local disk is unlimited.
    BackupTime string
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_time' instead.

    Deprecated: Attribute 'backup_time' has been deprecated from version 1.69.0. Use preferred_backup_time instead

    Category string

    Whether to enable second level backup.Valid values are Flash, Standard, Note:It only takes effect when the BackupPolicyMode parameter is DataBackupPolicy.

    NOTE: You can configure a backup policy by using this parameter and the PreferredBackupPeriod parameter. For example, if you set the PreferredBackupPeriod parameter to Saturday,Sunday and the BackupInterval parameter to -1, a snapshot backup is performed on every Saturday and Sunday.If the instance runs PostgreSQL, the BackupInterval parameter is supported only when the instance is equipped with standard SSDs or enhanced SSDs (ESSDs).This parameter takes effect only when you set the BackupPolicyMode parameter to DataBackupPolicy.

    CompressType string
    The compress type of instance policy. Valid values are 1, 4, 8.
    EnableBackupLog bool
    Whether to backup instance log. Valid values are true, false, Default to true. Note: The 'Basic Edition' category Rds instance does not support setting log backup. What is Basic Edition.
    HighSpaceUsageProtection string
    Instance high space usage protection policy. Valid when the enable_backup_log is true. Valid values are Enable, Disable.
    InstanceId string
    The Id of instance that can run database.
    LocalLogRetentionHours int
    Instance log backup local retention hours. Valid when the enable_backup_log is true. Valid values: [0-7*24].
    LocalLogRetentionSpace int
    Instance log backup local retention space. Valid when the enable_backup_log is true. Valid values: [0-50].
    LogBackup bool
    It has been deprecated from version 1.68.0, and use field 'enable_backup_log' instead.

    Deprecated: Attribute 'log_backup' has been deprecated from version 1.68.0. Use enable_backup_log instead

    LogBackupFrequency string
    Instance log backup frequency. Valid when the instance engine is SQLServer. Valid values are LogInterval.
    LogBackupRetentionPeriod int
    Instance log backup retention days. Valid when the enable_backup_log is 1. Valid values: [7-730]. Default to 7. It cannot be larger than backup_retention_period.
    LogRetentionPeriod int
    It has been deprecated from version 1.69.0, and use field 'log_backup_retention_period' instead.

    Deprecated: Attribute 'log_retention_period' has been deprecated from version 1.69.0. Use log_backup_retention_period instead

    PreferredBackupPeriods List<string>
    DB Instance backup period. Please set at least two days to ensure backing up at least twice a week. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    PreferredBackupTime string
    DB instance backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
    ReleasedKeepPolicy string
    The policy based on which ApsaraDB RDS retains archived backup files if the instance is released. Default value: None. Valid values:

    • None: No archived backup files are retained.
    • Lastest: Only the most recent archived backup file is retained.
    • All: All archived backup files are retained.
    RetentionPeriod int
    It has been deprecated from version 1.69.0, and use field 'backup_retention_period' instead.

    Deprecated: Attribute 'retention_period' has been deprecated from version 1.69.0. Use backup_retention_period instead

    ArchiveBackupKeepCount int
    Instance archive backup keep count. Valid when the enable_backup_log is true and instance is mysql local disk. When archive_backup_keep_policy is ByMonth Valid values: [1-31]. When archive_backup_keep_policy is ByWeek Valid values: [1-7].
    ArchiveBackupKeepPolicy string
    Instance archive backup keep policy. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values are ByMonth, ByWeek, KeepAll.
    ArchiveBackupRetentionPeriod int
    Instance archive backup retention days. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values: [30-1095], and archive_backup_retention_period must larger than backup_retention_period 730.
    BackupInterval string

    The frequency at which you want to perform a snapshot backup on the instance. Valid values:

    • -1: No backup frequencies are specified.
    • 30: A snapshot backup is performed once every 30 minutes.
    • 60: A snapshot backup is performed once every 60 minutes.
    • 120: A snapshot backup is performed once every 120 minutes.
    • 240: A snapshot backup is performed once every 240 minutes.
    • 360: A snapshot backup is performed once every 360 minutes.
    • 480: A snapshot backup is performed once every 480 minutes.
    • 720: A snapshot backup is performed once every 720 minutes.

    NOTE: Currently, the SQLServer instance does not support to modify log_backup_retention_period.

    BackupPeriods []string
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_period' instead.

    Deprecated: Attribute 'backup_period' has been deprecated from version 1.69.0. Use preferred_backup_period instead

    BackupRetentionPeriod int
    Instance backup retention days. Valid values: [7-730]. Default to 7. But mysql local disk is unlimited.
    BackupTime string
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_time' instead.

    Deprecated: Attribute 'backup_time' has been deprecated from version 1.69.0. Use preferred_backup_time instead

    Category string

    Whether to enable second level backup.Valid values are Flash, Standard, Note:It only takes effect when the BackupPolicyMode parameter is DataBackupPolicy.

    NOTE: You can configure a backup policy by using this parameter and the PreferredBackupPeriod parameter. For example, if you set the PreferredBackupPeriod parameter to Saturday,Sunday and the BackupInterval parameter to -1, a snapshot backup is performed on every Saturday and Sunday.If the instance runs PostgreSQL, the BackupInterval parameter is supported only when the instance is equipped with standard SSDs or enhanced SSDs (ESSDs).This parameter takes effect only when you set the BackupPolicyMode parameter to DataBackupPolicy.

    CompressType string
    The compress type of instance policy. Valid values are 1, 4, 8.
    EnableBackupLog bool
    Whether to backup instance log. Valid values are true, false, Default to true. Note: The 'Basic Edition' category Rds instance does not support setting log backup. What is Basic Edition.
    HighSpaceUsageProtection string
    Instance high space usage protection policy. Valid when the enable_backup_log is true. Valid values are Enable, Disable.
    InstanceId string
    The Id of instance that can run database.
    LocalLogRetentionHours int
    Instance log backup local retention hours. Valid when the enable_backup_log is true. Valid values: [0-7*24].
    LocalLogRetentionSpace int
    Instance log backup local retention space. Valid when the enable_backup_log is true. Valid values: [0-50].
    LogBackup bool
    It has been deprecated from version 1.68.0, and use field 'enable_backup_log' instead.

    Deprecated: Attribute 'log_backup' has been deprecated from version 1.68.0. Use enable_backup_log instead

    LogBackupFrequency string
    Instance log backup frequency. Valid when the instance engine is SQLServer. Valid values are LogInterval.
    LogBackupRetentionPeriod int
    Instance log backup retention days. Valid when the enable_backup_log is 1. Valid values: [7-730]. Default to 7. It cannot be larger than backup_retention_period.
    LogRetentionPeriod int
    It has been deprecated from version 1.69.0, and use field 'log_backup_retention_period' instead.

    Deprecated: Attribute 'log_retention_period' has been deprecated from version 1.69.0. Use log_backup_retention_period instead

    PreferredBackupPeriods []string
    DB Instance backup period. Please set at least two days to ensure backing up at least twice a week. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    PreferredBackupTime string
    DB instance backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
    ReleasedKeepPolicy string
    The policy based on which ApsaraDB RDS retains archived backup files if the instance is released. Default value: None. Valid values:

    • None: No archived backup files are retained.
    • Lastest: Only the most recent archived backup file is retained.
    • All: All archived backup files are retained.
    RetentionPeriod int
    It has been deprecated from version 1.69.0, and use field 'backup_retention_period' instead.

    Deprecated: Attribute 'retention_period' has been deprecated from version 1.69.0. Use backup_retention_period instead

    archiveBackupKeepCount Integer
    Instance archive backup keep count. Valid when the enable_backup_log is true and instance is mysql local disk. When archive_backup_keep_policy is ByMonth Valid values: [1-31]. When archive_backup_keep_policy is ByWeek Valid values: [1-7].
    archiveBackupKeepPolicy String
    Instance archive backup keep policy. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values are ByMonth, ByWeek, KeepAll.
    archiveBackupRetentionPeriod Integer
    Instance archive backup retention days. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values: [30-1095], and archive_backup_retention_period must larger than backup_retention_period 730.
    backupInterval String

    The frequency at which you want to perform a snapshot backup on the instance. Valid values:

    • -1: No backup frequencies are specified.
    • 30: A snapshot backup is performed once every 30 minutes.
    • 60: A snapshot backup is performed once every 60 minutes.
    • 120: A snapshot backup is performed once every 120 minutes.
    • 240: A snapshot backup is performed once every 240 minutes.
    • 360: A snapshot backup is performed once every 360 minutes.
    • 480: A snapshot backup is performed once every 480 minutes.
    • 720: A snapshot backup is performed once every 720 minutes.

    NOTE: Currently, the SQLServer instance does not support to modify log_backup_retention_period.

    backupPeriods List<String>
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_period' instead.

    Deprecated: Attribute 'backup_period' has been deprecated from version 1.69.0. Use preferred_backup_period instead

    backupRetentionPeriod Integer
    Instance backup retention days. Valid values: [7-730]. Default to 7. But mysql local disk is unlimited.
    backupTime String
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_time' instead.

    Deprecated: Attribute 'backup_time' has been deprecated from version 1.69.0. Use preferred_backup_time instead

    category String

    Whether to enable second level backup.Valid values are Flash, Standard, Note:It only takes effect when the BackupPolicyMode parameter is DataBackupPolicy.

    NOTE: You can configure a backup policy by using this parameter and the PreferredBackupPeriod parameter. For example, if you set the PreferredBackupPeriod parameter to Saturday,Sunday and the BackupInterval parameter to -1, a snapshot backup is performed on every Saturday and Sunday.If the instance runs PostgreSQL, the BackupInterval parameter is supported only when the instance is equipped with standard SSDs or enhanced SSDs (ESSDs).This parameter takes effect only when you set the BackupPolicyMode parameter to DataBackupPolicy.

    compressType String
    The compress type of instance policy. Valid values are 1, 4, 8.
    enableBackupLog Boolean
    Whether to backup instance log. Valid values are true, false, Default to true. Note: The 'Basic Edition' category Rds instance does not support setting log backup. What is Basic Edition.
    highSpaceUsageProtection String
    Instance high space usage protection policy. Valid when the enable_backup_log is true. Valid values are Enable, Disable.
    instanceId String
    The Id of instance that can run database.
    localLogRetentionHours Integer
    Instance log backup local retention hours. Valid when the enable_backup_log is true. Valid values: [0-7*24].
    localLogRetentionSpace Integer
    Instance log backup local retention space. Valid when the enable_backup_log is true. Valid values: [0-50].
    logBackup Boolean
    It has been deprecated from version 1.68.0, and use field 'enable_backup_log' instead.

    Deprecated: Attribute 'log_backup' has been deprecated from version 1.68.0. Use enable_backup_log instead

    logBackupFrequency String
    Instance log backup frequency. Valid when the instance engine is SQLServer. Valid values are LogInterval.
    logBackupRetentionPeriod Integer
    Instance log backup retention days. Valid when the enable_backup_log is 1. Valid values: [7-730]. Default to 7. It cannot be larger than backup_retention_period.
    logRetentionPeriod Integer
    It has been deprecated from version 1.69.0, and use field 'log_backup_retention_period' instead.

    Deprecated: Attribute 'log_retention_period' has been deprecated from version 1.69.0. Use log_backup_retention_period instead

    preferredBackupPeriods List<String>
    DB Instance backup period. Please set at least two days to ensure backing up at least twice a week. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    preferredBackupTime String
    DB instance backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
    releasedKeepPolicy String
    The policy based on which ApsaraDB RDS retains archived backup files if the instance is released. Default value: None. Valid values:

    • None: No archived backup files are retained.
    • Lastest: Only the most recent archived backup file is retained.
    • All: All archived backup files are retained.
    retentionPeriod Integer
    It has been deprecated from version 1.69.0, and use field 'backup_retention_period' instead.

    Deprecated: Attribute 'retention_period' has been deprecated from version 1.69.0. Use backup_retention_period instead

    archiveBackupKeepCount number
    Instance archive backup keep count. Valid when the enable_backup_log is true and instance is mysql local disk. When archive_backup_keep_policy is ByMonth Valid values: [1-31]. When archive_backup_keep_policy is ByWeek Valid values: [1-7].
    archiveBackupKeepPolicy string
    Instance archive backup keep policy. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values are ByMonth, ByWeek, KeepAll.
    archiveBackupRetentionPeriod number
    Instance archive backup retention days. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values: [30-1095], and archive_backup_retention_period must larger than backup_retention_period 730.
    backupInterval string

    The frequency at which you want to perform a snapshot backup on the instance. Valid values:

    • -1: No backup frequencies are specified.
    • 30: A snapshot backup is performed once every 30 minutes.
    • 60: A snapshot backup is performed once every 60 minutes.
    • 120: A snapshot backup is performed once every 120 minutes.
    • 240: A snapshot backup is performed once every 240 minutes.
    • 360: A snapshot backup is performed once every 360 minutes.
    • 480: A snapshot backup is performed once every 480 minutes.
    • 720: A snapshot backup is performed once every 720 minutes.

    NOTE: Currently, the SQLServer instance does not support to modify log_backup_retention_period.

    backupPeriods string[]
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_period' instead.

    Deprecated: Attribute 'backup_period' has been deprecated from version 1.69.0. Use preferred_backup_period instead

    backupRetentionPeriod number
    Instance backup retention days. Valid values: [7-730]. Default to 7. But mysql local disk is unlimited.
    backupTime string
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_time' instead.

    Deprecated: Attribute 'backup_time' has been deprecated from version 1.69.0. Use preferred_backup_time instead

    category string

    Whether to enable second level backup.Valid values are Flash, Standard, Note:It only takes effect when the BackupPolicyMode parameter is DataBackupPolicy.

    NOTE: You can configure a backup policy by using this parameter and the PreferredBackupPeriod parameter. For example, if you set the PreferredBackupPeriod parameter to Saturday,Sunday and the BackupInterval parameter to -1, a snapshot backup is performed on every Saturday and Sunday.If the instance runs PostgreSQL, the BackupInterval parameter is supported only when the instance is equipped with standard SSDs or enhanced SSDs (ESSDs).This parameter takes effect only when you set the BackupPolicyMode parameter to DataBackupPolicy.

    compressType string
    The compress type of instance policy. Valid values are 1, 4, 8.
    enableBackupLog boolean
    Whether to backup instance log. Valid values are true, false, Default to true. Note: The 'Basic Edition' category Rds instance does not support setting log backup. What is Basic Edition.
    highSpaceUsageProtection string
    Instance high space usage protection policy. Valid when the enable_backup_log is true. Valid values are Enable, Disable.
    instanceId string
    The Id of instance that can run database.
    localLogRetentionHours number
    Instance log backup local retention hours. Valid when the enable_backup_log is true. Valid values: [0-7*24].
    localLogRetentionSpace number
    Instance log backup local retention space. Valid when the enable_backup_log is true. Valid values: [0-50].
    logBackup boolean
    It has been deprecated from version 1.68.0, and use field 'enable_backup_log' instead.

    Deprecated: Attribute 'log_backup' has been deprecated from version 1.68.0. Use enable_backup_log instead

    logBackupFrequency string
    Instance log backup frequency. Valid when the instance engine is SQLServer. Valid values are LogInterval.
    logBackupRetentionPeriod number
    Instance log backup retention days. Valid when the enable_backup_log is 1. Valid values: [7-730]. Default to 7. It cannot be larger than backup_retention_period.
    logRetentionPeriod number
    It has been deprecated from version 1.69.0, and use field 'log_backup_retention_period' instead.

    Deprecated: Attribute 'log_retention_period' has been deprecated from version 1.69.0. Use log_backup_retention_period instead

    preferredBackupPeriods string[]
    DB Instance backup period. Please set at least two days to ensure backing up at least twice a week. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    preferredBackupTime string
    DB instance backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
    releasedKeepPolicy string
    The policy based on which ApsaraDB RDS retains archived backup files if the instance is released. Default value: None. Valid values:

    • None: No archived backup files are retained.
    • Lastest: Only the most recent archived backup file is retained.
    • All: All archived backup files are retained.
    retentionPeriod number
    It has been deprecated from version 1.69.0, and use field 'backup_retention_period' instead.

    Deprecated: Attribute 'retention_period' has been deprecated from version 1.69.0. Use backup_retention_period instead

    archive_backup_keep_count int
    Instance archive backup keep count. Valid when the enable_backup_log is true and instance is mysql local disk. When archive_backup_keep_policy is ByMonth Valid values: [1-31]. When archive_backup_keep_policy is ByWeek Valid values: [1-7].
    archive_backup_keep_policy str
    Instance archive backup keep policy. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values are ByMonth, ByWeek, KeepAll.
    archive_backup_retention_period int
    Instance archive backup retention days. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values: [30-1095], and archive_backup_retention_period must larger than backup_retention_period 730.
    backup_interval str

    The frequency at which you want to perform a snapshot backup on the instance. Valid values:

    • -1: No backup frequencies are specified.
    • 30: A snapshot backup is performed once every 30 minutes.
    • 60: A snapshot backup is performed once every 60 minutes.
    • 120: A snapshot backup is performed once every 120 minutes.
    • 240: A snapshot backup is performed once every 240 minutes.
    • 360: A snapshot backup is performed once every 360 minutes.
    • 480: A snapshot backup is performed once every 480 minutes.
    • 720: A snapshot backup is performed once every 720 minutes.

    NOTE: Currently, the SQLServer instance does not support to modify log_backup_retention_period.

    backup_periods Sequence[str]
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_period' instead.

    Deprecated: Attribute 'backup_period' has been deprecated from version 1.69.0. Use preferred_backup_period instead

    backup_retention_period int
    Instance backup retention days. Valid values: [7-730]. Default to 7. But mysql local disk is unlimited.
    backup_time str
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_time' instead.

    Deprecated: Attribute 'backup_time' has been deprecated from version 1.69.0. Use preferred_backup_time instead

    category str

    Whether to enable second level backup.Valid values are Flash, Standard, Note:It only takes effect when the BackupPolicyMode parameter is DataBackupPolicy.

    NOTE: You can configure a backup policy by using this parameter and the PreferredBackupPeriod parameter. For example, if you set the PreferredBackupPeriod parameter to Saturday,Sunday and the BackupInterval parameter to -1, a snapshot backup is performed on every Saturday and Sunday.If the instance runs PostgreSQL, the BackupInterval parameter is supported only when the instance is equipped with standard SSDs or enhanced SSDs (ESSDs).This parameter takes effect only when you set the BackupPolicyMode parameter to DataBackupPolicy.

    compress_type str
    The compress type of instance policy. Valid values are 1, 4, 8.
    enable_backup_log bool
    Whether to backup instance log. Valid values are true, false, Default to true. Note: The 'Basic Edition' category Rds instance does not support setting log backup. What is Basic Edition.
    high_space_usage_protection str
    Instance high space usage protection policy. Valid when the enable_backup_log is true. Valid values are Enable, Disable.
    instance_id str
    The Id of instance that can run database.
    local_log_retention_hours int
    Instance log backup local retention hours. Valid when the enable_backup_log is true. Valid values: [0-7*24].
    local_log_retention_space int
    Instance log backup local retention space. Valid when the enable_backup_log is true. Valid values: [0-50].
    log_backup bool
    It has been deprecated from version 1.68.0, and use field 'enable_backup_log' instead.

    Deprecated: Attribute 'log_backup' has been deprecated from version 1.68.0. Use enable_backup_log instead

    log_backup_frequency str
    Instance log backup frequency. Valid when the instance engine is SQLServer. Valid values are LogInterval.
    log_backup_retention_period int
    Instance log backup retention days. Valid when the enable_backup_log is 1. Valid values: [7-730]. Default to 7. It cannot be larger than backup_retention_period.
    log_retention_period int
    It has been deprecated from version 1.69.0, and use field 'log_backup_retention_period' instead.

    Deprecated: Attribute 'log_retention_period' has been deprecated from version 1.69.0. Use log_backup_retention_period instead

    preferred_backup_periods Sequence[str]
    DB Instance backup period. Please set at least two days to ensure backing up at least twice a week. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    preferred_backup_time str
    DB instance backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
    released_keep_policy str
    The policy based on which ApsaraDB RDS retains archived backup files if the instance is released. Default value: None. Valid values:

    • None: No archived backup files are retained.
    • Lastest: Only the most recent archived backup file is retained.
    • All: All archived backup files are retained.
    retention_period int
    It has been deprecated from version 1.69.0, and use field 'backup_retention_period' instead.

    Deprecated: Attribute 'retention_period' has been deprecated from version 1.69.0. Use backup_retention_period instead

    archiveBackupKeepCount Number
    Instance archive backup keep count. Valid when the enable_backup_log is true and instance is mysql local disk. When archive_backup_keep_policy is ByMonth Valid values: [1-31]. When archive_backup_keep_policy is ByWeek Valid values: [1-7].
    archiveBackupKeepPolicy String
    Instance archive backup keep policy. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values are ByMonth, ByWeek, KeepAll.
    archiveBackupRetentionPeriod Number
    Instance archive backup retention days. Valid when the enable_backup_log is true and instance is mysql local disk. Valid values: [30-1095], and archive_backup_retention_period must larger than backup_retention_period 730.
    backupInterval String

    The frequency at which you want to perform a snapshot backup on the instance. Valid values:

    • -1: No backup frequencies are specified.
    • 30: A snapshot backup is performed once every 30 minutes.
    • 60: A snapshot backup is performed once every 60 minutes.
    • 120: A snapshot backup is performed once every 120 minutes.
    • 240: A snapshot backup is performed once every 240 minutes.
    • 360: A snapshot backup is performed once every 360 minutes.
    • 480: A snapshot backup is performed once every 480 minutes.
    • 720: A snapshot backup is performed once every 720 minutes.

    NOTE: Currently, the SQLServer instance does not support to modify log_backup_retention_period.

    backupPeriods List<String>
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_period' instead.

    Deprecated: Attribute 'backup_period' has been deprecated from version 1.69.0. Use preferred_backup_period instead

    backupRetentionPeriod Number
    Instance backup retention days. Valid values: [7-730]. Default to 7. But mysql local disk is unlimited.
    backupTime String
    It has been deprecated from version 1.69.0, and use field 'preferred_backup_time' instead.

    Deprecated: Attribute 'backup_time' has been deprecated from version 1.69.0. Use preferred_backup_time instead

    category String

    Whether to enable second level backup.Valid values are Flash, Standard, Note:It only takes effect when the BackupPolicyMode parameter is DataBackupPolicy.

    NOTE: You can configure a backup policy by using this parameter and the PreferredBackupPeriod parameter. For example, if you set the PreferredBackupPeriod parameter to Saturday,Sunday and the BackupInterval parameter to -1, a snapshot backup is performed on every Saturday and Sunday.If the instance runs PostgreSQL, the BackupInterval parameter is supported only when the instance is equipped with standard SSDs or enhanced SSDs (ESSDs).This parameter takes effect only when you set the BackupPolicyMode parameter to DataBackupPolicy.

    compressType String
    The compress type of instance policy. Valid values are 1, 4, 8.
    enableBackupLog Boolean
    Whether to backup instance log. Valid values are true, false, Default to true. Note: The 'Basic Edition' category Rds instance does not support setting log backup. What is Basic Edition.
    highSpaceUsageProtection String
    Instance high space usage protection policy. Valid when the enable_backup_log is true. Valid values are Enable, Disable.
    instanceId String
    The Id of instance that can run database.
    localLogRetentionHours Number
    Instance log backup local retention hours. Valid when the enable_backup_log is true. Valid values: [0-7*24].
    localLogRetentionSpace Number
    Instance log backup local retention space. Valid when the enable_backup_log is true. Valid values: [0-50].
    logBackup Boolean
    It has been deprecated from version 1.68.0, and use field 'enable_backup_log' instead.

    Deprecated: Attribute 'log_backup' has been deprecated from version 1.68.0. Use enable_backup_log instead

    logBackupFrequency String
    Instance log backup frequency. Valid when the instance engine is SQLServer. Valid values are LogInterval.
    logBackupRetentionPeriod Number
    Instance log backup retention days. Valid when the enable_backup_log is 1. Valid values: [7-730]. Default to 7. It cannot be larger than backup_retention_period.
    logRetentionPeriod Number
    It has been deprecated from version 1.69.0, and use field 'log_backup_retention_period' instead.

    Deprecated: Attribute 'log_retention_period' has been deprecated from version 1.69.0. Use log_backup_retention_period instead

    preferredBackupPeriods List<String>
    DB Instance backup period. Please set at least two days to ensure backing up at least twice a week. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    preferredBackupTime String
    DB instance backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
    releasedKeepPolicy String
    The policy based on which ApsaraDB RDS retains archived backup files if the instance is released. Default value: None. Valid values:

    • None: No archived backup files are retained.
    • Lastest: Only the most recent archived backup file is retained.
    • All: All archived backup files are retained.
    retentionPeriod Number
    It has been deprecated from version 1.69.0, and use field 'backup_retention_period' instead.

    Deprecated: Attribute 'retention_period' has been deprecated from version 1.69.0. Use backup_retention_period instead

    Import

    RDS backup policy can be imported using the id or instance id, e.g.

    $ pulumi import alicloud:rds/backupPolicy:BackupPolicy example "rm-12345678"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi