Template name
ACS-RDS-BulkyModifyDBInstanceSpec
Template description
Modifies the configurations of ApsaraDB RDS instances. Modification reminders:
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 | |
rateControl | The rate control settings. | 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"
}
]
}
References
ACS-RDS-BulkyModifyDBInstanceSpec
Template content
FormatVersion: OOS-2019-06-01
Description:
name-en: ACS-RDS-BulkyModifyDBInstanceSpec
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>
Parameters:
regionId:
Label:
en: RegionId
Type: String
AssociationProperty: ALIYUN::ECS::RegionId
targets:
Type: Json
Label:
en: TargetInstance
AssociationProperty: Targets
AssociationPropertyMetadata:
ResourceType: ALIYUN::RDS::Instance
RegionId: regionId
Status: Running
dBInstanceStorageType:
Type: String
Label:
en: DBInstanceStorageType
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>
AllowedValues:
- local_ssd
- cloud_essd
- cloud_essd2
- cloud_essd3
- general_essd
dBInstanceClass:
Type: String
Label:
en: DBInstanceClass
AssociationProperty: ALIYUN::RDS::Instance::InstanceType
AssociationPropertyMetadata:
DBInstanceStorageType: ${dBInstanceStorageType}
dBInstanceStorage:
Type: Number
Label:
en: DBInstanceStorage
Description:
en: Unit:GB. You can increase the storage capacity in increments of 5 GB.
effectiveTime:
Type: String
Label:
en: EffectiveTime
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>
AllowedValues:
- Immediate
- MaintainTime
Default: Immediate
rateControl:
Label:
en: RateControl
Type: Json
AssociationProperty: RateControl
Default:
Mode: Concurrency
MaxErrors: 0
Concurrency: 10
OOSAssumeRole:
Label:
en: OOSAssumeRole
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: getInstance
Description:
en: Get the RDS instances
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
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:
en: Select RDS Instances
- Parameters:
- dBInstanceStorageType
- dBInstanceClass
- dBInstanceStorage
- effectiveTime
Label:
default:
en: Configuration
- Parameters:
- rateControl
- OOSAssumeRole
Label:
default:
en: Control Options