Enables a WAF protection module for multiple domains in bulk.
Template name
ACS-WAF-BulkyModifyProtectionModuleStatus
Template description
Enables a Web Application Firewall (WAF) protection module.
Template type
Automated
Owner
Alibaba Cloud
Input parameters
|
Parameter |
Description |
Type |
Required |
Default value |
Limit |
|
domains |
Domain names to protect. |
List |
Yes |
||
|
instanceId |
WAF instance ID. |
String |
Yes |
||
|
defenseType |
WAF protection module to enable. |
String |
Yes |
||
|
regionId |
Region ID. |
String |
No |
{{ ACS::RegionId }} |
|
|
rateControl |
Rate control settings. |
Json |
No |
{'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10} |
|
|
OOSAssumeRole |
RAM role assumed by OOS. |
String |
No |
"" |
Output parameters
None
Required permissions
{
"Version": "1",
"Statement": [
{
"Action": [
"waf-openapi:ModifyProtectionModuleStatus"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
References
View the template source on GitHub: ACS-WAF-BulkyModifyProtectionModuleStatus.
Template content
FormatVersion: OOS-2019-06-01
Description:
en: Modify protection module status
name-en: ACS-WAF-BulkyModifyProtectionModuleStatus
categories:
- security
Parameters:
regionId:
Type: String
Label:
en: RegionId
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
domains:
Type: List
Label:
en: Domains
instanceId:
Label:
en: InstanceId
Type: String
defenseType:
Label:
en: DefenseType
Type: String
AllowedValues:
- waf
- ac_cc
- tamperproof
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: modifyProtectionModuleStatus
Action: ACS::ExecuteAPI
Description:
en: Modify protection module status
Properties:
Service: WAF-OPENAPI
API: ModifyProtectionModuleStatus
Parameters:
RegionId: '{{ regionId }}'
DefenseType: '{{ defenseType }}'
Domain: '{{ ACS::TaskLoopItem }}'
InstanceId: '{{ instanceId }}'
ModuleStatus: 1
Loop:
RateControl: '{{ rateControl }}'
Items: '{{ domains }}'