Template name
ACS-VPC-BulkyEnableDeletionProtection
Template description
Enables the deletion protection feature for multiple virtual private clouds (VPCs) at a time.
Template type
Automated
Owner
Alibaba Cloud
Input parameters
Parameter | Description | Type | Required | Default value | Limit |
instanceIds | The IDs of the VPCs. | List | Yes | ||
regionId | The region ID. | String | No | {{ ACS::RegionId }} | |
type | The type of the instances for which you want to enable the deletion protection feature. | String | No | NATGW | |
protectionEnable | Specifies whether to enable the deletion protection feature. | Boolean | No | True | |
rateControl | The rate control settings. | Json | No | {'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10} | |
OOSAssumeRole | The Resource Access Management (RAM) role that is assumed by CloudOps Orchestration Service (OOS). | String | No | "" |
Output parameters
None
Permission policy that is required to execute the template
{
"Version": "1",
"Statement": [
{
"Action": [
"vpc:DeletionProtection"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
References
For more information, see ACS-VPC-BulkyEnableDeletionProtection at GitHub.
Template content
FormatVersion: OOS-2019-06-01
Description:
en: Bulky enable deletion protection for instances
name-en: ACS-VPC-BulkyEnableDeletionProtection
categories:
- security
Parameters:
regionId:
Type: String
Label:
en: RegionId
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
type:
Label:
en: Type
Type: String
AllowedValues:
- EIP
- CBWP
- NATGW
Default: NATGW
instanceIds:
Label:
en: InstanceIds
Type: List
protectionEnable:
Label:
en: ProtectionEnable
Type: Boolean
Default: true
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: enableDeletionProtection
Action: 'ACS::ExecuteApi'
Description:
en: Enables deletion protection for an instance
Properties:
Service: VPC
API: DeletionProtection
Parameters:
RegionId: '{{ regionId }}'
Type: '{{ type }}'
InstanceId: '{{ ACS::TaskLoopItem }}'
ProtectionEnable: '{{ protectionEnable }}'
Loop:
RateControl: '{{ rateControl }}'
Items: '{{ instanceIds }}'