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

alicloud.hbr.OtsBackupPlan

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 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 defaultInteger = new random.index.Integer("default", {
        max: 99999,
        min: 10000,
    });
    const defaultVault = new alicloud.hbr.Vault("default", {
        vaultName: `terraform-example-${defaultInteger.result}`,
        vaultType: "OTS_BACKUP",
    });
    const defaultInstance = new alicloud.ots.Instance("default", {
        name: `Example-${defaultInteger.result}`,
        description: "terraform-example",
        accessedBy: "Any",
        tags: {
            Created: "TF",
            For: "example",
        },
    });
    const defaultTable = new alicloud.ots.Table("default", {
        instanceName: defaultInstance.name,
        tableName: "terraform_example",
        primaryKeys: [{
            name: "pk1",
            type: "Integer",
        }],
        timeToLive: -1,
        maxVersion: 1,
        deviationCellVersionInSec: "1",
    });
    const defaultRole = new alicloud.ram.Role("default", {
        name: "hbrexamplerole",
        document: `\x09\x09{
    \x09\x09\x09"Statement": [
    \x09\x09\x09{
    \x09\x09\x09\x09"Action": "sts:AssumeRole",
    \x09\x09\x09\x09"Effect": "Allow",
    \x09\x09\x09\x09"Principal": {
    \x09\x09\x09\x09\x09"Service": [
    \x09\x09\x09\x09\x09\x09"crossbackup.hbr.aliyuncs.com"
    \x09\x09\x09\x09\x09]
    \x09\x09\x09\x09}
    \x09\x09\x09}
    \x09\x09\x09],
      \x09\x09\x09"Version": "1"
    \x09\x09}
    `,
        force: true,
    });
    const default = alicloud.getAccount({});
    const example = new alicloud.hbr.OtsBackupPlan("example", {
        otsBackupPlanName: `terraform-example-${defaultInteger.result}`,
        vaultId: defaultVault.id,
        backupType: "COMPLETE",
        retention: "1",
        instanceName: defaultInstance.name,
        crossAccountType: "SELF_ACCOUNT",
        crossAccountUserId: _default.then(_default => _default.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_integer = random.index.Integer("default",
        max=99999,
        min=10000)
    default_vault = alicloud.hbr.Vault("default",
        vault_name=f"terraform-example-{default_integer['result']}",
        vault_type="OTS_BACKUP")
    default_instance = alicloud.ots.Instance("default",
        name=f"Example-{default_integer['result']}",
        description="terraform-example",
        accessed_by="Any",
        tags={
            "Created": "TF",
            "For": "example",
        })
    default_table = alicloud.ots.Table("default",
        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("default",
        name="hbrexamplerole",
        document="""\x09\x09{
    \x09\x09\x09"Statement": [
    \x09\x09\x09{
    \x09\x09\x09\x09"Action": "sts:AssumeRole",
    \x09\x09\x09\x09"Effect": "Allow",
    \x09\x09\x09\x09"Principal": {
    \x09\x09\x09\x09\x09"Service": [
    \x09\x09\x09\x09\x09\x09"crossbackup.hbr.aliyuncs.com"
    \x09\x09\x09\x09\x09]
    \x09\x09\x09\x09}
    \x09\x09\x09}
    \x09\x09\x09],
      \x09\x09\x09"Version": "1"
    \x09\x09}
    """,
        force=True)
    default = alicloud.get_account()
    example = alicloud.hbr.OtsBackupPlan("example",
        ots_backup_plan_name=f"terraform-example-{default_integer['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.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 {
    		defaultInteger, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
    			Max: 99999,
    			Min: 10000,
    		})
    		if err != nil {
    			return err
    		}
    		defaultVault, err := hbr.NewVault(ctx, "default", &hbr.VaultArgs{
    			VaultName: pulumi.String(fmt.Sprintf("terraform-example-%v", defaultInteger.Result)),
    			VaultType: pulumi.String("OTS_BACKUP"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := ots.NewInstance(ctx, "default", &ots.InstanceArgs{
    			Name:        pulumi.String(fmt.Sprintf("Example-%v", defaultInteger.Result)),
    			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, "default", &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, "default", &ram.RoleArgs{
    			Name: pulumi.String("hbrexamplerole"),
    			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
    		}
    		_default, err := alicloud.GetAccount(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		_, err = hbr.NewOtsBackupPlan(ctx, "example", &hbr.OtsBackupPlanArgs{
    			OtsBackupPlanName:    pulumi.String(fmt.Sprintf("terraform-example-%v", defaultInteger.Result)),
    			VaultId:              defaultVault.ID(),
    			BackupType:           pulumi.String("COMPLETE"),
    			Retention:            pulumi.String("1"),
    			InstanceName:         defaultInstance.Name,
    			CrossAccountType:     pulumi.String("SELF_ACCOUNT"),
    			CrossAccountUserId:   pulumi.String(_default.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 defaultInteger = new Random.Index.Integer("default", new()
        {
            Max = 99999,
            Min = 10000,
        });
    
        var defaultVault = new AliCloud.Hbr.Vault("default", new()
        {
            VaultName = $"terraform-example-{defaultInteger.Result}",
            VaultType = "OTS_BACKUP",
        });
    
        var defaultInstance = new AliCloud.Ots.Instance("default", new()
        {
            Name = $"Example-{defaultInteger.Result}",
            Description = "terraform-example",
            AccessedBy = "Any",
            Tags = 
            {
                { "Created", "TF" },
                { "For", "example" },
            },
        });
    
        var defaultTable = new AliCloud.Ots.Table("default", 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("default", new()
        {
            Name = "hbrexamplerole",
            Document = @"		{
    			""Statement"": [
    			{
    				""Action"": ""sts:AssumeRole"",
    				""Effect"": ""Allow"",
    				""Principal"": {
    					""Service"": [
    						""crossbackup.hbr.aliyuncs.com""
    					]
    				}
    			}
    			],
      			""Version"": ""1""
    		}
    ",
            Force = true,
        });
    
        var @default = AliCloud.GetAccount.Invoke();
    
        var example = new AliCloud.Hbr.OtsBackupPlan("example", new()
        {
            OtsBackupPlanName = $"terraform-example-{defaultInteger.Result}",
            VaultId = defaultVault.Id,
            BackupType = "COMPLETE",
            Retention = "1",
            InstanceName = defaultInstance.Name,
            CrossAccountType = "SELF_ACCOUNT",
            CrossAccountUserId = @default.Apply(@default => @default.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",
                },
            },
        });
    
    });
    
    Coming soon!
    
    resources:
      defaultInteger:
        type: random:integer
        name: default
        properties:
          max: 99999
          min: 10000
      defaultVault:
        type: alicloud:hbr:Vault
        name: default
        properties:
          vaultName: terraform-example-${defaultInteger.result}
          vaultType: OTS_BACKUP
      defaultInstance:
        type: alicloud:ots:Instance
        name: default
        properties:
          name: Example-${defaultInteger.result}
          description: terraform-example
          accessedBy: Any
          tags:
            Created: TF
            For: example
      defaultTable:
        type: alicloud:ots:Table
        name: default
        properties:
          instanceName: ${defaultInstance.name}
          tableName: terraform_example
          primaryKeys:
            - name: pk1
              type: Integer
          timeToLive: -1
          maxVersion: 1
          deviationCellVersionInSec: 1
      defaultRole:
        type: alicloud:ram:Role
        name: default
        properties:
          name: hbrexamplerole
          document: |
            		{
            			"Statement": [
            			{
            				"Action": "sts:AssumeRole",
            				"Effect": "Allow",
            				"Principal": {
            					"Service": [
            						"crossbackup.hbr.aliyuncs.com"
            					]
            				}
            			}
            			],
              			"Version": "1"
            		}        
          force: true
      example:
        type: alicloud:hbr:OtsBackupPlan
        properties:
          otsBackupPlanName: terraform-example-${defaultInteger.result}
          vaultId: ${defaultVault.id}
          backupType: COMPLETE
          retention: '1'
          instanceName: ${defaultInstance.name}
          crossAccountType: SELF_ACCOUNT
          crossAccountUserId: ${default.id}
          crossAccountRoleName: ${defaultRole.id}
          otsDetails:
            - tableNames:
                - ${defaultTable.tableName}
          rules:
            - schedule: I|1602673264|PT2H
              retention: '1'
              disabled: 'false'
              ruleName: terraform-example
              backupType: COMPLETE
    variables:
      default:
        fn::invoke:
          Function: alicloud:getAccount
          Arguments: {}
    

    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.

    Constructor 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.

    • startTime Backup start time, UNIX time seconds.

    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.

    • startTime Backup start time, UNIX time seconds.

    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.

    • startTime Backup start time, UNIX time seconds.

    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.

    • startTime Backup start time, UNIX time seconds.

    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.

    • startTime Backup start time, UNIX time seconds.

    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.

    • startTime Backup start time, UNIX time seconds.

    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.

    • startTime Backup start time, UNIX time seconds.

    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.

    • startTime Backup start time, UNIX time seconds.

    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.

    • startTime Backup start time, UNIX time seconds.

    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.

    • startTime Backup start time, UNIX time seconds.

    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.

    • startTime Backup start time, UNIX time seconds.

    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.

    • startTime Backup start time, UNIX time seconds.

    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>
    TableNames []string
    tableNames List<String>
    tableNames string[]
    table_names Sequence[str]
    tableNames List<String>

    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
    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.

    • startTime Backup start time, UNIX time seconds.
    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
    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.

    • startTime Backup start time, UNIX time seconds.
    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
    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.

    • startTime Backup start time, UNIX time seconds.
    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
    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.

    • startTime Backup start time, UNIX time seconds.
    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
    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.

    • startTime Backup start time, UNIX time seconds.
    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
    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.

    • startTime Backup start time, UNIX time seconds.

    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.57.1 published on Wednesday, Jun 26, 2024 by Pulumi