模板名稱
ACS-ADB-EnableBackupPolicy 開啟ADB執行個體的自動備份策略
模板描述
開啟ADB執行個體的自動備份策略。
模板類型
自動化
所有者
Alibaba Cloud
輸入參數
參數名稱 | 描述 | 類型 | 是否必填 | 預設值 | 約束 |
instanceId | ADB執行個體ID | String | 是 | ||
OOSAssumeRole | OOS扮演的RAM角色 | String | 是 | ||
regionId | 地區ID | String | 否 | {{ ACS::RegionId }} | |
rateControl | 任務執行的並發比率 | Json | 否 | {'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10} |
輸出參數
無
執行此模板需要的權限原則
{
"Version": "1",
"Statement": [
{
"Action": [
"adb:DescribeBackupPolicy",
"adb:ModifyBackupPolicy"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
詳情
模板內容
FormatVersion: OOS-2019-06-01
Description:
en: Enable adb instance's backup policy.
zh-cn: 開啟ADB執行個體的自動備份策略。
name-en: ACS-ADB-EnableBackupPolicy
name-zh-cn: 開啟ADB執行個體的自動備份策略
categories:
- security
Parameters:
regionId:
Label:
en: RegionId
zh-cn: 地區ID
Type: String
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
instanceId:
Label:
en: The instance id
zh-cn: ADB執行個體ID
Type: String
rateControl:
Label:
en: RateControl
zh-cn: 任務執行的並發比率
Type: Json
AssociationProperty: RateControl
Default:
Mode: Concurrency
MaxErrors: 0
Concurrency: 10
OOSAssumeRole:
Label:
en: OOSAssumeRole
zh-cn: OOS扮演的RAM角色
Type: String
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: describeBackupPolicy
Action: ACS::ExecuteAPI
Description:
en: Describe adb instance's backup policy.
zh-cn: 查看叢集備份設定
Properties:
Service: ADB
API: DescribeBackupPolicy
Parameters:
RegionId: '{{ regionId }}'
DBClusterId: '{{ instanceId }}'
Outputs:
PreferredBackupTime:
Type: String
ValueSelector: .PreferredBackupTime
PreferredBackupPeriod:
Type: String
ValueSelector: .PreferredBackupPeriod
BackupRetentionPeriod:
Type: String
ValueSelector: .BackupRetentionPeriod
LogBackupRetentionPeriod:
Type: String
ValueSelector: .LogBackupRetentionPeriod
- Name: modifyBackupPolicy
Action: ACS::ExecuteAPI
Description:
en: enable adb instance's backup policy.
zh-cn: 開啟AnalyticDB MySQL版執行個體的備份策略
Properties:
Service: ADB
API: ModifyBackupPolicy
Parameters:
RegionId: '{{ regionId }}'
DBClusterId: '{{ instanceId }}'
PreferredBackupTime: '{{ describeBackupPolicy.PreferredBackupTime }}'
PreferredBackupPeriod: '{{ describeBackupPolicy.PreferredBackupPeriod }}'
BackupRetentionPeriod: '{{ describeBackupPolicy.BackupRetentionPeriod }}'
LogBackupRetentionPeriod: '{{ describeBackupPolicy.LogBackupRetentionPeriod }}'
EnableBackupLog: Enable
Metadata:
ALIYUN::OOS::Interface:
ParameterGroups:
- Parameters:
- regionId
- instanceId
Label:
default:
zh-cn: 選擇執行個體
en: Select Instance
- Parameters:
- rateControl
- OOSAssumeRole
Label:
default:
zh-cn: 進階選項
en: Control Options