ALIYUN::VPC::CommonBandwidthPackageIp类型用于添加EIP到共享带宽中。
- 只支持添加按量付费的EIP。
- EIP和共享带宽的地域必须相同。
语法
{
"Type": "ALIYUN::VPC::CommonBandwidthPackageIp",
"Properties": {
"Eips": List,
"BandwidthPackageId": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
Eips | List | 是 | 否 | 要添加的EIP。 | 无。 |
BandwidthPackageId | String | 是 | 否 | 共享带宽的ID。 | 无。 |
Eips语法
"Eips": [
{
"Bandwidth": Integer,
"AllocationId": String
}
]
Eips属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
Bandwidth | Integer | 否 | 否 | 带宽峰值。 | 0表示不限制。
默认值:0。 |
AllocationId | String | 是 | 否 | EIP实例的ID。 | 无。 |
返回值
Fn::GetAtt
- AllocationIds:所有的EIP的ID。
- IpAddresses:所有的EIP地址。
示例
JSON示例
{
"ROSTemplateFormatVersion": "2015-09-01",
"Resources": {
"CommonBandwidthPackageIp": {
"Type": "ALIYUN::VPC::CommonBandwidthPackageIp",
"Properties": {
"Eips": {
"Ref": "Eips"
},
"BandwidthPackageId": {
"Ref": "BandwidthPackageId"
}
}
}
},
"Parameters": {
"Eips": {
"Type": "Json",
"Description": "List of eip associated with the Internet Shared Bandwidth instance."
},
"BandwidthPackageId": {
"Type": "String",
"Description": "The ID of the Internet Shared Bandwidth instance."
}
},
"Outputs": {
"AllocationIds": {
"Description": "All eip allocation ids of common bandwidth package.",
"Value": {
"Fn::GetAtt": [
"CommonBandwidthPackageIp",
"AllocationIds"
]
}
},
"IpAddresses": {
"Description": "All eip addresses of common bandwidth package.",
"Value": {
"Fn::GetAtt": [
"CommonBandwidthPackageIp",
"IpAddresses"
]
}
}
}
}
YML示例
ROSTemplateFormatVersion: '2015-09-01'
Resources:
CommonBandwidthPackageIp:
Type: 'ALIYUN::VPC::CommonBandwidthPackageIp'
Properties:
Eips:
Ref: Eips
BandwidthPackageId:
Ref: BandwidthPackageId
Parameters:
Eips:
Type: Json
Description: List of eip associated with the Internet Shared Bandwidth instance.
BandwidthPackageId:
Type: String
Description: The ID of the Internet Shared Bandwidth instance.
Outputs:
AllocationIds:
Description: All eip allocation ids of common bandwidth package.
Value:
'Fn::GetAtt':
- CommonBandwidthPackageIp
- AllocationIds
IpAddresses:
Description: All eip addresses of common bandwidth package.
Value:
'Fn::GetAtt':
- CommonBandwidthPackageIp
- IpAddresses