模板名稱
ACS-RDS-BulkyModifySecurityIpsByInstanceIPArray 從RDS執行個體IP白名單分組裡刪除0.0.0.0/0
模板描述
從RDS執行個體IP白名單分組裡刪除0.0.0.0/0
模板類型
自動化
所有者
Alibaba Cloud
輸入參數
參數名稱 | 描述 | 類型 | 是否必填 | 預設值 | 約束 |
instanceId | RDS執行個體ID | String | 是 | ||
regionId | 地區ID | String | 否 | {{ ACS::RegionId }} | |
OOSAssumeRole | OOS扮演的RAM角色 | String | 否 | "" |
輸出參數
無
執行此模板需要的權限原則
{
"Version": "1",
"Statement": [
{
"Action": [
"rds:DescribeDBInstanceIPArrayList",
"rds:ModifySecurityIps"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
詳情
ACS-RDS-BulkyModifySecurityIpsByInstanceIPArray詳情
模板內容
FormatVersion: OOS-2019-06-01
Description:
en: Del 0.0.0.0/0 from the ip white list array of rds instances
zh-cn: 從RDS執行個體IP白名單分組裡刪除0.0.0.0/0
name-en: ACS-RDS-BulkyModifySecurityIpsByInstanceIPArray
name-zh-cn: 從RDS執行個體IP白名單分組裡刪除0.0.0.0/0
categories:
- security
Parameters:
regionId:
Type: String
Label:
en: RegionId
zh-cn: 地區ID
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
instanceId:
Label:
en: InstanceId
zh-cn: RDS執行個體ID
AssociationProperty: ALIYUN::RDS::Instance::InstanceId
AssociationPropertyMetadata:
RegionId: regionId
Type: String
OOSAssumeRole:
Label:
en: OOSAssumeRole
zh-cn: OOS扮演的RAM角色
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: describeDBInstanceIPArray
Action: 'ACS::ExecuteAPI'
Description:
en: Query SecurityIPList of a rds instance
zh-cn: 查詢一個RDS執行個體包含的SecurityIPList
Properties:
Service: RDS
API: DescribeDBInstanceIPArrayList
Parameters:
RegionId: '{{ regionId }}'
DBInstanceId: '{{ instanceId }}'
Outputs:
DBInstanceIPArray:
Type: List
ValueSelector: '.Items.DBInstanceIPArray[] | {"SecurityIPList": .SecurityIPList, "DBInstanceIPArrayName": .DBInstanceIPArrayName, "WhitelistNetworkType": .WhitelistNetworkType}'
- Name: modifySecurityByDBInstanceIPArray
Action: ACS::RDS::ModifySecurityIpsByInstanceIPArray
Description:
en: Query SecurityIPList of a rds instance
zh-cn: 查詢一個RDS執行個體包含的SecurityIPList
Properties:
regionId: '{{ regionId }}'
instanceId: '{{ instanceId }}'
securityIps:
'Fn::Select':
- SecurityIPList
- '{{ ACS::TaskLoopItem }}'
instanceIPArrayName:
'Fn::Select':
- DBInstanceIPArrayName
- '{{ ACS::TaskLoopItem }}'
whitelistNetworkType:
'Fn::Select':
- WhitelistNetworkType
- '{{ ACS::TaskLoopItem }}'
Loop:
Items: '{{ describeDBInstanceIPArray.DBInstanceIPArray }}'
RateControl:
Mode: Concurrency
MaxErrors: 0
Concurrency: 1