すべてのプロダクト
Search
ドキュメントセンター

Resource Orchestration Service:ALIYUN::SAG::ACLRule

最終更新日:Jun 03, 2026

ALIYUN::SAG::ACLRule は、アクセスコントロールルールを追加するリソースタイプです。

構文

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

プロパティ

プロパティ名

タイプ

必須

更新可能

説明

制約

Direction

String

はい

はい

ルールの方向。

有効な値:

  • in:外部ネットワークから Smart Access Gateway (SAG) のローカルブランチへのインバウンドトラフィック。

  • out:SAG のローカルブランチから外部ネットワークへのアウトバウンドトラフィック。

Description

String

いいえ

はい

ルールの説明。

1~512 文字。

AclId

String

はい

いいえ

アクセスコントロール ID。

なし

SourceCidr

String

はい

はい

送信元 CIDR ブロック。

CIDR 形式。例:192.168.1.0/24。

DestCidr

String

はい

はい

送信先 CIDR ブロック。

CIDR 形式。例:192.168.10.0/24。

Priority

Integer

いいえ

はい

ルールの優先度。

有効な値:1~100。

デフォルト:1。

DestPortRange

String

はい

はい

送信先ポート範囲。

なし

Policy

String

はい

はい

アクセスポリシー。

有効な値:

  • accept:アクセスを許可します。

  • drop:アクセスを拒否します。

IpProtocol

String

はい

はい

ルールが適用されるプロトコル。

大文字と小文字は区別されません。

SourcePortRange

String

はい

はい

送信元ポート範囲。

なし

Type

String

いいえ

はい

ルールのタイプ。

有効な値:

  • LAN (デフォルト):プライベートネットワークトラフィック。

  • WAN:パブリックネットワークトラフィック。

DpiSignatureIds

List

いいえ

はい

アプリケーション ID。

最大 100 件。

ListDpiSignatures API を呼び出して、アプリケーション ID を取得します。

Name

String

いいえ

はい

ルールの名前。

長さは 2~100 文字で、英字で始まる必要があります。英字、数字、アンダースコア (_)、ハイフン (-) を使用できます。

DpiGroupIds

List

いいえ

はい

アプリケーション グループ ID。

最大 100 件。

ListDpiGroups API を呼び出して、グループ ID を取得します。

戻り値

Fn::GetAtt

AcrId: アクセスコントロールルールの ID。

YAML 形式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Direction:
    Type: String
    Description: |-
      ルールの方向。
      値:in|out
    AllowedValues:
      - in
      - out
    Default: in
  AclId:
    Type: String
    Description: アクセスコントロール ID。
    Default: acl-***
  SourceCidr:
    Type: String
    Description: 送信元アドレス。CIDR 形式の IPv4 アドレス範囲。
    Default: 192.168.1.0/24
  DestCidr:
    Type: String
    Description: 送信先アドレス。CIDR 形式の IPv4 アドレス範囲。
    Default: 192.168.1.0/24
  Priority:
    Default: 1
    Type: Number
    Description: |-
      優先度は 1~100 の範囲です。
      デフォルト:1
    MaxValue: 100
    MinValue: 1
  DestPortRange:
    Type: String
    Description: 送信先ポート範囲、80/80。
    Default: 80/80
  Policy:
    Type: String
    Description: アクセスポリシー。
    AllowedValues:
      - accept
      - drop
    Default: accept
  IpProtocol:
    Type: String
    Description: プロトコル、大文字と小文字は区別されません。
    Default: ALL
  SourcePortRange:
    Type: String
    Description: 送信元ポート範囲、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。
    Value:
      Fn::GetAtt:
        - ACLRule
        - AcrId

JSON 形式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Direction": {
      "Type": "String",
      "Description": "ルールの方向。\n値:in|out",
      "AllowedValues": [
        "in",
        "out"
      ],
      "Default": "in"
    },
    "AclId": {
      "Type": "String",
      "Description": "アクセスコントロール ID。",
      "Default": "acl-***"
    },
    "SourceCidr": {
      "Type": "String",
      "Description": "送信元アドレス。CIDR 形式の IPv4 アドレス範囲。",
      "Default": "192.168.1.0/24"
    },
    "DestCidr": {
      "Type": "String",
      "Description": "送信先アドレス。CIDR 形式の IPv4 アドレス範囲。",
      "Default": "192.168.1.0/24"
    },
    "Priority": {
      "Default": 1,
      "Type": "Number",
      "Description": "優先度は 1~100 の範囲です。\nデフォルト:1",
      "MaxValue": 100,
      "MinValue": 1
    },
    "DestPortRange": {
      "Type": "String",
      "Description": "送信先ポート範囲、80/80。",
      "Default": "80/80"
    },
    "Policy": {
      "Type": "String",
      "Description": "アクセスポリシー。",
      "AllowedValues": [
        "accept",
        "drop"
      ],
      "Default": "accept"
    },
    "IpProtocol": {
      "Type": "String",
      "Description": "プロトコル、大文字と小文字は区別されません。",
      "Default": "ALL"
    },
    "SourcePortRange": {
      "Type": "String",
      "Description": "送信元ポート範囲、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。",
      "Value": {
        "Fn::GetAtt": [
          "ACLRule",
          "AcrId"
        ]
      }
    }
  }
}