模板名稱
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
文檔內容是否對您有幫助?