文档

ALIYUN::VPC::EIPPro

更新时间:

ALIYUN::VPC::EIPPro类型用于创建指定的弹性公网IP(EIP)。

语法

{
  "Type": "ALIYUN::VPC::EIPPro",
  "Properties": {
    "Description": String,
    "ResourceGroupId": String,
    "InstanceId": String,
    "InstanceChargeType": String,
    "PricingCycle": String,
    "ISP": String,
    "Period": Number,
    "DeletionProtection": Boolean,
    "AutoPay": Boolean,
    "Name": String,
    "InternetChargeType": String,
    "Netmode": String,
    "Bandwidth": Number,
    "IpAddress": String,
    "Tags": List,
    "SecurityProtectionTypes": List,
    "PublicIpAddressPoolId": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

Description

String

EIP的描述。

必须以英文字母开头,不能以http://https://开头。

ResourceGroupId

String

EIP所属的资源组ID。

InstanceId

String

EIP的实例ID。

您可以指定IpAddress或InstanceId其中一个参数。如果都不指定,系统会随机申请EIP。

InstanceChargeType

String

EIP的付费方式。

取值:

  • Prepaid:包年包月。

  • Postpaid(默认值):按量计费。

PricingCycle

String

预付费的计费周期。

当InstanceChargeType取值为Prepaid时,必须指定该参数。

取值:

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

  • Year:按年付费。

ISP

String

线路类型。

取值:

  • BGP:BGP(多线)线路,适用于全部地域。

  • BGP_PRO:BGP(多线)精品线路,仅适用于中国(香港)地域。

  • BGP_FinanceCloud:仅适用于杭州金融云用户。

说明

如果是开通了单线带宽白名单的用户,ISP字段可以设置为ChinaTelecom(中国电信)、ChinaUnicom(中国联通)和ChinaMobile(中国移动)。

Period

Number

购买时长。

当InstanceChargeType取值为PrePaid时,必须指定该参数。

取值范围:

  • 当PricingCycle取值为Month时:1~9。

  • 当PricingCycle取值为Year时:1~3。

DeletionProtection

Boolean

是否开启删除保护。

取值:

  • true:开启。

  • false(默认值):关闭。

AutoPay

Boolean

是否开启自动付费。

当InstanceChargeType取值为Prepaid时,必须指定该参数。

取值:

  • false:关闭。

    生成订单后需要到订单中心完成支付。

  • true(默认值):开启。

Name

String

EIP的名称。

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

InternetChargeType

String

EIP的计费方式。

取值:

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

  • PayByTraffic:按流量计费。

Netmode

String

网络类型。

取值:public,表示公网。

Bandwidth

Number

EIP的带宽值。

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

IpAddress

String

EIP的地址。

您可以指定IpAddress或InstanceId其中一个参数。如果都不指定,系统会随机申请EIP。

Tags

List

标签。

最多支持设置20个标签。

更多信息,请参见Tags属性

SecurityProtectionTypes

List

安全防护级别。

取值:

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

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

说明

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

PublicIpAddressPoolId

String

IP地址池ID。

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

Tags语法

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

Tags属性

属性名称

类型

必须

允许更新

描述

约束

Value

String

标签值。

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

Key

String

标签键。

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

返回值

Fn::GetAtt

  • ISP:线路类型。

  • AllocationId:EIP实例ID。

  • EipAddress:EIP地址。

  • OrderId:预付费EIP实例的订单ID。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      Description:
        Type: String
        Description: Optional. The description of the EIP. The description must be 2 to 256 characters in length. It must start with a letter. It cannot start with http://  or https://.
        Default: test
      InstanceId:
        Type: String
        Description: The ID of the requested EIP.
        Default: eip-25877c70gddh****
      Name:
        Type: String
        Description: The name of the EIP. The name must be 2 to 128 characters in length. It must start with a letter. It can contain numbers, periods (.), underscores (_), and hyphens (-). It cannot start with http://  or https://
        Default: test
      Bandwidth:
        Type: Number
        Description: Bandwidth for the output network. Default is 5MB.
        Default: 5
    Resources:
      ElasticIpPro:
        Type: ALIYUN::VPC::EIPPro
        Properties:
          Description:
            Ref: Description
          InstanceId:
            Ref: InstanceId
          Name:
            Ref: Name
          Bandwidth:
            Ref: Bandwidth
    Outputs:
      ISP:
        Description: The line type.
        Value:
          Fn::GetAtt:
            - ElasticIpPro
            - 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:
            - ElasticIpPro
            - AllocationId
      EipAddress:
        Description: IP address of created EIP.
        Value:
          Fn::GetAtt:
            - ElasticIpPro
            - EipAddress
      OrderId:
        Description: Order ID of prepaid EIP instance.
        Value:
          Fn::GetAtt:
            - ElasticIpPro
            - OrderId
                        
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "Description": {
          "Type": "String",
          "Description": "Optional. The description of the EIP. The description must be 2 to 256 characters in length. It must start with a letter. It cannot start with http://  or https://.",
          "Default": "test"
        },
        "InstanceId": {
          "Type": "String",
          "Description": "The ID of the requested EIP.",
          "Default": "eip-25877c70gddh****"
        },
        "Name": {
          "Type": "String",
          "Description": "The name of the EIP. The name must be 2 to 128 characters in length. It must start with a letter. It can contain numbers, periods (.), underscores (_), and hyphens (-). It cannot start with http://  or https://",
          "Default": "test"
        },
        "Bandwidth": {
          "Type": "Number",
          "Description": "Bandwidth for the output network. Default is 5MB.",
          "Default": 5
        }
      },
      "Resources": {
        "ElasticIpPro": {
          "Type": "ALIYUN::VPC::EIPPro",
          "Properties": {
            "Description": {
              "Ref": "Description"
            },
            "InstanceId": {
              "Ref": "InstanceId"
            },
            "Name": {
              "Ref": "Name"
            },
            "Bandwidth": {
              "Ref": "Bandwidth"
            }
          }
        }
      },
      "Outputs": {
        "ISP": {
          "Description": "The line type.",
          "Value": {
            "Fn::GetAtt": [
              "ElasticIpPro",
              "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": [
              "ElasticIpPro",
              "AllocationId"
            ]
          }
        },
        "EipAddress": {
          "Description": "IP address of created EIP.",
          "Value": {
            "Fn::GetAtt": [
              "ElasticIpPro",
              "EipAddress"
            ]
          }
        },
        "OrderId": {
          "Description": "Order ID of prepaid EIP instance.",
          "Value": {
            "Fn::GetAtt": [
              "ElasticIpPro",
              "OrderId"
            ]
          }
        }
      }
    }
  • 本页导读 (1)
文档反馈