All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::VPC::EIP

Last Updated:Mar 07, 2024

ALIYUN::VPC::EIP is used to apply for an elastic IP address (EIP).

Syntax

{
  "Type": "ALIYUN::VPC::EIP",
  "Properties": {
    "DeletionProtection": Boolean,
    "Name": String,
    "Tags": List,
    "Isp": String,
    "Netmode": String,
    "Period": Number,
    "ResourceGroupId": String,
    "AutoPay": Boolean,
    "InstanceChargeType": String,
    "PricingCycle": String,
    "Bandwidth": Number,
    "InternetChargeType": String,
    "Description": String,
    "SecurityProtectionTypes": List,
    "PublicIpAddressPoolId": String,
    "Zone": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

DeletionProtection

Boolean

No

Yes

Specifies whether to enable deletion protection.

Valid values:

  • true

  • false (default)

Name

String

No

Yes

The name of the EIP.

The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter but cannot start with http:// or https://.

ResourceGroupId

String

No

Yes

The ID of the resource group.

None

Netmode

String

No

No

The network type of the EIP.

Set the value to public. A value of public specifies that data is transferred over the Internet.

Bandwidth

Number

No

Yes

The bandwidth of the EIP.

Default value: 5. Unit: Mbit/s.

InternetChargeType

String

No

No

The metering method of the EIP.

Valid values:

  • PayByBandwidth (default): pay-by-bandwidth

  • PayByTraffic: pay-by-data-transfer.

InstanceChargeType

String

No

No

The billing method of the EIP.

Valid values:

  • Prepaid: subscription

  • Postpaid (default): pay-as-you-go

PricingCycle

String

No

No

The billing cycle of the EIP.

Valid values:

  • Month (default)

  • Year

Note

You must specify this property if InstanceChargeType is set to Prepaid.

Period

Number

No

No

The subscription period.

  • Valid values if PricingCycle is set to Month: 1 to 9.

  • Valid values if PricingCycle is set to Year: 1 to 3.

Default value: 1.

Note

You must specify this property if InstanceChargeType is set to Prepaid.

AutoPay

Boolean

No

No

Specifies whether to enable automatic payment.

Valid values:

  • false: does not enable automatic payment. After an order is generated, you must go to the order center to complete the payment.

    For more information about the order center, go to the Orders page of the Billing Management console.

  • true (default): enables automatic payment. After an order is generated, the system automatically completes the payment.

Note

You must specify this property if InstanceChargeType is set to Prepaid.

Isp

String

No

No

The line type of the EIP.

Valid values:

  • BGP (default): BGP (Multi-ISP)

  • BGP_PRO: BGP (Multi-ISP) Pro

BGP (Multi-ISP) lines are supported in all regions. BGP (Multi-ISP) Pro lines are supported only in the China (Hong Kong) region.

Description

String

No

Yes

The description of the EIP.

The description must be 2 to 256 characters in length. It must start with a letter but cannot start with http:// or https://.

Tags

List

No

Yes

The tags of the EIP.

You can add up to 20 tags. Each tag is a key-value pair. You can leave the tag value empty.

For more information, see Tags syntax and Tags properties.

SecurityProtectionTypes

List

No

No

The editions of Anti-DDoS.

Valid values:

  • Null: If you set this property to Null, Anti-DDoS Origin is used by default.

  • AntiDDoS_Enhanced: If you set this property to AntiDDoS_Enhanced, Anti-DDoS Pro or Premium is used.

Note

You can configure up to 10 editions of Anti-DDoS.

PublicIpAddressPoolId

String

No

No

The ID of the IP address pool.

EIPs are allocated from the specified IP address pool. The IP address pool feature is available only to users whose accounts are granted the required permissions for trial use. To use the feature, submit a ticket.

Zone

String

No

No

The zone of the EIP.

None

Tags syntax

"Tags": [
  {
    "Key": String,
    "Value": String
  }
]  

Tags properties

Property

Type

Required

Editable

Description

Constraint

Key

String

Yes

No

The tag key.

The tag key must be 1 to 128 characters in length, and cannot contain http:// or https://. It cannot start with aliyun or acs:.

Value

String

No

No

The tag value.

The tag value can be up to 128 characters in length, and cannot contain http:// or https://. It cannot start with aliyun or acs:.

Return values

Fn::GetAtt

  • EipAddress: the allocated EIP.

  • AllocationId: the EIP ID.

  • OrderId: the order ID of the EIP. This property is returned only if InstanceChargeType is set to Prepaid.

  • Isp: the line type.

Examples

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters: {}
Resources:
  ElasticIp:
    Type: ALIYUN::VPC::EIP
    Properties:
      InstanceChargeType: Postpaid
      Name: TestEIP
      InternetChargeType: PayByBandwidth
      Netmode: public
      Bandwidth: 5
Outputs:
  Isp:
    Description: The line type.
    Value:
      Fn::GetAtt:
        - ElasticIp
        - Isp
  AllocationId:
    Description: ID that Aliyun assigns to represent the allocation of the address for use with VPC. Returned only for VPC elastic IP addresses.
    Value:
      Fn::GetAtt:
        - ElasticIp
        - AllocationId
  EipAddress:
    Description: IP address of created EIP.
    Value:
      Fn::GetAtt:
        - ElasticIp
        - EipAddress
  OrderId:
    Description: Order ID of prepaid EIP instance.
    Value:
      Fn::GetAtt:
        - ElasticIp
        - OrderId

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
  },
  "Resources": {
    "ElasticIp": {
      "Type": "ALIYUN::VPC::EIP",
      "Properties": {
        "InstanceChargeType": "Postpaid",
        "Name": "TestEIP",
        "InternetChargeType": "PayByBandwidth",
        "Netmode": "public",
        "Bandwidth": 5
      }
    }
  },
  "Outputs": {
    "Isp": {
      "Description": "The line type.",
      "Value": {
        "Fn::GetAtt": [
          "ElasticIp",
          "Isp"
        ]
      }
    },
    "AllocationId": {
      "Description": "ID that Aliyun assigns to represent the allocation of the address for use with VPC. Returned only for VPC elastic IP addresses.",
      "Value": {
        "Fn::GetAtt": [
          "ElasticIp",
          "AllocationId"
        ]
      }
    },
    "EipAddress": {
      "Description": "IP address of created EIP.",
      "Value": {
        "Fn::GetAtt": [
          "ElasticIp",
          "EipAddress"
        ]
      }
    },
    "OrderId": {
      "Description": "Order ID of prepaid EIP instance.",
      "Value": {
        "Fn::GetAtt": [
          "ElasticIp",
          "OrderId"
        ]
      }
    }
  }
}