The ALIYUN::HBR::OssBackupPlan resource creates an OSS backup plan.
Syntax
{
"Type": "ALIYUN::HBR::OssBackupPlan",
"Properties": {
"Bucket": String,
"BackupType": String,
"PlanName": String,
"Retention": Integer,
"Schedule": String,
"VaultId": String,
"CrossAccountUserId": String,
"CrossAccountRoleName": String,
"CrossAccountType": String,
"Disabled": Boolean,
"Prefix": String
}
}Properties
Parameter | Type | Required | Editable | Description | Constraints |
BackupType | String | Yes | No | The backup type. | Valid value:
|
Bucket | String | Yes | No | The name of the OSS bucket. | None |
PlanName | String | Yes | Yes | The name of the backup plan. | The name must be 1 to 64 characters in length. The backup plan name must be unique for each data source type within the same backup vault. |
Retention | Integer | Yes | Yes | The backup retention period, in days. | The minimum value is 1. |
Schedule | String | Yes | Yes | The backup strategy. | Optional format:
|
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 a cross-account backup. | None |
CrossAccountType | String | No | No | The type of the cross-account backup. | Valid values:
|
CrossAccountUserId | String | No | No | The ID of the source account for a cross-account backup. | None |
Disabled | Boolean | No | No | Specifies whether to disable the backup task. | None |
Prefix | String | No | Yes | The backup prefix. | If you specify this property, Hybrid Backup Recovery (HBR) backs up only objects whose names match the prefix. |
Return values
Fn::GetAtt
PlanId: The backup plan ID.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
CrossAccountUserId:
Type: String
Description:
en: The ID of the source account for a cross-account backup.
Required: false
Bucket:
Type: String
Description:
en: The name of the OSS bucket.
Required: true
CrossAccountRoleName:
Type: String
Description:
en: The name of the RAM role created in the source account for a cross-account backup.
Required: false
Schedule:
Type: String
Description:
en: 'Backup strategy. The format is I|{startTime}|{interval}. It specifies that a backup task is executed at a fixed interval. Missed backup tasks are not retried. If a backup task is not complete, the next task does not start.'
Required: true
CrossAccountType:
Type: String
Description:
en: 'The type of a 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
Prefix:
Type: String
Description:
en: Backup prefix. If specified, only objects with the matching prefix are backed up.
Required: false
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 must be unique for each data source type within the same 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 backup retention period in days. The minimum value is 1.
Required: true
MinValue: 1
Disabled:
Type: Boolean
Description:
en: 'Whether to disable the backup task. Valid values: true, false.'
Required: false
Resources:
OssBackupPlan:
Type: ALIYUN::HBR::OssBackupPlan
Properties:
CrossAccountUserId:
Ref: CrossAccountUserId
Bucket:
Ref: Bucket
CrossAccountRoleName:
Ref: CrossAccountRoleName
Schedule:
Ref: Schedule
CrossAccountType:
Ref: CrossAccountType
BackupType:
Ref: BackupType
Prefix:
Ref: Prefix
PlanName:
Ref: PlanName
VaultId:
Ref: VaultId
Retention:
Ref: Retention
Disabled:
Ref: Disabled
Outputs:
PlanId:
Description: The backup plan ID.
Value:
Fn::GetAtt:
- OssBackupPlan
- PlanId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"CrossAccountUserId": {
"Type": "String",
"Description": {
"en": "The ID of the source account for a cross-account backup."
},
"Required": false
},
"Bucket": {
"Type": "String",
"Description": {
"en": "The name of the OSS bucket."
},
"Required": true
},
"CrossAccountRoleName": {
"Type": "String",
"Description": {
"en": "The name of the RAM role created in the source account for a cross-account backup."
},
"Required": false
},
"Schedule": {
"Type": "String",
"Description": {
"en": "Backup strategy. The format is I|{startTime}|{interval}. It specifies that a backup task is executed at a fixed interval. Missed backup tasks are not retried. If a backup task is not complete, the next task does not start."
},
"Required": true
},
"CrossAccountType": {
"Type": "String",
"Description": {
"en": "The type of a 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
},
"Prefix": {
"Type": "String",
"Description": {
"en": "Backup prefix. If specified, only objects with the matching prefix are backed up."
},
"Required": false
},
"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 must be unique for each data source type within the same 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 backup retention period in days. The minimum value is 1."
},
"Required": true,
"MinValue": 1
},
"Disabled": {
"Type": "Boolean",
"Description": {
"en": "Whether to disable the backup task. Valid values: true, false."
},
"Required": false
}
},
"Resources": {
"OssBackupPlan": {
"Type": "ALIYUN::HBR::OssBackupPlan",
"Properties": {
"CrossAccountUserId": {
"Ref": "CrossAccountUserId"
},
"Bucket": {
"Ref": "Bucket"
},
"CrossAccountRoleName": {
"Ref": "CrossAccountRoleName"
},
"Schedule": {
"Ref": "Schedule"
},
"CrossAccountType": {
"Ref": "CrossAccountType"
},
"BackupType": {
"Ref": "BackupType"
},
"Prefix": {
"Ref": "Prefix"
},
"PlanName": {
"Ref": "PlanName"
},
"VaultId": {
"Ref": "VaultId"
},
"Retention": {
"Ref": "Retention"
},
"Disabled": {
"Ref": "Disabled"
}
}
}
},
"Outputs": {
"PlanId": {
"Description": "The backup plan ID.",
"Value": {
"Fn::GetAtt": [
"OssBackupPlan",
"PlanId"
]
}
}
}
}