Tous les produits
Search
Centre de documentation

CloudOps Orchestration Service:ACS-VPC-BulkyDeleteForwardEntry

Dernière mise à jour :Aug 11, 2026

Supprimez en masse les ports à risque élevé des mappages DNAT sur une passerelle NAT.

Nom du modèle

Le modèle ACS-VPC-BulkyDeleteForwardEntry supprime les ports à risque élevés spécifiés dans les mappages DNAT d'une passerelle NAT.

Exécuter maintenant

Description du modèle

Supprime les ports à risque élevé mappés par les entrées DNAT sur une passerelle NAT.

Type de modèle

Automatisé

Propriétaire

Alibaba Cloud

Paramètres d'entrée

Paramètre

Description

Type

Obligatoire

Valeur par défaut

Limite

instanceId

ID de la passerelle NAT.

String

Oui

port

Port à risque élevé.

List

Oui

regionId

ID de la région.

String

Non

{{ ACS::RegionId }}

rateControl

Taux de concurrence pour l'exécution des tâches.

Json

Non

{'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10}

OOSAssumeRole

Rôle RAM endossé par le service CloudOps Orchestration Service (OOS).

String

Non

""

Paramètres de sortie

Aucun

Politique d'autorisation requise pour exécuter le modèle

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "vpc:DeleteForwardEntry",
                "vpc:DescribeForwardTableEntries",
                "vpc:DescribeNatGateways"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

Détails

Pour plus d'informations, consultez le fichier ACS-VPC-BulkyDeleteForwardEntry.yml sur GitHub.

Contenu du modèle

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.
  name-en: ACS-VPC-BulkyDeleteForwardEntry
  name-zh-cn: ACS-VPC-BulkyDeleteForwardEntry
  categories:
    - security
Parameters:
  regionId:
    Label:
      en: Region ID
      zh-cn: Region 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.
    Type: String
  port:
    Label:
      en: The high-risk port (backend port)
      zh-cn: The high-risk port (backend port)
    Type: List
  rateControl:
    Label:
      en: Rate Control
      zh-cn: Concurrency rate for task execution
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  OOSAssumeRole:
    Label:
      en: OOSAssumeRole
      zh-cn: The RAM role that OOS assumes
    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.
    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.
    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.
    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
      - Parameters:
          - regionId
          - instanceId
        Label:
          default:
            zh-cn: Select Instance
            en: Select Instance
      - Parameters:
          - rateControl
          - OOSAssumeRole
        Label:
          default:
            zh-cn: Advanced Options
            en: Advanced Options