All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::HBR::OtsBackupPlan

更新時間:Jul 05, 2026

The ALIYUN::HBR::OtsBackupPlan resource creates a backup plan for a Tablestore instance.

Syntax

{
  "Type": "ALIYUN::HBR::OtsBackupPlan",
  "Properties": {
    "BackupType": String,
    "PlanName": String,
    "Retention": Integer,
    "Schedule": String,
    "VaultId": String,
    "CrossAccountUserId": String,
    "CrossAccountRoleName": String,
    "CrossAccountType": String,
    "Disabled": Boolean,
    "InstanceName": String,
    "OtsDetail": Map,
    "Rules": List
  }
}

Properties

Parameter

Type

Required

Updatable

Description

Constraints

BackupType

String

Yes

No

The backup type.

Valid value:

  • COMPLETE

PlanName

String

Yes

Yes

The name of the backup plan.

The name must be 1 to 64 characters in length. The backup plan name for each data source type must be unique within a single backup vault.

Retention

Integer

Yes

Yes

The retention period for backups, in days.

Minimum value: 1.

Schedule

String

Yes

Yes

The backup schedule.

The format is I|{startTime}|{interval}. This specifies that a backup task runs at an interval of {interval} starting from {startTime}. Missed backup tasks are not run retroactively. A new backup task will not start until the previous one is complete. For example, I|1631685600|P1D specifies that a backup is performed every day starting from 14:00:00 on September 15, 2021.

startTime: The start time of the backup. This value is a UNIX timestamp, measured in seconds. interval: The backup interval. The value must be in the ISO 8601 standard format. For example, PT1H specifies an interval of one hour, and P1D specifies an interval of one day.

VaultId

String

Yes

Yes

The ID of the backup vault.

None

CrossAccountRoleName

String

No

No

The name of the RAM role that is created in the source account for the cross-account backup.

None

CrossAccountType

String

No

No

The type of cross-account backup.

Valid values:

  • SELF_ACCOUNT

  • CROSS_ACCOUNT

CrossAccountUserId

String

No

No

The ID of the source account for the cross-account backup.

None

Disabled

Boolean

No

No

Specifies whether to disable the backup plan.

None

InstanceName

String

No

No

The name of the Tablestore instance.

None

OtsDetail

Map

No

Yes

The details of the Tablestore instance.

For more information, see OtsDetail properties.

Rules

List

No

Yes

A list of backup rules.

Maximum number of rules: 64. For more information, see Rules properties.

OtsDetail syntax

"OtsDetail": {
  "TableNames": List
}

OtsDetail properties

Parameter

Type

Required

Updatable

Description

Constraints

TableNames

List

No

Yes

The names of the tables in the Tablestore instance to back up.

None

Rules syntax

"Rules": [
  {
    "Schedule": String,
    "BackupType": String,
    "Retention": Integer,
    "Disabled": Boolean,
    "RuleName": String
  }
]

Rules properties

Parameter

Type

Required

Updatable

Description

Constraints

BackupType

String

No

Yes

The backup type for the rule.

Valid values:

  • COMPLETE

  • INCREMENTAL

Disabled

Boolean

No

Yes

Specifies whether to disable the rule.

None

Retention

Integer

No

Yes

The retention period, in days, for backups created by this rule.

Minimum value: 1.

RuleName

String

No

Yes

The name of the rule.

None

Schedule

String

No

Yes

The backup schedule for the rule.

The format is I|{startTime}|{interval}. This specifies that a backup task runs at an interval of {interval} starting from {startTime}. Missed backup tasks are not run retroactively. A new backup task will not start until the previous one is complete. For example, I|1631685600|P1D specifies that a backup is performed every day starting from 14:00:00 on September 15, 2021.

startTime: The start time of the backup. This value is a UNIX timestamp, measured in seconds. interval: The backup interval. The value must be in the ISO 8601 standard format. For example, PT1H specifies an interval of one hour, and P1D specifies an interval of one day.

Return values

Fn::GetAtt

PlanId: The ID of the backup plan.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  InstanceName:
    Type: String
    Description:
      en: The name of the Tablestore instance.
    Required: false
  CrossAccountUserId:
    Type: String
    Description:
      en: The ID of the source account for the cross-account backup.
    Required: false
  CrossAccountRoleName:
    Type: String
    Description:
      en: The name of the RAM role that is created in the source account for the cross-account backup.
    Required: false
  Schedule:
    Type: String
    Description:
      en: 'The backup schedule, formatted as `I|{startTime}|{interval}`. This specifies a recurring task that starts at `{startTime}` and runs at the specified `{interval}`. Missed tasks are not run retroactively, and a new task will not start until the previous one is complete.'
    Required: true
  CrossAccountType:
    Type: String
    Description:
      en: 'The type of cross-account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.'
    AllowedValues:
      - SELF_ACCOUNT
      - CROSS_ACCOUNT
    Required: false
  BackupType:
    Type: String
    Description:
      en: 'The backup type. Valid value: COMPLETE.'
    AllowedValues:
      - COMPLETE
    Required: true
  PlanName:
    Type: String
    Description:
      en: 'The name of the backup plan. The name must be 1 to 64 characters in length. The backup plan name for each data source type must be unique within a single backup vault.'
    Required: true
    MinLength: 1
    MaxLength: 64
  VaultId:
    Type: String
    Description:
      en: The ID of the backup vault.
    Required: true
  Retention:
    Type: Number
    Description:
      en: 'The retention period for backups, in days. Minimum value: 1.'
    Required: true
    MinValue: 1
  Disabled:
    Type: Boolean
    Description:
      en: 'Specifies whether to disable the backup plan. Valid values: true, false.'
    Required: false
  OtsDetail:
    AssociationPropertyMetadata:
      Parameters:
        TableNames:
          AssociationPropertyMetadata:
            Parameter:
              Type: String
              Description:
                en: The name of a table in the Tablestore instance to back up.
              Required: false
          Type: Json
          AssociationProperty: List[Parameter]
          Description:
            en: The names of the tables in the Tablestore instance to back up.
          Required: false
    Type: Json
    Description:
      en: The details of the Tablestore instance.
    Required: false
  Rules:
    AssociationPropertyMetadata:
      Parameters:
        Schedule:
          Type: String
          Description:
            en: 'The backup schedule for the rule, formatted as `I|{startTime}|{interval}`. This specifies a recurring task that starts at `{startTime}` and runs at the specified `{interval}`. Missed tasks are not run retroactively, and a new task will not start until the previous one is complete.'
          Required: false
        BackupType:
          Type: String
          Description:
            en: 'The backup type for the rule. Valid values: COMPLETE, INCREMENTAL.'
          AllowedValues:
            - COMPLETE
            - INCREMENTAL
          Required: false
        Retention:
          Type: Number
          Description:
            en: 'The retention period, in days, for backups created by this rule. Minimum value: 1.'
          Required: false
          MinValue: 1
        Disabled:
          Type: Boolean
          Description:
            en: Specifies whether to disable the rule.
          Required: false
        RuleName:
          Type: String
          Description:
            en: The name of the rule.
          Required: false
    Type: Json
    AssociationProperty: List[Parameters]
    Description:
      en: A list of backup rules.
    Required: false
    MaxLength: 64
Resources:
  OtsBackupPlan:
    Type: ALIYUN::HBR::OtsBackupPlan
    Properties:
      InstanceName:
        Ref: InstanceName
      CrossAccountUserId:
        Ref: CrossAccountUserId
      CrossAccountRoleName:
        Ref: CrossAccountRoleName
      Schedule:
        Ref: Schedule
      CrossAccountType:
        Ref: CrossAccountType
      BackupType:
        Ref: BackupType
      PlanName:
        Ref: PlanName
      VaultId:
        Ref: VaultId
      Retention:
        Ref: Retention
      Disabled:
        Ref: Disabled
      OtsDetail:
        Ref: OtsDetail
      Rules:
        Ref: Rules
Outputs:
  PlanId:
    Description: The ID of the backup plan.
    Value:
      Fn::GetAtt:
        - OtsBackupPlan
        - PlanId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "InstanceName": {
      "Type": "String",
      "Description": {
        "en": "The name of the Tablestore instance."
      },
      "Required": false
    },
    "CrossAccountUserId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the source account for the cross-account backup."
      },
      "Required": false
    },
    "CrossAccountRoleName": {
      "Type": "String",
      "Description": {
        "en": "The name of the RAM role that is created in the source account for the cross-account backup."
      },
      "Required": false
    },
    "Schedule": {
      "Type": "String",
      "Description": {
        "en": "The backup schedule, formatted as `I|{startTime}|{interval}`. This specifies a recurring task that starts at `{startTime}` and runs at the specified `{interval}`. Missed tasks are not run retroactively, and a new task will not start until the previous one is complete."
      },
      "Required": true
    },
    "CrossAccountType": {
      "Type": "String",
      "Description": {
        "en": "The type of cross-account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT."
      },
      "AllowedValues": [
        "SELF_ACCOUNT",
        "CROSS_ACCOUNT"
      ],
      "Required": false
    },
    "BackupType": {
      "Type": "String",
      "Description": {
        "en": "The backup type. Valid value: COMPLETE."
      },
      "AllowedValues": [
        "COMPLETE"
      ],
      "Required": true
    },
    "PlanName": {
      "Type": "String",
      "Description": {
        "en": "The name of the backup plan. The name must be 1 to 64 characters in length. The backup plan name for each data source type must be unique within a single backup vault."
      },
      "Required": true,
      "MinLength": 1,
      "MaxLength": 64
    },
    "VaultId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the backup vault."
      },
      "Required": true
    },
    "Retention": {
      "Type": "Number",
      "Description": {
        "en": "The retention period for backups, in days. Minimum value: 1."
      },
      "Required": true,
      "MinValue": 1
    },
    "Disabled": {
      "Type": "Boolean",
      "Description": {
        "en": "Specifies whether to disable the backup plan. Valid values: true, false."
      },
      "Required": false
    },
    "OtsDetail": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "TableNames": {
            "AssociationPropertyMetadata": {
              "Parameter": {
                "Type": "String",
                "Description": {
                  "en": "The name of a table in the Tablestore instance to back up."
                },
                "Required": false
              }
            },
            "Type": "Json",
            "AssociationProperty": "List[Parameter]",
            "Description": {
              "en": "The names of the tables in the Tablestore instance to back up."
            },
            "Required": false
          }
        }
      },
      "Type": "Json",
      "Description": {
        "en": "The details of the Tablestore instance."
      },
      "Required": false
    },
    "Rules": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "Schedule": {
            "Type": "String",
            "Description": {
              "en": "The backup schedule for the rule, formatted as `I|{startTime}|{interval}`. This specifies a recurring task that starts at `{startTime}` and runs at the specified `{interval}`. Missed tasks are not run retroactively, and a new task will not start until the previous one is complete."
            },
            "Required": false
          },
          "BackupType": {
            "Type": "String",
            "Description": {
              "en": "The backup type for the rule. Valid values: COMPLETE, INCREMENTAL."
            },
            "AllowedValues": [
              "COMPLETE",
              "INCREMENTAL"
            ],
            "Required": false
          },
          "Retention": {
            "Type": "Number",
            "Description": {
              "en": "The retention period, in days, for backups created by this rule. Minimum value: 1."
            },
            "Required": false,
            "MinValue": 1
          },
          "Disabled": {
            "Type": "Boolean",
            "Description": {
              "en": "Specifies whether to disable the rule."
            },
            "Required": false
          },
          "RuleName": {
            "Type": "String",
            "Description": {
              "en": "The name of the rule."
            },
            "Required": false
          }
        }
      },
      "Type": "Json",
      "AssociationProperty": "List[Parameters]",
      "Description": {
        "en": "A list of backup rules."
      },
      "Required": false,
      "MaxLength": 64
    }
  },
  "Resources": {
    "OtsBackupPlan": {
      "Type": "ALIYUN::HBR::OtsBackupPlan",
      "Properties": {
        "InstanceName": {
          "Ref": "InstanceName"
        },
        "CrossAccountUserId": {
          "Ref": "CrossAccountUserId"
        },
        "CrossAccountRoleName": {
          "Ref": "CrossAccountRoleName"
        },
        "Schedule": {
          "Ref": "Schedule"
        },
        "CrossAccountType": {
          "Ref": "CrossAccountType"
        },
        "BackupType": {
          "Ref": "BackupType"
        },
        "PlanName": {
          "Ref": "PlanName"
        },
        "VaultId": {
          "Ref": "VaultId"
        },
        "Retention": {
          "Ref": "Retention"
        },
        "Disabled": {
          "Ref": "Disabled"
        },
        "OtsDetail": {
          "Ref": "OtsDetail"
        },
        "Rules": {
          "Ref": "Rules"
        }
      }
    }
  },
  "Outputs": {
    "PlanId": {
      "Description": "The ID of the backup plan.",
      "Value": {
        "Fn::GetAtt": [
          "OtsBackupPlan",
          "PlanId"
        ]
      }
    }
  }
}