Tüm Ürünler
Search
Belge Merkezi

Resource Orchestration Service:ALIYUN::ENS::NetworkAcl

Son Güncelleme:Oct 05, 2026

ALIYUN::ENS::NetworkAcl, Edge Node Service (ENS) için bir ağ erişim kontrol listesi (ACL) oluşturur.

Sözdizimi

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

Özellikler


Özellik


Tür


Gerekli


Düzenlenebilir


Açıklama


Kısıtlama


AclEntries


List


No


Yes


Ağ ACL'sinin kuralları.


En fazla 40 kural yapılandırabilirsiniz. Daha fazla bilgi için bkz. AclEntries özellikleri.


Description


String


No


No


Ağ ACL'sinin açıklaması.


Açıklama 1 ila 256 karakter uzunluğunda olmalıdır. http:// veya https:// ile başlayamaz.


NetworkAclName


String


No


No


Ağ ACL'sinin adı.


Ad 1 ila 128 karakter uzunluğunda olmalıdır. http:// veya https:// ile başlayamaz.

AclEntries sözdizimi

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

AclEntries özellikleri

Özellik

Tür

Gerekli

Düzenlenebilir

Açıklama

Kısıtlama

CidrBlock

String

Evet

Evet

Kaynak CIDR bloğu.

Yok.

Direction

String

Evet

Evet

Kuralın yönü.

Geçerli değerler:

  • ingress: gelen

  • egress: giden

Policy

String

Evet

Evet

Eşleşen ağ trafiğinde uygulanacak eylem.

Geçerli değerler:

  • accept: ağ trafiğine izin verir.

  • drop: ağ trafiğini engeller.

PortRange

String

Evet

Evet

Bağlantı noktası aralığı.

  • Protocol değeri all veya icmp olarak ayarlandığında geçerli değer: -1/-1. -1/-1 değeri tüm bağlantı noktalarını belirtir.

  • Protocol değeri tcp veya udp olarak ayarlandığında değer biçimi: X/Y. X başlangıç bağlantı noktasını ve Y bitiş bağlantı noktasını belirtir. X ve Y değerleri 1 ila 65535 arasındadır. Örneğin, 1/200 1. bağlantı noktasından 200. bağlantı noktasına kadar olanları ve 80/80 80. bağlantı noktasını belirtir.

Priority

Integer

Evet

Evet

Kuralın önceliği.

Geçerli değerler: 1 ila 100. Varsayılan değer: 1.

Protocol

String

Evet

Evet

Protokol türü.

Geçerli değerler:

  • icmp

  • tcp

  • udp

  • all

Description

String

Hayır

Hayır

Ağ ACL'sinin açıklaması.

Açıklama 1 ila 256 karakter uzunluğunda olmalıdır. http:// veya https:// ile başlayamaz.

NetworkAclEntryName

String

Hayır

Hayır

Kural adı.

Ad 1 ila 128 karakter uzunluğunda olmalıdır ve http:// veya https:// ile başlayamaz.

Dönüş değerleri

Fn::GetAtt

NetworkAclId: Ağ ACL'sinin kimliği.

Örnekler

YAML biçimi

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

JSON biçimi

{
  "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"
        ]
      }
    }
  }
}