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的描述。 | 必須以英文字母開頭,不能以 |
ResourceGroupId | String | 否 | 是 | EIP所屬的資源組ID。 | 無 |
InstanceId | String | 否 | 否 | EIP的實例ID。 | 您可以指定IpAddress或InstanceId其中一個參數。如果都不指定,系統會隨機申請EIP。 |
InstanceChargeType | String | 否 | 否 | EIP的付費方式。 | 取值:
|
PricingCycle | String | 否 | 否 | 預付費的計費周期。 | 當InstanceChargeType取值為Prepaid時,必須指定該參數。 取值:
|
ISP | String | 否 | 否 | 線路類型。 | 取值:
說明 如果是開通了單線帶寬白名單的用戶,ISP字段可以設置為ChinaTelecom(中國電信)、ChinaUnicom(中國聯通)和ChinaMobile(中國移動)。 |
Period | Number | 否 | 否 | 購買時長。 | 當InstanceChargeType取值為PrePaid時,必須指定該參數。 取值范圍:
|
DeletionProtection | Boolean | 否 | 是 | 是否開啟刪除保護。 | 取值:
|
AutoPay | Boolean | 否 | 否 | 是否開啟自動付費。 | 當InstanceChargeType取值為Prepaid時,必須指定該參數。 取值:
|
Name | String | 否 | 是 | EIP的名稱。 | 長度為2~128個字符。以英文字母開頭,不能以 |
InternetChargeType | String | 否 | 否 | EIP的計費方式。 | 取值:
|
Netmode | String | 否 | 否 | 網絡類型。 | 取值:public,表示公網。 |
Bandwidth | Number | 否 | 是 | EIP的帶寬值。 | 如果不指定,則取默認值5 Mbps。 |
IpAddress | String | 否 | 否 | EIP的地址。 | 您可以指定IpAddress或InstanceId其中一個參數。如果都不指定,系統會隨機申請EIP。 |
Tags | List | 否 | 是 | 標簽。 | 最多支持設置20個標簽。 更多信息,請參見Tags屬性。 |
SecurityProtectionTypes | List | 否 | 否 | 安全防護級別。 | 取值:
說明 您最多可以設置10個安全防護級別。 |
PublicIpAddressPoolId | String | 否 | 否 | IP地址池ID。 | EIP將從該IP地址池中分配,IP地址池僅對通過試用申請的用戶可見。如需使用,請提交工單。 |
Tags語法
"Tags": [
{
"Value": String,
"Key": String
}
]
Tags屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
Value | String | 否 | 否 | 標簽值。 | 長度為0~128個字符,不能以 |
Key | String | 是 | 否 | 標簽鍵。 | 長度為1~128個字符,不能以 |
返回值
Fn::GetAtt
ISP:線路類型。
AllocationId:EIP實例ID。
EipAddress:EIP地址。
OrderId:預付費EIP實例的訂單ID。
示例
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
{ "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" ] } } } }