ALIYUN::HBR::EcsBackupPlan

更新时间:
复制为 MD 格式

ALIYUN::HBR::EcsBackupPlan类型用于创建ECS 文件备份计划。

语法

{
  "Type": "ALIYUN::HBR::EcsBackupPlan",
  "Properties": {
    "BackupType": String,
    "InstanceId": String,
    "PlanName": String,
    "Retention": Integer,
    "Schedule": String,
    "VaultId": String,
    "CrossAccountUserId": String,
    "CrossAccountRoleName": String,
    "CrossAccountType": String,
    "Disabled": Boolean,
    "Detail": Map,
    "Exclude": String,
    "Include": String,
    "Options": Map,
    "Paths": List,
    "SpeedLimit": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

BackupType

String

备份类型。

有效值:COMPLETE

InstanceId

String

ECS实例的ID。

主机上必须已安装ECS备份客户端。

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。

Detail

Map

备份计划的详细信息。

Disabled

Boolean

是否禁用备份任务。

Exclude

String

备份计划的排除路径。

最大长度:255

Include

String

备份计划的包含路径。

最大长度:255

Options

Map

Windows操作系统使用VSS实现应用一致性,

例如:{"UseVSS":false}。

Paths

List

备份计划的路径。

最大长度:20

SpeedLimit

String

备份计划的限速。

返回值

Fn::GetAtt

PlanId:备份计划的ID。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Options:
    Type: Json
    Description:
      en: 'Windows operating system with application consistency using VSS, e.g: {"UseVSS":false}.'
    Required: false
  CrossAccountUserId:
    Type: String
    Description:
      en: The original account ID of the cross account backup managed by the current account.
    Required: false
  Exclude:
    Type: String
    Description:
      en: The exclude paths of the backup plan.
    Required: false
    MaxLength: 255
  InstanceId:
    Type: String
    Description:
      en: The ID of ECS instance. The ecs backup client must have been installed on the host.
    Required: true
  SpeedLimit:
    Type: String
    Description:
      en: The speed limit of the backup plan.
    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
  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
  Include:
    Type: String
    Description:
      en: The include paths of the backup plan.
    Required: false
    MaxLength: 255
  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
  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
  BackupType:
    Type: String
    Description:
      en: 'Backup type. Valid values: COMPLETE.'
    AllowedValues:
      - COMPLETE
    Required: true
  Paths:
    AssociationPropertyMetadata:
      Parameter:
        Type: String
        Required: false
    Type: Json
    AssociationProperty: List[Parameter]
    Description:
      en: The paths of the backup plan.
    Required: false
    MaxLength: 20
  Disabled:
    Type: Boolean
    Description:
      en: 'Whether to disable the backup task. Valid values: true, false.'
    Required: false
  Detail:
    Type: Json
    Description:
      en: The detail of the backup plan.
    Required: false
Resources:
  EcsBackupPlan:
    Type: ALIYUN::HBR::EcsBackupPlan
    Properties:
      Options:
        Ref: Options
      CrossAccountUserId:
        Ref: CrossAccountUserId
      Exclude:
        Ref: Exclude
      InstanceId:
        Ref: InstanceId
      SpeedLimit:
        Ref: SpeedLimit
      CrossAccountRoleName:
        Ref: CrossAccountRoleName
      CrossAccountType:
        Ref: CrossAccountType
      Include:
        Ref: Include
      PlanName:
        Ref: PlanName
      VaultId:
        Ref: VaultId
      Retention:
        Ref: Retention
      Schedule:
        Ref: Schedule
      BackupType:
        Ref: BackupType
      Paths:
        Ref: Paths
      Disabled:
        Ref: Disabled
      Detail:
        Ref: Detail
Outputs:
  PlanId:
    Description: The ID of the backup plan.
    Value:
      Fn::GetAtt:
        - EcsBackupPlan
        - PlanId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Options": {
      "Type": "Json",
      "Description": {
        "en": "Windows operating system with application consistency using VSS, e.g: {\"UseVSS\":false}."
      },
      "Required": false
    },
    "CrossAccountUserId": {
      "Type": "String",
      "Description": {
        "en": "The original account ID of the cross account backup managed by the current account."
      },
      "Required": false
    },
    "Exclude": {
      "Type": "String",
      "Description": {
        "en": "The exclude paths of the backup plan."
      },
      "Required": false,
      "MaxLength": 255
    },
    "InstanceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of ECS instance. The ecs backup client must have been installed on the host."
      },
      "Required": true
    },
    "SpeedLimit": {
      "Type": "String",
      "Description": {
        "en": "The speed limit of the backup plan."
      },
      "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
    },
    "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
    },
    "Include": {
      "Type": "String",
      "Description": {
        "en": "The include paths of the backup plan."
      },
      "Required": false,
      "MaxLength": 255
    },
    "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
    },
    "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
    },
    "BackupType": {
      "Type": "String",
      "Description": {
        "en": "Backup type. Valid values: COMPLETE."
      },
      "AllowedValues": [
        "COMPLETE"
      ],
      "Required": true
    },
    "Paths": {
      "AssociationPropertyMetadata": {
        "Parameter": {
          "Type": "String",
          "Required": false
        }
      },
      "Type": "Json",
      "AssociationProperty": "List[Parameter]",
      "Description": {
        "en": "The paths of the backup plan."
      },
      "Required": false,
      "MaxLength": 20
    },
    "Disabled": {
      "Type": "Boolean",
      "Description": {
        "en": "Whether to disable the backup task. Valid values: true, false."
      },
      "Required": false
    },
    "Detail": {
      "Type": "Json",
      "Description": {
        "en": "The detail of the backup plan."
      },
      "Required": false
    }
  },
  "Resources": {
    "EcsBackupPlan": {
      "Type": "ALIYUN::HBR::EcsBackupPlan",
      "Properties": {
        "Options": {
          "Ref": "Options"
        },
        "CrossAccountUserId": {
          "Ref": "CrossAccountUserId"
        },
        "Exclude": {
          "Ref": "Exclude"
        },
        "InstanceId": {
          "Ref": "InstanceId"
        },
        "SpeedLimit": {
          "Ref": "SpeedLimit"
        },
        "CrossAccountRoleName": {
          "Ref": "CrossAccountRoleName"
        },
        "CrossAccountType": {
          "Ref": "CrossAccountType"
        },
        "Include": {
          "Ref": "Include"
        },
        "PlanName": {
          "Ref": "PlanName"
        },
        "VaultId": {
          "Ref": "VaultId"
        },
        "Retention": {
          "Ref": "Retention"
        },
        "Schedule": {
          "Ref": "Schedule"
        },
        "BackupType": {
          "Ref": "BackupType"
        },
        "Paths": {
          "Ref": "Paths"
        },
        "Disabled": {
          "Ref": "Disabled"
        },
        "Detail": {
          "Ref": "Detail"
        }
      }
    }
  },
  "Outputs": {
    "PlanId": {
      "Description": "The ID of the backup plan.",
      "Value": {
        "Fn::GetAtt": [
          "EcsBackupPlan",
          "PlanId"
        ]
      }
    }
  }
}