Tous les produits
Search
Centre de documentation

Resource Orchestration Service:ALIYUN::ENS::NetworkAcl

Dernière mise à jour :Aug 10, 2026

La ressource ALIYUN::ENS::NetworkAcl crée une liste de contrôle d'accès réseau (ACL) pour Edge Node Service (ENS).

Syntaxe

{
  "Type": "ALIYUN::ENS::NetworkAcl",
  "Properties": {
    "AclEntries": List,
    "Description": String,
    "NetworkAclName": String
  }
}

Propriétés

Propriété

Type

Obligatoire

Modifiable

Description

Contrainte

AclEntries

List

Non

Oui

Règles de la liste de contrôle d'accès réseau.

Vous pouvez configurer jusqu'à 40 règles. Pour plus d'informations, consultez les propriétés AclEntries.

Description

String

Non

Non

Description de la liste de contrôle d'accès réseau.

La description doit comporter entre 1 et 256 caractères. Elle ne peut pas commencer par http:// ni par https://.

NetworkAclName

String

Non

Non

Nom de la liste de contrôle d'accès réseau.

Le nom doit comporter entre 1 et 128 caractères. Il ne peut pas commencer par http:// ni par https://.

Syntaxe AclEntries

"AclEntries": [
  {
    "Policy": String,
    "PortRange": String,
    "Description": String,
    "Priority": Integer,
    "CidrBlock": String,
    "Protocol": String,
    "NetworkAclEntryName": String,
    "Direction": String
  }
]

Propriétés AclEntries

Propriété

Type

Obligatoire

Modifiable

Description

Contrainte

CidrBlock

String

Oui

Oui

Bloc CIDR source.

Aucune.

Direction

String

Oui

Oui

Direction de la règle.

Valeurs valides :

  • ingress : entrant

  • egress : sortant

Policy

String

Oui

Oui

Action à appliquer au trafic réseau correspondant.

Valeurs valides :

  • accept : autorise le trafic réseau.

  • drop : refuse le trafic réseau.

PortRange

String

Oui

Oui

Plage de ports.

  • Valeur valide lorsque Protocol est défini sur all ou icmp : -1/-1. Cette valeur indique tous les ports.

  • Format de valeur lorsque Protocol est défini sur tcp ou udp : X/Y. X spécifie le port de début et Y spécifie le port de fin. Les valeurs X et Y vont de 1 à 65535. Par exemple, 1/200 spécifie les ports 1 à 200 et 80/80 spécifie le port 80.

Priority

Integer

Oui

Oui

Priorité de la règle.

Valeurs valides : 1 à 100. Valeur par défaut : 1.

Protocol

String

Oui

Oui

Type de protocole.

Valeurs valides :

  • icmp

  • tcp

  • udp

  • all

Description

String

Non

Non

Description de la liste de contrôle d'accès réseau.

La description doit comporter entre 1 et 256 caractères. Elle ne peut pas commencer par http:// ni par https://.

NetworkAclEntryName

String

Non

Non

Nom de la règle.

Le nom doit comporter entre 1 et 128 caractères et ne peut pas commencer par http:// ni par https://.

Valeurs de retour

Fn::GetAtt

NetworkAclId : ID de la liste de contrôle d'accès réseau.

Exemples

Format YAML

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  AclEntries:
    AssociationPropertyMetadata:
      Parameters:
        Policy:
          Type: String
          Description:
            en: |-
              The action that is performed on network traffic that matches the rule. Valid values: 
              accept: allows network traffic.
              drop: blocks network traffic.
          AllowedValues:
            - accept
            - drop
          Required: true
        PortRange:
          Type: String
          Description:
            en: The port range. If you set Protocol to all or icmp, set this parameter to -1/-1, which specifies all ports. If you set Protocol to tcp or udp, the port can be 1 to 65535. You can set this parameter to 1/200 or 80/80, which specifies ports 1 to 200 or port 80.
          Required: true
        Description:
          AssociationProperty: TextArea
          Type: String
          Description:
            en: The description of the network ACL. The description must be 1 to 256 characters in length and cannot start with http:// or https://.
          Required: false
        Priority:
          Type: Number
          Description:
            en: 'The priority of the rule. Valid values: 1 to 100. Default value: 1.'
          Required: true
          MinValue: 1
          MaxValue: 100
        CidrBlock:
          Type: String
          Description:
            en: The source CIDR block.
          Required: true
        NetworkAclEntryName:
          Type: String
          Description:
            en: The name of the rule. The name must be 1 to 128 characters in length and cannot start with http:// or https://.
          Required: false
        Protocol:
          Type: String
          Description:
            en: |-
              The protocol. Valid values: icmp: ICMP
              tcp: TCP
              udp: UDP
              all: all protocols
          AllowedValues:
            - icmp
            - tcp
            - udp
            - all
          Required: true
        Direction:
          Type: String
          Description:
            en: |-
              Specifies whether the ACL rule controls inbound or outbound access requests. Valid values: 
              ingress
              egress
          AllowedValues:
            - ingress
            - egress
          Required: true
    AssociationProperty: List[Parameters]
    Type: Json
    Description:
      en: The entry of Network ACL.
    Required: false
    MaxLength: 40
  NetworkAclName:
    Type: String
    Description:
      en: |-
        Enter a name for the network ACL.
        The name must be 1 to 128 characters in length and cannot start with http:// or https://.
    Required: false
Resources:
  NetworkAcl:
    Type: ALIYUN::ENS::NetworkAcl
    Properties:
      AclEntries:
        Ref: AclEntries
      NetworkAclName:
        Ref: NetworkAclName
Outputs:
  NetworkAclId:
    Description: The ID of the network ACL.
    Value:
      Fn::GetAtt:
        - NetworkAcl
        - NetworkAclId

Format JSON

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "AclEntries": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "Policy": {
            "Type": "String",
            "Description": {
              "en": "The action that is performed on network traffic that matches the rule. Valid values: \naccept: allows network traffic.\ndrop: blocks network traffic."
            },
            "AllowedValues": [
              "accept",
              "drop"
            ],
            "Required": true
          },
          "PortRange": {
            "Type": "String",
            "Description": {
              "en": "The port range. If you set Protocol to all or icmp, set this parameter to -1/-1, which specifies all ports. If you set Protocol to tcp or udp, the port can be 1 to 65535. You can set this parameter to 1/200 or 80/80, which specifies ports 1 to 200 or port 80."
            },
            "Required": true
          },
          "Description": {
            "AssociationProperty": "TextArea",
            "Type": "String",
            "Description": {
              "en": "The description of the network ACL. The description must be 1 to 256 characters in length and cannot start with http:// or https://."
            },
            "Required": false
          },
          "Priority": {
            "Type": "Number",
            "Description": {
              "en": "The priority of the rule. Valid values: 1 to 100. Default value: 1."
            },
            "Required": true,
            "MinValue": 1,
            "MaxValue": 100
          },
          "CidrBlock": {
            "Type": "String",
            "Description": {
              "en": "The source CIDR block."
            },
            "Required": true
          },
          "NetworkAclEntryName": {
            "Type": "String",
            "Description": {
              "en": "The name of the rule. The name must be 1 to 128 characters in length and cannot start with http:// or https://."
            },
            "Required": false
          },
          "Protocol": {
            "Type": "String",
            "Description": {
              "en": "The protocol. Valid values: icmp: ICMP\ntcp: TCP\nudp: UDP\nall: all protocols"
            },
            "AllowedValues": [
              "icmp",
              "tcp",
              "udp",
              "all"
            ],
            "Required": true
          },
          "Direction": {
            "Type": "String",
            "Description": {
              "en": "Specifies whether the ACL rule controls inbound or outbound access requests. Valid values: \ningress\negress"
            },
            "AllowedValues": [
              "ingress",
              "egress"
            ],
            "Required": true
          }
        }
      },
      "AssociationProperty": "List[Parameters]",
      "Type": "Json",
      "Description": {
        "en": "The entry of Network ACL."
      },
      "Required": false,
      "MaxLength": 40
    },
    "NetworkAclName": {
      "Type": "String",
      "Description": {
        "en": "Enter a name for the network ACL.\nThe name must be 1 to 128 characters in length and cannot start with http:// or https://."
      },
      "Required": false
    }
  },
  "Resources": {
    "NetworkAcl": {
      "Type": "ALIYUN::ENS::NetworkAcl",
      "Properties": {
        "AclEntries": {
          "Ref": "AclEntries"
        },
        "NetworkAclName": {
          "Ref": "NetworkAclName"
        }
      }
    }
  },
  "Outputs": {
    "NetworkAclId": {
      "Description": "The ID of the network ACL.",
      "Value": {
        "Fn::GetAtt": [
          "NetworkAcl",
          "NetworkAclId"
        ]
      }
    }
  }
}