全部產品
Search
文件中心

CloudOps Orchestration Service:ACS-RDS-BulkyModifyDBInstanceSpec

更新時間:Sep 06, 2024

模板名稱

ACS-RDS-BulkyModifyDBInstanceSpec 修改RDS執行個體的配置

立即執行

模板描述

修改RDS執行個體的配置,變更提醒:

  • RDS變更配置可能涉及底層資料移轉,請您耐心等待。在遷移完成後會進行切換,切換時會出現30秒左右的閃斷,請確保應用具備重連機制。

  • 變更執行個體規格過程會根據您選擇的切換時間自動重啟執行個體,無需手動操作。

  • 雲端硬碟同儲存類型的擴容業務無感,變更配置後會將立即執行,不會等待營運視窗;本地碟及不同類型雲端硬碟擴容業務會出現閃斷,可選擇營運視窗切換。

  • 閃斷過程中,與資料庫、帳號、網路等相關的大部分操作都無法執行,因此請盡量在業務低峰期執行變更配置操作。

  • 主執行個體磁碟空間須小於等於唯讀執行個體磁碟空間

模板類型

自動化

所有者

Alibaba Cloud

輸入參數

參數名稱

描述

類型

是否必填

預設值

約束

regionId

地區ID

String

targets

目標執行個體

Json

dBInstanceStorageType

執行個體儲存類型

String

dBInstanceClass

目標執行個體規格

String

dBInstanceStorage

目標儲存空間大小

Number

effectiveTime

變更生效時間

String

Immediate

rateControl

任務執行的並發比率

Json

{'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10}

OOSAssumeRole

OOS扮演的RAM角色

String

""

輸出參數

執行此模板需要的權限原則

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "rds:DescribeDBInstanceAttribute",
                "rds:DescribeDBInstances",
                "rds:ModifyDBInstanceSpec"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

詳情

ACS-RDS-BulkyModifyDBInstanceSpec詳情

模板內容

FormatVersion: OOS-2019-06-01
Description:
  name-en: ACS-RDS-BulkyModifyDBInstanceSpec
  name-zh-cn: 修改RDS執行個體的配置
  en: |-
    <div><p>Modify the configuration of the RDS instance, change reminder:</p>
    <ul>
    <li>Changing the RDS configuration may involve the migration of underlying data, please wait patiently. After the migration is completed, the switch will be performed, and there will be a flash disconnection of about 30 seconds during the switch. Please ensure that the application has a reconnection mechanism.</li>
    <li>The instance specification change process will automatically restart the instance according to the switch time you choose, without manual operation.</li>
    <li>The expansion business of the same storage type of cloud disk is not sensitive, and it will be executed immediately after the configuration change, and will not wait for the operation and maintenance window; the expansion business of local disks and different types of cloud disks will have flash disconnections, and you can choose to switch in the operation and maintenance window.</li>
    <li>During the flash disconnection, most operations related to databases, accounts, networks, etc. cannot be performed, so please try to perform the configuration change operation during the off-peak period of the business.</li>
    <li>The disk space of the main instance must be less than or equal to the disk space of the read-only instance</li>
    </ul>
    </div>
  zh-cn: |-
    <div><p>修改RDS執行個體的配置,變更提醒:</p>
      <ul>
        <li>RDS變更配置可能涉及底層資料移轉,請您耐心等待。在遷移完成後會進行切換,切換時會出現30秒左右的閃斷,請確保應用具備重連機制。</li>
        <li>變更執行個體規格過程會根據您選擇的切換時間自動重啟執行個體,無需手動操作。</li>
        <li>雲端硬碟同儲存類型的擴容業務無感,變更配置後會將立即執行,不會等待營運視窗;本地碟及不同類型雲端硬碟擴容業務會出現閃斷,可選擇營運視窗切換。</li>
        <li>閃斷過程中,與資料庫、帳號、網路等相關的大部分操作都無法執行,因此請盡量在業務低峰期執行變更配置操作。</li>
        <li>主執行個體磁碟空間須小於等於唯讀執行個體磁碟空間</li>
      </ul>
    </div>
Parameters:
  regionId:
    Label:
      en: RegionId
      zh-cn: 地區ID
    Type: String
    AssociationProperty: ALIYUN::ECS::RegionId
  targets:
    Type: Json
    Label:
      en: TargetInstance
      zh-cn: 目標執行個體
    AssociationProperty: Targets
    AssociationPropertyMetadata:
      ResourceType: ALIYUN::RDS::Instance
      RegionId: regionId
      Status: Running
  dBInstanceStorageType:
    Type: String
    Label:
      en: DBInstanceStorageType
      zh-cn: 執行個體儲存類型
    Description:
      en: |-
        <div><p>Instance storage type, value:</p>
            <ul>
                <li><strong>local_ssd</strong>: Local SSD disk</li>
                <li><strong>cloud_essd</strong>: ESSD PL1 cloud disk</li>
                <li><strong>cloud_essd2</strong>: ESSD PL2 cloud disk</li>
                <li><strong>cloud_essd3</strong>: ESSD PL3 cloud disk</li>
                <li><strong>general_essd</strong>: General cloud disk</li>
            </ul>
        </div>
      zh-cn: |-
        <div><p>執行個體儲存類型,取值:</p>
            <ul>
                <li><strong>local_ssd</strong>:本地 SSD 盤</li>
                <li><strong>cloud_essd</strong>:ESSD PL1 雲端硬碟</li>
                <li><strong>cloud_essd2</strong>:ESSD PL2 雲端硬碟</li>
                <li><strong>cloud_essd3</strong>:ESSD PL3 雲端硬碟</li>
                <li><strong>general_essd</strong>:通用雲端硬碟</li>
            </ul>
        </div>
    AllowedValues:
      - local_ssd
      - cloud_essd
      - cloud_essd2
      - cloud_essd3
      - general_essd
  dBInstanceClass:
    Type: String
    Label:
      en: DBInstanceClass
      zh-cn: 目標執行個體規格
    AssociationProperty: ALIYUN::RDS::Instance::InstanceType
    AssociationPropertyMetadata:
      DBInstanceStorageType: ${dBInstanceStorageType}
  dBInstanceStorage:
    Type: Number
    Label:
      en: DBInstanceStorage
      zh-cn: 目標儲存空間大小
    Description:
      en: Unit:GB. You can increase the storage capacity in increments of 5 GB.
      zh-cn: 單位:GB,每 5GB 進行遞增
  effectiveTime:
    Type: String
    Label:
      en: EffectiveTime
      zh-cn: 變更生效時間
    Description:
      en: |-
        <div><p>The time when the configuration change takes effect:</p>
          <ul>
            <li><strong>Immediate</strong>: The configuration change takes effect immediately.</li>
            <li><strong>MaintainTime</strong>: The configuration change takes effect during the maintenance window.</li>
          </ul>
        </div>
      zh-cn: |-
        <div><p>配置變更生效時間:</p>
          <ul>
            <li><strong>Immediate</strong>:配置變更生效立即生效。</li>
            <li><strong>MaintainTime</strong>:配置變更生效於維護時間段。</li>
          </ul>
        </div>
    AllowedValues:
      - Immediate
      - MaintainTime
    Default: Immediate
  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
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: getInstance
    Description:
      en: Get the RDS instances
      zh-cn: 擷取RDS執行個體
    Action: ACS::SelectTargets
    Properties:
      ResourceType: ALIYUN::RDS::Instance
      RegionId: '{{ regionId }}'
      Filters:
        - '{{ targets }}'
    Outputs:
      instanceIds:
        Type: List
        ValueSelector: Instances.Instance[].InstanceId
  - Name: modifyDBInstanceSpec
    Action: ACS::RDS::ModifyDBInstanceSpec
    Description:
      en: Modify RDS instance spec
      zh-cn: 變更RDS執行個體
    Properties:
      regionId: '{{ regionId }}'
      dBInstanceId: '{{ ACS::TaskLoopItem }}'
      dBInstanceClass: '{{ dBInstanceClass }}'
      dBInstanceStorage: '{{ dBInstanceStorage }}'
      dBInstanceStorageType: '{{ dBInstanceStorageType }}'
      effectiveTime: '{{ effectiveTime }}'
    Loop:
      RateControl: '{{ rateControl }}'
      Items: '{{ getInstance.instanceIds }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - regionId
          - targets
        Label:
          default:
            zh-cn: 選擇執行個體
            en: Select RDS Instances
      - Parameters:
          - dBInstanceStorageType
          - dBInstanceClass
          - dBInstanceStorage
          - effectiveTime
        Label:
          default:
            zh-cn: 配置參數
            en: Configuration
      - Parameters:
          - rateControl
          - OOSAssumeRole
        Label:
          default:
            zh-cn: 進階選項
            en: Control Options