全部產品
Search
文件中心

CloudOps Orchestration Service:ACS-ADB-EnableBackupPolicy

更新時間:Sep 06, 2024

模板名稱

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

詳情

ACS-ADB-EnableBackupPolicy詳情

模板內容

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