1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. rds
  5. RdsInstanceCrossBackupPolicy
Alibaba Cloud v3.69.0 published on Monday, Dec 9, 2024 by Pulumi

alicloud.rds.RdsInstanceCrossBackupPolicy

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.69.0 published on Monday, Dec 9, 2024 by Pulumi

    Provides an RDS instance emote disaster recovery strategy policy resource and used to configure instance emote disaster recovery strategy policy.

    For information about RDS cross region backup settings and how to use them, see What is cross region backup.

    NOTE: Available since v1.195.0.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tf-example";
    const default = alicloud.rds.getZones({
        engine: "MySQL",
        engineVersion: "8.0",
        dbInstanceStorageType: "local_ssd",
        category: "HighAvailability",
    });
    const defaultGetInstanceClasses = _default.then(_default => alicloud.rds.getInstanceClasses({
        zoneId: _default.ids?.[0],
        engine: "MySQL",
        engineVersion: "8.0",
        dbInstanceStorageType: "local_ssd",
        category: "HighAvailability",
    }));
    const regions = alicloud.rds.getCrossRegions({});
    const defaultNetwork = new alicloud.vpc.Network("default", {
        vpcName: name,
        cidrBlock: "172.16.0.0/16",
    });
    const defaultSwitch = new alicloud.vpc.Switch("default", {
        vpcId: defaultNetwork.id,
        cidrBlock: "172.16.0.0/24",
        zoneId: _default.then(_default => _default.ids?.[0]),
        vswitchName: name,
    });
    const defaultInstance = new alicloud.rds.Instance("default", {
        engine: "MySQL",
        engineVersion: "8.0",
        instanceType: defaultGetInstanceClasses.then(defaultGetInstanceClasses => defaultGetInstanceClasses.instanceClasses?.[0]?.instanceClass),
        instanceStorage: defaultGetInstanceClasses.then(defaultGetInstanceClasses => defaultGetInstanceClasses.instanceClasses?.[0]?.storageRange?.min),
        instanceChargeType: "Postpaid",
        category: "HighAvailability",
        instanceName: name,
        vswitchId: defaultSwitch.id,
        dbInstanceStorageType: "local_ssd",
    });
    const defaultRdsInstanceCrossBackupPolicy = new alicloud.rds.RdsInstanceCrossBackupPolicy("default", {
        instanceId: defaultInstance.id,
        crossBackupRegion: regions.then(regions => regions.ids?.[0]),
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-example"
    default = alicloud.rds.get_zones(engine="MySQL",
        engine_version="8.0",
        db_instance_storage_type="local_ssd",
        category="HighAvailability")
    default_get_instance_classes = alicloud.rds.get_instance_classes(zone_id=default.ids[0],
        engine="MySQL",
        engine_version="8.0",
        db_instance_storage_type="local_ssd",
        category="HighAvailability")
    regions = alicloud.rds.get_cross_regions()
    default_network = alicloud.vpc.Network("default",
        vpc_name=name,
        cidr_block="172.16.0.0/16")
    default_switch = alicloud.vpc.Switch("default",
        vpc_id=default_network.id,
        cidr_block="172.16.0.0/24",
        zone_id=default.ids[0],
        vswitch_name=name)
    default_instance = alicloud.rds.Instance("default",
        engine="MySQL",
        engine_version="8.0",
        instance_type=default_get_instance_classes.instance_classes[0].instance_class,
        instance_storage=default_get_instance_classes.instance_classes[0].storage_range.min,
        instance_charge_type="Postpaid",
        category="HighAvailability",
        instance_name=name,
        vswitch_id=default_switch.id,
        db_instance_storage_type="local_ssd")
    default_rds_instance_cross_backup_policy = alicloud.rds.RdsInstanceCrossBackupPolicy("default",
        instance_id=default_instance.id,
        cross_backup_region=regions.ids[0])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/rds"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "tf-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := rds.GetZones(ctx, &rds.GetZonesArgs{
    			Engine:                pulumi.StringRef("MySQL"),
    			EngineVersion:         pulumi.StringRef("8.0"),
    			DbInstanceStorageType: pulumi.StringRef("local_ssd"),
    			Category:              pulumi.StringRef("HighAvailability"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetInstanceClasses, err := rds.GetInstanceClasses(ctx, &rds.GetInstanceClassesArgs{
    			ZoneId:                pulumi.StringRef(_default.Ids[0]),
    			Engine:                pulumi.StringRef("MySQL"),
    			EngineVersion:         pulumi.StringRef("8.0"),
    			DbInstanceStorageType: pulumi.StringRef("local_ssd"),
    			Category:              pulumi.StringRef("HighAvailability"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		regions, err := rds.GetCrossRegions(ctx, &rds.GetCrossRegionsArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
    			VpcId:       defaultNetwork.ID(),
    			CidrBlock:   pulumi.String("172.16.0.0/24"),
    			ZoneId:      pulumi.String(_default.Ids[0]),
    			VswitchName: pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := rds.NewInstance(ctx, "default", &rds.InstanceArgs{
    			Engine:                pulumi.String("MySQL"),
    			EngineVersion:         pulumi.String("8.0"),
    			InstanceType:          pulumi.String(defaultGetInstanceClasses.InstanceClasses[0].InstanceClass),
    			InstanceStorage:       pulumi.String(defaultGetInstanceClasses.InstanceClasses[0].StorageRange.Min),
    			InstanceChargeType:    pulumi.String("Postpaid"),
    			Category:              pulumi.String("HighAvailability"),
    			InstanceName:          pulumi.String(name),
    			VswitchId:             defaultSwitch.ID(),
    			DbInstanceStorageType: pulumi.String("local_ssd"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = rds.NewRdsInstanceCrossBackupPolicy(ctx, "default", &rds.RdsInstanceCrossBackupPolicyArgs{
    			InstanceId:        defaultInstance.ID(),
    			CrossBackupRegion: pulumi.String(regions.Ids[0]),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "tf-example";
        var @default = AliCloud.Rds.GetZones.Invoke(new()
        {
            Engine = "MySQL",
            EngineVersion = "8.0",
            DbInstanceStorageType = "local_ssd",
            Category = "HighAvailability",
        });
    
        var defaultGetInstanceClasses = AliCloud.Rds.GetInstanceClasses.Invoke(new()
        {
            ZoneId = @default.Apply(getZonesResult => getZonesResult.Ids[0]),
            Engine = "MySQL",
            EngineVersion = "8.0",
            DbInstanceStorageType = "local_ssd",
            Category = "HighAvailability",
        });
    
        var regions = AliCloud.Rds.GetCrossRegions.Invoke();
    
        var defaultNetwork = new AliCloud.Vpc.Network("default", new()
        {
            VpcName = name,
            CidrBlock = "172.16.0.0/16",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
        {
            VpcId = defaultNetwork.Id,
            CidrBlock = "172.16.0.0/24",
            ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Ids[0])),
            VswitchName = name,
        });
    
        var defaultInstance = new AliCloud.Rds.Instance("default", new()
        {
            Engine = "MySQL",
            EngineVersion = "8.0",
            InstanceType = defaultGetInstanceClasses.Apply(getInstanceClassesResult => getInstanceClassesResult.InstanceClasses[0]?.InstanceClass),
            InstanceStorage = defaultGetInstanceClasses.Apply(getInstanceClassesResult => getInstanceClassesResult.InstanceClasses[0]?.StorageRange?.Min),
            InstanceChargeType = "Postpaid",
            Category = "HighAvailability",
            InstanceName = name,
            VswitchId = defaultSwitch.Id,
            DbInstanceStorageType = "local_ssd",
        });
    
        var defaultRdsInstanceCrossBackupPolicy = new AliCloud.Rds.RdsInstanceCrossBackupPolicy("default", new()
        {
            InstanceId = defaultInstance.Id,
            CrossBackupRegion = regions.Apply(getCrossRegionsResult => getCrossRegionsResult.Ids[0]),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.rds.RdsFunctions;
    import com.pulumi.alicloud.rds.inputs.GetZonesArgs;
    import com.pulumi.alicloud.rds.inputs.GetInstanceClassesArgs;
    import com.pulumi.alicloud.rds.inputs.GetCrossRegionsArgs;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.rds.Instance;
    import com.pulumi.alicloud.rds.InstanceArgs;
    import com.pulumi.alicloud.rds.RdsInstanceCrossBackupPolicy;
    import com.pulumi.alicloud.rds.RdsInstanceCrossBackupPolicyArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("tf-example");
            final var default = RdsFunctions.getZones(GetZonesArgs.builder()
                .engine("MySQL")
                .engineVersion("8.0")
                .dbInstanceStorageType("local_ssd")
                .category("HighAvailability")
                .build());
    
            final var defaultGetInstanceClasses = RdsFunctions.getInstanceClasses(GetInstanceClassesArgs.builder()
                .zoneId(default_.ids()[0])
                .engine("MySQL")
                .engineVersion("8.0")
                .dbInstanceStorageType("local_ssd")
                .category("HighAvailability")
                .build());
    
            final var regions = RdsFunctions.getCrossRegions();
    
            var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
                .vpcName(name)
                .cidrBlock("172.16.0.0/16")
                .build());
    
            var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
                .vpcId(defaultNetwork.id())
                .cidrBlock("172.16.0.0/24")
                .zoneId(default_.ids()[0])
                .vswitchName(name)
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
                .engine("MySQL")
                .engineVersion("8.0")
                .instanceType(defaultGetInstanceClasses.applyValue(getInstanceClassesResult -> getInstanceClassesResult.instanceClasses()[0].instanceClass()))
                .instanceStorage(defaultGetInstanceClasses.applyValue(getInstanceClassesResult -> getInstanceClassesResult.instanceClasses()[0].storageRange().min()))
                .instanceChargeType("Postpaid")
                .category("HighAvailability")
                .instanceName(name)
                .vswitchId(defaultSwitch.id())
                .dbInstanceStorageType("local_ssd")
                .build());
    
            var defaultRdsInstanceCrossBackupPolicy = new RdsInstanceCrossBackupPolicy("defaultRdsInstanceCrossBackupPolicy", RdsInstanceCrossBackupPolicyArgs.builder()
                .instanceId(defaultInstance.id())
                .crossBackupRegion(regions.applyValue(getCrossRegionsResult -> getCrossRegionsResult.ids()[0]))
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf-example
    resources:
      defaultNetwork:
        type: alicloud:vpc:Network
        name: default
        properties:
          vpcName: ${name}
          cidrBlock: 172.16.0.0/16
      defaultSwitch:
        type: alicloud:vpc:Switch
        name: default
        properties:
          vpcId: ${defaultNetwork.id}
          cidrBlock: 172.16.0.0/24
          zoneId: ${default.ids[0]}
          vswitchName: ${name}
      defaultInstance:
        type: alicloud:rds:Instance
        name: default
        properties:
          engine: MySQL
          engineVersion: '8.0'
          instanceType: ${defaultGetInstanceClasses.instanceClasses[0].instanceClass}
          instanceStorage: ${defaultGetInstanceClasses.instanceClasses[0].storageRange.min}
          instanceChargeType: Postpaid
          category: HighAvailability
          instanceName: ${name}
          vswitchId: ${defaultSwitch.id}
          dbInstanceStorageType: local_ssd
      defaultRdsInstanceCrossBackupPolicy:
        type: alicloud:rds:RdsInstanceCrossBackupPolicy
        name: default
        properties:
          instanceId: ${defaultInstance.id}
          crossBackupRegion: ${regions.ids[0]}
    variables:
      default:
        fn::invoke:
          Function: alicloud:rds:getZones
          Arguments:
            engine: MySQL
            engineVersion: '8.0'
            dbInstanceStorageType: local_ssd
            category: HighAvailability
      defaultGetInstanceClasses:
        fn::invoke:
          Function: alicloud:rds:getInstanceClasses
          Arguments:
            zoneId: ${default.ids[0]}
            engine: MySQL
            engineVersion: '8.0'
            dbInstanceStorageType: local_ssd
            category: HighAvailability
      regions:
        fn::invoke:
          Function: alicloud:rds:getCrossRegions
          Arguments: {}
    

    Create RdsInstanceCrossBackupPolicy Resource

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

    Constructor syntax

    new RdsInstanceCrossBackupPolicy(name: string, args: RdsInstanceCrossBackupPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def RdsInstanceCrossBackupPolicy(resource_name: str,
                                     args: RdsInstanceCrossBackupPolicyArgs,
                                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def RdsInstanceCrossBackupPolicy(resource_name: str,
                                     opts: Optional[ResourceOptions] = None,
                                     cross_backup_region: Optional[str] = None,
                                     instance_id: Optional[str] = None,
                                     log_backup_enabled: Optional[str] = None,
                                     retention: Optional[int] = None)
    func NewRdsInstanceCrossBackupPolicy(ctx *Context, name string, args RdsInstanceCrossBackupPolicyArgs, opts ...ResourceOption) (*RdsInstanceCrossBackupPolicy, error)
    public RdsInstanceCrossBackupPolicy(string name, RdsInstanceCrossBackupPolicyArgs args, CustomResourceOptions? opts = null)
    public RdsInstanceCrossBackupPolicy(String name, RdsInstanceCrossBackupPolicyArgs args)
    public RdsInstanceCrossBackupPolicy(String name, RdsInstanceCrossBackupPolicyArgs args, CustomResourceOptions options)
    
    type: alicloud:rds:RdsInstanceCrossBackupPolicy
    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 RdsInstanceCrossBackupPolicyArgs
    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 RdsInstanceCrossBackupPolicyArgs
    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 RdsInstanceCrossBackupPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RdsInstanceCrossBackupPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RdsInstanceCrossBackupPolicyArgs
    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 rdsInstanceCrossBackupPolicyResource = new AliCloud.Rds.RdsInstanceCrossBackupPolicy("rdsInstanceCrossBackupPolicyResource", new()
    {
        CrossBackupRegion = "string",
        InstanceId = "string",
        LogBackupEnabled = "string",
        Retention = 0,
    });
    
    example, err := rds.NewRdsInstanceCrossBackupPolicy(ctx, "rdsInstanceCrossBackupPolicyResource", &rds.RdsInstanceCrossBackupPolicyArgs{
    	CrossBackupRegion: pulumi.String("string"),
    	InstanceId:        pulumi.String("string"),
    	LogBackupEnabled:  pulumi.String("string"),
    	Retention:         pulumi.Int(0),
    })
    
    var rdsInstanceCrossBackupPolicyResource = new RdsInstanceCrossBackupPolicy("rdsInstanceCrossBackupPolicyResource", RdsInstanceCrossBackupPolicyArgs.builder()
        .crossBackupRegion("string")
        .instanceId("string")
        .logBackupEnabled("string")
        .retention(0)
        .build());
    
    rds_instance_cross_backup_policy_resource = alicloud.rds.RdsInstanceCrossBackupPolicy("rdsInstanceCrossBackupPolicyResource",
        cross_backup_region="string",
        instance_id="string",
        log_backup_enabled="string",
        retention=0)
    
    const rdsInstanceCrossBackupPolicyResource = new alicloud.rds.RdsInstanceCrossBackupPolicy("rdsInstanceCrossBackupPolicyResource", {
        crossBackupRegion: "string",
        instanceId: "string",
        logBackupEnabled: "string",
        retention: 0,
    });
    
    type: alicloud:rds:RdsInstanceCrossBackupPolicy
    properties:
        crossBackupRegion: string
        instanceId: string
        logBackupEnabled: string
        retention: 0
    

    RdsInstanceCrossBackupPolicy Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The RdsInstanceCrossBackupPolicy resource accepts the following input properties:

    CrossBackupRegion string
    The ID of the destination region where the cross-region backup files of the instance are stored.
    InstanceId string
    The ID of the instance.
    LogBackupEnabled string
    The status of the cross-region log backup feature on the instance. Valid values:

    • Enable: Enables the feature.
    • Disabled: Disables the feature.
    Retention int
    The number of days for which the cross-region backup files of the instance are retained. Valid values: 7 to 1825. Default value: 7.
    CrossBackupRegion string
    The ID of the destination region where the cross-region backup files of the instance are stored.
    InstanceId string
    The ID of the instance.
    LogBackupEnabled string
    The status of the cross-region log backup feature on the instance. Valid values:

    • Enable: Enables the feature.
    • Disabled: Disables the feature.
    Retention int
    The number of days for which the cross-region backup files of the instance are retained. Valid values: 7 to 1825. Default value: 7.
    crossBackupRegion String
    The ID of the destination region where the cross-region backup files of the instance are stored.
    instanceId String
    The ID of the instance.
    logBackupEnabled String
    The status of the cross-region log backup feature on the instance. Valid values:

    • Enable: Enables the feature.
    • Disabled: Disables the feature.
    retention Integer
    The number of days for which the cross-region backup files of the instance are retained. Valid values: 7 to 1825. Default value: 7.
    crossBackupRegion string
    The ID of the destination region where the cross-region backup files of the instance are stored.
    instanceId string
    The ID of the instance.
    logBackupEnabled string
    The status of the cross-region log backup feature on the instance. Valid values:

    • Enable: Enables the feature.
    • Disabled: Disables the feature.
    retention number
    The number of days for which the cross-region backup files of the instance are retained. Valid values: 7 to 1825. Default value: 7.
    cross_backup_region str
    The ID of the destination region where the cross-region backup files of the instance are stored.
    instance_id str
    The ID of the instance.
    log_backup_enabled str
    The status of the cross-region log backup feature on the instance. Valid values:

    • Enable: Enables the feature.
    • Disabled: Disables the feature.
    retention int
    The number of days for which the cross-region backup files of the instance are retained. Valid values: 7 to 1825. Default value: 7.
    crossBackupRegion String
    The ID of the destination region where the cross-region backup files of the instance are stored.
    instanceId String
    The ID of the instance.
    logBackupEnabled String
    The status of the cross-region log backup feature on the instance. Valid values:

    • Enable: Enables the feature.
    • Disabled: Disables the feature.
    retention Number
    The number of days for which the cross-region backup files of the instance are retained. Valid values: 7 to 1825. Default value: 7.

    Outputs

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

    BackupEnabled string
    The status of the overall cross-region backup switch on the instance. Valid values:

    • Disabled
    • Enable
    BackupEnabledTime string
    The time when cross-region backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    CrossBackupType string
    The policy that is used to save cross-region backups of the instance. Default value: 1. The default value 1 indicates that all cross-region backups are saved.
    DbInstanceStatus string
    The state of the instance. For more information, see Instance status.
    Id string
    The provider-assigned unique ID for this managed resource.
    LockMode string
    The lock status of the instance. Valid values:

    • Unlock: The instance is not locked.
    • ManualLock: The instance is manually locked.
    • LockByExpiration: The instance is locked upon expiration.
    • LockByRestoration: The instance is automatically locked before a rollback.
    • LockByDiskQuota: The instance is automatically locked because its storage space is exhausted. In this situation, the instance is inaccessible.
    LogBackupEnabledTime string
    The time when cross-region log backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    RetentType string
    The policy that is used to retain cross-region backups of the instance. Default value: 1. The default value 1 indicate that cross-region backups are retained based on the specified retention period.
    BackupEnabled string
    The status of the overall cross-region backup switch on the instance. Valid values:

    • Disabled
    • Enable
    BackupEnabledTime string
    The time when cross-region backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    CrossBackupType string
    The policy that is used to save cross-region backups of the instance. Default value: 1. The default value 1 indicates that all cross-region backups are saved.
    DbInstanceStatus string
    The state of the instance. For more information, see Instance status.
    Id string
    The provider-assigned unique ID for this managed resource.
    LockMode string
    The lock status of the instance. Valid values:

    • Unlock: The instance is not locked.
    • ManualLock: The instance is manually locked.
    • LockByExpiration: The instance is locked upon expiration.
    • LockByRestoration: The instance is automatically locked before a rollback.
    • LockByDiskQuota: The instance is automatically locked because its storage space is exhausted. In this situation, the instance is inaccessible.
    LogBackupEnabledTime string
    The time when cross-region log backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    RetentType string
    The policy that is used to retain cross-region backups of the instance. Default value: 1. The default value 1 indicate that cross-region backups are retained based on the specified retention period.
    backupEnabled String
    The status of the overall cross-region backup switch on the instance. Valid values:

    • Disabled
    • Enable
    backupEnabledTime String
    The time when cross-region backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    crossBackupType String
    The policy that is used to save cross-region backups of the instance. Default value: 1. The default value 1 indicates that all cross-region backups are saved.
    dbInstanceStatus String
    The state of the instance. For more information, see Instance status.
    id String
    The provider-assigned unique ID for this managed resource.
    lockMode String
    The lock status of the instance. Valid values:

    • Unlock: The instance is not locked.
    • ManualLock: The instance is manually locked.
    • LockByExpiration: The instance is locked upon expiration.
    • LockByRestoration: The instance is automatically locked before a rollback.
    • LockByDiskQuota: The instance is automatically locked because its storage space is exhausted. In this situation, the instance is inaccessible.
    logBackupEnabledTime String
    The time when cross-region log backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    retentType String
    The policy that is used to retain cross-region backups of the instance. Default value: 1. The default value 1 indicate that cross-region backups are retained based on the specified retention period.
    backupEnabled string
    The status of the overall cross-region backup switch on the instance. Valid values:

    • Disabled
    • Enable
    backupEnabledTime string
    The time when cross-region backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    crossBackupType string
    The policy that is used to save cross-region backups of the instance. Default value: 1. The default value 1 indicates that all cross-region backups are saved.
    dbInstanceStatus string
    The state of the instance. For more information, see Instance status.
    id string
    The provider-assigned unique ID for this managed resource.
    lockMode string
    The lock status of the instance. Valid values:

    • Unlock: The instance is not locked.
    • ManualLock: The instance is manually locked.
    • LockByExpiration: The instance is locked upon expiration.
    • LockByRestoration: The instance is automatically locked before a rollback.
    • LockByDiskQuota: The instance is automatically locked because its storage space is exhausted. In this situation, the instance is inaccessible.
    logBackupEnabledTime string
    The time when cross-region log backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    retentType string
    The policy that is used to retain cross-region backups of the instance. Default value: 1. The default value 1 indicate that cross-region backups are retained based on the specified retention period.
    backup_enabled str
    The status of the overall cross-region backup switch on the instance. Valid values:

    • Disabled
    • Enable
    backup_enabled_time str
    The time when cross-region backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    cross_backup_type str
    The policy that is used to save cross-region backups of the instance. Default value: 1. The default value 1 indicates that all cross-region backups are saved.
    db_instance_status str
    The state of the instance. For more information, see Instance status.
    id str
    The provider-assigned unique ID for this managed resource.
    lock_mode str
    The lock status of the instance. Valid values:

    • Unlock: The instance is not locked.
    • ManualLock: The instance is manually locked.
    • LockByExpiration: The instance is locked upon expiration.
    • LockByRestoration: The instance is automatically locked before a rollback.
    • LockByDiskQuota: The instance is automatically locked because its storage space is exhausted. In this situation, the instance is inaccessible.
    log_backup_enabled_time str
    The time when cross-region log backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    retent_type str
    The policy that is used to retain cross-region backups of the instance. Default value: 1. The default value 1 indicate that cross-region backups are retained based on the specified retention period.
    backupEnabled String
    The status of the overall cross-region backup switch on the instance. Valid values:

    • Disabled
    • Enable
    backupEnabledTime String
    The time when cross-region backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    crossBackupType String
    The policy that is used to save cross-region backups of the instance. Default value: 1. The default value 1 indicates that all cross-region backups are saved.
    dbInstanceStatus String
    The state of the instance. For more information, see Instance status.
    id String
    The provider-assigned unique ID for this managed resource.
    lockMode String
    The lock status of the instance. Valid values:

    • Unlock: The instance is not locked.
    • ManualLock: The instance is manually locked.
    • LockByExpiration: The instance is locked upon expiration.
    • LockByRestoration: The instance is automatically locked before a rollback.
    • LockByDiskQuota: The instance is automatically locked because its storage space is exhausted. In this situation, the instance is inaccessible.
    logBackupEnabledTime String
    The time when cross-region log backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    retentType String
    The policy that is used to retain cross-region backups of the instance. Default value: 1. The default value 1 indicate that cross-region backups are retained based on the specified retention period.

    Look up Existing RdsInstanceCrossBackupPolicy Resource

    Get an existing RdsInstanceCrossBackupPolicy 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?: RdsInstanceCrossBackupPolicyState, opts?: CustomResourceOptions): RdsInstanceCrossBackupPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backup_enabled: Optional[str] = None,
            backup_enabled_time: Optional[str] = None,
            cross_backup_region: Optional[str] = None,
            cross_backup_type: Optional[str] = None,
            db_instance_status: Optional[str] = None,
            instance_id: Optional[str] = None,
            lock_mode: Optional[str] = None,
            log_backup_enabled: Optional[str] = None,
            log_backup_enabled_time: Optional[str] = None,
            retent_type: Optional[str] = None,
            retention: Optional[int] = None) -> RdsInstanceCrossBackupPolicy
    func GetRdsInstanceCrossBackupPolicy(ctx *Context, name string, id IDInput, state *RdsInstanceCrossBackupPolicyState, opts ...ResourceOption) (*RdsInstanceCrossBackupPolicy, error)
    public static RdsInstanceCrossBackupPolicy Get(string name, Input<string> id, RdsInstanceCrossBackupPolicyState? state, CustomResourceOptions? opts = null)
    public static RdsInstanceCrossBackupPolicy get(String name, Output<String> id, RdsInstanceCrossBackupPolicyState 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:
    BackupEnabled string
    The status of the overall cross-region backup switch on the instance. Valid values:

    • Disabled
    • Enable
    BackupEnabledTime string
    The time when cross-region backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    CrossBackupRegion string
    The ID of the destination region where the cross-region backup files of the instance are stored.
    CrossBackupType string
    The policy that is used to save cross-region backups of the instance. Default value: 1. The default value 1 indicates that all cross-region backups are saved.
    DbInstanceStatus string
    The state of the instance. For more information, see Instance status.
    InstanceId string
    The ID of the instance.
    LockMode string
    The lock status of the instance. Valid values:

    • Unlock: The instance is not locked.
    • ManualLock: The instance is manually locked.
    • LockByExpiration: The instance is locked upon expiration.
    • LockByRestoration: The instance is automatically locked before a rollback.
    • LockByDiskQuota: The instance is automatically locked because its storage space is exhausted. In this situation, the instance is inaccessible.
    LogBackupEnabled string
    The status of the cross-region log backup feature on the instance. Valid values:

    • Enable: Enables the feature.
    • Disabled: Disables the feature.
    LogBackupEnabledTime string
    The time when cross-region log backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    RetentType string
    The policy that is used to retain cross-region backups of the instance. Default value: 1. The default value 1 indicate that cross-region backups are retained based on the specified retention period.
    Retention int
    The number of days for which the cross-region backup files of the instance are retained. Valid values: 7 to 1825. Default value: 7.
    BackupEnabled string
    The status of the overall cross-region backup switch on the instance. Valid values:

    • Disabled
    • Enable
    BackupEnabledTime string
    The time when cross-region backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    CrossBackupRegion string
    The ID of the destination region where the cross-region backup files of the instance are stored.
    CrossBackupType string
    The policy that is used to save cross-region backups of the instance. Default value: 1. The default value 1 indicates that all cross-region backups are saved.
    DbInstanceStatus string
    The state of the instance. For more information, see Instance status.
    InstanceId string
    The ID of the instance.
    LockMode string
    The lock status of the instance. Valid values:

    • Unlock: The instance is not locked.
    • ManualLock: The instance is manually locked.
    • LockByExpiration: The instance is locked upon expiration.
    • LockByRestoration: The instance is automatically locked before a rollback.
    • LockByDiskQuota: The instance is automatically locked because its storage space is exhausted. In this situation, the instance is inaccessible.
    LogBackupEnabled string
    The status of the cross-region log backup feature on the instance. Valid values:

    • Enable: Enables the feature.
    • Disabled: Disables the feature.
    LogBackupEnabledTime string
    The time when cross-region log backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    RetentType string
    The policy that is used to retain cross-region backups of the instance. Default value: 1. The default value 1 indicate that cross-region backups are retained based on the specified retention period.
    Retention int
    The number of days for which the cross-region backup files of the instance are retained. Valid values: 7 to 1825. Default value: 7.
    backupEnabled String
    The status of the overall cross-region backup switch on the instance. Valid values:

    • Disabled
    • Enable
    backupEnabledTime String
    The time when cross-region backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    crossBackupRegion String
    The ID of the destination region where the cross-region backup files of the instance are stored.
    crossBackupType String
    The policy that is used to save cross-region backups of the instance. Default value: 1. The default value 1 indicates that all cross-region backups are saved.
    dbInstanceStatus String
    The state of the instance. For more information, see Instance status.
    instanceId String
    The ID of the instance.
    lockMode String
    The lock status of the instance. Valid values:

    • Unlock: The instance is not locked.
    • ManualLock: The instance is manually locked.
    • LockByExpiration: The instance is locked upon expiration.
    • LockByRestoration: The instance is automatically locked before a rollback.
    • LockByDiskQuota: The instance is automatically locked because its storage space is exhausted. In this situation, the instance is inaccessible.
    logBackupEnabled String
    The status of the cross-region log backup feature on the instance. Valid values:

    • Enable: Enables the feature.
    • Disabled: Disables the feature.
    logBackupEnabledTime String
    The time when cross-region log backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    retentType String
    The policy that is used to retain cross-region backups of the instance. Default value: 1. The default value 1 indicate that cross-region backups are retained based on the specified retention period.
    retention Integer
    The number of days for which the cross-region backup files of the instance are retained. Valid values: 7 to 1825. Default value: 7.
    backupEnabled string
    The status of the overall cross-region backup switch on the instance. Valid values:

    • Disabled
    • Enable
    backupEnabledTime string
    The time when cross-region backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    crossBackupRegion string
    The ID of the destination region where the cross-region backup files of the instance are stored.
    crossBackupType string
    The policy that is used to save cross-region backups of the instance. Default value: 1. The default value 1 indicates that all cross-region backups are saved.
    dbInstanceStatus string
    The state of the instance. For more information, see Instance status.
    instanceId string
    The ID of the instance.
    lockMode string
    The lock status of the instance. Valid values:

    • Unlock: The instance is not locked.
    • ManualLock: The instance is manually locked.
    • LockByExpiration: The instance is locked upon expiration.
    • LockByRestoration: The instance is automatically locked before a rollback.
    • LockByDiskQuota: The instance is automatically locked because its storage space is exhausted. In this situation, the instance is inaccessible.
    logBackupEnabled string
    The status of the cross-region log backup feature on the instance. Valid values:

    • Enable: Enables the feature.
    • Disabled: Disables the feature.
    logBackupEnabledTime string
    The time when cross-region log backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    retentType string
    The policy that is used to retain cross-region backups of the instance. Default value: 1. The default value 1 indicate that cross-region backups are retained based on the specified retention period.
    retention number
    The number of days for which the cross-region backup files of the instance are retained. Valid values: 7 to 1825. Default value: 7.
    backup_enabled str
    The status of the overall cross-region backup switch on the instance. Valid values:

    • Disabled
    • Enable
    backup_enabled_time str
    The time when cross-region backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    cross_backup_region str
    The ID of the destination region where the cross-region backup files of the instance are stored.
    cross_backup_type str
    The policy that is used to save cross-region backups of the instance. Default value: 1. The default value 1 indicates that all cross-region backups are saved.
    db_instance_status str
    The state of the instance. For more information, see Instance status.
    instance_id str
    The ID of the instance.
    lock_mode str
    The lock status of the instance. Valid values:

    • Unlock: The instance is not locked.
    • ManualLock: The instance is manually locked.
    • LockByExpiration: The instance is locked upon expiration.
    • LockByRestoration: The instance is automatically locked before a rollback.
    • LockByDiskQuota: The instance is automatically locked because its storage space is exhausted. In this situation, the instance is inaccessible.
    log_backup_enabled str
    The status of the cross-region log backup feature on the instance. Valid values:

    • Enable: Enables the feature.
    • Disabled: Disables the feature.
    log_backup_enabled_time str
    The time when cross-region log backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    retent_type str
    The policy that is used to retain cross-region backups of the instance. Default value: 1. The default value 1 indicate that cross-region backups are retained based on the specified retention period.
    retention int
    The number of days for which the cross-region backup files of the instance are retained. Valid values: 7 to 1825. Default value: 7.
    backupEnabled String
    The status of the overall cross-region backup switch on the instance. Valid values:

    • Disabled
    • Enable
    backupEnabledTime String
    The time when cross-region backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    crossBackupRegion String
    The ID of the destination region where the cross-region backup files of the instance are stored.
    crossBackupType String
    The policy that is used to save cross-region backups of the instance. Default value: 1. The default value 1 indicates that all cross-region backups are saved.
    dbInstanceStatus String
    The state of the instance. For more information, see Instance status.
    instanceId String
    The ID of the instance.
    lockMode String
    The lock status of the instance. Valid values:

    • Unlock: The instance is not locked.
    • ManualLock: The instance is manually locked.
    • LockByExpiration: The instance is locked upon expiration.
    • LockByRestoration: The instance is automatically locked before a rollback.
    • LockByDiskQuota: The instance is automatically locked because its storage space is exhausted. In this situation, the instance is inaccessible.
    logBackupEnabled String
    The status of the cross-region log backup feature on the instance. Valid values:

    • Enable: Enables the feature.
    • Disabled: Disables the feature.
    logBackupEnabledTime String
    The time when cross-region log backup was enabled on the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
    retentType String
    The policy that is used to retain cross-region backups of the instance. Default value: 1. The default value 1 indicate that cross-region backups are retained based on the specified retention period.
    retention Number
    The number of days for which the cross-region backup files of the instance are retained. Valid values: 7 to 1825. Default value: 7.

    Import

    RDS remote disaster recovery policies can be imported using id or instance id, e.g.

    $ pulumi import alicloud:rds/rdsInstanceCrossBackupPolicy:RdsInstanceCrossBackupPolicy example "rm-12345678"
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.69.0 published on Monday, Dec 9, 2024 by Pulumi