All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::SAG::ACLRule

Last Updated:Jun 03, 2026

Tipe resource ALIYUN::SAG::ACLRule digunakan untuk menambahkan aturan kontrol akses.

Sintaks

{
  "Type": "ALIYUN::SAG::ACLRule",
  "Properties": {
    "Direction": String,
    "Description": String,
    "AclId": String,
    "SourceCidr": String,
    "DestCidr": String,
    "Priority": Integer,
    "DestPortRange": String,
    "Policy": String,
    "IpProtocol": String,
    "SourcePortRange": String,
    "Type": String,
    "DpiSignatureIds": List,
    "Name": String,
    "DpiGroupIds": List
  }
}

Properti

Nama properti

Tipe

Wajib

Pembaruan diizinkan

Deskripsi

Batasan

Direction

String

Ya

Ya

Arah aturan.

Nilai yang valid:

  • in: traffic inbound dari jaringan eksternal ke cabang lokal SAG.

  • out: traffic outbound dari cabang lokal SAG ke jaringan eksternal.

Description

String

Tidak

Ya

Deskripsi aturan.

1 hingga 512 karakter.

AclId

String

Ya

Tidak

ID instans Resource Access Management (RAM).

Tidak ada

SourceCidr

String

Ya

Ya

Blok CIDR sumber.

Format CIDR. Contoh: 192.168.1.0/24.

DestCidr

String

Ya

Ya

Blok CIDR tujuan.

Format CIDR. Contoh: 192.168.10.0/24.

Priority

Integer

Tidak

Ya

Prioritas aturan.

Nilai yang valid: 1 hingga 100.

Default: 1.

DestPortRange

String

Ya

Ya

Range port tujuan.

Tidak ada

Policy

String

Ya

Ya

Kebijakan otorisasi aturan.

Nilai yang valid:

  • accept: Izinkan akses.

  • drop: Tolak akses.

IpProtocol

String

Ya

Ya

Protokol yang diterapkan oleh aturan.

Tidak peka huruf besar/kecil.

SourcePortRange

String

Ya

Ya

Range port sumber.

Tidak ada

Type

String

Tidak

Ya

Jenis aturan.

Nilai yang valid:

  • LAN (default): traffic jaringan privat.

  • WAN: traffic jaringan publik.

DpiSignatureIds

List

Tidak

Ya

ID aplikasi.

Maksimum: 100.

Panggil ListDpiSignatures untuk mengkueri ID aplikasi.

Name

String

Tidak

Ya

Nama aturan.

2 hingga 100 karakter, dimulai dengan huruf. Mendukung huruf, angka, garis bawah (_), dan tanda hubung (-).

DpiGroupIds

List

Tidak

Ya

ID kelompok aplikasi.

Maksimum: 100.

Panggil ListDpiGroups untuk mengkueri ID kelompok.

Nilai kembalian

Fn::GetAtt

AcrId: ID aturan kontrol akses.

Contoh

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Direction:
    Type: String
    Description: |-
      Arah biasa.
      Nilai: in|out
    AllowedValues:
      - in
      - out
    Default: in
  AclId:
    Type: String
    Description: ID kontrol akses.
    Default: acl-***
  SourceCidr:
    Type: String
    Description: Alamat sumber, format CIDR dan rentang alamat IP dalam format IPv4.
    Default: 192.168.1.0/24
  DestCidr:
    Type: String
    Description: Alamat tujuan, format CIDR dan rentang alamat IP dalam format IPv4.
    Default: 192.168.1.0/24
  Priority:
    Default: 1
    Type: Number
    Description: |-
      Prioritas, berkisar antara 1 hingga 100.
      Default: 1
    MaxValue: 100
    MinValue: 1
  DestPortRange:
    Type: String
    Description: Range port tujuan, 80/80.
    Default: 80/80
  Policy:
    Type: String
    Description: 'Akses: accept|drop'
    AllowedValues:
      - accept
      - drop
    Default: accept
  IpProtocol:
    Type: String
    Description: Protokol, tidak peka huruf besar/kecil.
    Default: ALL
  SourcePortRange:
    Type: String
    Description: Range port sumber, 80/80.
    Default: 80/80
Resources:
  ACLRule:
    Type: ALIYUN::SAG::ACLRule
    Properties:
      Direction:
        Ref: Direction
      AclId:
        Ref: AclId
      SourceCidr:
        Ref: SourceCidr
      DestCidr:
        Ref: DestCidr
      Priority:
        Ref: Priority
      DestPortRange:
        Ref: DestPortRange
      Policy:
        Ref: Policy
      IpProtocol:
        Ref: IpProtocol
      SourcePortRange:
        Ref: SourcePortRange
Outputs:
  AcrId:
    Description: ID aturan kontrol akses.
    Value:
      Fn::GetAtt:
        - ACLRule
        - AcrId

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Direction": {
      "Type": "String",
      "Description": "Arah biasa.\nNilai: in|out",
      "AllowedValues": [
        "in",
        "out"
      ],
      "Default": "in"
    },
    "AclId": {
      "Type": "String",
      "Description": "ID kontrol akses.",
      "Default": "acl-***"
    },
    "SourceCidr": {
      "Type": "String",
      "Description": "Alamat sumber, format CIDR dan rentang alamat IP dalam format IPv4.",
      "Default": "192.168.1.0/24"
    },
    "DestCidr": {
      "Type": "String",
      "Description": "Alamat tujuan, format CIDR dan rentang alamat IP dalam format IPv4.",
      "Default": "192.168.1.0/24"
    },
    "Priority": {
      "Default": 1,
      "Type": "Number",
      "Description": "Prioritas, berkisar antara 1 hingga 100.\nDefault: 1",
      "MaxValue": 100,
      "MinValue": 1
    },
    "DestPortRange": {
      "Type": "String",
      "Description": "Range port tujuan, 80/80.",
      "Default": "80/80"
    },
    "Policy": {
      "Type": "String",
      "Description": "Akses: accept|drop",
      "AllowedValues": [
        "accept",
        "drop"
      ],
      "Default": "accept"
    },
    "IpProtocol": {
      "Type": "String",
      "Description": "Protokol, tidak peka huruf besar/kecil.",
      "Default": "ALL"
    },
    "SourcePortRange": {
      "Type": "String",
      "Description": "Range port sumber, 80/80.",
      "Default": "80/80"
    }
  },
  "Resources": {
    "ACLRule": {
      "Type": "ALIYUN::SAG::ACLRule",
      "Properties": {
        "Direction": {
          "Ref": "Direction"
        },
        "AclId": {
          "Ref": "AclId"
        },
        "SourceCidr": {
          "Ref": "SourceCidr"
        },
        "DestCidr": {
          "Ref": "DestCidr"
        },
        "Priority": {
          "Ref": "Priority"
        },
        "DestPortRange": {
          "Ref": "DestPortRange"
        },
        "Policy": {
          "Ref": "Policy"
        },
        "IpProtocol": {
          "Ref": "IpProtocol"
        },
        "SourcePortRange": {
          "Ref": "SourcePortRange"
        }
      }
    }
  },
  "Outputs": {
    "AcrId": {
      "Description": "ID aturan kontrol akses.",
      "Value": {
        "Fn::GetAtt": [
          "ACLRule",
          "AcrId"
        ]
      }
    }
  }
}