Enables modification protection for multiple Server Load Balancer (SLB) instances in bulk to prevent accidental configuration changes.
Template name
ACS-SLB-BulkySetLoadBalancerModificationProtection
Template description
Enables the configuration read-only mode for multiple Server Load Balancer (SLB) instances at a time.
Template type
Automated
Owner
Alibaba Cloud
Input parameters
|
Parameter |
Description |
Type |
Required |
Default value |
Limit |
|
loadBalancerIds |
The IDs of the SLB instances. |
List |
Yes |
||
|
regionId |
The region ID. |
String |
No |
{{ ACS::RegionId }} |
|
|
rateControl |
The rate control settings. |
Json |
No |
{'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10} |
|
|
OOSAssumeRole |
The RAM role assumed by CloudOps Orchestration Service (OOS) to execute this template. |
String |
No |
"" |
Output parameters
None
Permission policy that is required to execute the template
{
"Version": "1",
"Statement": [
{
"Action": [
"slb:SetLoadBalancerModificationProtection"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
References
For more information, see ACS-SLB-BulkySetLoadBalancerModificationProtection at GitHub.
Template content
FormatVersion: OOS-2019-06-01
Description:
en: Set loadbalancer modification protection
name-en: ACS-SLB-BulkySetLoadBalancerModificationProtection
categories:
- security
Parameters:
regionId:
Type: String
Label:
en: RegionId
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
loadBalancerIds:
Label:
en: LoadBalancerIds
Type: List
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: setLoadBalancerModificationProtection
Action: 'ACS::ExecuteAPI'
Description:
en: Set loadbalancer modification protection
Properties:
Service: SLB
API: SetLoadBalancerModificationProtection
Parameters:
RegionId: '{{ regionId }}'
LoadBalancerId: '{{ ACS::TaskLoopItem }}'
ModificationProtectionStatus: ConsoleProtection
Loop:
RateControl: '{{ rateControl }}'
Items: '{{ loadBalancerIds }}'