ALIYUN::VPC::SnatEntry digunakan untuk menambahkan entri SNAT ke tabel SNAT.
Sintaksis
{
"Type": "ALIYUN::VPC::SnatEntry",
"Properties": {
"SnatTableId": String,
"SnatEntryName": String,
"SourceVSwitchIds": List,
"SourceCIDR": String,
"SnatIp": String,
"EipAffinity": Integer
}
}Properti
Properti | Tipe | Diperlukan | Dapat Diedit | Deskripsi | Kendala |
SnatTableId | String | Ya | Tidak | ID tabel SNAT. | Tidak ada. |
SnatEntryName | String | Tidak | Ya | Nama entri SNAT. | Nama harus memiliki panjang 2 hingga 128 karakter. Nama harus dimulai dengan huruf, dan tidak boleh dimulai dengan |
SourceVSwitchIds | List | Tidak | Ya | ID vSwitch yang mengakses Internet. | Tidak ada. |
SourceCIDR | String | Tidak | Tidak | Blok CIDR dari vSwitch atau instance Elastic Compute Service (ECS). | Anda tidak dapat menentukan SourceCIDR dan SourceVSwitchIds secara bersamaan. |
SnatIp | String | Ya | Ya | Alamat IP publik. | Pisahkan beberapa alamat IP dengan koma (,). |
EipAffinity | Integer | Tidak | Tidak | Menentukan apakah akan mengaktifkan afinitas alamat IP elastis (EIP). | Nilai valid:
Catatan Jika afinitas EIP diaktifkan dan entri SNAT dikaitkan dengan beberapa EIP, klien menggunakan EIP yang sama untuk mengakses Internet. Jika tidak, klien menggunakan EIP yang dipilih dari EIP terkait untuk mengakses Internet. |
Nilai Pengembalian
Fn::GetAtt
SnatEntryIds: ID entri SNAT.
Contoh
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
SourceVSwitchId:
AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
Type: String
Label:
zh-cn: 网络交换机ID
en: VSwitch ID
SnatIp:
Type: String
Description: Alamat IP publik. Pisahkan beberapa EIP dengan koma.
SnatTableId:
Type: String
Description: ID dari tabel SNAT.
Resources:
SnatEntry:
Type: ALIYUN::VPC::SnatEntry
Properties:
SourceVSwitchIds:
- Ref: SourceVSwitchId
SnatIp:
Ref: SnatIp
SnatTableId:
Ref: SnatTableId
Outputs:
SnatEntryIds:
Description: ID dari entri SNAT.
Value:
Fn::GetAtt:
- SnatEntry
- SnatEntryIds{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"SourceVSwitchId": {
"AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
"Type": "String",
"Label": {
"zh-cn": "网络交换机ID",
"en": "VSwitch ID"
}
},
"SnatIp": {
"Type": "String",
"Description": "Alamat IP publik. Pisahkan beberapa EIP dengan koma."
},
"SnatTableId": {
"Type": "String",
"Description": "ID dari tabel SNAT."
}
},
"Resources": {
"SnatEntry": {
"Type": "ALIYUN::VPC::SnatEntry",
"Properties": {
"SourceVSwitchIds": [
{
"Ref": "SourceVSwitchId"
}
],
"SnatIp": {
"Ref": "SnatIp"
},
"SnatTableId": {
"Ref": "SnatTableId"
}
}
}
},
"Outputs": {
"SnatEntryIds": {
"Description": "ID dari entri SNAT.",
"Value": {
"Fn::GetAtt": [
"SnatEntry",
"SnatEntryIds"
]
}
}
}
}