ALIYUN::VPC::EIPSegment類型用於申請連續Elastic IP Address(EIP)。
文法
{
"Type": "ALIYUN::VPC::EIPSegment",
"Properties": {
"EipMask": Integer,
"ResourceGroupId": String,
"Netmode": String,
"Bandwidth": Integer,
"InternetChargeType": String,
"Zone": String,
"Isp": String
}
}屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
EipMask | Integer | 是 | 否 | 連續EIP的掩碼。 | 取值:
說明 由於IP位址保留區,實際申請到的連續EIP可能缺少1個、3個或者4個EIP。 |
ResourceGroupId | String | 否 | 否 | 資源群組ID。 | 無 |
Zone | String | 否 | 否 | 可用性區域。 | 無 |
Isp | String | 否 | 否 | 線路類型。 | 取值:
關於 BGP(多線)線路和 BGP(多線)_精品線路的更多資訊,請參見 什麼是Elastic IP Address。 如果您是單線頻寬的白名單使用者,您還可以選擇以下類型:
如果您是杭州金融雲使用者,該欄位必填,取值:BGP_FinanceCloud。 |
Netmode | String | 否 | 否 | 網路類型。 | 取值:
說明 僅具有混合雲白名單的使用者支援選擇混合雲類型,如需使用,請聯絡您的客戶經理。 |
Bandwidth | Integer | 否 | 否 | EIP的頻寬峰值。 | 預設值:5。 單位:Mbps。 |
InternetChargeType | String | 否 | 否 | 連續EIP的計費方式。 | 取值:
說明 當Netmode取值為hybrid時,InternetChargeType僅支援按頻寬計費(PayByBandwidth)。 |
傳回值
Fn::GetAtt
EipSegmentInstanceId:連續EIP的執行個體ID。
EipAddresses:EIP執行個體地址。
樣本
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
EipMask:
Type: Number
Description: |-
The mask of the contiguous EIP group. Valid values:
28: 16 contiguous EIPs are allocated for one call.
27: 32 contiguous EIPs are allocated for one call.
26: 64 contiguous EIPs are allocated for one call.
25: 128 contiguous EIPs are allocated for one call.
24: 256 contiguous EIPs are allocated for one call.
Note The actual number of assigned EIPs may be less than the expected number because one,
three, or four EIPs may be reserved.
AllowedValues:
- 28
- 27
- 26
- 25
- 24
Default: 28
ResourceGroupId:
Type: String
Description: The ID of the resource group to which the EIPs belong.
Default: Null
Netmode:
Type: String
Description: |-
The network type. Valid values:
public: the Internet. This is the default value. After contiguous EIPs are associated with
cloud resources, the cloud resources can access the Internet by using the EIPs.
hybrid: the hybrid cloud. After contiguous EIPs are associated with cloud resources, the
cloud resources can access the hybrid cloud by using the EIPs.
Note This network type is available only to users who are added to the whitelist. To use
this network type, contact your customer manager.
AllowedValues:
- public
- hybrid
Default: public
Bandwidth:
Type: Number
Description: 'The maximum bandwidth of the contiguous EIPs. Unit: Mbit/s. Default value: 5.'
Default: 5
InternetChargeType:
Type: String
Description: |-
The metering method of the contiguous EIPs. Valid values:
PayByBandwidth: Fees are charged based on bandwidth usage. This is the default value.
PayByTraffic: Fees are charged based on data transfer.
Note If the Netmode parameter is set to hybrid, InternetChargeType is set to PayByBandwidth.
AllowedValues:
- PayByBandwidth
- PayByTraffic
Default: PayByBandwidth
Resources:
EIPSegment:
Type: ALIYUN::VPC::EIPSegment
Properties:
EipMask:
Ref: EipMask
ResourceGroupId:
Ref: ResourceGroupId
Netmode:
Ref: Netmode
Bandwidth:
Ref: Bandwidth
InternetChargeType:
Ref: InternetChargeType
Outputs:
EipSegmentInstanceId:
Description: The ID of the contiguous EIP group.
Value:
Fn::GetAtt:
- EIPSegment
- EipSegmentInstanceId
EipAddresses:
Description: 'List of EIP addresses. like [{"AllocationId": "eip-xxx", "IpAddress": "xx.xx.xx.xx"}]'
Value:
Fn::GetAtt:
- EIPSegment
- EipAddresses{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"EipMask": {
"Type": "Number",
"Description": "The mask of the contiguous EIP group. Valid values:\n28: 16 contiguous EIPs are allocated for one call.\n27: 32 contiguous EIPs are allocated for one call.\n26: 64 contiguous EIPs are allocated for one call.\n25: 128 contiguous EIPs are allocated for one call.\n24: 256 contiguous EIPs are allocated for one call.\nNote The actual number of assigned EIPs may be less than the expected number because one,\nthree, or four EIPs may be reserved.",
"AllowedValues": [
28,
27,
26,
25,
24
],
"Default": 28
},
"ResourceGroupId": {
"Type": "String",
"Description": "The ID of the resource group to which the EIPs belong.",
"Default": null
},
"Netmode": {
"Type": "String",
"Description": "The network type. Valid values:\npublic: the Internet. This is the default value. After contiguous EIPs are associated with\ncloud resources, the cloud resources can access the Internet by using the EIPs.\nhybrid: the hybrid cloud. After contiguous EIPs are associated with cloud resources, the\ncloud resources can access the hybrid cloud by using the EIPs.\nNote This network type is available only to users who are added to the whitelist. To use\nthis network type, contact your customer manager.",
"AllowedValues": [
"public",
"hybrid"
],
"Default": "public"
},
"Bandwidth": {
"Type": "Number",
"Description": "The maximum bandwidth of the contiguous EIPs. Unit: Mbit/s. Default value: 5.",
"Default": 5
},
"InternetChargeType": {
"Type": "String",
"Description": "The metering method of the contiguous EIPs. Valid values:\nPayByBandwidth: Fees are charged based on bandwidth usage. This is the default value.\nPayByTraffic: Fees are charged based on data transfer.\nNote If the Netmode parameter is set to hybrid, InternetChargeType is set to PayByBandwidth.",
"AllowedValues": [
"PayByBandwidth",
"PayByTraffic"
],
"Default": "PayByBandwidth"
}
},
"Resources": {
"EIPSegment": {
"Type": "ALIYUN::VPC::EIPSegment",
"Properties": {
"EipMask": {
"Ref": "EipMask"
},
"ResourceGroupId": {
"Ref": "ResourceGroupId"
},
"Netmode": {
"Ref": "Netmode"
},
"Bandwidth": {
"Ref": "Bandwidth"
},
"InternetChargeType": {
"Ref": "InternetChargeType"
}
}
}
},
"Outputs": {
"EipSegmentInstanceId": {
"Description": "The ID of the contiguous EIP group.",
"Value": {
"Fn::GetAtt": [
"EIPSegment",
"EipSegmentInstanceId"
]
}
},
"EipAddresses": {
"Description": "List of EIP addresses. like [{\"AllocationId\": \"eip-xxx\", \"IpAddress\": \"xx.xx.xx.xx\"}]",
"Value": {
"Fn::GetAtt": [
"EIPSegment",
"EipAddresses"
]
}
}
}
}