Cria uma entrada SNAT em uma tabela SNAT do NAT Gateway.
Sintaxe
{
"Type": "ALIYUN::ECS::SNatEntry",
"Properties": {
"SNatTableId": String,
"SNatIp": String,
"SnatEntryName": String,
"SourceCIDR": String,
"SourceVSwitchId": String
}
}
Propriedades
| Nome da propriedade | Tipo | Obrigatório | Atualização permitida | Descrição | Restrições |
| SNatTableId | String | Sim | Sim | ID da tabela SNAT. | Nenhuma |
| SNatIp | String | Sim | Sim | Endereço IP público para SNAT. | O endereço deve pertencer ao plano de largura de banda do NAT Gateway. Não é possível usar o mesmo endereço IP público na tabela de encaminhamento e na tabela SNAT simultaneamente. |
| SnatEntryName | String | Não | Sim | Nome da entrada SNAT. | O nome deve ter de 2 a 128 caracteres. Deve começar com uma letra ou caractere chinês e não pode iniciar com http:// ou https://. |
| SourceCIDR | String | Não | Não | Bloco CIDR do vSwitch ou da instância ECS.
|
Especifique SourceCIDR ou SourceVSwitchId. |
| SourceVSwitchId | String | Não | Sim | ID do vSwitch. As instâncias ECS neste vSwitch usam a entrada SNAT para acessar a Internet. | Especifique SourceCIDR ou SourceVSwitchId. |
Valores de retorno
Fn::GetAtt
SNatEntryId: ID da entrada SNAT.
Exemplos
-
Formato
YAMLROSTemplateFormatVersion: '2015-09-01' Parameters: SourceVSwitchId: Type: String AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId Description: The vSwitch that is allowed to access the Internet. SNatTableId: Type: String Description: The SNAT table in which to create the SNAT entry. 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: The ID of the created SNAT entry. Value: Fn::GetAtt: - SNatTableEntry - SNatEntryId -
Formato
JSON{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "SourceVSwitchId": { "Type": "String", "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId", "Description": "The vSwitch that is allowed to access the Internet." }, "SNatTableId": { "Type": "String", "Description": "The SNAT table in which to create the SNAT entry." } }, "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": "The ID of the created SNAT entry.", "Value": { "Fn::GetAtt": [ "SNatTableEntry", "SNatEntryId" ] } } } }