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

Resource Orchestration Service:ALIYUN::ECS::SecurityGroupEgress

最終更新日:Jan 16, 2025

ALIYUN::ECS::SecurityGroupEgress は、セキュリティグループの送信アクセスルールを作成するために使用されます。

構文

{
  "Type": "ALIYUN::ECS::SecurityGroupEgress",
  "Properties": {
    "SecurityGroupId": String,
    "IpProtocol": String,
    "PortRange": String,
    "DestGroupId": String,
    "DestCidrIp": String,
    "Policy": String,
    "Priority": String,
    "NicType": String,
    "DestPrefixListId": String,
    "Ipv6DestCidrIp": String
  }
}

プロパティ

プロパティタイプ必須編集可能説明制約
IpProtocol Stringはいいいえトランスポート層プロトコル。有効な値:
  • tcp。
  • udp。
  • icmp。
  • gre。
  • all:上記のすべてのプロトコルがサポートされています。
PortRange Stringはいいいえ宛先セキュリティグループのトランスポート層プロトコルに対して構成するポートの範囲。有効な値:
  • IpProtocol プロパティを tcp または udp に設定した場合の有効な値:1 ~ 65535。開始ポート番号と終了ポート番号をスラッシュ(/)で区切ります。正しい例:1/200。誤った例:200/1。
  • IpProtocol プロパティを icmp に設定した場合の有効な値:-1/-1。
  • IpProtocol プロパティを gre に設定した場合の有効な値:-1/-1。
  • IpProtocol プロパティを all に設定した場合の有効な値:-1/-1。
SecurityGroupId Stringいいえいいえ送信元セキュリティグループの ID。なし
DestPrefixListIdStringいいえいいえ送信アクセス権限を付与する宛先プレフィックスリストの ID。DescribePrefixLists オペレーションを呼び出して、使用可能なプレフィックスリストの ID をクエリできます。

セキュリティグループがクラシックネットワークにある場合、セキュリティグループルールでプレフィックスリストを構成することはできません。

DestCidrIp、Ipv6DestCidrIp、または DestGroupId プロパティを指定した場合、システムは DestPrefixListId プロパティの値を無視します。

NicType Stringいいえいいえネットワークインターフェースコントローラー(NIC)のタイプ。デフォルト値:internet。有効な値:
  • internet:パブリック NIC
  • intranet:内部 NIC
DestGroupId プロパティを指定し、DestCidrIp プロパティを空のままにした場合は、NicType プロパティを intranet に設定する必要があります。
Priority Integerいいえいいえセキュリティグループルールの優先度。有効な値:1 ~ 100。

デフォルト値:1。

DestGroupId Stringいいえいいえ送信アクセス権限を付与する宛先セキュリティグループの ID。DestGroupId プロパティと DestCidrIp プロパティの少なくとも 1 つを指定する必要があります。

DestGroupId プロパティを指定し、DestCidrIp プロパティを空のままにした場合は、NicType プロパティを intranet に設定する必要があります。

DestGroupId プロパティと DestCidrIp プロパティの両方を指定した場合、DestCidrIp プロパティの値が使用されます。

DestCidrIp Stringいいえいいえ宛先 CIDR ブロック。IPv4 CIDR ブロックがサポートされています。
Policy Stringいいえいいえ送信アクセスを受け入れるかどうかを決定するルールの動作。デフォルト値:accept。有効な値:
  • accept
  • drop
DescriptionStringいいえはいセキュリティグループルールの説明。説明は 1 ~ 512 文字である必要があります。
DestGroupOwnerIdStringいいえいいえアカウント間でセキュリティグループルールを構成するときに、宛先セキュリティグループの管理に使用する Alibaba Cloud アカウントの ID。このプロパティを空のままにすると、アカウント内の他のセキュリティグループに送信アクセス権限が付与されます。 DestCidrIp プロパティを指定した場合、システムは DestGroupOwnerId プロパティの値を無視します。
Ipv6DestCidrIpStringいいえいいえ宛先 IPv6 CIDR ブロック。CIDR ブロックと IPv6 アドレスがサポートされています。仮想プライベートクラウド(VPC)タイプの IP アドレスのみを指定できます。

戻り値

Fn::GetAtt

なし。

  • YAML 形式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      Policy:
        Type: String
        Description: >-
          許可ポリシー。パラメーター値は、accept(アクセス許可)、drop(アクセス拒否)です。デフォルト値は accept です。
        AllowedValues:
          - accept
          - drop
      PortRange:
        Type: String
        Description: >-
          IP プロトコル相対ポート範囲。tcp および udp の場合、ポート範囲は [1,65535] で、「1/200」の形式を使用します。icmp|gre|all プロトコルの場合、ポート範囲は「-1/-1」である必要があります。
      Description:
        Type: String
        Description: >-
          セキュリティグループルールの説明。[1, 512] 文字。デフォルトは空です。
        MinLength: 1
        MaxLength: 512
      Priority:
        Type: Number
        Description: '許可ポリシーの優先度範囲 [1, 100]'
        MinValue: 1
        MaxValue: 100
        Default: 1
      SecurityGroupId:
        Type: String
        Description: セキュリティグループの ID。
      DestGroupOwnerId:
        Type: String
        Description: 宛先グループ所有者アカウント ID
      IpProtocol:
        Type: String
        Description: ルールの IP プロトコル。
        AllowedValues:
          - tcp
          - udp
          - icmp
          - gre
          - all
      DestCidrIp:
        Type: String
        Description: 宛先 CIDR IP アドレス範囲。IPV4 のみがサポートされています。
      NicType:
        Type: String
        Description: >-
          ネットワークタイプ。「internet」または「intranet」です。デフォルト値は internet です。
        AllowedValues:
          - internet
          - intranet
      Ipv6DestCidrIp:
        Type: String
        Description: >-
          宛先 IPv6 CIDR アドレスセグメント。CIDR 形式と IPv6 形式の IP アドレス範囲をサポートしています。
    
          注:VPC タイプの IP アドレスのみがサポートされています。
      DestGroupId:
        Type: String
        Description: 宛先グループ ID
    Resources:
      SecurityGroupEgress:
        Type: 'ALIYUN::ECS::SecurityGroupEgress'
        Properties:
          Policy:
            Ref: Policy
          PortRange:
            Ref: PortRange
          Description:
            Ref: Description
          Priority:
            Ref: Priority
          SecurityGroupId:
            Ref: SecurityGroupId
          DestGroupOwnerId:
            Ref: DestGroupOwnerId
          IpProtocol:
            Ref: IpProtocol
          DestCidrIp:
            Ref: DestCidrIp
          NicType:
            Ref: NicType
          Ipv6DestCidrIp:
            Ref: Ipv6DestCidrIp
          DestGroupId:
            Ref: DestGroupId
  • JSON 形式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "Policy": {
          "Type": "String",
          "Description": "許可ポリシー。パラメーター値は、accept(アクセス許可)、drop(アクセス拒否)です。デフォルト値は accept です。",
          "AllowedValues": [
            "accept",
            "drop"
          ]
        },
        "PortRange": {
          "Type": "String",
          "Description": "IP プロトコル相対ポート範囲。 tcp および udp の場合、ポート範囲は [1,65535] で、「1/200」の形式を使用します。icmp|gre|all プロトコルの場合、ポート範囲は「-1/-1」である必要があります。"
        },
        "Description": {
          "Type": "String",
          "Description": "セキュリティグループルールの説明。[1, 512] 文字。デフォルトは空です。",
          "MinLength": 1,
          "MaxLength": 512
        },
        "Priority": {
          "Type": "Number",
          "Description": "許可ポリシーの優先度範囲 [1, 100]",
          "MinValue": 1,
          "MaxValue": 100,
          "Default": 1
        },
        "SecurityGroupId": {
          "Type": "String",
          "Description": "セキュリティグループの ID。"
        },
        "DestGroupOwnerId": {
          "Type": "String",
          "Description": "宛先グループ所有者アカウント ID"
        },
        "IpProtocol": {
          "Type": "String",
          "Description": "ルールの IP プロトコル。",
          "AllowedValues": [
            "tcp",
            "udp",
            "icmp",
            "gre",
            "all"
          ]
        },
        "DestCidrIp": {
          "Type": "String",
          "Description": "宛先 CIDR IP アドレス範囲。IPV4 のみがサポートされています。"
        },
        "NicType": {
          "Type": "String",
          "Description": "ネットワークタイプ。「internet」または「intranet」です。デフォルト値は internet です。",
          "AllowedValues": [
            "internet",
            "intranet"
          ]
        },
        "Ipv6DestCidrIp": {
          "Type": "String",
          "Description": "宛先 IPv6 CIDR アドレスセグメント。CIDR 形式と IPv6 形式の IP アドレス範囲をサポートしています。\n注:VPC タイプの IP アドレスのみがサポートされています。"
        },
        "DestGroupId": {
          "Type": "String",
          "Description": "宛先グループ ID"
        }
      },
      "Resources": {
        "SecurityGroupEgress": {
          "Type": "ALIYUN::ECS::SecurityGroupEgress",
          "Properties": {
            "Policy": {
              "Ref": "Policy"
            },
            "PortRange": {
              "Ref": "PortRange"
            },
            "Description": {
              "Ref": "Description"
            },
            "Priority": {
              "Ref": "Priority"
            },
            "SecurityGroupId": {
              "Ref": "SecurityGroupId"
            },
            "DestGroupOwnerId": {
              "Ref": "DestGroupOwnerId"
            },
            "IpProtocol": {
              "Ref": "IpProtocol"
            },
            "DestCidrIp": {
              "Ref": "DestCidrIp"
            },
            "NicType": {
              "Ref": "NicType"
            },
            "Ipv6DestCidrIp": {
              "Ref": "Ipv6DestCidrIp"
            },
            "DestGroupId": {
              "Ref": "DestGroupId"
            }
          }
        }
      }
    }