Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::VPC::NatIpCidr

Última atualização: Jun 27, 2026

Crie um bloco CIDR NAT.

Sintaxe

{
  "Type": "ALIYUN::VPC::NatIpCidr",
  "Properties": {
    "NatIpCidr": String,
    "NatIpCidrDescription": String,
    "NatIpCidrName": String,
    "NatGatewayId": String
  }
}

Propriedades

Propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

NatIpCidr

String

Sim

Não

Bloco CIDR NAT a ser criado.

O bloco CIDR NAT deve atender às seguintes condições:

  • Deve estar contido em um dos seguintes blocos CIDR ou em suas sub-redes: 10.0.0.0/8, 172.16.0.0/12 e 192.168.0.0/16.

  • A máscara de sub-rede do bloco CIDR NAT deve ter de 16 a 32 bits.

  • Não pode haver sobreposição com o bloco CIDR privado da Virtual Private Cloud (VPC) à qual o gateway NAT da VPC pertence. Para usar outros endereços IP do bloco CIDR privado da VPC na prestação de serviços NAT, crie um vSwitch no bloco CIDR da VPC e anexe-o a outro gateway NAT da VPC.

  • Para usar endereços IP públicos na prestação de serviços NAT, verifique se eles estão dentro de um bloco CIDR de cliente da VPC à qual o gateway NAT da VPC pertence. Para obter mais informações sobre blocos CIDR de cliente, consulte Perguntas frequentes sobre VPC.

NatIpCidrDescription

String

Sim

Sim

Descrição do bloco CIDR NAT.

Deve ter de 2 a 256 caracteres, começar com uma letra e não pode iniciar com http:// ou https://.

NatIpCidrName

String

Sim

Sim

Nome do bloco CIDR NAT.

Deve ter de 2 a 128 caracteres e pode conter letras, dígitos, pontos (.), sublinhados (_) e hifens (-). Deve começar com uma letra e não pode iniciar com http:// ou https://.

NatGatewayId

String

Sim

Não

ID do gateway NAT da VPC a ser associado ao bloco CIDR NAT.

Nenhuma.

Valores de retorno

Fn::GetAtt

NatIpCidrId: ID do bloco CIDR NAT.

Exemplos

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      NatGatewayId:
        Description:
          en: The ID of the Virtual Private Cloud (VPC) NAT gateway with which you want
            to associate the CIDR block.
        Required: true
        Type: String
      NatIpCidr:
        Description:
          en: 'The NAT CIDR block that you want to associate with the NAT gateway.
    
            The new CIDR block must meet the following conditions:
    
            The NAT CIDR block must fall within 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16,
            or their subnets.
    
            The subnet mask must be 16 to 32 bits in length.
    
            The NAT CIDR block cannot overlap with the private CIDR block of the VPC to
            which the NAT gateway belongs. If you want to use other IP addresses from
            the private CIDR block of the VPC to provide NAT services, create a vSwitch
            and attach the vSwitch to another VPC NAT gateway.
    
            If you want to use public IP addresses to provide NAT services, make sure
            that the public IP addresses fall within a customer CIDR block of the VPC
            to which the VPC NAT gateway belongs. For more information, see What is customer
            CIDR block?.'
        Required: true
        Type: String
      NatIpCidrDescription:
        Description:
          en: 'The description of the NAT CIDR block.
    
            The description must be 2 to 256 characters in length and start with a letter.
            The description cannot start with http:// or https://.'
        Required: true
        Type: String
      NatIpCidrName:
        Description:
          en: 'The name of the CIDR block.
    
            The name must be 2 to 128 characters in length, and can contain letters, digits,
            periods (.), underscores (_), and hyphens (-). It must start with a letter.
            The name must start with a letter and cannot start with http:// or https://.'
        Required: true
        Type: String
    Resources:
      VPCNatIpCidr:
        Properties:
          NatGatewayId:
            Ref: NatGatewayId
          NatIpCidr:
            Ref: NatIpCidr
          NatIpCidrDescription:
            Ref: NatIpCidrDescription
          NatIpCidrName:
            Ref: NatIpCidrName
        Type: ALIYUN::VPC::NatIpCidr
    Outputs:
      NatIpCidrId:
        Description: The ID of the NAT CIDR block.
        Value:
          Fn::GetAtt:
          - VPCNatIpCidr
          - NatIpCidrId
                            
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "NatIpCidr": {
          "Type": "String",
          "Description": {
            "en": "The NAT CIDR block that you want to associate with the NAT gateway.\nThe new CIDR block must meet the following conditions:\nThe NAT CIDR block must fall within 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, or their subnets.\nThe subnet mask must be 16 to 32 bits in length.\nThe NAT CIDR block cannot overlap with the private CIDR block of the VPC to which the NAT gateway belongs. If you want to use other IP addresses from the private CIDR block of the VPC to provide NAT services, create a vSwitch and attach the vSwitch to another VPC NAT gateway.\nIf you want to use public IP addresses to provide NAT services, make sure that the public IP addresses fall within a customer CIDR block of the VPC to which the VPC NAT gateway belongs. For more information, see What is customer CIDR block?."
          },
          "Required": true
        },
        "NatIpCidrDescription": {
          "Type": "String",
          "Description": {
            "en": "The description of the NAT CIDR block.\nThe description must be 2 to 256 characters in length and start with a letter. The description cannot start with http:// or https://."
          },
          "Required": true
        },
        "NatIpCidrName": {
          "Type": "String",
          "Description": {
            "en": "The name of the CIDR block.\nThe name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. The name must start with a letter and cannot start with http:// or https://."
          },
          "Required": true
        },
        "NatGatewayId": {
          "Type": "String",
          "Description": {
            "en": "The ID of the Virtual Private Cloud (VPC) NAT gateway with which you want to associate the CIDR block."
          },
          "Required": true
        }
      },
      "Resources": {
        "VPCNatIpCidr": {
          "Type": "ALIYUN::VPC::NatIpCidr",
          "Properties": {
            "NatIpCidr": {
              "Ref": "NatIpCidr"
            },
            "NatIpCidrDescription": {
              "Ref": "NatIpCidrDescription"
            },
            "NatIpCidrName": {
              "Ref": "NatIpCidrName"
            },
            "NatGatewayId": {
              "Ref": "NatGatewayId"
            }
          }
        }
      },
      "Outputs": {
        "NatIpCidrId": {
          "Description": "The ID of the NAT CIDR block.",
          "Value": {
            "Fn::GetAtt": [
              "VPCNatIpCidr",
              "NatIpCidrId"
            ]
          }
        }
      }
    }