ALIYUN::VPC::SnatEntry
更新時(shí)間:
ALIYUN::VPC::SnatEntry類型用于在SNAT列表中添加SNAT條目。
語(yǔ)法
{
"Type": "ALIYUN::VPC::SnatEntry",
"Properties": {
"SnatTableId": String,
"SnatEntryName": String,
"SourceVSwitchIds": List,
"SourceCIDR": String,
"SnatIp": String,
"EipAffinity": Integer
}
}
屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
SnatTableId | String | 是 | 否 | SNAT表ID。 | 無(wú) |
SnatEntryName | String | 否 | 是 | SNAT規(guī)則的名稱。 | 長(zhǎng)度為2~128個(gè)字符,必須以英文字母或漢字開(kāi)頭,但不能以 |
SourceVSwitchIds | List | 否 | 否 | 需要公網(wǎng)訪問(wèn)的交換機(jī)的ID。 | 無(wú) |
SourceCIDR | String | 否 | 否 | 交換機(jī)或ECS實(shí)例的網(wǎng)段。 | 不能同時(shí)指定SourceCIDR和SourceVSwitchIds。 |
SnatIp | String | 是 | 是 | 公網(wǎng)IP地址。 | 多個(gè)IP之間用半角逗號(hào)(,)間隔。 |
EipAffinity | Integer | 否 | 否 | 是否打開(kāi)EIP親和性。 | 取值:
說(shuō)明 打開(kāi)EIP親和性開(kāi)關(guān)后,如果SNAT綁定多個(gè)EIP,同一個(gè)客戶端將使用相同的EIP訪問(wèn)公網(wǎng),否則客戶端將從綁定的EIP中隨機(jī)選取EIP訪問(wèn)公網(wǎng)。 |
返回值
Fn::GetAtt
SnatEntryIds:SNAT條目ID。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
SourceVSwitchId:
AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
Type: String
Label:
zh-cn: 網(wǎng)絡(luò)交換機(jī)ID
en: VSwitch ID
SnatIp:
Type: String
Description: The public IP address. Separate multiple EIPs with commas.
SnatTableId:
Type: String
Description: The ID of the SNAT table.
Resources:
SnatEntry:
Type: ALIYUN::VPC::SnatEntry
Properties:
SourceVSwitchIds:
- Ref: SourceVSwitchId
SnatIp:
Ref: SnatIp
SnatTableId:
Ref: SnatTableId
Outputs:
SnatEntryIds:
Description: The IDS of the SNAT entry.
Value:
Fn::GetAtt:
- SnatEntry
- SnatEntryIds
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"SourceVSwitchId": {
"AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
"Type": "String",
"Label": {
"zh-cn": "網(wǎng)絡(luò)交換機(jī)ID",
"en": "VSwitch ID"
}
},
"SnatIp": {
"Type": "String",
"Description": "The public IP address. Separate multiple EIPs with commas."
},
"SnatTableId": {
"Type": "String",
"Description": "The ID of the SNAT table."
}
},
"Resources": {
"SnatEntry": {
"Type": "ALIYUN::VPC::SnatEntry",
"Properties": {
"SourceVSwitchIds": [
{
"Ref": "SourceVSwitchId"
}
],
"SnatIp": {
"Ref": "SnatIp"
},
"SnatTableId": {
"Ref": "SnatTableId"
}
}
}
},
"Outputs": {
"SnatEntryIds": {
"Description": "The IDS of the SNAT entry.",
"Value": {
"Fn::GetAtt": [
"SnatEntry",
"SnatEntryIds"
]
}
}
}
}
文檔內(nèi)容是否對(duì)您有幫助?