文档

ALIYUN::VPC::EIP

更新时间:

ALIYUN::VPC::EIP类型用于申请弹性公网IP(Elastic IP Address,简称EIP)。

语法

{
  "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
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

DeletionProtection

Boolean

是否开启删除保护功能。

取值:

  • true:开启删除保护功能。

  • false(默认值):不开启删除保护功能。

Name

String

EIP的名称。

长度为2~128个字符。以英文字母开头,不能以http://https://开头。可包含英文字母、数字、半角句号(.)、下划线(_)和短划线(-)。

ResourceGroupId

String

资源组ID。

Netmode

String

网络类型。

取值:public,表示公网。

Bandwidth

Number

EIP的带宽值。

如果不指定,则取默认值5 Mbps。

InternetChargeType

String

EIP的计费方式。

取值:

  • PayByBandwidth(默认值):按带宽计费。

  • PayByTraffic:按流量计费。

InstanceChargeType

String

EIP的付费方式。

取值:

  • Prepaid:预付费。

  • Postpaid(默认值):后付费。

PricingCycle

String

预付费的计费周期。

取值:

  • Month(默认值):按月付费。

  • Year:按年付费。

说明

InstanceChargeType取值为Prepaid时,PricingCycle必选。

Period

Number

购买时长。

取值:

  • 选择按月付费时,取值范围:1~9。

  • 选择按年付费时,取值范围:1~3。

默认值:1。

说明

InstanceChargeType取值为Prepaid时,Period必选。

AutoPay

Boolean

是否开启自动付费。

取值:

  • false:不开启自动付费,生成订单后需要到订单中心完成支付。

    关于订单中心的更多信息,请参见订单中心

  • true(默认值):开启自动付费,自动支付订单。

说明

InstanceChargeType取值为Prepaid时,AutoPay必选。

Isp

String

线路类型。

取值:

  • BGP(默认值):BGP(多线)线路。

  • BGP_PRO:BGP(多线)精品线路。

目前,全部地域都支持BGP(多线)线路EIP,仅中国香港地域支持BGP(多线)精品线路EIP。

说明

如果是开通了单线带宽白名单的用户,Isp可以设置为ChinaTelecom(中国电信)、ChinaUnicom(中国联通)和ChinaMobile(中国移动);如果是杭州金融云用户,Isp必填,取值:BGP_FinanceCloud。

Description

String

EIP的描述信息。

长度为2~256个字符。以英文字母开头,不能以http://https://开头。

Tags

List

标签。

最多设置20个标签,每个标签由键值对组成。标签值可以为空。

更多信息,请参见Tags语法Tags属性

SecurityProtectionTypes

List

安全防护级别。

取值:

  • 当该参数配置为空时,默认为DDoS防护(基础版)。

  • 当该参数配置为AntiDDoS_Enhanced时,表示为DDoS防护(增强版)。

说明

您最多可以设置10个安全防护级别。

PublicIpAddressPoolId

String

IP地址池ID。

EIP将从该IP地址池中分配,IP地址池仅对通过试用申请的用户可见。如需使用,请提交工单

Zone

String

弹性公网IP可用分区。

Tags语法

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

Tags属性

属性名称

类型

必须

允许更新

描述

约束

Key

String

标签键。

长度为1~128个字符,不能以aliyunacs:开头,不能包含http://https://

Value

String

标签值。

长度为0~128个字符,不能以aliyunacs:开头,不能包含http://https://

返回值

Fn::GetAtt

  • EipAddress:分配的EIP。

  • AllocationId:EIP的实例ID。

  • OrderId:订单号,仅InstanceChargeType取值为Prepaid时返回。

  • Isp:线路类型。

示例

YAML格式

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格式

{
  "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"
        ]
      }
    }
  }
}
  • 本页导读 (1)
文档反馈