All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::HBR::EcsBackupPlan

Last Updated:Jul 05, 2026

The ALIYUN::HBR::EcsBackupPlan resource type creates an ECS file backup plan.

Syntax

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

Properties

Parameter

Type

Required

Editable

Description

Constraints

BackupType

String

Yes

No

The backup type.

Valid value: COMPLETE

InstanceId

String

Yes

No

The ID of the ECS instance.

The backup client must be installed on the host.

PlanName

String

Yes

Yes

The name of the backup plan.

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

Retention

Integer

Yes

Yes

The number of days to retain backups.

The minimum value is 1.

Schedule

String

Yes

Yes

The backup strategy.

Optional format: I|{startTime}|{interval}. This format indicates that a backup task is executed at a specified {interval} starting from {startTime}. Missed backup tasks are not retroactively performed. If the previous backup task has not completed, the next backup task is not triggered. For example, I|1631685600|P1D indicates that a backup is performed once per day, starting from 2021-09-15 14:00:00.

  • startTime: The backup start time. This value is a UNIX timestamp in seconds.

  • interval: The backup interval. The value must be in the ISO 8601 duration 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 created in the source account for the cross-account backup.

None

CrossAccountType

String

No

No

The type of the 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

Detail

Map

No

Yes

The details of the backup plan.

None

Disabled

Boolean

No

No

Specifies whether to disable the backup task.

None

Exclude

String

No

Yes

The path to exclude from the backup.

Maximum length: 255 characters

Include

String

No

Yes

The path to include in the backup.

Maximum length: 255 characters

Options

Map

No

Yes

Options for creating application-consistent backups on Windows by using the Volume Shadow Copy Service (VSS).

For example: {"UseVSS":false}.

Paths

List

No

Yes

The paths to back up.

The maximum number of paths is 20.

SpeedLimit

String

No

Yes

The speed limit for the backup.

None

Return values

Fn::GetAtt

PlanId: The ID of the backup plan.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Options:
    Type: Json
    Description:
      en: 'Options for creating application-consistent backups on Windows by using the Volume Shadow Copy Service (VSS). For example: {"UseVSS":false}.'
    Required: false
  CrossAccountUserId:
    Type: String
    Description:
      en: The ID of the source account for the cross-account backup.
    Required: false
  Exclude:
    Type: String
    Description:
      en: The path to exclude from the backup.
    Required: false
    MaxLength: 255
  InstanceId:
    Type: String
    Description:
      en: The ID of the ECS instance. The backup client must be installed on the host.
    Required: true
  SpeedLimit:
    Type: String
    Description:
      en: The speed limit for the backup.
    Required: false
  CrossAccountRoleName:
    Type: String
    Description:
      en: The name of the RAM role created in the source account for the cross-account backup.
    Required: false
  CrossAccountType:
    Type: String
    Description:
      en: 'The type of cross-account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT.'
    AllowedValues:
      - SELF_ACCOUNT
      - CROSS_ACCOUNT
    Required: false
  Include:
    Type: String
    Description:
      en: The path to include in the backup.
    Required: false
    MaxLength: 255
  PlanName:
    Type: String
    Description:
      en: The name of the backup plan. The name must be 1 to 64 characters long. The name must be unique for each data source type 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 number of days to retain backups. The minimum value is 1.
    Required: true
    MinValue: 1
  Schedule:
    Type: String
    Description:
      en: 'The backup strategy. The format is `I|{startTime}|{interval}`. This specifies that a backup task runs at the interval specified by `{interval}`, starting from the time specified by `{startTime}`. Missed backups are not run retroactively. A new backup task does not start if the previous one has not completed.'
    Required: true
  BackupType:
    Type: String
    Description:
      en: 'The backup type. Valid value: COMPLETE.'
    AllowedValues:
      - COMPLETE
    Required: true
  Paths:
    AssociationPropertyMetadata:
      Parameter:
        Type: String
        Required: false
    Type: Json
    AssociationProperty: List[Parameter]
    Description:
      en: The paths to back up.
    Required: false
    MaxLength: 20
  Disabled:
    Type: Boolean
    Description:
      en: 'Specifies whether to disable the backup task. Valid values: true, false.'
    Required: false
  Detail:
    Type: Json
    Description:
      en: The details 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": "Options for creating application-consistent backups on Windows by using the Volume Shadow Copy Service (VSS). For example: {\"UseVSS\":false}."
      },
      "Required": false
    },
    "CrossAccountUserId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the source account for the cross-account backup."
      },
      "Required": false
    },
    "Exclude": {
      "Type": "String",
      "Description": {
        "en": "The path to exclude from the backup."
      },
      "Required": false,
      "MaxLength": 255
    },
    "InstanceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the ECS instance. The backup client must be installed on the host."
      },
      "Required": true
    },
    "SpeedLimit": {
      "Type": "String",
      "Description": {
        "en": "The speed limit for the backup."
      },
      "Required": false
    },
    "CrossAccountRoleName": {
      "Type": "String",
      "Description": {
        "en": "The name of the RAM role created in the source account for the cross-account backup."
      },
      "Required": false
    },
    "CrossAccountType": {
      "Type": "String",
      "Description": {
        "en": "The type of cross-account backup. Valid values: SELF_ACCOUNT, CROSS_ACCOUNT."
      },
      "AllowedValues": [
        "SELF_ACCOUNT",
        "CROSS_ACCOUNT"
      ],
      "Required": false
    },
    "Include": {
      "Type": "String",
      "Description": {
        "en": "The path to include in the backup."
      },
      "Required": false,
      "MaxLength": 255
    },
    "PlanName": {
      "Type": "String",
      "Description": {
        "en": "The name of the backup plan. The name must be 1 to 64 characters long. The name must be unique for each data source type 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 number of days to retain backups. The minimum value is 1."
      },
      "Required": true,
      "MinValue": 1
    },
    "Schedule": {
      "Type": "String",
      "Description": {
        "en": "The backup strategy. The format is `I|{startTime}|{interval}`. This specifies that a backup task runs at the interval specified by `{interval}`, starting from the time specified by `{startTime}`. Missed backups are not run retroactively. A new backup task does not start if the previous one has not completed."
      },
      "Required": true
    },
    "BackupType": {
      "Type": "String",
      "Description": {
        "en": "The backup type. Valid value: COMPLETE."
      },
      "AllowedValues": [
        "COMPLETE"
      ],
      "Required": true
    },
    "Paths": {
      "AssociationPropertyMetadata": {
        "Parameter": {
          "Type": "String",
          "Required": false
        }
      },
      "Type": "Json",
      "AssociationProperty": "List[Parameter]",
      "Description": {
        "en": "The paths to back up."
      },
      "Required": false,
      "MaxLength": 20
    },
    "Disabled": {
      "Type": "Boolean",
      "Description": {
        "en": "Specifies whether to disable the backup task. Valid values: true, false."
      },
      "Required": false
    },
    "Detail": {
      "Type": "Json",
      "Description": {
        "en": "The details 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"
        ]
      }
    }
  }
}