ALIYUN::VPC::EIPPro

更新时间:
复制 MD 格式

Creates an Elastic IP Address (EIP).

Syntax

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

Properties

Property name

Type

Required

Update allowed

Description

Constraints

Description

String

No

Yes

The description of the EIP.

The description must start with a letter and cannot start with http:// or https://.

ResourceGroupId

String

No

Yes

The ID of the resource group to which the EIP belongs.

None

InstanceId

String

No

No

The instance ID of the EIP.

Specify either the IpAddress or InstanceId parameter. If you specify neither, the system randomly allocates an EIP.

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 subscription EIP.

This parameter is required when you set InstanceChargeType to Prepaid.

Valid values:

  • Month (default): Billed monthly.

  • Year: Billed annually.

ISP

String

No

No

The line type.

Valid values:

  • BGP: BGP (Multi-ISP) line. This line type is available in all regions.

  • BGP_PRO: BGP (Multi-ISP) Pro line. This line type is available only in the China (Hong Kong) region.

  • BGP_FinanceCloud: Available only to users of Alibaba Finance Cloud in Hangzhou.

Note

If you are on the single-line bandwidth whitelist, you can set ISP to ChinaTelecom, ChinaUnicom, or ChinaMobile.

Period

Number

No

No

The subscription duration.

This parameter is required when you set InstanceChargeType to PrePaid.

Valid values:

  • If you set PricingCycle to Month: 1 to 9.

  • If you set PricingCycle to Year: 1 to 3.

DeletionProtection

Boolean

No

Yes

Whether to enable deletion protection.

Valid values:

  • true: Enabled.

  • false (default): Disabled.

AutoPay

Boolean

No

No

Whether to enable automatic payment.

This parameter is required when you set InstanceChargeType to Prepaid.

Valid values:

  • false: The instance is shut down.

    After an order is generated, go to the Order Hub to complete the payment.

  • true (default): Automatic payment is enabled.

Name

String

No

Yes

The name of the EIP.

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

InternetChargeType

String

No

No

The metering method of the EIP.

Valid values:

  • PayByBandwidth (default): pay-by-bandwidth.

  • PayByTraffic: pay-by-data-transfer.

Netmode

String

No

No

The network type.

Valid value: public. This value indicates the public network.

Bandwidth

Number

No

Yes

The bandwidth of the EIP.

If you do not specify this parameter, the default value of 5 Mbps is used.

IpAddress

String

No

No

The IP address of the EIP.

Specify either the IpAddress or InstanceId parameter. If you specify neither, the system randomly allocates an EIP.

Tags

List

No

Yes

The tags.

You can add up to 20 tags.

For more information, see the Tags property section.

SecurityProtectionTypes

List

No

No

The security protection level.

Valid values:

  • If you leave this parameter empty, Anti-DDoS Basic is used by default.

  • If you set this parameter to AntiDDoS_Enhanced, enhanced Anti-DDoS is used.

Note

You can specify up to 10 security protection levels.

PublicIpAddressPoolId

String

No

No

The ID of the IP address pool.

The EIP is allocated from this IP address pool. The IP address pool is visible only to users who are granted trial access. To use this feature, submit a ticket.

Tags syntax

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

Tags property

Property name

Type

Required

Update allowed

Description

Constraints

Value

String

No

No

The value of the tag.

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

Key

String

Yes

No

The key of the tag.

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

Return value

Fn::GetAtt

  • ISP: The line type.

  • AllocationId: The instance ID of the EIP.

  • EipAddress: The IP address of the EIP.

  • OrderId: The order ID of the subscription EIP instance.

Examples

  • YAML format

    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 format

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