1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. hbr
  5. OtsBackupPlan
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.hbr.OtsBackupPlan

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    Provides a HBR Ots Backup Plan resource.

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

    NOTE: Available in v1.163.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const defaultRandomInteger = new random.RandomInteger("defaultRandomInteger", {
        max: 99999,
        min: 10000,
    });
    const defaultVault = new alicloud.hbr.Vault("defaultVault", {
        vaultName: pulumi.interpolate`terraform-example-${defaultRandomInteger.result}`,
        vaultType: "OTS_BACKUP",
    });
    const defaultInstance = new alicloud.ots.Instance("defaultInstance", {
        description: "terraform-example",
        accessedBy: "Any",
        tags: {
            Created: "TF",
            For: "example",
        },
    });
    const defaultTable = new alicloud.ots.Table("defaultTable", {
        instanceName: defaultInstance.name,
        tableName: "terraform_example",
        primaryKeys: [{
            name: "pk1",
            type: "Integer",
        }],
        timeToLive: -1,
        maxVersion: 1,
        deviationCellVersionInSec: "1",
    });
    const defaultRole = new alicloud.ram.Role("defaultRole", {
        document: `		{
    			"Statement": [
    			{
    				"Action": "sts:AssumeRole",
    				"Effect": "Allow",
    				"Principal": {
    					"Service": [
    						"crossbackup.hbr.aliyuncs.com"
    					]
    				}
    			}
    			],
      			"Version": "1"
    		}
    `,
        force: true,
    });
    const defaultAccount = alicloud.getAccount({});
    const example = new alicloud.hbr.OtsBackupPlan("example", {
        otsBackupPlanName: pulumi.interpolate`terraform-example-${defaultRandomInteger.result}`,
        vaultId: defaultVault.id,
        backupType: "COMPLETE",
        retention: "1",
        instanceName: defaultInstance.name,
        crossAccountType: "SELF_ACCOUNT",
        crossAccountUserId: defaultAccount.then(defaultAccount => defaultAccount.id),
        crossAccountRoleName: defaultRole.id,
        otsDetails: [{
            tableNames: [defaultTable.tableName],
        }],
        rules: [{
            schedule: "I|1602673264|PT2H",
            retention: "1",
            disabled: false,
            ruleName: "terraform-example",
            backupType: "COMPLETE",
        }],
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    default_random_integer = random.RandomInteger("defaultRandomInteger",
        max=99999,
        min=10000)
    default_vault = alicloud.hbr.Vault("defaultVault",
        vault_name=default_random_integer.result.apply(lambda result: f"terraform-example-{result}"),
        vault_type="OTS_BACKUP")
    default_instance = alicloud.ots.Instance("defaultInstance",
        description="terraform-example",
        accessed_by="Any",
        tags={
            "Created": "TF",
            "For": "example",
        })
    default_table = alicloud.ots.Table("defaultTable",
        instance_name=default_instance.name,
        table_name="terraform_example",
        primary_keys=[alicloud.ots.TablePrimaryKeyArgs(
            name="pk1",
            type="Integer",
        )],
        time_to_live=-1,
        max_version=1,
        deviation_cell_version_in_sec="1")
    default_role = alicloud.ram.Role("defaultRole",
        document="""		{
    			"Statement": [
    			{
    				"Action": "sts:AssumeRole",
    				"Effect": "Allow",
    				"Principal": {
    					"Service": [
    						"crossbackup.hbr.aliyuncs.com"
    					]
    				}
    			}
    			],
      			"Version": "1"
    		}
    """,
        force=True)
    default_account = alicloud.get_account()
    example = alicloud.hbr.OtsBackupPlan("example",
        ots_backup_plan_name=default_random_integer.result.apply(lambda result: f"terraform-example-{result}"),
        vault_id=default_vault.id,
        backup_type="COMPLETE",
        retention="1",
        instance_name=default_instance.name,
        cross_account_type="SELF_ACCOUNT",
        cross_account_user_id=default_account.id,
        cross_account_role_name=default_role.id,
        ots_details=[alicloud.hbr.OtsBackupPlanOtsDetailArgs(
            table_names=[default_table.table_name],
        )],
        rules=[alicloud.hbr.OtsBackupPlanRuleArgs(
            schedule="I|1602673264|PT2H",
            retention="1",
            disabled=False,
            rule_name="terraform-example",
            backup_type="COMPLETE",
        )])
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/hbr"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ots"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ram"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		defaultRandomInteger, err := random.NewRandomInteger(ctx, "defaultRandomInteger", &random.RandomIntegerArgs{
    			Max: pulumi.Int(99999),
    			Min: pulumi.Int(10000),
    		})
    		if err != nil {
    			return err
    		}
    		defaultVault, err := hbr.NewVault(ctx, "defaultVault", &hbr.VaultArgs{
    			VaultName: defaultRandomInteger.Result.ApplyT(func(result int) (string, error) {
    				return fmt.Sprintf("terraform-example-%v", result), nil
    			}).(pulumi.StringOutput),
    			VaultType: pulumi.String("OTS_BACKUP"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := ots.NewInstance(ctx, "defaultInstance", &ots.InstanceArgs{
    			Description: pulumi.String("terraform-example"),
    			AccessedBy:  pulumi.String("Any"),
    			Tags: pulumi.Map{
    				"Created": pulumi.Any("TF"),
    				"For":     pulumi.Any("example"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		defaultTable, err := ots.NewTable(ctx, "defaultTable", &ots.TableArgs{
    			InstanceName: defaultInstance.Name,
    			TableName:    pulumi.String("terraform_example"),
    			PrimaryKeys: ots.TablePrimaryKeyArray{
    				&ots.TablePrimaryKeyArgs{
    					Name: pulumi.String("pk1"),
    					Type: pulumi.String("Integer"),
    				},
    			},
    			TimeToLive:                -1,
    			MaxVersion:                pulumi.Int(1),
    			DeviationCellVersionInSec: pulumi.String("1"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultRole, err := ram.NewRole(ctx, "defaultRole", &ram.RoleArgs{
    			Document: pulumi.String(`		{
    			"Statement": [
    			{
    				"Action": "sts:AssumeRole",
    				"Effect": "Allow",
    				"Principal": {
    					"Service": [
    						"crossbackup.hbr.aliyuncs.com"
    					]
    				}
    			}
    			],
      			"Version": "1"
    		}
    `),
    			Force: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		defaultAccount, err := alicloud.GetAccount(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		_, err = hbr.NewOtsBackupPlan(ctx, "example", &hbr.OtsBackupPlanArgs{
    			OtsBackupPlanName: defaultRandomInteger.Result.ApplyT(func(result int) (string, error) {
    				return fmt.Sprintf("terraform-example-%v", result), nil
    			}).(pulumi.StringOutput),
    			VaultId:              defaultVault.ID(),
    			BackupType:           pulumi.String("COMPLETE"),
    			Retention:            pulumi.String("1"),
    			InstanceName:         defaultInstance.Name,
    			CrossAccountType:     pulumi.String("SELF_ACCOUNT"),
    			CrossAccountUserId:   pulumi.String(defaultAccount.Id),
    			CrossAccountRoleName: defaultRole.ID(),
    			OtsDetails: hbr.OtsBackupPlanOtsDetailArray{
    				&hbr.OtsBackupPlanOtsDetailArgs{
    					TableNames: pulumi.StringArray{
    						defaultTable.TableName,
    					},
    				},
    			},
    			Rules: hbr.OtsBackupPlanRuleArray{
    				&hbr.OtsBackupPlanRuleArgs{
    					Schedule:   pulumi.String("I|1602673264|PT2H"),
    					Retention:  pulumi.String("1"),
    					Disabled:   pulumi.Bool(false),
    					RuleName:   pulumi.String("terraform-example"),
    					BackupType: pulumi.String("COMPLETE"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var defaultRandomInteger = new Random.RandomInteger("defaultRandomInteger", new()
        {
            Max = 99999,
            Min = 10000,
        });
    
        var defaultVault = new AliCloud.Hbr.Vault("defaultVault", new()
        {
            VaultName = defaultRandomInteger.Result.Apply(result => $"terraform-example-{result}"),
            VaultType = "OTS_BACKUP",
        });
    
        var defaultInstance = new AliCloud.Ots.Instance("defaultInstance", new()
        {
            Description = "terraform-example",
            AccessedBy = "Any",
            Tags = 
            {
                { "Created", "TF" },
                { "For", "example" },
            },
        });
    
        var defaultTable = new AliCloud.Ots.Table("defaultTable", new()
        {
            InstanceName = defaultInstance.Name,
            TableName = "terraform_example",
            PrimaryKeys = new[]
            {
                new AliCloud.Ots.Inputs.TablePrimaryKeyArgs
                {
                    Name = "pk1",
                    Type = "Integer",
                },
            },
            TimeToLive = -1,
            MaxVersion = 1,
            DeviationCellVersionInSec = "1",
        });
    
        var defaultRole = new AliCloud.Ram.Role("defaultRole", new()
        {
            Document = @"		{
    			""Statement"": [
    			{
    				""Action"": ""sts:AssumeRole"",
    				""Effect"": ""Allow"",
    				""Principal"": {
    					""Service"": [
    						""crossbackup.hbr.aliyuncs.com""
    					]
    				}
    			}
    			],
      			""Version"": ""1""
    		}
    ",
            Force = true,
        });
    
        var defaultAccount = AliCloud.GetAccount.Invoke();
    
        var example = new AliCloud.Hbr.OtsBackupPlan("example", new()
        {
            OtsBackupPlanName = defaultRandomInteger.Result.Apply(result => $"terraform-example-{result}"),
            VaultId = defaultVault.Id,
            BackupType = "COMPLETE",
            Retention = "1",
            InstanceName = defaultInstance.Name,
            CrossAccountType = "SELF_ACCOUNT",
            CrossAccountUserId = defaultAccount.Apply(getAccountResult => getAccountResult.Id),
            CrossAccountRoleName = defaultRole.Id,
            OtsDetails = new[]
            {
                new AliCloud.Hbr.Inputs.OtsBackupPlanOtsDetailArgs
                {
                    TableNames = new[]
                    {
                        defaultTable.TableName,
                    },
                },
            },
            Rules = new[]
            {
                new AliCloud.Hbr.Inputs.OtsBackupPlanRuleArgs
                {
                    Schedule = "I|1602673264|PT2H",
                    Retention = "1",
                    Disabled = false,
                    RuleName = "terraform-example",
                    BackupType = "COMPLETE",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.RandomInteger;
    import com.pulumi.random.RandomIntegerArgs;
    import com.pulumi.alicloud.hbr.Vault;
    import com.pulumi.alicloud.hbr.VaultArgs;
    import com.pulumi.alicloud.ots.Instance;
    import com.pulumi.alicloud.ots.InstanceArgs;
    import com.pulumi.alicloud.ots.Table;
    import com.pulumi.alicloud.ots.TableArgs;
    import com.pulumi.alicloud.ots.inputs.TablePrimaryKeyArgs;
    import com.pulumi.alicloud.ram.Role;
    import com.pulumi.alicloud.ram.RoleArgs;
    import com.pulumi.alicloud.AlicloudFunctions;
    import com.pulumi.alicloud.hbr.OtsBackupPlan;
    import com.pulumi.alicloud.hbr.OtsBackupPlanArgs;
    import com.pulumi.alicloud.hbr.inputs.OtsBackupPlanOtsDetailArgs;
    import com.pulumi.alicloud.hbr.inputs.OtsBackupPlanRuleArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var defaultRandomInteger = new RandomInteger("defaultRandomInteger", RandomIntegerArgs.builder()        
                .max(99999)
                .min(10000)
                .build());
    
            var defaultVault = new Vault("defaultVault", VaultArgs.builder()        
                .vaultName(defaultRandomInteger.result().applyValue(result -> String.format("terraform-example-%s", result)))
                .vaultType("OTS_BACKUP")
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()        
                .description("terraform-example")
                .accessedBy("Any")
                .tags(Map.ofEntries(
                    Map.entry("Created", "TF"),
                    Map.entry("For", "example")
                ))
                .build());
    
            var defaultTable = new Table("defaultTable", TableArgs.builder()        
                .instanceName(defaultInstance.name())
                .tableName("terraform_example")
                .primaryKeys(TablePrimaryKeyArgs.builder()
                    .name("pk1")
                    .type("Integer")
                    .build())
                .timeToLive("TODO: GenUnaryOpExpression")
                .maxVersion(1)
                .deviationCellVersionInSec(1)
                .build());
    
            var defaultRole = new Role("defaultRole", RoleArgs.builder()        
                .document("""
    		{
    			"Statement": [
    			{
    				"Action": "sts:AssumeRole",
    				"Effect": "Allow",
    				"Principal": {
    					"Service": [
    						"crossbackup.hbr.aliyuncs.com"
    					]
    				}
    			}
    			],
      			"Version": "1"
    		}
                """)
                .force(true)
                .build());
    
            final var defaultAccount = AlicloudFunctions.getAccount();
    
            var example = new OtsBackupPlan("example", OtsBackupPlanArgs.builder()        
                .otsBackupPlanName(defaultRandomInteger.result().applyValue(result -> String.format("terraform-example-%s", result)))
                .vaultId(defaultVault.id())
                .backupType("COMPLETE")
                .retention("1")
                .instanceName(defaultInstance.name())
                .crossAccountType("SELF_ACCOUNT")
                .crossAccountUserId(defaultAccount.applyValue(getAccountResult -> getAccountResult.id()))
                .crossAccountRoleName(defaultRole.id())
                .otsDetails(OtsBackupPlanOtsDetailArgs.builder()
                    .tableNames(defaultTable.tableName())
                    .build())
                .rules(OtsBackupPlanRuleArgs.builder()
                    .schedule("I|1602673264|PT2H")
                    .retention("1")
                    .disabled("false")
                    .ruleName("terraform-example")
                    .backupType("COMPLETE")
                    .build())
                .build());
    
        }
    }
    
    Coming soon!
    

    Create OtsBackupPlan Resource

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

    Constructor syntax

    new OtsBackupPlan(name: string, args: OtsBackupPlanArgs, opts?: CustomResourceOptions);
    @overload
    def OtsBackupPlan(resource_name: str,
                      args: OtsBackupPlanArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def OtsBackupPlan(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      backup_type: Optional[str] = None,
                      ots_backup_plan_name: Optional[str] = None,
                      retention: Optional[str] = None,
                      cross_account_role_name: Optional[str] = None,
                      cross_account_type: Optional[str] = None,
                      cross_account_user_id: Optional[int] = None,
                      disabled: Optional[bool] = None,
                      instance_name: Optional[str] = None,
                      ots_details: Optional[Sequence[OtsBackupPlanOtsDetailArgs]] = None,
                      rules: Optional[Sequence[OtsBackupPlanRuleArgs]] = None,
                      schedule: Optional[str] = None,
                      vault_id: Optional[str] = None)
    func NewOtsBackupPlan(ctx *Context, name string, args OtsBackupPlanArgs, opts ...ResourceOption) (*OtsBackupPlan, error)
    public OtsBackupPlan(string name, OtsBackupPlanArgs args, CustomResourceOptions? opts = null)
    public OtsBackupPlan(String name, OtsBackupPlanArgs args)
    public OtsBackupPlan(String name, OtsBackupPlanArgs args, CustomResourceOptions options)
    
    type: alicloud:hbr:OtsBackupPlan
    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 OtsBackupPlanArgs
    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 OtsBackupPlanArgs
    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 OtsBackupPlanArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OtsBackupPlanArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OtsBackupPlanArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var otsBackupPlanResource = new AliCloud.Hbr.OtsBackupPlan("otsBackupPlanResource", new()
    {
        BackupType = "string",
        OtsBackupPlanName = "string",
        Retention = "string",
        CrossAccountRoleName = "string",
        CrossAccountType = "string",
        CrossAccountUserId = 0,
        Disabled = false,
        InstanceName = "string",
        OtsDetails = new[]
        {
            new AliCloud.Hbr.Inputs.OtsBackupPlanOtsDetailArgs
            {
                TableNames = new[]
                {
                    "string",
                },
            },
        },
        Rules = new[]
        {
            new AliCloud.Hbr.Inputs.OtsBackupPlanRuleArgs
            {
                BackupType = "string",
                Disabled = false,
                Retention = "string",
                RuleName = "string",
                Schedule = "string",
            },
        },
        VaultId = "string",
    });
    
    example, err := hbr.NewOtsBackupPlan(ctx, "otsBackupPlanResource", &hbr.OtsBackupPlanArgs{
    	BackupType:           pulumi.String("string"),
    	OtsBackupPlanName:    pulumi.String("string"),
    	Retention:            pulumi.String("string"),
    	CrossAccountRoleName: pulumi.String("string"),
    	CrossAccountType:     pulumi.String("string"),
    	CrossAccountUserId:   pulumi.Int(0),
    	Disabled:             pulumi.Bool(false),
    	InstanceName:         pulumi.String("string"),
    	OtsDetails: hbr.OtsBackupPlanOtsDetailArray{
    		&hbr.OtsBackupPlanOtsDetailArgs{
    			TableNames: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	Rules: hbr.OtsBackupPlanRuleArray{
    		&hbr.OtsBackupPlanRuleArgs{
    			BackupType: pulumi.String("string"),
    			Disabled:   pulumi.Bool(false),
    			Retention:  pulumi.String("string"),
    			RuleName:   pulumi.String("string"),
    			Schedule:   pulumi.String("string"),
    		},
    	},
    	VaultId: pulumi.String("string"),
    })
    
    var otsBackupPlanResource = new OtsBackupPlan("otsBackupPlanResource", OtsBackupPlanArgs.builder()        
        .backupType("string")
        .otsBackupPlanName("string")
        .retention("string")
        .crossAccountRoleName("string")
        .crossAccountType("string")
        .crossAccountUserId(0)
        .disabled(false)
        .instanceName("string")
        .otsDetails(OtsBackupPlanOtsDetailArgs.builder()
            .tableNames("string")
            .build())
        .rules(OtsBackupPlanRuleArgs.builder()
            .backupType("string")
            .disabled(false)
            .retention("string")
            .ruleName("string")
            .schedule("string")
            .build())
        .vaultId("string")
        .build());
    
    ots_backup_plan_resource = alicloud.hbr.OtsBackupPlan("otsBackupPlanResource",
        backup_type="string",
        ots_backup_plan_name="string",
        retention="string",
        cross_account_role_name="string",
        cross_account_type="string",
        cross_account_user_id=0,
        disabled=False,
        instance_name="string",
        ots_details=[alicloud.hbr.OtsBackupPlanOtsDetailArgs(
            table_names=["string"],
        )],
        rules=[alicloud.hbr.OtsBackupPlanRuleArgs(
            backup_type="string",
            disabled=False,
            retention="string",
            rule_name="string",
            schedule="string",
        )],
        vault_id="string")
    
    const otsBackupPlanResource = new alicloud.hbr.OtsBackupPlan("otsBackupPlanResource", {
        backupType: "string",
        otsBackupPlanName: "string",
        retention: "string",
        crossAccountRoleName: "string",
        crossAccountType: "string",
        crossAccountUserId: 0,
        disabled: false,
        instanceName: "string",
        otsDetails: [{
            tableNames: ["string"],
        }],
        rules: [{
            backupType: "string",
            disabled: false,
            retention: "string",
            ruleName: "string",
            schedule: "string",
        }],
        vaultId: "string",
    });
    
    type: alicloud:hbr:OtsBackupPlan
    properties:
        backupType: string
        crossAccountRoleName: string
        crossAccountType: string
        crossAccountUserId: 0
        disabled: false
        instanceName: string
        otsBackupPlanName: string
        otsDetails:
            - tableNames:
                - string
        retention: string
        rules:
            - backupType: string
              disabled: false
              retention: string
              ruleName: string
              schedule: string
        vaultId: string
    

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

    BackupType string
    Backup type. Valid values: COMPLETE.
    OtsBackupPlanName string
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    Retention string
    Backup retention days, the minimum is 1.
    CrossAccountRoleName string
    The role name created in the original account RAM backup by the cross account managed by the current account.
    CrossAccountType string
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    CrossAccountUserId int
    The original account ID of the cross account backup managed by the current account.
    Disabled bool
    Whether to disable the backup task. Valid values: true, false. Default values: false.
    InstanceName string
    The name of the Table store instance. Note: Required while source_type equals OTS_TABLE.
    OtsDetails List<Pulumi.AliCloud.Hbr.Inputs.OtsBackupPlanOtsDetail>
    The details about the Table store instance. See the following Block ots_detail. Note: Required while source_type equals OTS_TABLE.
    Rules List<Pulumi.AliCloud.Hbr.Inputs.OtsBackupPlanRule>
    The backup plan rule. See the following Block rules. Note: Required while source_type equals OTS_TABLE.
    Schedule string
    Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.

    Deprecated: Field 'schedule' has been deprecated from version 1.163.0. Use 'rules' instead.

    VaultId string
    The ID of backup vault.
    BackupType string
    Backup type. Valid values: COMPLETE.
    OtsBackupPlanName string
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    Retention string
    Backup retention days, the minimum is 1.
    CrossAccountRoleName string
    The role name created in the original account RAM backup by the cross account managed by the current account.
    CrossAccountType string
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    CrossAccountUserId int
    The original account ID of the cross account backup managed by the current account.
    Disabled bool
    Whether to disable the backup task. Valid values: true, false. Default values: false.
    InstanceName string
    The name of the Table store instance. Note: Required while source_type equals OTS_TABLE.
    OtsDetails []OtsBackupPlanOtsDetailArgs
    The details about the Table store instance. See the following Block ots_detail. Note: Required while source_type equals OTS_TABLE.
    Rules []OtsBackupPlanRuleArgs
    The backup plan rule. See the following Block rules. Note: Required while source_type equals OTS_TABLE.
    Schedule string
    Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.

    Deprecated: Field 'schedule' has been deprecated from version 1.163.0. Use 'rules' instead.

    VaultId string
    The ID of backup vault.
    backupType String
    Backup type. Valid values: COMPLETE.
    otsBackupPlanName String
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    retention String
    Backup retention days, the minimum is 1.
    crossAccountRoleName String
    The role name created in the original account RAM backup by the cross account managed by the current account.
    crossAccountType String
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    crossAccountUserId Integer
    The original account ID of the cross account backup managed by the current account.
    disabled Boolean
    Whether to disable the backup task. Valid values: true, false. Default values: false.
    instanceName String
    The name of the Table store instance. Note: Required while source_type equals OTS_TABLE.
    otsDetails List<OtsBackupPlanOtsDetail>
    The details about the Table store instance. See the following Block ots_detail. Note: Required while source_type equals OTS_TABLE.
    rules List<OtsBackupPlanRule>
    The backup plan rule. See the following Block rules. Note: Required while source_type equals OTS_TABLE.
    schedule String
    Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.

    Deprecated: Field 'schedule' has been deprecated from version 1.163.0. Use 'rules' instead.

    vaultId String
    The ID of backup vault.
    backupType string
    Backup type. Valid values: COMPLETE.
    otsBackupPlanName string
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    retention string
    Backup retention days, the minimum is 1.
    crossAccountRoleName string
    The role name created in the original account RAM backup by the cross account managed by the current account.
    crossAccountType string
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    crossAccountUserId number
    The original account ID of the cross account backup managed by the current account.
    disabled boolean
    Whether to disable the backup task. Valid values: true, false. Default values: false.
    instanceName string
    The name of the Table store instance. Note: Required while source_type equals OTS_TABLE.
    otsDetails OtsBackupPlanOtsDetail[]
    The details about the Table store instance. See the following Block ots_detail. Note: Required while source_type equals OTS_TABLE.
    rules OtsBackupPlanRule[]
    The backup plan rule. See the following Block rules. Note: Required while source_type equals OTS_TABLE.
    schedule string
    Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.

    Deprecated: Field 'schedule' has been deprecated from version 1.163.0. Use 'rules' instead.

    vaultId string
    The ID of backup vault.
    backup_type str
    Backup type. Valid values: COMPLETE.
    ots_backup_plan_name str
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    retention str
    Backup retention days, the minimum is 1.
    cross_account_role_name str
    The role name created in the original account RAM backup by the cross account managed by the current account.
    cross_account_type str
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    cross_account_user_id int
    The original account ID of the cross account backup managed by the current account.
    disabled bool
    Whether to disable the backup task. Valid values: true, false. Default values: false.
    instance_name str
    The name of the Table store instance. Note: Required while source_type equals OTS_TABLE.
    ots_details Sequence[OtsBackupPlanOtsDetailArgs]
    The details about the Table store instance. See the following Block ots_detail. Note: Required while source_type equals OTS_TABLE.
    rules Sequence[OtsBackupPlanRuleArgs]
    The backup plan rule. See the following Block rules. Note: Required while source_type equals OTS_TABLE.
    schedule str
    Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.

    Deprecated: Field 'schedule' has been deprecated from version 1.163.0. Use 'rules' instead.

    vault_id str
    The ID of backup vault.
    backupType String
    Backup type. Valid values: COMPLETE.
    otsBackupPlanName String
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    retention String
    Backup retention days, the minimum is 1.
    crossAccountRoleName String
    The role name created in the original account RAM backup by the cross account managed by the current account.
    crossAccountType String
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    crossAccountUserId Number
    The original account ID of the cross account backup managed by the current account.
    disabled Boolean
    Whether to disable the backup task. Valid values: true, false. Default values: false.
    instanceName String
    The name of the Table store instance. Note: Required while source_type equals OTS_TABLE.
    otsDetails List<Property Map>
    The details about the Table store instance. See the following Block ots_detail. Note: Required while source_type equals OTS_TABLE.
    rules List<Property Map>
    The backup plan rule. See the following Block rules. Note: Required while source_type equals OTS_TABLE.
    schedule String
    Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.

    Deprecated: Field 'schedule' has been deprecated from version 1.163.0. Use 'rules' instead.

    vaultId String
    The ID of backup vault.

    Outputs

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

    Get an existing OtsBackupPlan 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?: OtsBackupPlanState, opts?: CustomResourceOptions): OtsBackupPlan
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backup_type: Optional[str] = None,
            cross_account_role_name: Optional[str] = None,
            cross_account_type: Optional[str] = None,
            cross_account_user_id: Optional[int] = None,
            disabled: Optional[bool] = None,
            instance_name: Optional[str] = None,
            ots_backup_plan_name: Optional[str] = None,
            ots_details: Optional[Sequence[OtsBackupPlanOtsDetailArgs]] = None,
            retention: Optional[str] = None,
            rules: Optional[Sequence[OtsBackupPlanRuleArgs]] = None,
            schedule: Optional[str] = None,
            vault_id: Optional[str] = None) -> OtsBackupPlan
    func GetOtsBackupPlan(ctx *Context, name string, id IDInput, state *OtsBackupPlanState, opts ...ResourceOption) (*OtsBackupPlan, error)
    public static OtsBackupPlan Get(string name, Input<string> id, OtsBackupPlanState? state, CustomResourceOptions? opts = null)
    public static OtsBackupPlan get(String name, Output<String> id, OtsBackupPlanState 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:
    BackupType string
    Backup type. Valid values: COMPLETE.
    CrossAccountRoleName string
    The role name created in the original account RAM backup by the cross account managed by the current account.
    CrossAccountType string
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    CrossAccountUserId int
    The original account ID of the cross account backup managed by the current account.
    Disabled bool
    Whether to disable the backup task. Valid values: true, false. Default values: false.
    InstanceName string
    The name of the Table store instance. Note: Required while source_type equals OTS_TABLE.
    OtsBackupPlanName string
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    OtsDetails List<Pulumi.AliCloud.Hbr.Inputs.OtsBackupPlanOtsDetail>
    The details about the Table store instance. See the following Block ots_detail. Note: Required while source_type equals OTS_TABLE.
    Retention string
    Backup retention days, the minimum is 1.
    Rules List<Pulumi.AliCloud.Hbr.Inputs.OtsBackupPlanRule>
    The backup plan rule. See the following Block rules. Note: Required while source_type equals OTS_TABLE.
    Schedule string
    Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.

    Deprecated: Field 'schedule' has been deprecated from version 1.163.0. Use 'rules' instead.

    VaultId string
    The ID of backup vault.
    BackupType string
    Backup type. Valid values: COMPLETE.
    CrossAccountRoleName string
    The role name created in the original account RAM backup by the cross account managed by the current account.
    CrossAccountType string
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    CrossAccountUserId int
    The original account ID of the cross account backup managed by the current account.
    Disabled bool
    Whether to disable the backup task. Valid values: true, false. Default values: false.
    InstanceName string
    The name of the Table store instance. Note: Required while source_type equals OTS_TABLE.
    OtsBackupPlanName string
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    OtsDetails []OtsBackupPlanOtsDetailArgs
    The details about the Table store instance. See the following Block ots_detail. Note: Required while source_type equals OTS_TABLE.
    Retention string
    Backup retention days, the minimum is 1.
    Rules []OtsBackupPlanRuleArgs
    The backup plan rule. See the following Block rules. Note: Required while source_type equals OTS_TABLE.
    Schedule string
    Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.

    Deprecated: Field 'schedule' has been deprecated from version 1.163.0. Use 'rules' instead.

    VaultId string
    The ID of backup vault.
    backupType String
    Backup type. Valid values: COMPLETE.
    crossAccountRoleName String
    The role name created in the original account RAM backup by the cross account managed by the current account.
    crossAccountType String
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    crossAccountUserId Integer
    The original account ID of the cross account backup managed by the current account.
    disabled Boolean
    Whether to disable the backup task. Valid values: true, false. Default values: false.
    instanceName String
    The name of the Table store instance. Note: Required while source_type equals OTS_TABLE.
    otsBackupPlanName String
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    otsDetails List<OtsBackupPlanOtsDetail>
    The details about the Table store instance. See the following Block ots_detail. Note: Required while source_type equals OTS_TABLE.
    retention String
    Backup retention days, the minimum is 1.
    rules List<OtsBackupPlanRule>
    The backup plan rule. See the following Block rules. Note: Required while source_type equals OTS_TABLE.
    schedule String
    Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.

    Deprecated: Field 'schedule' has been deprecated from version 1.163.0. Use 'rules' instead.

    vaultId String
    The ID of backup vault.
    backupType string
    Backup type. Valid values: COMPLETE.
    crossAccountRoleName string
    The role name created in the original account RAM backup by the cross account managed by the current account.
    crossAccountType string
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    crossAccountUserId number
    The original account ID of the cross account backup managed by the current account.
    disabled boolean
    Whether to disable the backup task. Valid values: true, false. Default values: false.
    instanceName string
    The name of the Table store instance. Note: Required while source_type equals OTS_TABLE.
    otsBackupPlanName string
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    otsDetails OtsBackupPlanOtsDetail[]
    The details about the Table store instance. See the following Block ots_detail. Note: Required while source_type equals OTS_TABLE.
    retention string
    Backup retention days, the minimum is 1.
    rules OtsBackupPlanRule[]
    The backup plan rule. See the following Block rules. Note: Required while source_type equals OTS_TABLE.
    schedule string
    Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.

    Deprecated: Field 'schedule' has been deprecated from version 1.163.0. Use 'rules' instead.

    vaultId string
    The ID of backup vault.
    backup_type str
    Backup type. Valid values: COMPLETE.
    cross_account_role_name str
    The role name created in the original account RAM backup by the cross account managed by the current account.
    cross_account_type str
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    cross_account_user_id int
    The original account ID of the cross account backup managed by the current account.
    disabled bool
    Whether to disable the backup task. Valid values: true, false. Default values: false.
    instance_name str
    The name of the Table store instance. Note: Required while source_type equals OTS_TABLE.
    ots_backup_plan_name str
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    ots_details Sequence[OtsBackupPlanOtsDetailArgs]
    The details about the Table store instance. See the following Block ots_detail. Note: Required while source_type equals OTS_TABLE.
    retention str
    Backup retention days, the minimum is 1.
    rules Sequence[OtsBackupPlanRuleArgs]
    The backup plan rule. See the following Block rules. Note: Required while source_type equals OTS_TABLE.
    schedule str
    Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.

    Deprecated: Field 'schedule' has been deprecated from version 1.163.0. Use 'rules' instead.

    vault_id str
    The ID of backup vault.
    backupType String
    Backup type. Valid values: COMPLETE.
    crossAccountRoleName String
    The role name created in the original account RAM backup by the cross account managed by the current account.
    crossAccountType String
    The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.
    crossAccountUserId Number
    The original account ID of the cross account backup managed by the current account.
    disabled Boolean
    Whether to disable the backup task. Valid values: true, false. Default values: false.
    instanceName String
    The name of the Table store instance. Note: Required while source_type equals OTS_TABLE.
    otsBackupPlanName String
    The name of the backup plan. 1~64 characters, the backup plan name of each data source type in a single warehouse required to be unique.
    otsDetails List<Property Map>
    The details about the Table store instance. See the following Block ots_detail. Note: Required while source_type equals OTS_TABLE.
    retention String
    Backup retention days, the minimum is 1.
    rules List<Property Map>
    The backup plan rule. See the following Block rules. Note: Required while source_type equals OTS_TABLE.
    schedule String
    Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.

    Deprecated: Field 'schedule' has been deprecated from version 1.163.0. Use 'rules' instead.

    vaultId String
    The ID of backup vault.

    Supporting Types

    OtsBackupPlanOtsDetail, OtsBackupPlanOtsDetailArgs

    TableNames List<string>
    The names of the destination tables in the Tablestore instance. Note: Required while source_type equals OTS_TABLE.
    TableNames []string
    The names of the destination tables in the Tablestore instance. Note: Required while source_type equals OTS_TABLE.
    tableNames List<String>
    The names of the destination tables in the Tablestore instance. Note: Required while source_type equals OTS_TABLE.
    tableNames string[]
    The names of the destination tables in the Tablestore instance. Note: Required while source_type equals OTS_TABLE.
    table_names Sequence[str]
    The names of the destination tables in the Tablestore instance. Note: Required while source_type equals OTS_TABLE.
    tableNames List<String>
    The names of the destination tables in the Tablestore instance. Note: Required while source_type equals OTS_TABLE.

    OtsBackupPlanRule, OtsBackupPlanRuleArgs

    BackupType string
    Backup type. Valid values: COMPLETE.
    Disabled bool
    Whether to disable the backup task. Valid values: true, false. Default values: false.
    Retention string
    Backup retention days, the minimum is 1.
    RuleName string
    The name of the backup rule.Note: Required while source_type equals OTS_TABLE. rule_name should be unique for the specific user.
    Schedule string
    Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.
    BackupType string
    Backup type. Valid values: COMPLETE.
    Disabled bool
    Whether to disable the backup task. Valid values: true, false. Default values: false.
    Retention string
    Backup retention days, the minimum is 1.
    RuleName string
    The name of the backup rule.Note: Required while source_type equals OTS_TABLE. rule_name should be unique for the specific user.
    Schedule string
    Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.
    backupType String
    Backup type. Valid values: COMPLETE.
    disabled Boolean
    Whether to disable the backup task. Valid values: true, false. Default values: false.
    retention String
    Backup retention days, the minimum is 1.
    ruleName String
    The name of the backup rule.Note: Required while source_type equals OTS_TABLE. rule_name should be unique for the specific user.
    schedule String
    Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.
    backupType string
    Backup type. Valid values: COMPLETE.
    disabled boolean
    Whether to disable the backup task. Valid values: true, false. Default values: false.
    retention string
    Backup retention days, the minimum is 1.
    ruleName string
    The name of the backup rule.Note: Required while source_type equals OTS_TABLE. rule_name should be unique for the specific user.
    schedule string
    Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.
    backup_type str
    Backup type. Valid values: COMPLETE.
    disabled bool
    Whether to disable the backup task. Valid values: true, false. Default values: false.
    retention str
    Backup retention days, the minimum is 1.
    rule_name str
    The name of the backup rule.Note: Required while source_type equals OTS_TABLE. rule_name should be unique for the specific user.
    schedule str
    Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.
    backupType String
    Backup type. Valid values: COMPLETE.
    disabled Boolean
    Whether to disable the backup task. Valid values: true, false. Default values: false.
    retention String
    Backup retention days, the minimum is 1.
    ruleName String
    The name of the backup rule.Note: Required while source_type equals OTS_TABLE. rule_name should be unique for the specific user.
    schedule String
    Backup strategy. Optional format: I|{startTime}|{interval}. It means to execute a backup task every {interval} starting from {startTime}. The backup task for the elapsed time will not be compensated. If the last backup task has not completed yet, the next backup task will not be triggered.

    Import

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

    $ pulumi import alicloud:hbr/otsBackupPlan:OtsBackupPlan 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.53.0 published on Wednesday, Apr 17, 2024 by Pulumi