ALIYUN::ECS::SNatEntry digunakan untuk mengonfigurasi tabel Source Network Address Translation (SNAT) pada gateway NAT.
Sintaksis
{
"Type": "ALIYUN::ECS::SNatEntry",
"Properties": {
"SNatTableId": String,
"SNatIp": String,
"SnatEntryName": String,
"SourceCIDR": String,
"SourceVSwitchId": String
}
}Properti
| Properti | Tipe | Diperlukan | Dapat Diedit | Deskripsi | Kendala |
| SNatTableId | String | Ya | Ya | ID tabel SNAT. | Tidak ada |
| SNatIp | String | Ya | Ya | Alamat IP publik yang akan diterjemahkan. | Alamat IP publik harus termasuk dalam rencana layanan NAT. Tidak dapat ada di kedua tabel penerusan dan tabel SNAT. |
| SnatEntryName | String | Tidak | Ya | Nama entri SNAT. | Nama harus memiliki panjang 2 hingga 128 karakter. Harus dimulai dengan huruf dan tidak boleh dimulai dengan http:// atau https://. |
| SourceCIDR | String | Tidak | Tidak | Blok CIDR dari vSwitch atau alamat IP dari instance ECS.
| Anda harus menentukan salah satu parameter SourceCIDR dan SourceVSwtichId, tetapi Anda tidak dapat menentukan keduanya. |
| SourceVSwitchId | String | Tidak | Ya | ID vSwitch dari instance ECS yang mengakses Internet menggunakan fitur SNAT. | Anda harus menentukan salah satu parameter SourceCIDR dan SourceVSwtichId, tetapi Anda tidak dapat menentukan keduanya. |
Parameter respons
Fn::GetAtt
SNatEntryId: ID setiap entri dalam tabel SNAT.
Contoh
Format JSON{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "SourceVSwitchId": { "Type": "String", "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId", "Description": "Mengizinkan switch mana yang dapat mengakses internet." }, "SNatTableId": { "Type": "String", "Description": "Buat entri SNAT di tabel SNAT yang ditentukan." } }, "Resources": { "SNatTableEntry": { "Type": "ALIYUN::ECS::SNatEntry", "Properties": { "SourceVSwitchId": { "Ref": "SourceVSwitchId" }, "SnatEntryName": "test_entry_name", "SNatTableId": { "Ref": "SNatTableId" }, "SNatIp": "100.100.100.1" } } }, "Outputs": { "SNatEntryId": { "Description": "ID entri SNAT yang dibuat.", "Value": { "Fn::GetAtt": [ "SNatTableEntry", "SNatEntryId" ] } } } }