ALIYUN::HBR::OtsBackupPlan

更新时间:
复制为 MD 格式

ALIYUN::HBR::OtsBackupPlan类型用于Ots 表格存储实例备份计划。

语法

{
  "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
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

BackupType

String

备份类型。

取值:

  • COMPLETE

PlanName

String

备份计划的名称。

1~64个字符,单个仓库中每种数据源类型的备份计划名称必须唯一。

Retention

Integer

备份保留天数。

最小值:1

Schedule

String

备份策略。

可选格式:I|{startTime}|{interval}。表示从{startTime}开始每隔{interval}的时间执行一次备份任务。不会执行已过去时间的备份任务。如果上一次备份任务没有完成,不会触发下一次备份任务。例如 I|1631685600|P1D 表示从 2021-09-15 14:00:00 开始每隔一天备份一次。

startTime:备份起始时间,UNIX 时间,单位为秒。 interval: ISO8601 时间间隔。例如:PT1H 表示间隔一小时。P1D 表示间隔一天。

VaultId

String

备份仓库的ID。

CrossAccountRoleName

String

当前账号管理的跨账号在原账号RAM备份中创建的角色名称。

CrossAccountType

String

跨账号备份的类型。

取值:

  • SELF_ACCOUNT

  • CROSS_ACCOUNT

CrossAccountUserId

String

当前账号管理的跨账号备份的原账号ID。

Disabled

Boolean

是否禁用备份任务。

InstanceName

String

表格存储实例的名称。

OtsDetail

Map

表格存储实例的详细信息。

更多信息,请参考OtsDetail属性

Rules

List

备份计划规则。

最大长度:64,更多信息,请参考Rules属性

OtsDetail语法

"OtsDetail": {
  "TableNames": List
}

OtsDetail属性

属性名称

类型

必须

允许更新

描述

约束

TableNames

List

表格存储实例中目标表的名称。

Rules语法

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

Rules属性

属性名称

类型

必须

允许更新

描述

约束

BackupType

String

表格存储实例的名称。

取值:

  • COMPLETE

  • INCREMENTAL

Disabled

Boolean

规则是否被禁用。

Retention

Integer

备份保留天数,

最小值:1

RuleName

String

规则的名称。

Schedule

String

备份策略。

可选格式:I|{startTime}|{interval}。表示从{startTime}开始每隔{interval}的时间执行一次备份任务。不会执行已过去时间的备份任务。如果上一次备份任务没有完成,不会触发下一次备份任务。例如 I|1631685600|P1D 表示从 2021-09-15 14:00:00 开始每隔一天备份一次。

startTime:备份起始时间,UNIX 时间,单位为秒。 interval: ISO8601 时间间隔。例如:PT1H 表示间隔一小时。P1D 表示间隔一天。

返回值

Fn::GetAtt

PlanId:备份计划的ID。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  InstanceName:
    Type: String
    Description:
      en: The name of the Table store instance.
    Required: false
  CrossAccountUserId:
    Type: String
    Description:
      en: The original account ID of the cross account backup managed by the current account.
    Required: false
  CrossAccountRoleName:
    Type: String
    Description:
      en: The role name created in the original account RAM backup by the cross account managed by the current account.
    Required: false
  Schedule:
    Type: String
    Description:
      en: '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.'
    Required: true
  CrossAccountType:
    Type: String
    Description:
      en: 'The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.'
    AllowedValues:
      - SELF_ACCOUNT
      - CROSS_ACCOUNT
    Required: false
  BackupType:
    Type: String
    Description:
      en: 'Backup type. Valid values: COMPLETE.'
    AllowedValues:
      - COMPLETE
    Required: true
  PlanName:
    Type: String
    Description:
      en: 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.
    Required: true
    MinLength: 1
    MaxLength: 64
  VaultId:
    Type: String
    Description:
      en: The ID of backup vault.
    Required: true
  Retention:
    Type: Number
    Description:
      en: Backup retention days, the minimum is 1.
    Required: true
    MinValue: 1
  Disabled:
    Type: Boolean
    Description:
      en: 'Whether to disable the backup task. Valid values: true, false.'
    Required: false
  OtsDetail:
    AssociationPropertyMetadata:
      Parameters:
        TableNames:
          AssociationPropertyMetadata:
            Parameter:
              Type: String
              Description:
                en: The name of the destination table in the Tablestore instance.
              Required: false
          Type: Json
          AssociationProperty: List[Parameter]
          Description:
            en: The names of the destination tables in the Tablestore instance.
          Required: false
    Type: Json
    Description:
      en: The details about the Table store instance.
    Required: false
  Rules:
    AssociationPropertyMetadata:
      Parameters:
        Schedule:
          Type: String
          Description:
            en: '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.'
          Required: false
        BackupType:
          Type: String
          Description:
            en: 'The name of the tableStore instance. Valid values: COMPLETE, INCREMENTAL.'
          AllowedValues:
            - COMPLETE
            - INCREMENTAL
          Required: false
        Retention:
          Type: Number
          Description:
            en: Backup retention days, the minimum is 1.
          Required: false
          MinValue: 1
        Disabled:
          Type: Boolean
          Description:
            en: Whether the rule is disabled.
          Required: false
        RuleName:
          Type: String
          Description:
            en: The name of the rule.
          Required: false
    Type: Json
    AssociationProperty: List[Parameters]
    Description:
      en: The backup plan rule.
    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 Table store instance."
      },
      "Required": false
    },
    "CrossAccountUserId": {
      "Type": "String",
      "Description": {
        "en": "The original account ID of the cross account backup managed by the current account."
      },
      "Required": false
    },
    "CrossAccountRoleName": {
      "Type": "String",
      "Description": {
        "en": "The role name created in the original account RAM backup by the cross account managed by the current account."
      },
      "Required": false
    },
    "Schedule": {
      "Type": "String",
      "Description": {
        "en": "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."
      },
      "Required": true
    },
    "CrossAccountType": {
      "Type": "String",
      "Description": {
        "en": "The type of the cross account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT."
      },
      "AllowedValues": [
        "SELF_ACCOUNT",
        "CROSS_ACCOUNT"
      ],
      "Required": false
    },
    "BackupType": {
      "Type": "String",
      "Description": {
        "en": "Backup type. Valid values: COMPLETE."
      },
      "AllowedValues": [
        "COMPLETE"
      ],
      "Required": true
    },
    "PlanName": {
      "Type": "String",
      "Description": {
        "en": "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."
      },
      "Required": true,
      "MinLength": 1,
      "MaxLength": 64
    },
    "VaultId": {
      "Type": "String",
      "Description": {
        "en": "The ID of backup vault."
      },
      "Required": true
    },
    "Retention": {
      "Type": "Number",
      "Description": {
        "en": "Backup retention days, the minimum is 1."
      },
      "Required": true,
      "MinValue": 1
    },
    "Disabled": {
      "Type": "Boolean",
      "Description": {
        "en": "Whether to disable the backup task. Valid values: true, false."
      },
      "Required": false
    },
    "OtsDetail": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "TableNames": {
            "AssociationPropertyMetadata": {
              "Parameter": {
                "Type": "String",
                "Description": {
                  "en": "The name of the destination table in the Tablestore instance."
                },
                "Required": false
              }
            },
            "Type": "Json",
            "AssociationProperty": "List[Parameter]",
            "Description": {
              "en": "The names of the destination tables in the Tablestore instance."
            },
            "Required": false
          }
        }
      },
      "Type": "Json",
      "Description": {
        "en": "The details about the Table store instance."
      },
      "Required": false
    },
    "Rules": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "Schedule": {
            "Type": "String",
            "Description": {
              "en": "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."
            },
            "Required": false
          },
          "BackupType": {
            "Type": "String",
            "Description": {
              "en": "The name of the tableStore instance. Valid values: COMPLETE, INCREMENTAL."
            },
            "AllowedValues": [
              "COMPLETE",
              "INCREMENTAL"
            ],
            "Required": false
          },
          "Retention": {
            "Type": "Number",
            "Description": {
              "en": "Backup retention days, the minimum is 1."
            },
            "Required": false,
            "MinValue": 1
          },
          "Disabled": {
            "Type": "Boolean",
            "Description": {
              "en": "Whether the rule is disabled."
            },
            "Required": false
          },
          "RuleName": {
            "Type": "String",
            "Description": {
              "en": "The name of the rule."
            },
            "Required": false
          }
        }
      },
      "Type": "Json",
      "AssociationProperty": "List[Parameters]",
      "Description": {
        "en": "The backup plan rule."
      },
      "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"
        ]
      }
    }
  }
}