alicloud.hbr.OtsBackupPlan
Explore with Pulumi AI
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=[{
"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=[{
"table_names": [default_table.table_name],
}],
rules=[{
"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.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.Sprintf("Example-%v", defaultInteger.Result),
Description: pulumi.String("terraform-example"),
AccessedBy: pulumi.String("Any"),
Tags: pulumi.StringMap{
"Created": pulumi.String("TF"),
"For": pulumi.String("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: int(-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.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:
- Backup
Type string - Backup type. Valid values:
COMPLETE
. - Ots
Backup stringPlan Name - 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.
- Cross
Account stringRole Name - The role name created in the original account RAM backup by the cross account managed by the current account.
- Cross
Account stringType - The type of the cross account backup. Valid values:
SELF_ACCOUNT
,CROSS_ACCOUNT
. - Cross
Account intUser Id - 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 string - The name of the Table store instance. Note: Required while source_type equals
OTS_TABLE
. - Ots
Details List<Pulumi.Ali Cloud. Hbr. Inputs. Ots Backup Plan Ots Detail> - The details about the Table store instance. See the following
Block ots_detail
. Note: Required while source_type equalsOTS_TABLE
. - Rules
List<Pulumi.
Ali Cloud. Hbr. Inputs. Ots Backup Plan Rule> - The backup plan rule. See the following
Block rules
. Note: Required while source_type equalsOTS_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.
- Vault
Id string - The ID of backup vault.
- Backup
Type string - Backup type. Valid values:
COMPLETE
. - Ots
Backup stringPlan Name - 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.
- Cross
Account stringRole Name - The role name created in the original account RAM backup by the cross account managed by the current account.
- Cross
Account stringType - The type of the cross account backup. Valid values:
SELF_ACCOUNT
,CROSS_ACCOUNT
. - Cross
Account intUser Id - 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 string - The name of the Table store instance. Note: Required while source_type equals
OTS_TABLE
. - Ots
Details []OtsBackup Plan Ots Detail Args - The details about the Table store instance. See the following
Block ots_detail
. Note: Required while source_type equalsOTS_TABLE
. - Rules
[]Ots
Backup Plan Rule Args - The backup plan rule. See the following
Block rules
. Note: Required while source_type equalsOTS_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.
- Vault
Id string - The ID of backup vault.
- backup
Type String - Backup type. Valid values:
COMPLETE
. - ots
Backup StringPlan Name - 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.
- cross
Account StringRole Name - The role name created in the original account RAM backup by the cross account managed by the current account.
- cross
Account StringType - The type of the cross account backup. Valid values:
SELF_ACCOUNT
,CROSS_ACCOUNT
. - cross
Account IntegerUser Id - 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
. - instance
Name String - The name of the Table store instance. Note: Required while source_type equals
OTS_TABLE
. - ots
Details List<OtsBackup Plan Ots Detail> - The details about the Table store instance. See the following
Block ots_detail
. Note: Required while source_type equalsOTS_TABLE
. - rules
List<Ots
Backup Plan Rule> - The backup plan rule. See the following
Block rules
. Note: Required while source_type equalsOTS_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.
- vault
Id String - The ID of backup vault.
- backup
Type string - Backup type. Valid values:
COMPLETE
. - ots
Backup stringPlan Name - 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.
- cross
Account stringRole Name - The role name created in the original account RAM backup by the cross account managed by the current account.
- cross
Account stringType - The type of the cross account backup. Valid values:
SELF_ACCOUNT
,CROSS_ACCOUNT
. - cross
Account numberUser Id - 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
. - instance
Name string - The name of the Table store instance. Note: Required while source_type equals
OTS_TABLE
. - ots
Details OtsBackup Plan Ots Detail[] - The details about the Table store instance. See the following
Block ots_detail
. Note: Required while source_type equalsOTS_TABLE
. - rules
Ots
Backup Plan Rule[] - The backup plan rule. See the following
Block rules
. Note: Required while source_type equalsOTS_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.
- vault
Id string - The ID of backup vault.
- backup_
type str - Backup type. Valid values:
COMPLETE
. - ots_
backup_ strplan_ name - 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_ strrole_ name - The role name created in the original account RAM backup by the cross account managed by the current account.
- cross_
account_ strtype - The type of the cross account backup. Valid values:
SELF_ACCOUNT
,CROSS_ACCOUNT
. - cross_
account_ intuser_ id - 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[OtsBackup Plan Ots Detail Args] - The details about the Table store instance. See the following
Block ots_detail
. Note: Required while source_type equalsOTS_TABLE
. - rules
Sequence[Ots
Backup Plan Rule Args] - The backup plan rule. See the following
Block rules
. Note: Required while source_type equalsOTS_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.
- vault_
id str - The ID of backup vault.
- backup
Type String - Backup type. Valid values:
COMPLETE
. - ots
Backup StringPlan Name - 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.
- cross
Account StringRole Name - The role name created in the original account RAM backup by the cross account managed by the current account.
- cross
Account StringType - The type of the cross account backup. Valid values:
SELF_ACCOUNT
,CROSS_ACCOUNT
. - cross
Account NumberUser Id - 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
. - instance
Name String - The name of the Table store instance. Note: Required while source_type equals
OTS_TABLE
. - ots
Details List<Property Map> - The details about the Table store instance. See the following
Block ots_detail
. Note: Required while source_type equalsOTS_TABLE
. - rules List<Property Map>
- The backup plan rule. See the following
Block rules
. Note: Required while source_type equalsOTS_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.
- vault
Id 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.
- Backup
Type string - Backup type. Valid values:
COMPLETE
. - Cross
Account stringRole Name - The role name created in the original account RAM backup by the cross account managed by the current account.
- Cross
Account stringType - The type of the cross account backup. Valid values:
SELF_ACCOUNT
,CROSS_ACCOUNT
. - Cross
Account intUser Id - 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 string - The name of the Table store instance. Note: Required while source_type equals
OTS_TABLE
. - Ots
Backup stringPlan Name - 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 List<Pulumi.Ali Cloud. Hbr. Inputs. Ots Backup Plan Ots Detail> - The details about the Table store instance. See the following
Block ots_detail
. Note: Required while source_type equalsOTS_TABLE
. - Retention string
- Backup retention days, the minimum is 1.
- Rules
List<Pulumi.
Ali Cloud. Hbr. Inputs. Ots Backup Plan Rule> - The backup plan rule. See the following
Block rules
. Note: Required while source_type equalsOTS_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.
- Vault
Id string - The ID of backup vault.
- Backup
Type string - Backup type. Valid values:
COMPLETE
. - Cross
Account stringRole Name - The role name created in the original account RAM backup by the cross account managed by the current account.
- Cross
Account stringType - The type of the cross account backup. Valid values:
SELF_ACCOUNT
,CROSS_ACCOUNT
. - Cross
Account intUser Id - 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 string - The name of the Table store instance. Note: Required while source_type equals
OTS_TABLE
. - Ots
Backup stringPlan Name - 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 []OtsBackup Plan Ots Detail Args - The details about the Table store instance. See the following
Block ots_detail
. Note: Required while source_type equalsOTS_TABLE
. - Retention string
- Backup retention days, the minimum is 1.
- Rules
[]Ots
Backup Plan Rule Args - The backup plan rule. See the following
Block rules
. Note: Required while source_type equalsOTS_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.
- Vault
Id string - The ID of backup vault.
- backup
Type String - Backup type. Valid values:
COMPLETE
. - cross
Account StringRole Name - The role name created in the original account RAM backup by the cross account managed by the current account.
- cross
Account StringType - The type of the cross account backup. Valid values:
SELF_ACCOUNT
,CROSS_ACCOUNT
. - cross
Account IntegerUser Id - 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
. - instance
Name String - The name of the Table store instance. Note: Required while source_type equals
OTS_TABLE
. - ots
Backup StringPlan Name - 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 List<OtsBackup Plan Ots Detail> - The details about the Table store instance. See the following
Block ots_detail
. Note: Required while source_type equalsOTS_TABLE
. - retention String
- Backup retention days, the minimum is 1.
- rules
List<Ots
Backup Plan Rule> - The backup plan rule. See the following
Block rules
. Note: Required while source_type equalsOTS_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.
- vault
Id String - The ID of backup vault.
- backup
Type string - Backup type. Valid values:
COMPLETE
. - cross
Account stringRole Name - The role name created in the original account RAM backup by the cross account managed by the current account.
- cross
Account stringType - The type of the cross account backup. Valid values:
SELF_ACCOUNT
,CROSS_ACCOUNT
. - cross
Account numberUser Id - 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
. - instance
Name string - The name of the Table store instance. Note: Required while source_type equals
OTS_TABLE
. - ots
Backup stringPlan Name - 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 OtsBackup Plan Ots Detail[] - The details about the Table store instance. See the following
Block ots_detail
. Note: Required while source_type equalsOTS_TABLE
. - retention string
- Backup retention days, the minimum is 1.
- rules
Ots
Backup Plan Rule[] - The backup plan rule. See the following
Block rules
. Note: Required while source_type equalsOTS_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.
- vault
Id string - The ID of backup vault.
- backup_
type str - Backup type. Valid values:
COMPLETE
. - cross_
account_ strrole_ name - The role name created in the original account RAM backup by the cross account managed by the current account.
- cross_
account_ strtype - The type of the cross account backup. Valid values:
SELF_ACCOUNT
,CROSS_ACCOUNT
. - cross_
account_ intuser_ id - 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_ strplan_ name - 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[OtsBackup Plan Ots Detail Args] - The details about the Table store instance. See the following
Block ots_detail
. Note: Required while source_type equalsOTS_TABLE
. - retention str
- Backup retention days, the minimum is 1.
- rules
Sequence[Ots
Backup Plan Rule Args] - The backup plan rule. See the following
Block rules
. Note: Required while source_type equalsOTS_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.
- vault_
id str - The ID of backup vault.
- backup
Type String - Backup type. Valid values:
COMPLETE
. - cross
Account StringRole Name - The role name created in the original account RAM backup by the cross account managed by the current account.
- cross
Account StringType - The type of the cross account backup. Valid values:
SELF_ACCOUNT
,CROSS_ACCOUNT
. - cross
Account NumberUser Id - 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
. - instance
Name String - The name of the Table store instance. Note: Required while source_type equals
OTS_TABLE
. - ots
Backup StringPlan Name - 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 List<Property Map> - The details about the Table store instance. See the following
Block ots_detail
. Note: Required while source_type equalsOTS_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 equalsOTS_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.
- vault
Id String - The ID of backup vault.
Supporting Types
OtsBackupPlanOtsDetail, OtsBackupPlanOtsDetailArgs
- Table
Names List<string> - The names of the destination tables in the Tablestore instance. Note: Required while source_type equals
OTS_TABLE
.
- Table
Names []string - The names of the destination tables in the Tablestore instance. Note: Required while source_type equals
OTS_TABLE
.
- table
Names List<String> - The names of the destination tables in the Tablestore instance. Note: Required while source_type equals
OTS_TABLE
.
- table
Names 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
.
- table
Names List<String> - The names of the destination tables in the Tablestore instance. Note: Required while source_type equals
OTS_TABLE
.
OtsBackupPlanRule, OtsBackupPlanRuleArgs
- Backup
Type 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.
- Rule
Name 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.startTime
Backup start time, UNIX time seconds.
- Backup
Type 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.
- Rule
Name 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.startTime
Backup start time, UNIX time seconds.
- backup
Type 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.
- rule
Name 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.startTime
Backup start time, UNIX time seconds.
- backup
Type 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.
- rule
Name 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.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 - 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.startTime
Backup start time, UNIX time seconds.
- backup
Type 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.
- rule
Name 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.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.