All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::VPC::EIPSegment

Last Updated:Mar 28, 2026

ALIYUN::VPC::EIPSegment is used to apply for contiguous elastic IP addresses (EIPs).

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

EipMask

Integer

Yes

No

The subnet mask length for the contiguous EIPs.

Valid values:

  • 28: The system allocates 16 contiguous EIPs in each call.

  • 27: The system allocates 32 contiguous EIPs in each call.

  • 26: The system allocates 64 contiguous EIPs in each call.

  • 25: The system allocates 128 contiguous EIPs in each call.

  • 24: The system allocates 256 contiguous EIPs in each call.

Note

The actual number of requested EIPs may be less than the expected number because one, three, or four EIPs may be reserved.

ResourceGroupId

String

No

No

The ID of the resource group.

None.

Zone

String

No

No

The zone where the contiguous EIPs are created.

None

Isp

String

No

No

The line type.

Valid values:

  • BGP (default): BGP (Multi-ISP). All regions support BGP (Multi-ISP) EIPs.

  • BGP_PRO: BGP (Multi-ISP) Pro. This line type is available only in the China (Hong Kong), Singapore, Japan (Tokyo), Malaysia (Kuala Lumpur), Philippines (Manila), Indonesia (Jakarta), and Thailand (Bangkok) regions.

For more information about BGP (Multi-ISP) and BGP (Multi-ISP) Pro lines, see What is an EIP?.

If you are on the allowlist for single-ISP bandwidth, you can also select one of the following values:

  • ChinaTelecom: China Telecom

  • ChinaUnicom: China Unicom

  • ChinaMobile: China Mobile

  • ChinaTelecom_L2: China Telecom L2

  • ChinaUnicom_L2: China Unicom L2

  • ChinaMobile_L2: China Mobile L2

If you are a Hangzhou Finance Cloud user, this parameter is required and you must set the value to BGP_FinanceCloud.

Netmode

String

No

No

The network type of the contiguous EIPs.

Valid values:

  • public (default): Internet. After you associate the contiguous EIPs with cloud resources, the cloud resources can access the Internet by using the EIPs.

  • hybrid: hybrid cloud. After you associate the contiguous EIPs with cloud resources, the cloud resources can access hybrid clouds by using the EIPs.

Note

Only users who are included in the whitelist can set Netmode to hybrid. To use this network type, contact your business manager.

Bandwidth

Integer

No

No

The maximum bandwidth of the EIP.

Default value: 5.

Unit: Mbit/s.

InternetChargeType

String

No

No

The billing method of the contiguous EIPs.

Valid values:

  • PayByBandwidth (default): pay-by-bandwidth

  • PayByTraffic: pay-by-data-transfer

Note

When Netmode is set to hybrid, you can set InternetChangeType only to PayByBandwidth.

Return values

Fn::GetAtt

  • EipSegmentInstanceId: the ID of the contiguous EIP group.

  • EipAddresses: the EIPs.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  EipMask:
    Type: Number
    Description: |-
      The mask of the contiguous EIP group. Valid values:
      28: Allocates 16 contiguous EIPs.
      27: Allocates 32 contiguous EIPs.
      26: Allocates 64 contiguous EIPs.
      25: Allocates 128 contiguous EIPs.
      24: Allocates 256 contiguous EIPs.
      Note: The actual number of allocated EIPs may be fewer than expected because the system reserves one,
      three, or four IP addresses.
    AllowedValues:
      - 28
      - 27
      - 26
      - 25
      - 24
    Default: 28
  ResourceGroupId:
    Type: String
    Description: The ID of the resource group.
    Default: Null
  Netmode:
    Type: String
    Description: |-
      The network type. Valid values:
      public: (Default) Internet. Allows associated cloud resources to access the Internet.
      hybrid: Hybrid cloud. Allows associated cloud resources to communicate with the hybrid cloud.
      Note: This network type is available only to users who are on the allowlist. To use
      this network type, contact your account manager.
    AllowedValues:
      - public
      - hybrid
    Default: public
  Bandwidth:
    Type: Number
    Description: 'The peak bandwidth of the contiguous EIPs. Unit: Mbps. Default: 5.'
    Default: 5
  InternetChargeType:
    Type: String
    Description: |-
      The billing method of the contiguous EIPs. Valid values:
      PayByBandwidth: (Default) Charges are based on bandwidth.
      PayByTraffic: Charges are based on data transfer.
      Note: If Netmode is hybrid, InternetChargeType must be 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: 'The list of allocated EIPs. Example: [{"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: Allocates 16 contiguous EIPs.\n27: Allocates 32 contiguous EIPs.\n26: Allocates 64 contiguous EIPs.\n25: Allocates 128 contiguous EIPs.\n24: Allocates 256 contiguous EIPs.\nNote: The actual number of allocated EIPs may be fewer than expected because the system reserves one,\nthree, or four IP addresses.",
      "AllowedValues": [
        28,
        27,
        26,
        25,
        24
      ],
      "Default": 28
    },
    "ResourceGroupId": {
      "Type": "String",
      "Description": "The ID of the resource group.",
      "Default": null
    },
    "Netmode": {
      "Type": "String",
      "Description": "The network type. Valid values:\npublic: (Default) Internet. Allows associated cloud resources to access the Internet.\nhybrid: Hybrid cloud. Allows associated cloud resources to communicate with the hybrid cloud.\nNote: This network type is available only to users who are on the allowlist. To use\nthis network type, contact your account manager.",
      "AllowedValues": [
        "public",
        "hybrid"
      ],
      "Default": "public"
    },
    "Bandwidth": {
      "Type": "Number",
      "Description": "The peak bandwidth of the contiguous EIPs. Unit: Mbps. Default: 5.",
      "Default": 5
    },
    "InternetChargeType": {
      "Type": "String",
      "Description": "The billing method of the contiguous EIPs. Valid values:\nPayByBandwidth: (Default) Charges are based on bandwidth.\nPayByTraffic: Charges are based on data transfer.\nNote: If Netmode is hybrid, InternetChargeType must be 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": "The list of allocated EIPs. Example: [{\"AllocationId\": \"eip-xxx\", \"IpAddress\": \"xx.xx.xx.xx\"}]",
      "Value": {
        "Fn::GetAtt": [
          "EIPSegment",
          "EipAddresses"
        ]
      }
    }
  }
}