全部產品
Search
文件中心

Resource Orchestration Service:ALIYUN::VPC::EIPSegment

更新時間:Mar 28, 2026

ALIYUN::VPC::EIPSegment類型用於申請連續Elastic IP Address(EIP)。

文法

{
  "Type": "ALIYUN::VPC::EIPSegment",
  "Properties": {
    "EipMask": Integer,
    "ResourceGroupId": String,
    "Netmode": String,
    "Bandwidth": Integer,
    "InternetChargeType": String,
    "Zone": String,
    "Isp": String
  }
}

屬性

屬性名稱

類型

必須

允許更新

描述

約束

EipMask

Integer

連續EIP的掩碼。

取值:

  • 28:單次調用,系統將分配16個連續EIP。

  • 27:單次調用,系統將分配32個連續EIP。

  • 26:單次調用,系統將分配64個連續EIP。

  • 25:單次調用,系統將分配128個連續EIP。

  • 24:單次調用,系統將分配256個連續EIP。

說明

由於IP位址保留區,實際申請到的連續EIP可能缺少1個、3個或者4個EIP。

ResourceGroupId

String

資源群組ID。

Zone

String

可用性區域。

Isp

String

線路類型。

取值:

  • BGP(預設值):BGP(多線)線路。目前全部地區都支援 BGP(多線)線路 EIP。

  • BGP_PRO:BGP(多線)_精品線路。目前僅中國香港、新加坡、日本(東京)、馬來西亞(吉隆坡)、菲律賓(馬尼拉)、印尼(雅加達)和泰國(曼穀)地區支援 BGP(多線)_精品線路 EIP。

關於 BGP(多線)線路和 BGP(多線)_精品線路的更多資訊,請參見 什麼是Elastic IP Address

如果您是單線頻寬的白名單使用者,您還可以選擇以下類型:

  • ChinaTelecom:中國電信

  • ChinaUnicom:中國聯通

  • ChinaMobile:中國移動

  • ChinaTelecom_L2:中國電信 L2

  • ChinaUnicom_L2:中國聯通 L2

  • ChinaMobile_L2:中國移動 L2

如果您是杭州金融雲使用者,該欄位必填,取值:BGP_FinanceCloud

Netmode

String

網路類型。

取值:

  • public(預設):公網。連續EIP和雲資源綁定後,雲資源可以通過EIP與公網通訊。

  • hybrid:混合雲。連續EIP和雲資源綁定後,雲資源可以通過EIP進行混合雲通訊。

說明

僅具有混合雲白名單的使用者支援選擇混合雲類型,如需使用,請聯絡您的客戶經理。

Bandwidth

Integer

EIP的頻寬峰值。

預設值:5。

單位:Mbps。

InternetChargeType

String

連續EIP的計費方式。

取值:

  • PayByBandwidth(預設值):按頻寬計費。

  • PayByTraffic:按流量計費。

說明

當Netmode取值為hybrid時,InternetChargeType僅支援按頻寬計費(PayByBandwidth)。

傳回值

Fn::GetAtt

  • EipSegmentInstanceId:連續EIP的執行個體ID。

  • EipAddresses:EIP執行個體地址。

樣本

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  EipMask:
    Type: Number
    Description: |-
      The mask of the contiguous EIP group. Valid values:
      28: 16 contiguous EIPs are allocated for one call.
      27: 32 contiguous EIPs are allocated for one call.
      26: 64 contiguous EIPs are allocated for one call.
      25: 128 contiguous EIPs are allocated for one call.
      24: 256 contiguous EIPs are allocated for one call.
      Note The actual number of assigned EIPs may be less than the expected number because one,
      three, or four EIPs may be reserved.
    AllowedValues:
      - 28
      - 27
      - 26
      - 25
      - 24
    Default: 28
  ResourceGroupId:
    Type: String
    Description: The ID of the resource group to which the EIPs belong.
    Default: Null
  Netmode:
    Type: String
    Description: |-
      The network type. Valid values:
      public: the Internet. This is the default value. After contiguous EIPs are associated with
      cloud resources, the cloud resources can access the Internet by using the EIPs.
      hybrid: the hybrid cloud. After contiguous EIPs are associated with cloud resources, the
      cloud resources can access the hybrid cloud by using the EIPs.
      Note This network type is available only to users who are added to the whitelist. To use
      this network type, contact your customer manager.
    AllowedValues:
      - public
      - hybrid
    Default: public
  Bandwidth:
    Type: Number
    Description: 'The maximum bandwidth of the contiguous EIPs. Unit: Mbit/s. Default value: 5.'
    Default: 5
  InternetChargeType:
    Type: String
    Description: |-
      The metering method of the contiguous EIPs. Valid values:
      PayByBandwidth: Fees are charged based on bandwidth usage. This is the default value.
      PayByTraffic: Fees are charged based on data transfer.
      Note If the Netmode parameter is set to hybrid, InternetChargeType is set to PayByBandwidth.
    AllowedValues:
      - PayByBandwidth
      - PayByTraffic
    Default: PayByBandwidth
Resources:
  EIPSegment:
    Type: ALIYUN::VPC::EIPSegment
    Properties:
      EipMask:
        Ref: EipMask
      ResourceGroupId:
        Ref: ResourceGroupId
      Netmode:
        Ref: Netmode
      Bandwidth:
        Ref: Bandwidth
      InternetChargeType:
        Ref: InternetChargeType
Outputs:
  EipSegmentInstanceId:
    Description: The ID of the contiguous EIP group.
    Value:
      Fn::GetAtt:
        - EIPSegment
        - EipSegmentInstanceId
  EipAddresses:
    Description: 'List of EIP addresses. like [{"AllocationId": "eip-xxx", "IpAddress": "xx.xx.xx.xx"}]'
    Value:
      Fn::GetAtt:
        - EIPSegment
        - EipAddresses
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "EipMask": {
      "Type": "Number",
      "Description": "The mask of the contiguous EIP group. Valid values:\n28: 16 contiguous EIPs are allocated for one call.\n27: 32 contiguous EIPs are allocated for one call.\n26: 64 contiguous EIPs are allocated for one call.\n25: 128 contiguous EIPs are allocated for one call.\n24: 256 contiguous EIPs are allocated for one call.\nNote The actual number of assigned EIPs may be less than the expected number because one,\nthree, or four EIPs may be reserved.",
      "AllowedValues": [
        28,
        27,
        26,
        25,
        24
      ],
      "Default": 28
    },
    "ResourceGroupId": {
      "Type": "String",
      "Description": "The ID of the resource group to which the EIPs belong.",
      "Default": null
    },
    "Netmode": {
      "Type": "String",
      "Description": "The network type. Valid values:\npublic: the Internet. This is the default value. After contiguous EIPs are associated with\ncloud resources, the cloud resources can access the Internet by using the EIPs.\nhybrid: the hybrid cloud. After contiguous EIPs are associated with cloud resources, the\ncloud resources can access the hybrid cloud by using the EIPs.\nNote This network type is available only to users who are added to the whitelist. To use\nthis network type, contact your customer manager.",
      "AllowedValues": [
        "public",
        "hybrid"
      ],
      "Default": "public"
    },
    "Bandwidth": {
      "Type": "Number",
      "Description": "The maximum bandwidth of the contiguous EIPs. Unit: Mbit/s. Default value: 5.",
      "Default": 5
    },
    "InternetChargeType": {
      "Type": "String",
      "Description": "The metering method of the contiguous EIPs. Valid values:\nPayByBandwidth: Fees are charged based on bandwidth usage. This is the default value.\nPayByTraffic: Fees are charged based on data transfer.\nNote If the Netmode parameter is set to hybrid, InternetChargeType is set to PayByBandwidth.",
      "AllowedValues": [
        "PayByBandwidth",
        "PayByTraffic"
      ],
      "Default": "PayByBandwidth"
    }
  },
  "Resources": {
    "EIPSegment": {
      "Type": "ALIYUN::VPC::EIPSegment",
      "Properties": {
        "EipMask": {
          "Ref": "EipMask"
        },
        "ResourceGroupId": {
          "Ref": "ResourceGroupId"
        },
        "Netmode": {
          "Ref": "Netmode"
        },
        "Bandwidth": {
          "Ref": "Bandwidth"
        },
        "InternetChargeType": {
          "Ref": "InternetChargeType"
        }
      }
    }
  },
  "Outputs": {
    "EipSegmentInstanceId": {
      "Description": "The ID of the contiguous EIP group.",
      "Value": {
        "Fn::GetAtt": [
          "EIPSegment",
          "EipSegmentInstanceId"
        ]
      }
    },
    "EipAddresses": {
      "Description": "List of EIP addresses. like [{\"AllocationId\": \"eip-xxx\", \"IpAddress\": \"xx.xx.xx.xx\"}]",
      "Value": {
        "Fn::GetAtt": [
          "EIPSegment",
          "EipAddresses"
        ]
      }
    }
  }
}