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
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
DeletionProtection | Boolean | No | No | Specifies whether to enable the deletion protection feature. | Default value: false. Valid values:
|
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 (-). The name 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. | Set the value to public, which indicates the Internet. |
Bandwidth | Number | No | Yes | The bandwidth of the EIP. Unit: Mbit/s. | Default value: 5. If you do not specify this property, the default value is used. |
InternetChargeType | String | No | No | The metering method of the EIP. | Default value: PayByBandwidth. Valid values:
|
InstanceChargeType | String | No | No | The billing method of the EIP. | Default value: Postpaid. Valid values:
|
PricingCycle | String | No | No | The billing cycle of the EIP to which you are subscribed. | Default value: Month. Valid values:
Note PricingCycle is required if InstanceChargeType is set to Prepaid.
|
Period | Number | No | No | The subscription duration. |
Default value: 1.
Note Period is required if InstanceChargeType is set to Prepaid.
|
AutoPay | Boolean | No | No | Specifies whether to enable automatic payment. | Default value: true. Valid values:
Note This property is required if the InstanceChargeType property is set to Prepaid.
|
Isp | String | No | No | The line type. | Default value: BGP. Valid values:
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. The description must start with a letter but cannot start with http:// or https:// . |
Tags | List | No | Yes | The tags of the EIP. | Up to 20 tags can be specified. 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:
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. |
Tags syntax
"Tags": [
{
"Key": String,
"Value": String
}
]
Tags properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Key | String | Yes | No | The key of the tag. | The key must be 1 to 128 characters in length and cannot contain http:// or https:// . It cannot start with acs: or aliyun . |
Value | String | No | No | The value of the tag. | The value must be 0 to 128 characters in length and cannot contain http:// or https:// . It cannot start with acs: or aliyun . |
Return values
Fn::GetAtt
- EipAddress: the allocated EIP.
- AllocationId: the ID of the instance to which the EIP is allocated.
- OrderId: the order ID, which is returned only when InstanceChargeType is set to Prepaid.
- Isp: the line type.
Examples
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" ] } } } }