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

alicloud.dbs.BackupPlan

Explore with Pulumi AI

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

    Provides a DBS Backup Plan resource.

    For information about DBS Backup Plan and how to use it, see What is Backup Plan.

    NOTE: Available since v1.185.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const default = alicloud.resourcemanager.getResourceGroups({
        status: "OK",
    });
    const defaultGetZones = alicloud.rds.getZones({
        engine: "MySQL",
        engineVersion: "8.0",
        instanceChargeType: "PostPaid",
        category: "HighAvailability",
        dbInstanceStorageType: "cloud_essd",
    });
    const defaultGetInstanceClasses = defaultGetZones.then(defaultGetZones => alicloud.rds.getInstanceClasses({
        zoneId: defaultGetZones.zones?.[1]?.id,
        engine: "MySQL",
        engineVersion: "8.0",
        category: "HighAvailability",
        dbInstanceStorageType: "cloud_essd",
        instanceChargeType: "PostPaid",
    }));
    const defaultGetNetworks = alicloud.vpc.getNetworks({
        nameRegex: "^default-NODELETING",
    });
    const defaultGetSwitches = Promise.all([defaultGetNetworks, defaultGetZones]).then(([defaultGetNetworks, defaultGetZones]) => alicloud.vpc.getSwitches({
        vpcId: defaultGetNetworks.ids?.[0],
        zoneId: defaultGetZones.zones?.[1]?.id,
    }));
    const vswitchId = defaultGetSwitches.then(defaultGetSwitches => defaultGetSwitches.ids?.[0]);
    const zoneId = defaultGetZones.then(defaultGetZones => defaultGetZones.ids?.[1]);
    const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
        name: name,
        vpcId: defaultGetNetworks.then(defaultGetNetworks => defaultGetNetworks.ids?.[0]),
    });
    const defaultInstance = new alicloud.rds.Instance("default", {
        engine: "MySQL",
        engineVersion: "8.0",
        dbInstanceStorageType: "cloud_essd",
        instanceType: defaultGetInstanceClasses.then(defaultGetInstanceClasses => defaultGetInstanceClasses.instanceClasses?.[0]?.instanceClass),
        instanceStorage: defaultGetInstanceClasses.then(defaultGetInstanceClasses => defaultGetInstanceClasses.instanceClasses?.[0]?.storageRange?.min),
        vswitchId: vswitchId,
        instanceName: name,
    });
    const defaultDatabase = new alicloud.rds.Database("default", {
        instanceId: defaultInstance.id,
        name: "tfdatabase",
    });
    const defaultRdsAccount = new alicloud.rds.RdsAccount("default", {
        dbInstanceId: defaultInstance.id,
        accountName: "tfnormal000",
        accountPassword: "Test12345",
    });
    const defaultAccountPrivilege = new alicloud.rds.AccountPrivilege("default", {
        instanceId: defaultInstance.id,
        accountName: defaultRdsAccount.accountName,
        privilege: "ReadWrite",
        dbNames: [defaultDatabase.name],
    });
    const defaultBackupPlan = new alicloud.dbs.BackupPlan("default", {
        backupPlanName: name,
        paymentType: "PayAsYouGo",
        instanceClass: "xlarge",
        backupMethod: "logical",
        databaseType: "MySQL",
        databaseRegion: "cn-hangzhou",
        storageRegion: "cn-hangzhou",
        instanceType: "RDS",
        sourceEndpointInstanceType: "RDS",
        resourceGroupId: _default.then(_default => _default.ids?.[0]),
        sourceEndpointRegion: "cn-hangzhou",
        sourceEndpointInstanceId: defaultInstance.id,
        sourceEndpointUserName: defaultAccountPrivilege.accountName,
        sourceEndpointPassword: defaultRdsAccount.accountPassword,
        backupObjects: pulumi.interpolate`[{"DBName":"${defaultDatabase.name}"}]`,
        backupPeriod: "Monday",
        backupStartTime: "14:22",
        backupStorageType: "system",
        backupRetentionPeriod: 740,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = alicloud.resourcemanager.get_resource_groups(status="OK")
    default_get_zones = alicloud.rds.get_zones(engine="MySQL",
        engine_version="8.0",
        instance_charge_type="PostPaid",
        category="HighAvailability",
        db_instance_storage_type="cloud_essd")
    default_get_instance_classes = alicloud.rds.get_instance_classes(zone_id=default_get_zones.zones[1].id,
        engine="MySQL",
        engine_version="8.0",
        category="HighAvailability",
        db_instance_storage_type="cloud_essd",
        instance_charge_type="PostPaid")
    default_get_networks = alicloud.vpc.get_networks(name_regex="^default-NODELETING")
    default_get_switches = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0],
        zone_id=default_get_zones.zones[1].id)
    vswitch_id = default_get_switches.ids[0]
    zone_id = default_get_zones.ids[1]
    default_security_group = alicloud.ecs.SecurityGroup("default",
        name=name,
        vpc_id=default_get_networks.ids[0])
    default_instance = alicloud.rds.Instance("default",
        engine="MySQL",
        engine_version="8.0",
        db_instance_storage_type="cloud_essd",
        instance_type=default_get_instance_classes.instance_classes[0].instance_class,
        instance_storage=default_get_instance_classes.instance_classes[0].storage_range.min,
        vswitch_id=vswitch_id,
        instance_name=name)
    default_database = alicloud.rds.Database("default",
        instance_id=default_instance.id,
        name="tfdatabase")
    default_rds_account = alicloud.rds.RdsAccount("default",
        db_instance_id=default_instance.id,
        account_name="tfnormal000",
        account_password="Test12345")
    default_account_privilege = alicloud.rds.AccountPrivilege("default",
        instance_id=default_instance.id,
        account_name=default_rds_account.account_name,
        privilege="ReadWrite",
        db_names=[default_database.name])
    default_backup_plan = alicloud.dbs.BackupPlan("default",
        backup_plan_name=name,
        payment_type="PayAsYouGo",
        instance_class="xlarge",
        backup_method="logical",
        database_type="MySQL",
        database_region="cn-hangzhou",
        storage_region="cn-hangzhou",
        instance_type="RDS",
        source_endpoint_instance_type="RDS",
        resource_group_id=default.ids[0],
        source_endpoint_region="cn-hangzhou",
        source_endpoint_instance_id=default_instance.id,
        source_endpoint_user_name=default_account_privilege.account_name,
        source_endpoint_password=default_rds_account.account_password,
        backup_objects=default_database.name.apply(lambda name: f"[{{\"DBName\":\"{name}\"}}]"),
        backup_period="Monday",
        backup_start_time="14:22",
        backup_storage_type="system",
        backup_retention_period=740)
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dbs"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/rds"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
    	"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 := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := resourcemanager.GetResourceGroups(ctx, &resourcemanager.GetResourceGroupsArgs{
    			Status: pulumi.StringRef("OK"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetZones, err := rds.GetZones(ctx, &rds.GetZonesArgs{
    			Engine:                pulumi.StringRef("MySQL"),
    			EngineVersion:         pulumi.StringRef("8.0"),
    			InstanceChargeType:    pulumi.StringRef("PostPaid"),
    			Category:              pulumi.StringRef("HighAvailability"),
    			DbInstanceStorageType: pulumi.StringRef("cloud_essd"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetInstanceClasses, err := rds.GetInstanceClasses(ctx, &rds.GetInstanceClassesArgs{
    			ZoneId:                pulumi.StringRef(defaultGetZones.Zones[1].Id),
    			Engine:                pulumi.StringRef("MySQL"),
    			EngineVersion:         pulumi.StringRef("8.0"),
    			Category:              pulumi.StringRef("HighAvailability"),
    			DbInstanceStorageType: pulumi.StringRef("cloud_essd"),
    			InstanceChargeType:    pulumi.StringRef("PostPaid"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetNetworks, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
    			NameRegex: pulumi.StringRef("^default-NODELETING"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
    			VpcId:  pulumi.StringRef(defaultGetNetworks.Ids[0]),
    			ZoneId: pulumi.StringRef(defaultGetZones.Zones[1].Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		vswitchId := defaultGetSwitches.Ids[0]
    		_ := defaultGetZones.Ids[1]
    		_, err = ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
    			Name:  pulumi.String(name),
    			VpcId: pulumi.String(defaultGetNetworks.Ids[0]),
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := rds.NewInstance(ctx, "default", &rds.InstanceArgs{
    			Engine:                pulumi.String("MySQL"),
    			EngineVersion:         pulumi.String("8.0"),
    			DbInstanceStorageType: pulumi.String("cloud_essd"),
    			InstanceType:          pulumi.String(defaultGetInstanceClasses.InstanceClasses[0].InstanceClass),
    			InstanceStorage:       pulumi.String(defaultGetInstanceClasses.InstanceClasses[0].StorageRange.Min),
    			VswitchId:             pulumi.String(vswitchId),
    			InstanceName:          pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		defaultDatabase, err := rds.NewDatabase(ctx, "default", &rds.DatabaseArgs{
    			InstanceId: defaultInstance.ID(),
    			Name:       pulumi.String("tfdatabase"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultRdsAccount, err := rds.NewRdsAccount(ctx, "default", &rds.RdsAccountArgs{
    			DbInstanceId:    defaultInstance.ID(),
    			AccountName:     pulumi.String("tfnormal000"),
    			AccountPassword: pulumi.String("Test12345"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultAccountPrivilege, err := rds.NewAccountPrivilege(ctx, "default", &rds.AccountPrivilegeArgs{
    			InstanceId:  defaultInstance.ID(),
    			AccountName: defaultRdsAccount.AccountName,
    			Privilege:   pulumi.String("ReadWrite"),
    			DbNames: pulumi.StringArray{
    				defaultDatabase.Name,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dbs.NewBackupPlan(ctx, "default", &dbs.BackupPlanArgs{
    			BackupPlanName:             pulumi.String(name),
    			PaymentType:                pulumi.String("PayAsYouGo"),
    			InstanceClass:              pulumi.String("xlarge"),
    			BackupMethod:               pulumi.String("logical"),
    			DatabaseType:               pulumi.String("MySQL"),
    			DatabaseRegion:             pulumi.String("cn-hangzhou"),
    			StorageRegion:              pulumi.String("cn-hangzhou"),
    			InstanceType:               pulumi.String("RDS"),
    			SourceEndpointInstanceType: pulumi.String("RDS"),
    			ResourceGroupId:            pulumi.String(_default.Ids[0]),
    			SourceEndpointRegion:       pulumi.String("cn-hangzhou"),
    			SourceEndpointInstanceId:   defaultInstance.ID(),
    			SourceEndpointUserName:     defaultAccountPrivilege.AccountName,
    			SourceEndpointPassword:     defaultRdsAccount.AccountPassword,
    			BackupObjects: defaultDatabase.Name.ApplyT(func(name string) (string, error) {
    				return fmt.Sprintf("[{\"DBName\":\"%v\"}]", name), nil
    			}).(pulumi.StringOutput),
    			BackupPeriod:          pulumi.String("Monday"),
    			BackupStartTime:       pulumi.String("14:22"),
    			BackupStorageType:     pulumi.String("system"),
    			BackupRetentionPeriod: pulumi.Int(740),
    		})
    		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") ?? "terraform-example";
        var @default = AliCloud.ResourceManager.GetResourceGroups.Invoke(new()
        {
            Status = "OK",
        });
    
        var defaultGetZones = AliCloud.Rds.GetZones.Invoke(new()
        {
            Engine = "MySQL",
            EngineVersion = "8.0",
            InstanceChargeType = "PostPaid",
            Category = "HighAvailability",
            DbInstanceStorageType = "cloud_essd",
        });
    
        var defaultGetInstanceClasses = AliCloud.Rds.GetInstanceClasses.Invoke(new()
        {
            ZoneId = defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[1]?.Id),
            Engine = "MySQL",
            EngineVersion = "8.0",
            Category = "HighAvailability",
            DbInstanceStorageType = "cloud_essd",
            InstanceChargeType = "PostPaid",
        });
    
        var defaultGetNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
        {
            NameRegex = "^default-NODELETING",
        });
    
        var defaultGetSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
        {
            VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
            ZoneId = defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[1]?.Id),
        });
    
        var vswitchId = defaultGetSwitches.Apply(getSwitchesResult => getSwitchesResult.Ids[0]);
    
        var zoneId = defaultGetZones.Apply(getZonesResult => getZonesResult.Ids[1]);
    
        var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
        {
            Name = name,
            VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
        });
    
        var defaultInstance = new AliCloud.Rds.Instance("default", new()
        {
            Engine = "MySQL",
            EngineVersion = "8.0",
            DbInstanceStorageType = "cloud_essd",
            InstanceType = defaultGetInstanceClasses.Apply(getInstanceClassesResult => getInstanceClassesResult.InstanceClasses[0]?.InstanceClass),
            InstanceStorage = defaultGetInstanceClasses.Apply(getInstanceClassesResult => getInstanceClassesResult.InstanceClasses[0]?.StorageRange?.Min),
            VswitchId = vswitchId,
            InstanceName = name,
        });
    
        var defaultDatabase = new AliCloud.Rds.Database("default", new()
        {
            InstanceId = defaultInstance.Id,
            Name = "tfdatabase",
        });
    
        var defaultRdsAccount = new AliCloud.Rds.RdsAccount("default", new()
        {
            DbInstanceId = defaultInstance.Id,
            AccountName = "tfnormal000",
            AccountPassword = "Test12345",
        });
    
        var defaultAccountPrivilege = new AliCloud.Rds.AccountPrivilege("default", new()
        {
            InstanceId = defaultInstance.Id,
            AccountName = defaultRdsAccount.AccountName,
            Privilege = "ReadWrite",
            DbNames = new[]
            {
                defaultDatabase.Name,
            },
        });
    
        var defaultBackupPlan = new AliCloud.DBS.BackupPlan("default", new()
        {
            BackupPlanName = name,
            PaymentType = "PayAsYouGo",
            InstanceClass = "xlarge",
            BackupMethod = "logical",
            DatabaseType = "MySQL",
            DatabaseRegion = "cn-hangzhou",
            StorageRegion = "cn-hangzhou",
            InstanceType = "RDS",
            SourceEndpointInstanceType = "RDS",
            ResourceGroupId = @default.Apply(@default => @default.Apply(getResourceGroupsResult => getResourceGroupsResult.Ids[0])),
            SourceEndpointRegion = "cn-hangzhou",
            SourceEndpointInstanceId = defaultInstance.Id,
            SourceEndpointUserName = defaultAccountPrivilege.AccountName,
            SourceEndpointPassword = defaultRdsAccount.AccountPassword,
            BackupObjects = defaultDatabase.Name.Apply(name => $"[{{\"DBName\":\"{name}\"}}]"),
            BackupPeriod = "Monday",
            BackupStartTime = "14:22",
            BackupStorageType = "system",
            BackupRetentionPeriod = 740,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
    import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
    import com.pulumi.alicloud.rds.RdsFunctions;
    import com.pulumi.alicloud.rds.inputs.GetZonesArgs;
    import com.pulumi.alicloud.rds.inputs.GetInstanceClassesArgs;
    import com.pulumi.alicloud.vpc.VpcFunctions;
    import com.pulumi.alicloud.vpc.inputs.GetNetworksArgs;
    import com.pulumi.alicloud.vpc.inputs.GetSwitchesArgs;
    import com.pulumi.alicloud.ecs.SecurityGroup;
    import com.pulumi.alicloud.ecs.SecurityGroupArgs;
    import com.pulumi.alicloud.rds.Instance;
    import com.pulumi.alicloud.rds.InstanceArgs;
    import com.pulumi.alicloud.rds.Database;
    import com.pulumi.alicloud.rds.DatabaseArgs;
    import com.pulumi.alicloud.rds.RdsAccount;
    import com.pulumi.alicloud.rds.RdsAccountArgs;
    import com.pulumi.alicloud.rds.AccountPrivilege;
    import com.pulumi.alicloud.rds.AccountPrivilegeArgs;
    import com.pulumi.alicloud.dbs.BackupPlan;
    import com.pulumi.alicloud.dbs.BackupPlanArgs;
    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("terraform-example");
            final var default = ResourcemanagerFunctions.getResourceGroups(GetResourceGroupsArgs.builder()
                .status("OK")
                .build());
    
            final var defaultGetZones = RdsFunctions.getZones(GetZonesArgs.builder()
                .engine("MySQL")
                .engineVersion("8.0")
                .instanceChargeType("PostPaid")
                .category("HighAvailability")
                .dbInstanceStorageType("cloud_essd")
                .build());
    
            final var defaultGetInstanceClasses = RdsFunctions.getInstanceClasses(GetInstanceClassesArgs.builder()
                .zoneId(defaultGetZones.applyValue(getZonesResult -> getZonesResult.zones()[1].id()))
                .engine("MySQL")
                .engineVersion("8.0")
                .category("HighAvailability")
                .dbInstanceStorageType("cloud_essd")
                .instanceChargeType("PostPaid")
                .build());
    
            final var defaultGetNetworks = VpcFunctions.getNetworks(GetNetworksArgs.builder()
                .nameRegex("^default-NODELETING")
                .build());
    
            final var defaultGetSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
                .vpcId(defaultGetNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
                .zoneId(defaultGetZones.applyValue(getZonesResult -> getZonesResult.zones()[1].id()))
                .build());
    
            final var vswitchId = defaultGetSwitches.applyValue(getSwitchesResult -> getSwitchesResult.ids()[0]);
    
            final var zoneId = defaultGetZones.applyValue(getZonesResult -> getZonesResult.ids()[1]);
    
            var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
                .name(name)
                .vpcId(defaultGetNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
                .engine("MySQL")
                .engineVersion("8.0")
                .dbInstanceStorageType("cloud_essd")
                .instanceType(defaultGetInstanceClasses.applyValue(getInstanceClassesResult -> getInstanceClassesResult.instanceClasses()[0].instanceClass()))
                .instanceStorage(defaultGetInstanceClasses.applyValue(getInstanceClassesResult -> getInstanceClassesResult.instanceClasses()[0].storageRange().min()))
                .vswitchId(vswitchId)
                .instanceName(name)
                .build());
    
            var defaultDatabase = new Database("defaultDatabase", DatabaseArgs.builder()
                .instanceId(defaultInstance.id())
                .name("tfdatabase")
                .build());
    
            var defaultRdsAccount = new RdsAccount("defaultRdsAccount", RdsAccountArgs.builder()
                .dbInstanceId(defaultInstance.id())
                .accountName("tfnormal000")
                .accountPassword("Test12345")
                .build());
    
            var defaultAccountPrivilege = new AccountPrivilege("defaultAccountPrivilege", AccountPrivilegeArgs.builder()
                .instanceId(defaultInstance.id())
                .accountName(defaultRdsAccount.accountName())
                .privilege("ReadWrite")
                .dbNames(defaultDatabase.name())
                .build());
    
            var defaultBackupPlan = new BackupPlan("defaultBackupPlan", BackupPlanArgs.builder()
                .backupPlanName(name)
                .paymentType("PayAsYouGo")
                .instanceClass("xlarge")
                .backupMethod("logical")
                .databaseType("MySQL")
                .databaseRegion("cn-hangzhou")
                .storageRegion("cn-hangzhou")
                .instanceType("RDS")
                .sourceEndpointInstanceType("RDS")
                .resourceGroupId(default_.ids()[0])
                .sourceEndpointRegion("cn-hangzhou")
                .sourceEndpointInstanceId(defaultInstance.id())
                .sourceEndpointUserName(defaultAccountPrivilege.accountName())
                .sourceEndpointPassword(defaultRdsAccount.accountPassword())
                .backupObjects(defaultDatabase.name().applyValue(name -> String.format("[{{\"DBName\":\"%s\"}}]", name)))
                .backupPeriod("Monday")
                .backupStartTime("14:22")
                .backupStorageType("system")
                .backupRetentionPeriod(740)
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      defaultSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        name: default
        properties:
          name: ${name}
          vpcId: ${defaultGetNetworks.ids[0]}
      defaultInstance:
        type: alicloud:rds:Instance
        name: default
        properties:
          engine: MySQL
          engineVersion: '8.0'
          dbInstanceStorageType: cloud_essd
          instanceType: ${defaultGetInstanceClasses.instanceClasses[0].instanceClass}
          instanceStorage: ${defaultGetInstanceClasses.instanceClasses[0].storageRange.min}
          vswitchId: ${vswitchId}
          instanceName: ${name}
      defaultDatabase:
        type: alicloud:rds:Database
        name: default
        properties:
          instanceId: ${defaultInstance.id}
          name: tfdatabase
      defaultRdsAccount:
        type: alicloud:rds:RdsAccount
        name: default
        properties:
          dbInstanceId: ${defaultInstance.id}
          accountName: tfnormal000
          accountPassword: Test12345
      defaultAccountPrivilege:
        type: alicloud:rds:AccountPrivilege
        name: default
        properties:
          instanceId: ${defaultInstance.id}
          accountName: ${defaultRdsAccount.accountName}
          privilege: ReadWrite
          dbNames:
            - ${defaultDatabase.name}
      defaultBackupPlan:
        type: alicloud:dbs:BackupPlan
        name: default
        properties:
          backupPlanName: ${name}
          paymentType: PayAsYouGo
          instanceClass: xlarge
          backupMethod: logical
          databaseType: MySQL
          databaseRegion: cn-hangzhou
          storageRegion: cn-hangzhou
          instanceType: RDS
          sourceEndpointInstanceType: RDS
          resourceGroupId: ${default.ids[0]}
          sourceEndpointRegion: cn-hangzhou
          sourceEndpointInstanceId: ${defaultInstance.id}
          sourceEndpointUserName: ${defaultAccountPrivilege.accountName}
          sourceEndpointPassword: ${defaultRdsAccount.accountPassword}
          backupObjects: '[{"DBName":"${defaultDatabase.name}"}]'
          backupPeriod: Monday
          backupStartTime: 14:22
          backupStorageType: system
          backupRetentionPeriod: 740
    variables:
      default:
        fn::invoke:
          Function: alicloud:resourcemanager:getResourceGroups
          Arguments:
            status: OK
      defaultGetZones:
        fn::invoke:
          Function: alicloud:rds:getZones
          Arguments:
            engine: MySQL
            engineVersion: '8.0'
            instanceChargeType: PostPaid
            category: HighAvailability
            dbInstanceStorageType: cloud_essd
      defaultGetInstanceClasses:
        fn::invoke:
          Function: alicloud:rds:getInstanceClasses
          Arguments:
            zoneId: ${defaultGetZones.zones[1].id}
            engine: MySQL
            engineVersion: '8.0'
            category: HighAvailability
            dbInstanceStorageType: cloud_essd
            instanceChargeType: PostPaid
      defaultGetNetworks:
        fn::invoke:
          Function: alicloud:vpc:getNetworks
          Arguments:
            nameRegex: ^default-NODELETING
      defaultGetSwitches:
        fn::invoke:
          Function: alicloud:vpc:getSwitches
          Arguments:
            vpcId: ${defaultGetNetworks.ids[0]}
            zoneId: ${defaultGetZones.zones[1].id}
      vswitchId: ${defaultGetSwitches.ids[0]}
      zoneId: ${defaultGetZones.ids[1]}
    

    Create BackupPlan Resource

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

    Constructor syntax

    new BackupPlan(name: string, args: BackupPlanArgs, opts?: CustomResourceOptions);
    @overload
    def BackupPlan(resource_name: str,
                   args: BackupPlanArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def BackupPlan(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   backup_plan_name: Optional[str] = None,
                   source_endpoint_instance_type: Optional[str] = None,
                   backup_method: Optional[str] = None,
                   instance_class: Optional[str] = None,
                   database_type: Optional[str] = None,
                   backup_start_time: Optional[str] = None,
                   payment_type: Optional[str] = None,
                   backup_retention_period: Optional[int] = None,
                   backup_speed_limit: Optional[str] = None,
                   backup_gateway_id: Optional[str] = None,
                   backup_storage_type: Optional[str] = None,
                   backup_strategy_type: Optional[str] = None,
                   cross_aliyun_id: Optional[str] = None,
                   cross_role_name: Optional[str] = None,
                   database_region: Optional[str] = None,
                   backup_period: Optional[str] = None,
                   duplication_archive_period: Optional[int] = None,
                   duplication_infrequent_access_period: Optional[int] = None,
                   enable_backup_log: Optional[bool] = None,
                   backup_objects: Optional[str] = None,
                   instance_type: Optional[str] = None,
                   oss_bucket_name: Optional[str] = None,
                   backup_rate_limit: Optional[str] = None,
                   period: Optional[str] = None,
                   resource_group_id: Optional[str] = None,
                   source_endpoint_database_name: Optional[str] = None,
                   source_endpoint_instance_id: Optional[str] = None,
                   backup_log_interval_seconds: Optional[int] = None,
                   source_endpoint_ip: Optional[str] = None,
                   source_endpoint_oracle_sid: Optional[str] = None,
                   source_endpoint_password: Optional[str] = None,
                   source_endpoint_port: Optional[int] = None,
                   source_endpoint_region: Optional[str] = None,
                   source_endpoint_sid: Optional[str] = None,
                   source_endpoint_user_name: Optional[str] = None,
                   status: Optional[str] = None,
                   storage_region: Optional[str] = None,
                   used_time: Optional[int] = None)
    func NewBackupPlan(ctx *Context, name string, args BackupPlanArgs, opts ...ResourceOption) (*BackupPlan, error)
    public BackupPlan(string name, BackupPlanArgs args, CustomResourceOptions? opts = null)
    public BackupPlan(String name, BackupPlanArgs args)
    public BackupPlan(String name, BackupPlanArgs args, CustomResourceOptions options)
    
    type: alicloud:dbs:BackupPlan
    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 BackupPlanArgs
    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 BackupPlanArgs
    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 BackupPlanArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BackupPlanArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BackupPlanArgs
    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 alicloudBackupPlanResource = new AliCloud.DBS.BackupPlan("alicloudBackupPlanResource", new()
    {
        BackupPlanName = "string",
        SourceEndpointInstanceType = "string",
        BackupMethod = "string",
        InstanceClass = "string",
        DatabaseType = "string",
        BackupStartTime = "string",
        PaymentType = "string",
        BackupRetentionPeriod = 0,
        BackupSpeedLimit = "string",
        BackupGatewayId = "string",
        BackupStorageType = "string",
        BackupStrategyType = "string",
        CrossAliyunId = "string",
        CrossRoleName = "string",
        DatabaseRegion = "string",
        BackupPeriod = "string",
        DuplicationArchivePeriod = 0,
        DuplicationInfrequentAccessPeriod = 0,
        EnableBackupLog = false,
        BackupObjects = "string",
        InstanceType = "string",
        OssBucketName = "string",
        BackupRateLimit = "string",
        Period = "string",
        ResourceGroupId = "string",
        SourceEndpointDatabaseName = "string",
        SourceEndpointInstanceId = "string",
        BackupLogIntervalSeconds = 0,
        SourceEndpointIp = "string",
        SourceEndpointOracleSid = "string",
        SourceEndpointPassword = "string",
        SourceEndpointPort = 0,
        SourceEndpointRegion = "string",
        SourceEndpointSid = "string",
        SourceEndpointUserName = "string",
        Status = "string",
        StorageRegion = "string",
        UsedTime = 0,
    });
    
    example, err := dbs.NewBackupPlan(ctx, "alicloudBackupPlanResource", &dbs.BackupPlanArgs{
    	BackupPlanName:                    pulumi.String("string"),
    	SourceEndpointInstanceType:        pulumi.String("string"),
    	BackupMethod:                      pulumi.String("string"),
    	InstanceClass:                     pulumi.String("string"),
    	DatabaseType:                      pulumi.String("string"),
    	BackupStartTime:                   pulumi.String("string"),
    	PaymentType:                       pulumi.String("string"),
    	BackupRetentionPeriod:             pulumi.Int(0),
    	BackupSpeedLimit:                  pulumi.String("string"),
    	BackupGatewayId:                   pulumi.String("string"),
    	BackupStorageType:                 pulumi.String("string"),
    	BackupStrategyType:                pulumi.String("string"),
    	CrossAliyunId:                     pulumi.String("string"),
    	CrossRoleName:                     pulumi.String("string"),
    	DatabaseRegion:                    pulumi.String("string"),
    	BackupPeriod:                      pulumi.String("string"),
    	DuplicationArchivePeriod:          pulumi.Int(0),
    	DuplicationInfrequentAccessPeriod: pulumi.Int(0),
    	EnableBackupLog:                   pulumi.Bool(false),
    	BackupObjects:                     pulumi.String("string"),
    	InstanceType:                      pulumi.String("string"),
    	OssBucketName:                     pulumi.String("string"),
    	BackupRateLimit:                   pulumi.String("string"),
    	Period:                            pulumi.String("string"),
    	ResourceGroupId:                   pulumi.String("string"),
    	SourceEndpointDatabaseName:        pulumi.String("string"),
    	SourceEndpointInstanceId:          pulumi.String("string"),
    	BackupLogIntervalSeconds:          pulumi.Int(0),
    	SourceEndpointIp:                  pulumi.String("string"),
    	SourceEndpointOracleSid:           pulumi.String("string"),
    	SourceEndpointPassword:            pulumi.String("string"),
    	SourceEndpointPort:                pulumi.Int(0),
    	SourceEndpointRegion:              pulumi.String("string"),
    	SourceEndpointSid:                 pulumi.String("string"),
    	SourceEndpointUserName:            pulumi.String("string"),
    	Status:                            pulumi.String("string"),
    	StorageRegion:                     pulumi.String("string"),
    	UsedTime:                          pulumi.Int(0),
    })
    
    var alicloudBackupPlanResource = new BackupPlan("alicloudBackupPlanResource", BackupPlanArgs.builder()
        .backupPlanName("string")
        .sourceEndpointInstanceType("string")
        .backupMethod("string")
        .instanceClass("string")
        .databaseType("string")
        .backupStartTime("string")
        .paymentType("string")
        .backupRetentionPeriod(0)
        .backupSpeedLimit("string")
        .backupGatewayId("string")
        .backupStorageType("string")
        .backupStrategyType("string")
        .crossAliyunId("string")
        .crossRoleName("string")
        .databaseRegion("string")
        .backupPeriod("string")
        .duplicationArchivePeriod(0)
        .duplicationInfrequentAccessPeriod(0)
        .enableBackupLog(false)
        .backupObjects("string")
        .instanceType("string")
        .ossBucketName("string")
        .backupRateLimit("string")
        .period("string")
        .resourceGroupId("string")
        .sourceEndpointDatabaseName("string")
        .sourceEndpointInstanceId("string")
        .backupLogIntervalSeconds(0)
        .sourceEndpointIp("string")
        .sourceEndpointOracleSid("string")
        .sourceEndpointPassword("string")
        .sourceEndpointPort(0)
        .sourceEndpointRegion("string")
        .sourceEndpointSid("string")
        .sourceEndpointUserName("string")
        .status("string")
        .storageRegion("string")
        .usedTime(0)
        .build());
    
    alicloud_backup_plan_resource = alicloud.dbs.BackupPlan("alicloudBackupPlanResource",
        backup_plan_name="string",
        source_endpoint_instance_type="string",
        backup_method="string",
        instance_class="string",
        database_type="string",
        backup_start_time="string",
        payment_type="string",
        backup_retention_period=0,
        backup_speed_limit="string",
        backup_gateway_id="string",
        backup_storage_type="string",
        backup_strategy_type="string",
        cross_aliyun_id="string",
        cross_role_name="string",
        database_region="string",
        backup_period="string",
        duplication_archive_period=0,
        duplication_infrequent_access_period=0,
        enable_backup_log=False,
        backup_objects="string",
        instance_type="string",
        oss_bucket_name="string",
        backup_rate_limit="string",
        period="string",
        resource_group_id="string",
        source_endpoint_database_name="string",
        source_endpoint_instance_id="string",
        backup_log_interval_seconds=0,
        source_endpoint_ip="string",
        source_endpoint_oracle_sid="string",
        source_endpoint_password="string",
        source_endpoint_port=0,
        source_endpoint_region="string",
        source_endpoint_sid="string",
        source_endpoint_user_name="string",
        status="string",
        storage_region="string",
        used_time=0)
    
    const alicloudBackupPlanResource = new alicloud.dbs.BackupPlan("alicloudBackupPlanResource", {
        backupPlanName: "string",
        sourceEndpointInstanceType: "string",
        backupMethod: "string",
        instanceClass: "string",
        databaseType: "string",
        backupStartTime: "string",
        paymentType: "string",
        backupRetentionPeriod: 0,
        backupSpeedLimit: "string",
        backupGatewayId: "string",
        backupStorageType: "string",
        backupStrategyType: "string",
        crossAliyunId: "string",
        crossRoleName: "string",
        databaseRegion: "string",
        backupPeriod: "string",
        duplicationArchivePeriod: 0,
        duplicationInfrequentAccessPeriod: 0,
        enableBackupLog: false,
        backupObjects: "string",
        instanceType: "string",
        ossBucketName: "string",
        backupRateLimit: "string",
        period: "string",
        resourceGroupId: "string",
        sourceEndpointDatabaseName: "string",
        sourceEndpointInstanceId: "string",
        backupLogIntervalSeconds: 0,
        sourceEndpointIp: "string",
        sourceEndpointOracleSid: "string",
        sourceEndpointPassword: "string",
        sourceEndpointPort: 0,
        sourceEndpointRegion: "string",
        sourceEndpointSid: "string",
        sourceEndpointUserName: "string",
        status: "string",
        storageRegion: "string",
        usedTime: 0,
    });
    
    type: alicloud:dbs:BackupPlan
    properties:
        backupGatewayId: string
        backupLogIntervalSeconds: 0
        backupMethod: string
        backupObjects: string
        backupPeriod: string
        backupPlanName: string
        backupRateLimit: string
        backupRetentionPeriod: 0
        backupSpeedLimit: string
        backupStartTime: string
        backupStorageType: string
        backupStrategyType: string
        crossAliyunId: string
        crossRoleName: string
        databaseRegion: string
        databaseType: string
        duplicationArchivePeriod: 0
        duplicationInfrequentAccessPeriod: 0
        enableBackupLog: false
        instanceClass: string
        instanceType: string
        ossBucketName: string
        paymentType: string
        period: string
        resourceGroupId: string
        sourceEndpointDatabaseName: string
        sourceEndpointInstanceId: string
        sourceEndpointInstanceType: string
        sourceEndpointIp: string
        sourceEndpointOracleSid: string
        sourceEndpointPassword: string
        sourceEndpointPort: 0
        sourceEndpointRegion: string
        sourceEndpointSid: string
        sourceEndpointUserName: string
        status: string
        storageRegion: string
        usedTime: 0
    

    BackupPlan 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 BackupPlan resource accepts the following input properties:

    BackupMethod string
    Backup method. Valid values: duplication, logical, physical.
    BackupPlanName string
    The name of the resource.
    DatabaseType string
    Database type. Valid values: DRDS, FIle, MSSQL, MariaDB, MongoDB, MySQL, Oracle, PPAS, PostgreSQL, Redis.
    InstanceClass string
    The instance class. Valid values: large, medium, micro, small, xlarge.
    SourceEndpointInstanceType string
    The location of the database. Valid values: RDS, ECS, Express, Agent, DDS, Other.
    BackupGatewayId string
    The ID of the backup gateway. This parameter is required when the source_endpoint_instance_type is Agent.
    BackupLogIntervalSeconds int
    The backup log interval seconds.
    BackupObjects string
    The backup object.
    BackupPeriod string
    Full backup cycle, Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. supports the selection of multiple fetch values, separated by English commas (,).
    BackupRateLimit string
    The backup rate limit.
    BackupRetentionPeriod int
    The retention time of backup data. Valid values: 0 to 1825. Default value: 730 days.
    BackupSpeedLimit string
    The backup speed limit.
    BackupStartTime string
    The start time of full Backup. The format is <I> HH:mm</I> Z(UTC time).
    BackupStorageType string
    Built-in storage type, Valid values: system.
    BackupStrategyType string
    The backup strategy type. Valid values: simple, manual.
    CrossAliyunId string
    The UID that is backed up across Alibaba cloud accounts.
    CrossRoleName string
    The name of the RAM role that is backed up across Alibaba cloud accounts.
    DatabaseRegion string
    The database region.
    DuplicationArchivePeriod int
    The storage time for conversion to archive cold standby is 365 days by default.
    DuplicationInfrequentAccessPeriod int
    The storage time is converted to low-frequency access. The default time is 180 days.
    EnableBackupLog bool
    Whether to enable incremental log Backup.
    InstanceType string
    The instance type. Valid values: RDS, PolarDB, DDS, Kvstore, Other.
    OssBucketName string
    The OSS Bucket name. The system automatically generates a new name by default.
    PaymentType string
    The payment type of the resource. Valid values: PayAsYouGo, Subscription.
    Period string
    Specify that the prepaid instance is of the package year or monthly type. Valid values: Month, Year.
    ResourceGroupId string
    The ID of the resource group.
    SourceEndpointDatabaseName string
    The name of the database. This parameter is required when the database_type is PostgreSQL or MongoDB.
    SourceEndpointInstanceId string
    The ID of the database instance. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, or Express.
    SourceEndpointIp string
    The source endpoint ip.
    SourceEndpointOracleSid string
    Oracle SID name. This parameter is required when the database_type is Oracle.
    SourceEndpointPassword string
    The source endpoint password. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    SourceEndpointPort int
    The source endpoint port.
    SourceEndpointRegion string
    The region of the database. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, Express, or Agent.
    SourceEndpointSid string
    Oracle SID name. This parameter is required when the database_type is Oracle.
    SourceEndpointUserName string
    The source endpoint username. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    Status string
    The status of the resource. Valid values: pause, running.
    StorageRegion string
    The storage region.
    UsedTime int
    Specify purchase duration. When the parameter period is Year, the used_time value is 1 to 9. When the parameter period is Month, the used_time value is 1 to 11.
    BackupMethod string
    Backup method. Valid values: duplication, logical, physical.
    BackupPlanName string
    The name of the resource.
    DatabaseType string
    Database type. Valid values: DRDS, FIle, MSSQL, MariaDB, MongoDB, MySQL, Oracle, PPAS, PostgreSQL, Redis.
    InstanceClass string
    The instance class. Valid values: large, medium, micro, small, xlarge.
    SourceEndpointInstanceType string
    The location of the database. Valid values: RDS, ECS, Express, Agent, DDS, Other.
    BackupGatewayId string
    The ID of the backup gateway. This parameter is required when the source_endpoint_instance_type is Agent.
    BackupLogIntervalSeconds int
    The backup log interval seconds.
    BackupObjects string
    The backup object.
    BackupPeriod string
    Full backup cycle, Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. supports the selection of multiple fetch values, separated by English commas (,).
    BackupRateLimit string
    The backup rate limit.
    BackupRetentionPeriod int
    The retention time of backup data. Valid values: 0 to 1825. Default value: 730 days.
    BackupSpeedLimit string
    The backup speed limit.
    BackupStartTime string
    The start time of full Backup. The format is <I> HH:mm</I> Z(UTC time).
    BackupStorageType string
    Built-in storage type, Valid values: system.
    BackupStrategyType string
    The backup strategy type. Valid values: simple, manual.
    CrossAliyunId string
    The UID that is backed up across Alibaba cloud accounts.
    CrossRoleName string
    The name of the RAM role that is backed up across Alibaba cloud accounts.
    DatabaseRegion string
    The database region.
    DuplicationArchivePeriod int
    The storage time for conversion to archive cold standby is 365 days by default.
    DuplicationInfrequentAccessPeriod int
    The storage time is converted to low-frequency access. The default time is 180 days.
    EnableBackupLog bool
    Whether to enable incremental log Backup.
    InstanceType string
    The instance type. Valid values: RDS, PolarDB, DDS, Kvstore, Other.
    OssBucketName string
    The OSS Bucket name. The system automatically generates a new name by default.
    PaymentType string
    The payment type of the resource. Valid values: PayAsYouGo, Subscription.
    Period string
    Specify that the prepaid instance is of the package year or monthly type. Valid values: Month, Year.
    ResourceGroupId string
    The ID of the resource group.
    SourceEndpointDatabaseName string
    The name of the database. This parameter is required when the database_type is PostgreSQL or MongoDB.
    SourceEndpointInstanceId string
    The ID of the database instance. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, or Express.
    SourceEndpointIp string
    The source endpoint ip.
    SourceEndpointOracleSid string
    Oracle SID name. This parameter is required when the database_type is Oracle.
    SourceEndpointPassword string
    The source endpoint password. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    SourceEndpointPort int
    The source endpoint port.
    SourceEndpointRegion string
    The region of the database. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, Express, or Agent.
    SourceEndpointSid string
    Oracle SID name. This parameter is required when the database_type is Oracle.
    SourceEndpointUserName string
    The source endpoint username. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    Status string
    The status of the resource. Valid values: pause, running.
    StorageRegion string
    The storage region.
    UsedTime int
    Specify purchase duration. When the parameter period is Year, the used_time value is 1 to 9. When the parameter period is Month, the used_time value is 1 to 11.
    backupMethod String
    Backup method. Valid values: duplication, logical, physical.
    backupPlanName String
    The name of the resource.
    databaseType String
    Database type. Valid values: DRDS, FIle, MSSQL, MariaDB, MongoDB, MySQL, Oracle, PPAS, PostgreSQL, Redis.
    instanceClass String
    The instance class. Valid values: large, medium, micro, small, xlarge.
    sourceEndpointInstanceType String
    The location of the database. Valid values: RDS, ECS, Express, Agent, DDS, Other.
    backupGatewayId String
    The ID of the backup gateway. This parameter is required when the source_endpoint_instance_type is Agent.
    backupLogIntervalSeconds Integer
    The backup log interval seconds.
    backupObjects String
    The backup object.
    backupPeriod String
    Full backup cycle, Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. supports the selection of multiple fetch values, separated by English commas (,).
    backupRateLimit String
    The backup rate limit.
    backupRetentionPeriod Integer
    The retention time of backup data. Valid values: 0 to 1825. Default value: 730 days.
    backupSpeedLimit String
    The backup speed limit.
    backupStartTime String
    The start time of full Backup. The format is <I> HH:mm</I> Z(UTC time).
    backupStorageType String
    Built-in storage type, Valid values: system.
    backupStrategyType String
    The backup strategy type. Valid values: simple, manual.
    crossAliyunId String
    The UID that is backed up across Alibaba cloud accounts.
    crossRoleName String
    The name of the RAM role that is backed up across Alibaba cloud accounts.
    databaseRegion String
    The database region.
    duplicationArchivePeriod Integer
    The storage time for conversion to archive cold standby is 365 days by default.
    duplicationInfrequentAccessPeriod Integer
    The storage time is converted to low-frequency access. The default time is 180 days.
    enableBackupLog Boolean
    Whether to enable incremental log Backup.
    instanceType String
    The instance type. Valid values: RDS, PolarDB, DDS, Kvstore, Other.
    ossBucketName String
    The OSS Bucket name. The system automatically generates a new name by default.
    paymentType String
    The payment type of the resource. Valid values: PayAsYouGo, Subscription.
    period String
    Specify that the prepaid instance is of the package year or monthly type. Valid values: Month, Year.
    resourceGroupId String
    The ID of the resource group.
    sourceEndpointDatabaseName String
    The name of the database. This parameter is required when the database_type is PostgreSQL or MongoDB.
    sourceEndpointInstanceId String
    The ID of the database instance. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, or Express.
    sourceEndpointIp String
    The source endpoint ip.
    sourceEndpointOracleSid String
    Oracle SID name. This parameter is required when the database_type is Oracle.
    sourceEndpointPassword String
    The source endpoint password. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    sourceEndpointPort Integer
    The source endpoint port.
    sourceEndpointRegion String
    The region of the database. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, Express, or Agent.
    sourceEndpointSid String
    Oracle SID name. This parameter is required when the database_type is Oracle.
    sourceEndpointUserName String
    The source endpoint username. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    status String
    The status of the resource. Valid values: pause, running.
    storageRegion String
    The storage region.
    usedTime Integer
    Specify purchase duration. When the parameter period is Year, the used_time value is 1 to 9. When the parameter period is Month, the used_time value is 1 to 11.
    backupMethod string
    Backup method. Valid values: duplication, logical, physical.
    backupPlanName string
    The name of the resource.
    databaseType string
    Database type. Valid values: DRDS, FIle, MSSQL, MariaDB, MongoDB, MySQL, Oracle, PPAS, PostgreSQL, Redis.
    instanceClass string
    The instance class. Valid values: large, medium, micro, small, xlarge.
    sourceEndpointInstanceType string
    The location of the database. Valid values: RDS, ECS, Express, Agent, DDS, Other.
    backupGatewayId string
    The ID of the backup gateway. This parameter is required when the source_endpoint_instance_type is Agent.
    backupLogIntervalSeconds number
    The backup log interval seconds.
    backupObjects string
    The backup object.
    backupPeriod string
    Full backup cycle, Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. supports the selection of multiple fetch values, separated by English commas (,).
    backupRateLimit string
    The backup rate limit.
    backupRetentionPeriod number
    The retention time of backup data. Valid values: 0 to 1825. Default value: 730 days.
    backupSpeedLimit string
    The backup speed limit.
    backupStartTime string
    The start time of full Backup. The format is <I> HH:mm</I> Z(UTC time).
    backupStorageType string
    Built-in storage type, Valid values: system.
    backupStrategyType string
    The backup strategy type. Valid values: simple, manual.
    crossAliyunId string
    The UID that is backed up across Alibaba cloud accounts.
    crossRoleName string
    The name of the RAM role that is backed up across Alibaba cloud accounts.
    databaseRegion string
    The database region.
    duplicationArchivePeriod number
    The storage time for conversion to archive cold standby is 365 days by default.
    duplicationInfrequentAccessPeriod number
    The storage time is converted to low-frequency access. The default time is 180 days.
    enableBackupLog boolean
    Whether to enable incremental log Backup.
    instanceType string
    The instance type. Valid values: RDS, PolarDB, DDS, Kvstore, Other.
    ossBucketName string
    The OSS Bucket name. The system automatically generates a new name by default.
    paymentType string
    The payment type of the resource. Valid values: PayAsYouGo, Subscription.
    period string
    Specify that the prepaid instance is of the package year or monthly type. Valid values: Month, Year.
    resourceGroupId string
    The ID of the resource group.
    sourceEndpointDatabaseName string
    The name of the database. This parameter is required when the database_type is PostgreSQL or MongoDB.
    sourceEndpointInstanceId string
    The ID of the database instance. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, or Express.
    sourceEndpointIp string
    The source endpoint ip.
    sourceEndpointOracleSid string
    Oracle SID name. This parameter is required when the database_type is Oracle.
    sourceEndpointPassword string
    The source endpoint password. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    sourceEndpointPort number
    The source endpoint port.
    sourceEndpointRegion string
    The region of the database. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, Express, or Agent.
    sourceEndpointSid string
    Oracle SID name. This parameter is required when the database_type is Oracle.
    sourceEndpointUserName string
    The source endpoint username. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    status string
    The status of the resource. Valid values: pause, running.
    storageRegion string
    The storage region.
    usedTime number
    Specify purchase duration. When the parameter period is Year, the used_time value is 1 to 9. When the parameter period is Month, the used_time value is 1 to 11.
    backup_method str
    Backup method. Valid values: duplication, logical, physical.
    backup_plan_name str
    The name of the resource.
    database_type str
    Database type. Valid values: DRDS, FIle, MSSQL, MariaDB, MongoDB, MySQL, Oracle, PPAS, PostgreSQL, Redis.
    instance_class str
    The instance class. Valid values: large, medium, micro, small, xlarge.
    source_endpoint_instance_type str
    The location of the database. Valid values: RDS, ECS, Express, Agent, DDS, Other.
    backup_gateway_id str
    The ID of the backup gateway. This parameter is required when the source_endpoint_instance_type is Agent.
    backup_log_interval_seconds int
    The backup log interval seconds.
    backup_objects str
    The backup object.
    backup_period str
    Full backup cycle, Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. supports the selection of multiple fetch values, separated by English commas (,).
    backup_rate_limit str
    The backup rate limit.
    backup_retention_period int
    The retention time of backup data. Valid values: 0 to 1825. Default value: 730 days.
    backup_speed_limit str
    The backup speed limit.
    backup_start_time str
    The start time of full Backup. The format is <I> HH:mm</I> Z(UTC time).
    backup_storage_type str
    Built-in storage type, Valid values: system.
    backup_strategy_type str
    The backup strategy type. Valid values: simple, manual.
    cross_aliyun_id str
    The UID that is backed up across Alibaba cloud accounts.
    cross_role_name str
    The name of the RAM role that is backed up across Alibaba cloud accounts.
    database_region str
    The database region.
    duplication_archive_period int
    The storage time for conversion to archive cold standby is 365 days by default.
    duplication_infrequent_access_period int
    The storage time is converted to low-frequency access. The default time is 180 days.
    enable_backup_log bool
    Whether to enable incremental log Backup.
    instance_type str
    The instance type. Valid values: RDS, PolarDB, DDS, Kvstore, Other.
    oss_bucket_name str
    The OSS Bucket name. The system automatically generates a new name by default.
    payment_type str
    The payment type of the resource. Valid values: PayAsYouGo, Subscription.
    period str
    Specify that the prepaid instance is of the package year or monthly type. Valid values: Month, Year.
    resource_group_id str
    The ID of the resource group.
    source_endpoint_database_name str
    The name of the database. This parameter is required when the database_type is PostgreSQL or MongoDB.
    source_endpoint_instance_id str
    The ID of the database instance. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, or Express.
    source_endpoint_ip str
    The source endpoint ip.
    source_endpoint_oracle_sid str
    Oracle SID name. This parameter is required when the database_type is Oracle.
    source_endpoint_password str
    The source endpoint password. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    source_endpoint_port int
    The source endpoint port.
    source_endpoint_region str
    The region of the database. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, Express, or Agent.
    source_endpoint_sid str
    Oracle SID name. This parameter is required when the database_type is Oracle.
    source_endpoint_user_name str
    The source endpoint username. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    status str
    The status of the resource. Valid values: pause, running.
    storage_region str
    The storage region.
    used_time int
    Specify purchase duration. When the parameter period is Year, the used_time value is 1 to 9. When the parameter period is Month, the used_time value is 1 to 11.
    backupMethod String
    Backup method. Valid values: duplication, logical, physical.
    backupPlanName String
    The name of the resource.
    databaseType String
    Database type. Valid values: DRDS, FIle, MSSQL, MariaDB, MongoDB, MySQL, Oracle, PPAS, PostgreSQL, Redis.
    instanceClass String
    The instance class. Valid values: large, medium, micro, small, xlarge.
    sourceEndpointInstanceType String
    The location of the database. Valid values: RDS, ECS, Express, Agent, DDS, Other.
    backupGatewayId String
    The ID of the backup gateway. This parameter is required when the source_endpoint_instance_type is Agent.
    backupLogIntervalSeconds Number
    The backup log interval seconds.
    backupObjects String
    The backup object.
    backupPeriod String
    Full backup cycle, Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. supports the selection of multiple fetch values, separated by English commas (,).
    backupRateLimit String
    The backup rate limit.
    backupRetentionPeriod Number
    The retention time of backup data. Valid values: 0 to 1825. Default value: 730 days.
    backupSpeedLimit String
    The backup speed limit.
    backupStartTime String
    The start time of full Backup. The format is <I> HH:mm</I> Z(UTC time).
    backupStorageType String
    Built-in storage type, Valid values: system.
    backupStrategyType String
    The backup strategy type. Valid values: simple, manual.
    crossAliyunId String
    The UID that is backed up across Alibaba cloud accounts.
    crossRoleName String
    The name of the RAM role that is backed up across Alibaba cloud accounts.
    databaseRegion String
    The database region.
    duplicationArchivePeriod Number
    The storage time for conversion to archive cold standby is 365 days by default.
    duplicationInfrequentAccessPeriod Number
    The storage time is converted to low-frequency access. The default time is 180 days.
    enableBackupLog Boolean
    Whether to enable incremental log Backup.
    instanceType String
    The instance type. Valid values: RDS, PolarDB, DDS, Kvstore, Other.
    ossBucketName String
    The OSS Bucket name. The system automatically generates a new name by default.
    paymentType String
    The payment type of the resource. Valid values: PayAsYouGo, Subscription.
    period String
    Specify that the prepaid instance is of the package year or monthly type. Valid values: Month, Year.
    resourceGroupId String
    The ID of the resource group.
    sourceEndpointDatabaseName String
    The name of the database. This parameter is required when the database_type is PostgreSQL or MongoDB.
    sourceEndpointInstanceId String
    The ID of the database instance. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, or Express.
    sourceEndpointIp String
    The source endpoint ip.
    sourceEndpointOracleSid String
    Oracle SID name. This parameter is required when the database_type is Oracle.
    sourceEndpointPassword String
    The source endpoint password. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    sourceEndpointPort Number
    The source endpoint port.
    sourceEndpointRegion String
    The region of the database. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, Express, or Agent.
    sourceEndpointSid String
    Oracle SID name. This parameter is required when the database_type is Oracle.
    sourceEndpointUserName String
    The source endpoint username. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    status String
    The status of the resource. Valid values: pause, running.
    storageRegion String
    The storage region.
    usedTime Number
    Specify purchase duration. When the parameter period is Year, the used_time value is 1 to 9. When the parameter period is Month, the used_time value is 1 to 11.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the BackupPlan 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 BackupPlan Resource

    Get an existing BackupPlan 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?: BackupPlanState, opts?: CustomResourceOptions): BackupPlan
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backup_gateway_id: Optional[str] = None,
            backup_log_interval_seconds: Optional[int] = None,
            backup_method: Optional[str] = None,
            backup_objects: Optional[str] = None,
            backup_period: Optional[str] = None,
            backup_plan_name: Optional[str] = None,
            backup_rate_limit: Optional[str] = None,
            backup_retention_period: Optional[int] = None,
            backup_speed_limit: Optional[str] = None,
            backup_start_time: Optional[str] = None,
            backup_storage_type: Optional[str] = None,
            backup_strategy_type: Optional[str] = None,
            cross_aliyun_id: Optional[str] = None,
            cross_role_name: Optional[str] = None,
            database_region: Optional[str] = None,
            database_type: Optional[str] = None,
            duplication_archive_period: Optional[int] = None,
            duplication_infrequent_access_period: Optional[int] = None,
            enable_backup_log: Optional[bool] = None,
            instance_class: Optional[str] = None,
            instance_type: Optional[str] = None,
            oss_bucket_name: Optional[str] = None,
            payment_type: Optional[str] = None,
            period: Optional[str] = None,
            resource_group_id: Optional[str] = None,
            source_endpoint_database_name: Optional[str] = None,
            source_endpoint_instance_id: Optional[str] = None,
            source_endpoint_instance_type: Optional[str] = None,
            source_endpoint_ip: Optional[str] = None,
            source_endpoint_oracle_sid: Optional[str] = None,
            source_endpoint_password: Optional[str] = None,
            source_endpoint_port: Optional[int] = None,
            source_endpoint_region: Optional[str] = None,
            source_endpoint_sid: Optional[str] = None,
            source_endpoint_user_name: Optional[str] = None,
            status: Optional[str] = None,
            storage_region: Optional[str] = None,
            used_time: Optional[int] = None) -> BackupPlan
    func GetBackupPlan(ctx *Context, name string, id IDInput, state *BackupPlanState, opts ...ResourceOption) (*BackupPlan, error)
    public static BackupPlan Get(string name, Input<string> id, BackupPlanState? state, CustomResourceOptions? opts = null)
    public static BackupPlan get(String name, Output<String> id, BackupPlanState 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:
    BackupGatewayId string
    The ID of the backup gateway. This parameter is required when the source_endpoint_instance_type is Agent.
    BackupLogIntervalSeconds int
    The backup log interval seconds.
    BackupMethod string
    Backup method. Valid values: duplication, logical, physical.
    BackupObjects string
    The backup object.
    BackupPeriod string
    Full backup cycle, Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. supports the selection of multiple fetch values, separated by English commas (,).
    BackupPlanName string
    The name of the resource.
    BackupRateLimit string
    The backup rate limit.
    BackupRetentionPeriod int
    The retention time of backup data. Valid values: 0 to 1825. Default value: 730 days.
    BackupSpeedLimit string
    The backup speed limit.
    BackupStartTime string
    The start time of full Backup. The format is <I> HH:mm</I> Z(UTC time).
    BackupStorageType string
    Built-in storage type, Valid values: system.
    BackupStrategyType string
    The backup strategy type. Valid values: simple, manual.
    CrossAliyunId string
    The UID that is backed up across Alibaba cloud accounts.
    CrossRoleName string
    The name of the RAM role that is backed up across Alibaba cloud accounts.
    DatabaseRegion string
    The database region.
    DatabaseType string
    Database type. Valid values: DRDS, FIle, MSSQL, MariaDB, MongoDB, MySQL, Oracle, PPAS, PostgreSQL, Redis.
    DuplicationArchivePeriod int
    The storage time for conversion to archive cold standby is 365 days by default.
    DuplicationInfrequentAccessPeriod int
    The storage time is converted to low-frequency access. The default time is 180 days.
    EnableBackupLog bool
    Whether to enable incremental log Backup.
    InstanceClass string
    The instance class. Valid values: large, medium, micro, small, xlarge.
    InstanceType string
    The instance type. Valid values: RDS, PolarDB, DDS, Kvstore, Other.
    OssBucketName string
    The OSS Bucket name. The system automatically generates a new name by default.
    PaymentType string
    The payment type of the resource. Valid values: PayAsYouGo, Subscription.
    Period string
    Specify that the prepaid instance is of the package year or monthly type. Valid values: Month, Year.
    ResourceGroupId string
    The ID of the resource group.
    SourceEndpointDatabaseName string
    The name of the database. This parameter is required when the database_type is PostgreSQL or MongoDB.
    SourceEndpointInstanceId string
    The ID of the database instance. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, or Express.
    SourceEndpointInstanceType string
    The location of the database. Valid values: RDS, ECS, Express, Agent, DDS, Other.
    SourceEndpointIp string
    The source endpoint ip.
    SourceEndpointOracleSid string
    Oracle SID name. This parameter is required when the database_type is Oracle.
    SourceEndpointPassword string
    The source endpoint password. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    SourceEndpointPort int
    The source endpoint port.
    SourceEndpointRegion string
    The region of the database. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, Express, or Agent.
    SourceEndpointSid string
    Oracle SID name. This parameter is required when the database_type is Oracle.
    SourceEndpointUserName string
    The source endpoint username. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    Status string
    The status of the resource. Valid values: pause, running.
    StorageRegion string
    The storage region.
    UsedTime int
    Specify purchase duration. When the parameter period is Year, the used_time value is 1 to 9. When the parameter period is Month, the used_time value is 1 to 11.
    BackupGatewayId string
    The ID of the backup gateway. This parameter is required when the source_endpoint_instance_type is Agent.
    BackupLogIntervalSeconds int
    The backup log interval seconds.
    BackupMethod string
    Backup method. Valid values: duplication, logical, physical.
    BackupObjects string
    The backup object.
    BackupPeriod string
    Full backup cycle, Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. supports the selection of multiple fetch values, separated by English commas (,).
    BackupPlanName string
    The name of the resource.
    BackupRateLimit string
    The backup rate limit.
    BackupRetentionPeriod int
    The retention time of backup data. Valid values: 0 to 1825. Default value: 730 days.
    BackupSpeedLimit string
    The backup speed limit.
    BackupStartTime string
    The start time of full Backup. The format is <I> HH:mm</I> Z(UTC time).
    BackupStorageType string
    Built-in storage type, Valid values: system.
    BackupStrategyType string
    The backup strategy type. Valid values: simple, manual.
    CrossAliyunId string
    The UID that is backed up across Alibaba cloud accounts.
    CrossRoleName string
    The name of the RAM role that is backed up across Alibaba cloud accounts.
    DatabaseRegion string
    The database region.
    DatabaseType string
    Database type. Valid values: DRDS, FIle, MSSQL, MariaDB, MongoDB, MySQL, Oracle, PPAS, PostgreSQL, Redis.
    DuplicationArchivePeriod int
    The storage time for conversion to archive cold standby is 365 days by default.
    DuplicationInfrequentAccessPeriod int
    The storage time is converted to low-frequency access. The default time is 180 days.
    EnableBackupLog bool
    Whether to enable incremental log Backup.
    InstanceClass string
    The instance class. Valid values: large, medium, micro, small, xlarge.
    InstanceType string
    The instance type. Valid values: RDS, PolarDB, DDS, Kvstore, Other.
    OssBucketName string
    The OSS Bucket name. The system automatically generates a new name by default.
    PaymentType string
    The payment type of the resource. Valid values: PayAsYouGo, Subscription.
    Period string
    Specify that the prepaid instance is of the package year or monthly type. Valid values: Month, Year.
    ResourceGroupId string
    The ID of the resource group.
    SourceEndpointDatabaseName string
    The name of the database. This parameter is required when the database_type is PostgreSQL or MongoDB.
    SourceEndpointInstanceId string
    The ID of the database instance. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, or Express.
    SourceEndpointInstanceType string
    The location of the database. Valid values: RDS, ECS, Express, Agent, DDS, Other.
    SourceEndpointIp string
    The source endpoint ip.
    SourceEndpointOracleSid string
    Oracle SID name. This parameter is required when the database_type is Oracle.
    SourceEndpointPassword string
    The source endpoint password. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    SourceEndpointPort int
    The source endpoint port.
    SourceEndpointRegion string
    The region of the database. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, Express, or Agent.
    SourceEndpointSid string
    Oracle SID name. This parameter is required when the database_type is Oracle.
    SourceEndpointUserName string
    The source endpoint username. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    Status string
    The status of the resource. Valid values: pause, running.
    StorageRegion string
    The storage region.
    UsedTime int
    Specify purchase duration. When the parameter period is Year, the used_time value is 1 to 9. When the parameter period is Month, the used_time value is 1 to 11.
    backupGatewayId String
    The ID of the backup gateway. This parameter is required when the source_endpoint_instance_type is Agent.
    backupLogIntervalSeconds Integer
    The backup log interval seconds.
    backupMethod String
    Backup method. Valid values: duplication, logical, physical.
    backupObjects String
    The backup object.
    backupPeriod String
    Full backup cycle, Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. supports the selection of multiple fetch values, separated by English commas (,).
    backupPlanName String
    The name of the resource.
    backupRateLimit String
    The backup rate limit.
    backupRetentionPeriod Integer
    The retention time of backup data. Valid values: 0 to 1825. Default value: 730 days.
    backupSpeedLimit String
    The backup speed limit.
    backupStartTime String
    The start time of full Backup. The format is <I> HH:mm</I> Z(UTC time).
    backupStorageType String
    Built-in storage type, Valid values: system.
    backupStrategyType String
    The backup strategy type. Valid values: simple, manual.
    crossAliyunId String
    The UID that is backed up across Alibaba cloud accounts.
    crossRoleName String
    The name of the RAM role that is backed up across Alibaba cloud accounts.
    databaseRegion String
    The database region.
    databaseType String
    Database type. Valid values: DRDS, FIle, MSSQL, MariaDB, MongoDB, MySQL, Oracle, PPAS, PostgreSQL, Redis.
    duplicationArchivePeriod Integer
    The storage time for conversion to archive cold standby is 365 days by default.
    duplicationInfrequentAccessPeriod Integer
    The storage time is converted to low-frequency access. The default time is 180 days.
    enableBackupLog Boolean
    Whether to enable incremental log Backup.
    instanceClass String
    The instance class. Valid values: large, medium, micro, small, xlarge.
    instanceType String
    The instance type. Valid values: RDS, PolarDB, DDS, Kvstore, Other.
    ossBucketName String
    The OSS Bucket name. The system automatically generates a new name by default.
    paymentType String
    The payment type of the resource. Valid values: PayAsYouGo, Subscription.
    period String
    Specify that the prepaid instance is of the package year or monthly type. Valid values: Month, Year.
    resourceGroupId String
    The ID of the resource group.
    sourceEndpointDatabaseName String
    The name of the database. This parameter is required when the database_type is PostgreSQL or MongoDB.
    sourceEndpointInstanceId String
    The ID of the database instance. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, or Express.
    sourceEndpointInstanceType String
    The location of the database. Valid values: RDS, ECS, Express, Agent, DDS, Other.
    sourceEndpointIp String
    The source endpoint ip.
    sourceEndpointOracleSid String
    Oracle SID name. This parameter is required when the database_type is Oracle.
    sourceEndpointPassword String
    The source endpoint password. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    sourceEndpointPort Integer
    The source endpoint port.
    sourceEndpointRegion String
    The region of the database. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, Express, or Agent.
    sourceEndpointSid String
    Oracle SID name. This parameter is required when the database_type is Oracle.
    sourceEndpointUserName String
    The source endpoint username. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    status String
    The status of the resource. Valid values: pause, running.
    storageRegion String
    The storage region.
    usedTime Integer
    Specify purchase duration. When the parameter period is Year, the used_time value is 1 to 9. When the parameter period is Month, the used_time value is 1 to 11.
    backupGatewayId string
    The ID of the backup gateway. This parameter is required when the source_endpoint_instance_type is Agent.
    backupLogIntervalSeconds number
    The backup log interval seconds.
    backupMethod string
    Backup method. Valid values: duplication, logical, physical.
    backupObjects string
    The backup object.
    backupPeriod string
    Full backup cycle, Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. supports the selection of multiple fetch values, separated by English commas (,).
    backupPlanName string
    The name of the resource.
    backupRateLimit string
    The backup rate limit.
    backupRetentionPeriod number
    The retention time of backup data. Valid values: 0 to 1825. Default value: 730 days.
    backupSpeedLimit string
    The backup speed limit.
    backupStartTime string
    The start time of full Backup. The format is <I> HH:mm</I> Z(UTC time).
    backupStorageType string
    Built-in storage type, Valid values: system.
    backupStrategyType string
    The backup strategy type. Valid values: simple, manual.
    crossAliyunId string
    The UID that is backed up across Alibaba cloud accounts.
    crossRoleName string
    The name of the RAM role that is backed up across Alibaba cloud accounts.
    databaseRegion string
    The database region.
    databaseType string
    Database type. Valid values: DRDS, FIle, MSSQL, MariaDB, MongoDB, MySQL, Oracle, PPAS, PostgreSQL, Redis.
    duplicationArchivePeriod number
    The storage time for conversion to archive cold standby is 365 days by default.
    duplicationInfrequentAccessPeriod number
    The storage time is converted to low-frequency access. The default time is 180 days.
    enableBackupLog boolean
    Whether to enable incremental log Backup.
    instanceClass string
    The instance class. Valid values: large, medium, micro, small, xlarge.
    instanceType string
    The instance type. Valid values: RDS, PolarDB, DDS, Kvstore, Other.
    ossBucketName string
    The OSS Bucket name. The system automatically generates a new name by default.
    paymentType string
    The payment type of the resource. Valid values: PayAsYouGo, Subscription.
    period string
    Specify that the prepaid instance is of the package year or monthly type. Valid values: Month, Year.
    resourceGroupId string
    The ID of the resource group.
    sourceEndpointDatabaseName string
    The name of the database. This parameter is required when the database_type is PostgreSQL or MongoDB.
    sourceEndpointInstanceId string
    The ID of the database instance. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, or Express.
    sourceEndpointInstanceType string
    The location of the database. Valid values: RDS, ECS, Express, Agent, DDS, Other.
    sourceEndpointIp string
    The source endpoint ip.
    sourceEndpointOracleSid string
    Oracle SID name. This parameter is required when the database_type is Oracle.
    sourceEndpointPassword string
    The source endpoint password. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    sourceEndpointPort number
    The source endpoint port.
    sourceEndpointRegion string
    The region of the database. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, Express, or Agent.
    sourceEndpointSid string
    Oracle SID name. This parameter is required when the database_type is Oracle.
    sourceEndpointUserName string
    The source endpoint username. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    status string
    The status of the resource. Valid values: pause, running.
    storageRegion string
    The storage region.
    usedTime number
    Specify purchase duration. When the parameter period is Year, the used_time value is 1 to 9. When the parameter period is Month, the used_time value is 1 to 11.
    backup_gateway_id str
    The ID of the backup gateway. This parameter is required when the source_endpoint_instance_type is Agent.
    backup_log_interval_seconds int
    The backup log interval seconds.
    backup_method str
    Backup method. Valid values: duplication, logical, physical.
    backup_objects str
    The backup object.
    backup_period str
    Full backup cycle, Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. supports the selection of multiple fetch values, separated by English commas (,).
    backup_plan_name str
    The name of the resource.
    backup_rate_limit str
    The backup rate limit.
    backup_retention_period int
    The retention time of backup data. Valid values: 0 to 1825. Default value: 730 days.
    backup_speed_limit str
    The backup speed limit.
    backup_start_time str
    The start time of full Backup. The format is <I> HH:mm</I> Z(UTC time).
    backup_storage_type str
    Built-in storage type, Valid values: system.
    backup_strategy_type str
    The backup strategy type. Valid values: simple, manual.
    cross_aliyun_id str
    The UID that is backed up across Alibaba cloud accounts.
    cross_role_name str
    The name of the RAM role that is backed up across Alibaba cloud accounts.
    database_region str
    The database region.
    database_type str
    Database type. Valid values: DRDS, FIle, MSSQL, MariaDB, MongoDB, MySQL, Oracle, PPAS, PostgreSQL, Redis.
    duplication_archive_period int
    The storage time for conversion to archive cold standby is 365 days by default.
    duplication_infrequent_access_period int
    The storage time is converted to low-frequency access. The default time is 180 days.
    enable_backup_log bool
    Whether to enable incremental log Backup.
    instance_class str
    The instance class. Valid values: large, medium, micro, small, xlarge.
    instance_type str
    The instance type. Valid values: RDS, PolarDB, DDS, Kvstore, Other.
    oss_bucket_name str
    The OSS Bucket name. The system automatically generates a new name by default.
    payment_type str
    The payment type of the resource. Valid values: PayAsYouGo, Subscription.
    period str
    Specify that the prepaid instance is of the package year or monthly type. Valid values: Month, Year.
    resource_group_id str
    The ID of the resource group.
    source_endpoint_database_name str
    The name of the database. This parameter is required when the database_type is PostgreSQL or MongoDB.
    source_endpoint_instance_id str
    The ID of the database instance. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, or Express.
    source_endpoint_instance_type str
    The location of the database. Valid values: RDS, ECS, Express, Agent, DDS, Other.
    source_endpoint_ip str
    The source endpoint ip.
    source_endpoint_oracle_sid str
    Oracle SID name. This parameter is required when the database_type is Oracle.
    source_endpoint_password str
    The source endpoint password. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    source_endpoint_port int
    The source endpoint port.
    source_endpoint_region str
    The region of the database. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, Express, or Agent.
    source_endpoint_sid str
    Oracle SID name. This parameter is required when the database_type is Oracle.
    source_endpoint_user_name str
    The source endpoint username. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    status str
    The status of the resource. Valid values: pause, running.
    storage_region str
    The storage region.
    used_time int
    Specify purchase duration. When the parameter period is Year, the used_time value is 1 to 9. When the parameter period is Month, the used_time value is 1 to 11.
    backupGatewayId String
    The ID of the backup gateway. This parameter is required when the source_endpoint_instance_type is Agent.
    backupLogIntervalSeconds Number
    The backup log interval seconds.
    backupMethod String
    Backup method. Valid values: duplication, logical, physical.
    backupObjects String
    The backup object.
    backupPeriod String
    Full backup cycle, Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. supports the selection of multiple fetch values, separated by English commas (,).
    backupPlanName String
    The name of the resource.
    backupRateLimit String
    The backup rate limit.
    backupRetentionPeriod Number
    The retention time of backup data. Valid values: 0 to 1825. Default value: 730 days.
    backupSpeedLimit String
    The backup speed limit.
    backupStartTime String
    The start time of full Backup. The format is <I> HH:mm</I> Z(UTC time).
    backupStorageType String
    Built-in storage type, Valid values: system.
    backupStrategyType String
    The backup strategy type. Valid values: simple, manual.
    crossAliyunId String
    The UID that is backed up across Alibaba cloud accounts.
    crossRoleName String
    The name of the RAM role that is backed up across Alibaba cloud accounts.
    databaseRegion String
    The database region.
    databaseType String
    Database type. Valid values: DRDS, FIle, MSSQL, MariaDB, MongoDB, MySQL, Oracle, PPAS, PostgreSQL, Redis.
    duplicationArchivePeriod Number
    The storage time for conversion to archive cold standby is 365 days by default.
    duplicationInfrequentAccessPeriod Number
    The storage time is converted to low-frequency access. The default time is 180 days.
    enableBackupLog Boolean
    Whether to enable incremental log Backup.
    instanceClass String
    The instance class. Valid values: large, medium, micro, small, xlarge.
    instanceType String
    The instance type. Valid values: RDS, PolarDB, DDS, Kvstore, Other.
    ossBucketName String
    The OSS Bucket name. The system automatically generates a new name by default.
    paymentType String
    The payment type of the resource. Valid values: PayAsYouGo, Subscription.
    period String
    Specify that the prepaid instance is of the package year or monthly type. Valid values: Month, Year.
    resourceGroupId String
    The ID of the resource group.
    sourceEndpointDatabaseName String
    The name of the database. This parameter is required when the database_type is PostgreSQL or MongoDB.
    sourceEndpointInstanceId String
    The ID of the database instance. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, or Express.
    sourceEndpointInstanceType String
    The location of the database. Valid values: RDS, ECS, Express, Agent, DDS, Other.
    sourceEndpointIp String
    The source endpoint ip.
    sourceEndpointOracleSid String
    Oracle SID name. This parameter is required when the database_type is Oracle.
    sourceEndpointPassword String
    The source endpoint password. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    sourceEndpointPort Number
    The source endpoint port.
    sourceEndpointRegion String
    The region of the database. This parameter is required when the source_endpoint_instance_type is RDS, ECS, DDS, Express, or Agent.
    sourceEndpointSid String
    Oracle SID name. This parameter is required when the database_type is Oracle.
    sourceEndpointUserName String
    The source endpoint username. This parameter is not required when the database_type is Redis, or when the source_endpoint_instance_type is Agent and the database_type is MSSQL. This parameter is required in other scenarios.
    status String
    The status of the resource. Valid values: pause, running.
    storageRegion String
    The storage region.
    usedTime Number
    Specify purchase duration. When the parameter period is Year, the used_time value is 1 to 9. When the parameter period is Month, the used_time value is 1 to 11.

    Import

    DBS Backup Plan can be imported using the id, e.g.

    $ pulumi import alicloud:dbs/backupPlan:BackupPlan example <id>
    

    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