ALIYUN::VPC::EIP is used to apply for an Elastic IP address.

Syntax

{
  "Type": "ALIYUN::VPC::EIP",
  "Properties": {
    "Isp": String,
    "Period": Number,
    "ResourceGroupId": String,
    "AutoPay": Boolean,
    "InstanceChargeType": String,
    "PricingCycle": String,
    "InternetChargeType": String,
    "Bandwidth": Number
  }
}

Properties

Name Type Required Editable Description Validity
ResourceGroupId String No No The ID of the resource group. None
Bandwidth Number No No The network bandwidth. Unit: Mbit/s. Default value: 5. None
InternetChargeType String No No The billing method of the Elastic IP address. Default value: PayByBandwidth.

Valid values:

  • PayByBandwidth: You are billed by bandwidth.
  • PayByTraffic: You are billed by traffic.
InstanceChargeType String No No The payment method of the Elastic IP address. Default value: Postpaid.

Valid values:

  • Prepaid
  • Postpaid
PricingCycle String No No The billing cycle of the subscription. Default value: Month.

Valid values:

  • Month: You are billed on a monthly basis.
  • Year: You are billed on a yearly basis.
Note This parameter is required when InstanceChargeType is set to Prepaid.
Period Number No No The subscription period.

Valid values:

  • Valid values when the PricingCycle parameter is set to Month: 1 to 9.
  • Valid values when the PricingCycle parameter is set to Year: 1 to 3.

Default value: 1.

Note This parameter is required when InstanceChargeType is set to Prepaid.
AutoPay Boolean No No Specifies whether to enable automatic payment.

Valid values:

  • false: Automatic payment is disabled. After an order is generated, you must go to the Order Center to make the payment.
  • true: Automatic payment is enabled. The payment is automatically made.
Note This parameter is required when InstanceChargeType is set to Prepaid.
Isp String No No The ISP tag that is used for Finance Cloud. This parameter takes effect only when your region is set to China (Hangzhou).

This parameter is ignored if you are not a Finance Cloud user.

Response parameters

Fn::GetAtt
  • EipAddress: the assigned Elastic IP address.
  • AllocationId: the ID of the instance that the Elastic IP address is allocated to.
  • OrderId: The order ID that is returned to you when you set the InstanceChargeType parameter to Prepaid.

Examples

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "Eip": {
      "Type": "ALIYUN::VPC::EIP",
      "Properties": {
        "InternetChargeType": "PayByTraffic",
          "Bandwidth": 200
      }
    }
  },
  "Outputs": {
    "EipAddress": {
      "Value" : {"Fn::GetAtt": ["Eip", "EipAddress"]}
    },
    "AllocationId": {
      "Value" : {"Fn::GetAtt": ["Eip", "AllocationId"]}
    },
    "OrderId": {
      "Value" : {"Fn::GetAtt": ["Eip", "OrderId"]}
    }
  }
}