All Products
Search
Document Center

CloudOps Orchestration Service:ACS-RDS-BulkyModifyDBInstanceSpec

Last Updated:Dec 22, 2025

Template name

ACS-RDS-BulkyModifyDBInstanceSpec: Modifies the configuration of multiple RDS instances

Execute Now

Template description

Modifies the configuration of an ApsaraDB RDS instance. Note the following:

  • The upgrade may cause a migration of underlying data. After the migration is complete, a switchover of your workloads is triggered. During the switchover, a transient connection interruption lasts approximately 30 seconds. Make sure that your application is configured to automatically reconnect to your RDS instance.

  • During the specifications change, your instance is automatically restarted based on the switchover time that you specify.

  • If your instance uses cloud disks and you do not change the storage type during the specifications change, your workloads are not affected when you expand the storage capacity. After the specifications change is complete, your workloads are immediately switched over. If your instance uses local disks or you change the storage type between cloud disks during the specifications change, a transient connection interruption occurs when you expand the storage capacity. After the specifications change is complete, you can switch over your workloads during the maintenance window.

  • During the transient connection interruption, you cannot perform most of the operations that are related to databases, accounts, and network settings. We recommend that you change instance specifications during off-peak hours.

  • The storage capacity of the primary instance must be less than or equal to that of its read-only instances.

Template type

Automated

Owner

Alibaba Cloud

Input parameters

Parameter

Description

Data type

Required

Default value

Limit

regionId

The region ID.

String

Yes

targets

The destination instances.

Json

Yes

dBInstanceStorageType

The storage type of the instances.

String

Yes

dBInstanceClass

The type of the destination instances.

String

Yes

dBInstanceStorage

The storage capacity of the destination instances.

Number

Yes

effectiveTime

The time when the modifications take effect.

String

No

Immediate

direction

The type of configuration change for the instance.

String

No

Up

rateControl

OOS RAM role

Json

No

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

OOSAssumeRole

The RAM role that is assumed by CloudOps Orchestration Service (OOS).

String

No

""

Output parameters

N/A.

Permission policy that is required to execute the template

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

Details

ACS-RDS-BulkyModifyDBInstanceSpec

Template content

FormatVersion: OOS-2019-06-01
Description:
  name-en: ACS-RDS-BulkyModifyDBInstanceSpec
  name-zh-cn: Modify the configuration of an RDS instance
  en: |-
    <div><p>Modifies the configuration of an ApsaraDB RDS instance. Note the following reminders:</p>
    <ul>
    <li>Changing the RDS configuration may involve underlying data migration. After the migration is complete, a switchover occurs. The switchover causes a transient disconnection that lasts about 30 seconds. Make sure your application has a reconnection mechanism.</li>
    <li>When you change the instance type, the instance automatically restarts based on the switchover time that you specify. No manual operation is required.</li>
    <li>Expanding a disk of the same storage type does not affect your services. The change takes effect immediately and does not wait for the O&M window. Expanding a local SSD or changing the disk type causes a transient disconnection. You can choose to switch over during the O&M window.</li>
    <li>During the transient disconnection, most operations related to databases, accounts, and networks cannot be performed. Change the instance specifications during off-peak hours.</li>
    <li>The disk space of the primary instance must be less than or equal to the disk space of its read-only instances.</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: Region ID
      zh-cn: 地域ID
    Type: String
    AssociationProperty: ALIYUN::ECS::RegionId
  targets:
    Type: Json
    Label:
      en: Target Instance
      zh-cn: 目标实例
    AssociationProperty: Targets
    AssociationPropertyMetadata:
      ResourceType: ALIYUN::RDS::Instance
      RegionId: regionId
      Status: Running
  dBInstanceStorageType:
    Type: String
    Label:
      en: Instance Storage Type
      zh-cn: 实例储存类型
    Description:
      en: |-
        <div><p>The storage type of the instance. Valid values:</p>
            <ul>
                <li>local_ssd: Local SSD</li>
                <li>cloud_essd: ESSD PL1 disk</li>
                <li>cloud_essd2: ESSD PL2 disk</li>
                <li>cloud_essd3: ESSD PL3 disk</li>
                <li>general_essd: General-purpose ESSD</li>
            </ul>
        </div>
      zh-cn: |-
        <div><p>实例储存类型,取值: </p>
            <ul>
                <li>local_ssd: 本地 SSD 盘</li>
                <li>cloud_essd: ESSD PL1 云盘</li>
                <li>cloud_essd2: ESSD PL2 云盘</li>
                <li>cloud_essd3: ESSD PL3 云盘</li>
                <li>general_essd: 通用云盘</li>
            </ul>
        </div>
    AllowedValues:
      - local_ssd
      - cloud_essd
      - cloud_essd2
      - cloud_essd3
      - general_essd
  dBInstanceClass:
    Type: String
    Label:
      en: Target Instance Type
      zh-cn: 目标实例规格
    AssociationProperty: ALIYUN::RDS::Instance::InstanceType
    AssociationPropertyMetadata:
      DBInstanceStorageType: ${dBInstanceStorageType}
  dBInstanceStorage:
    Type: Number
    Label:
      en: Target Storage Capacity
      zh-cn: 目标存储空间大小
    Description:
      en: The unit is GB. The storage capacity increases in 5 GB increments.
      zh-cn: 单位: GB,每 5GB 进行递增
  effectiveTime:
    Type: String
    Label:
      en: Effective Time
      zh-cn: 变更生效时间
    Description:
      en: |-
        <div><p>The time when the configuration change takes effect:</p>
          <ul>
            <li>Immediate: The configuration change takes effect immediately.</li>
            <li>MaintainTime: The configuration change takes effect during the maintenance window.</li>
          </ul>
        </div>
      zh-cn: |-
        <div><p>配置变更生效时间:</p>
          <ul>
            <li>Immediate: 配置变更生效立即生效。</li>
            <li>MaintainTime: 配置变更生效于维护时间段。</li>
          </ul>
        </div>
    AllowedValues:
      - Immediate
      - MaintainTime
    Default: Immediate
  direction:
    Type: String
    Label:
      en: Direction
      zh-cn: 实例变配类型
    Description:
      en: If you only change the DBInstanceStorageType parameter, for example, from a standard SSD to an ESSD, leave this parameter empty.
      zh-cn: 如果仅变更 DBInstanceStorageType 参数,例如将 SSD 云盘变更为 ESSD 云盘,则此参数留空。
    AllowedValues:
      - Up
      - Down
      - TempUpgrade
      - Serverless
    Default: Up
  rateControl:
    Label:
      en: Concurrency Rate
      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 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
      zh-cn: 变更RDS实例
    Properties:
      regionId: '{{ regionId }}'
      dBInstanceId: '{{ ACS::TaskLoopItem }}'
      dBInstanceClass: '{{ dBInstanceClass }}'
      dBInstanceStorage: '{{ dBInstanceStorage }}'
      dBInstanceStorageType: '{{ dBInstanceStorageType }}'
      effectiveTime: '{{ effectiveTime }}'
      direction: '{{ direction }}'
    Loop:
      RateControl: '{{ rateControl }}'
      Items: '{{ getInstance.instanceIds }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - regionId
          - targets
        Label:
          default:
            zh-cn: 选择实例
            en: Select Instances
      - Parameters:
          - dBInstanceStorageType
          - dBInstanceClass
          - dBInstanceStorage
          - effectiveTime
          - direction
        Label:
          default:
            zh-cn: 配置参数
            en: Configure Parameters
      - Parameters:
          - rateControl
          - OOSAssumeRole
        Label:
          default:
            zh-cn: 高级选项
            en: Advanced Options