テンプレート名
ACS-VPC-BulkyDeleteForwardEntry は、NAT Gateway の DNAT マッピングから脅威として識別された指定のポートを削除します。
テンプレートの説明
NAT Gateway の DNAT エントリを使用してマッピングされた高リスクポートを削除します。
テンプレートタイプ
自動化
所有者
Alibaba Cloud
入力パラメータ
パラメータ | 説明 | タイプ | 必須 | デフォルト値 | 制限 |
instanceId | NAT ゲートウェイの ID。 | String | はい | ||
port | リスクの高いポート。 | List | はい | ||
regionId | リージョン ID。 | String | いいえ | {{ ACS::RegionId }} | |
rateControl | タスク実行の同時実行レート | Json | いいえ | {'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10} | |
OOSAssumeRole | CloudOps Orchestration Service (OOS) がアシュームする Resource Access Management (RAM) ロール。 | String | いいえ | "" |
出力パラメータ
なし
テンプレートを実行するために必要な権限ポリシー
{
"Version": "1",
"Statement": [
{
"Action": [
"vpc:DeleteForwardEntry",
"vpc:DescribeForwardTableEntries",
"vpc:DescribeNatGateways"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
詳細
詳細については、GitHub の ACS-VPC-BulkyDeleteForwardEntry.yml をご参照ください。
テンプレートコンテンツ
FormatVersion: OOS-2019-06-01
Description:
en: Deletes the specified high-risk ports mapped on the DNAT table.
zh-cn: Deletes the specified high-risk ports mapped on the DNAT table.
ja: DNAT テーブルにマッピングされた指定の高リスクポートを削除します。
name-en: ACS-VPC-BulkyDeleteForwardEntry
name-zh-cn: ACS-VPC-BulkyDeleteForwardEntry
categories:
- security
Parameters:
regionId:
Label:
en: Region ID
zh-cn: Region ID
ja: リージョン ID
Type: String
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
instanceId:
Label:
en: The instance ID of the NAT Gateway.
zh-cn: The instance ID of the NAT Gateway.
ja: NAT Gateway のインスタンス ID。
Type: String
port:
Label:
en: The high-risk port (backend port)
zh-cn: The high-risk port (backend port)
ja: 高リスクポート (バックエンドポート)
Type: List
rateControl:
Label:
en: Rate Control
zh-cn: Concurrency rate for task execution
ja: レート制御
Type: Json
AssociationProperty: RateControl
Default:
Mode: Concurrency
MaxErrors: 0
Concurrency: 10
OOSAssumeRole:
Label:
en: OOSAssumeRole
zh-cn: The RAM role that OOS assumes
ja: OOSAssumeRole
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: describeNatGateways
Action: ACS::ExecuteAPI
Description:
en: Queries the DNAT table ID of the NAT Gateway instance.
zh-cn: Queries the DNAT table ID of the NAT Gateway instance.
ja: NAT Gateway インスタンスの DNAT テーブル ID を照会します。
Properties:
Service: VPC
API: DescribeNatGateways
Parameters:
RegionId: '{{ regionId }}'
NatGatewayId: '{{ instanceId }}'
Outputs:
ForwardTableIds:
Type: String
ValueSelector: .NatGateways.NatGateway[].ForwardTableIds.ForwardTableId[]
- Name: describeForwardTableEntries
Action: ACS::ExecuteAPI
Description:
en: Queries the IDs of DNAT entries that match the high-risk ports.
zh-cn: Queries the IDs of DNAT entries that match the high-risk ports.
ja: 高リスクポートに一致する DNAT エントリの ID を照会します。
Properties:
Service: VPC
API: DescribeForwardTableEntries
Parameters:
RegionId: '{{ regionId }}'
ForwardTableId: '{{ describeNatGateways.ForwardTableIds }}'
InternalPort: '{{ ACS::TaskLoopItem }}'
Loop:
RateControl: '{{ rateControl }}'
Items: '{{ port }}'
Outputs:
ForwardEntryId-all:
AggregateType: Fn::ListJoin
AggregateField: ForwardEntryId
Outputs:
ForwardEntryId:
Type: Json
ValueSelector: .ForwardTableEntries.ForwardTableEntry[].ForwardEntryId
- Name: deleteForwardEntry
Action: ACS::ExecuteAPI
Description:
en: Deletes the specified high-risk ports mapped on the DNAT table.
zh-cn: Deletes the specified high-risk ports mapped on the DNAT table.
ja: DNAT テーブルにマッピングされた指定の高リスクポートを削除します。
Properties:
Service: VPC
API: DeleteForwardEntry
Parameters:
RegionId: '{{ regionId }}'
ForwardEntryId: '{{ ACS::TaskLoopItem }}'
ForwardTableId: '{{ describeNatGateways.ForwardTableIds }}'
Loop:
Items:
'Fn::Jq':
- All
- '.[] | (select(. != null))'
- '{{ describeForwardTableEntries.ForwardEntryId-all }}'
RateControl:
Mode: Concurrency
MaxErrors: 0
Concurrency: 1
Metadata:
ALIYUN::OOS::Interface:
ParameterGroups:
- Parameters:
- port
Label:
default:
zh-cn: Configure Parameters
en: Configure Parameters
ja: パラメーターの設定
- Parameters:
- regionId
- instanceId
Label:
default:
zh-cn: Select Instance
en: Select Instance
ja: インスタンスの選択
- Parameters:
- rateControl
- OOSAssumeRole
Label:
default:
zh-cn: Advanced Options
en: Advanced Options
ja: 詳細オプション