ALIYUN::HBR::OssBackupPlan类型用于OSS 备份计划。
语法
{
"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
}
}
属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
BackupType |
String |
是 |
否 |
备份类型。 |
取值
|
|
Bucket |
String |
是 |
否 |
OSS存储桶的名称。 |
无 |
|
PlanName |
String |
是 |
是 |
备份计划的名称。 |
1~64个字符,单个仓库中每种数据源类型的备份计划名称必须唯一。 |
|
Retention |
Integer |
是 |
是 |
备份保留天数, |
最小值为1。 |
|
Schedule |
String |
是 |
是 |
备份策略。 |
可选格式:
|
|
VaultId |
String |
是 |
是 |
备份仓库的ID。 |
无 |
|
CrossAccountRoleName |
String |
否 |
否 |
当前账号管理的跨账号在原账号RAM备份中创建的角色名称。 |
无 |
|
CrossAccountType |
String |
否 |
否 |
跨账号备份的类型。 |
取值:
|
|
CrossAccountUserId |
String |
否 |
否 |
当前账号管理的跨账号备份的原账号ID。 |
无 |
|
Disabled |
Boolean |
否 |
否 |
是否禁用备份任务。 |
无 |
|
Prefix |
String |
否 |
是 |
备份前缀。 |
一旦指定,只有匹配前缀的对象才会被备份。 |
返回值
Fn::GetAtt
PlanId:备份计划的ID。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
CrossAccountUserId:
Type: String
Description:
en: The original account ID of the cross account backup managed by the current account.
Required: false
Bucket:
Type: String
Description:
en: The name of OSS bucket.
Required: true
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
Prefix:
Type: String
Description:
en: Backup prefix. Once specified, only objects with matching prefixes will be backed up.
Required: false
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
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 ID of the backup plan.
Value:
Fn::GetAtt:
- OssBackupPlan
- PlanId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"CrossAccountUserId": {
"Type": "String",
"Description": {
"en": "The original account ID of the cross account backup managed by the current account."
},
"Required": false
},
"Bucket": {
"Type": "String",
"Description": {
"en": "The name of OSS bucket."
},
"Required": true
},
"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
},
"Prefix": {
"Type": "String",
"Description": {
"en": "Backup prefix. Once specified, only objects with matching prefixes will be backed up."
},
"Required": false
},
"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
}
},
"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 ID of the backup plan.",
"Value": {
"Fn::GetAtt": [
"OssBackupPlan",
"PlanId"
]
}
}
}
}
该文章对您有帮助吗?