Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::CLOUDFW::VpcFirewallCen

Última atualização: Jun 27, 2026

O recurso ALIYUN::CLOUDFW::VpcFirewallCen cria um firewall de VPC para uma instância do Cloud Enterprise Network (CEN).

Sintaxe

{
  "Type": "ALIYUN::CLOUDFW::VpcFirewallCen",
  "Properties": {
    "CenId": String,
    "FirewallVpcZoneId": String,
    "FirewallSwitch": String,
    "NetworkInstanceId": String,
    "VpcRegion": String,
    "VpcFirewallName": String,
    "FirewallVSwitchCidrBlock": String,
    "FirewallVpcCidrBlock": String,
    "MemberUid": String,
    "VSwitchId": String
  }
}

Propriedades

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

CenId

String

Sim

Não

ID da instância do Cloud Enterprise Network (CEN).

Nenhuma.

FirewallVpcZoneId

String

Sim

Não

ID da zona do vSwitch do firewall de VPC.

Para minimizar a latência, especifique a mesma zona do vSwitch da VPC de negócios.

Se deixado em branco, o sistema aloca uma zona automaticamente.

Nota

Esta propriedade tem efeito apenas na primeira criação de um firewall de VPC na instância CEN e região atuais. Para obter mais informações sobre as zonas com suporte em cada região, consulte DescribeZones.

FirewallSwitch

String

Sim

Sim

Define se o firewall de VPC deve ser ativado.

Valores válidos:

  • open (padrão): ativa o firewall de VPC durante a criação.

  • close: desativa o firewall de VPC durante a criação. Chame a operação ModifyVpcFirewallCenSwitchStatus para ativá-lo posteriormente.

NetworkInstanceId

String

Sim

Não

ID da VPC para a qual crie o firewall.

Nenhuma.

VpcRegion

String

Sim

Não

ID da região da VPC.

Nota

Para obter mais informações sobre as regiões com suporte ao Cloud Firewall, consulte Regiões suportadas.

VpcFirewallName

String

Sim

Sim

Nome do firewall de VPC.

Nenhuma.

FirewallVSwitchCidrBlock

String

Não

Não

Bloco CIDR do vSwitch do firewall de VPC.

Bloco CIDR do vSwitch Cloud_Firewall_VSWITCH, criado automaticamente para redirecionamento de tráfego. A máscara de sub-rede deve ser /29 ou menor. O bloco não pode entrar em conflito com o planejamento de rede e deve ser um subconjunto do bloco CIDR do firewall de VPC.

Padrão: 10.219.219.216/29.

Nota

Tem efeito apenas na primeira criação de um firewall de VPC na instância CEN e região atuais.

FirewallVpcCidrBlock

String

Não

Não

Bloco CIDR da VPC do firewall de VPC.

Bloco CIDR da VPC Cloud_Firewall_VPC, criada automaticamente para redirecionamento de tráfego. A máscara de sub-rede deve ser /28 ou menor.

Padrão: 10.0.0.0/8.

Nota

Tem efeito apenas na primeira criação de um firewall de VPC na instância CEN e região atuais.

MemberUid

String

Não

Não

UID da conta de membro gerenciada pela sua conta Alibaba Cloud.

Nenhuma.

VSwitchId

String

Não

Não

ID do vSwitch associado ao Cloud Firewall.

Nenhuma.

Valores de retorno

Fn::GetAtt

VpcFirewallId: ID da instância do firewall de VPC.

Exemplos

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  NetworkInstanceId:
    Type: String
    Description:
      en: The ID of the VPC for which you want to create the VPC firewall.
    Required: true
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
  VSwitchId:
    AssociationPropertyMetadata:
      VpcId: ${NetworkInstanceId}
    AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
    Type: String
    Description:
      en: The ID of the vSwitch that is used to associate with the elastic network interface (ENI) required by the VPC firewall.
    Required: false
  CenId:
    Type: String
    Description:
      en: The ID of the CEN instance.
    AssociationProperty: ALIYUN::CEN::Instance::CenId
    Required: true
  VpcFirewallName:
    Type: String
    Description:
      en: The instance name of the VPC firewall.
    Required: true
  FirewallSwitch:
    Type: String
    Description:
      en: |-
        Specifies whether to enable the VPC firewall. Valid values:
        open: After you create the VPC firewall, the VPC firewall is automatically enabled. This is the default value.
        close: After you create the VPC firewall, the VPC firewall is disabled. You can call the ModifyVpcFirewallCenSwitchStatus operation to manually enable the VPC firewall.
    AllowedValues:
      - open
      - close
    Required: true
    Default: open
Resources:
  ExtensionResource:
    Type: ALIYUN::CLOUDFW::VpcFirewallCen
    Properties:
      NetworkInstanceId:
        Ref: NetworkInstanceId
      VSwitchId:
        Ref: VSwitchId
      CenId:
        Ref: CenId
      VpcRegion:
        Ref: ALIYUN::Region
      FirewallVpcZoneId:
        Fn::Select:
          - '0'
          - Fn::GetAZs:
              Ref: ALIYUN::Region
      VpcFirewallName:
        Ref: VpcFirewallName
      FirewallSwitch:
        Ref: FirewallSwitch
Outputs:
  VpcFirewallId:
    Description: The instance ID of the VPC firewall.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - VpcFirewallId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "NetworkInstanceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the VPC for which you want to create the VPC firewall."
      },
      "Required": true,
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
    },
    "VSwitchId": {
      "AssociationPropertyMetadata": {
        "VpcId": "${NetworkInstanceId}"
      },
      "AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
      "Type": "String",
      "Description": {
        "en": "The ID of the vSwitch that is used to associate with the elastic network interface (ENI) required by the VPC firewall."
      },
      "Required": false
    },
    "CenId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the CEN instance."
      },
      "AssociationProperty": "ALIYUN::CEN::Instance::CenId",
      "Required": true
    },
    "VpcFirewallName": {
      "Type": "String",
      "Description": {
        "en": "The instance name of the VPC firewall."
      },
      "Required": true
    },
    "FirewallSwitch": {
      "Type": "String",
      "Description": {
        "en": "Specifies whether to enable the VPC firewall. Valid values:\nopen: After you create the VPC firewall, the VPC firewall is automatically enabled. This is the default value.\nclose: After you create the VPC firewall, the VPC firewall is disabled. You can call the ModifyVpcFirewallCenSwitchStatus operation to manually enable the VPC firewall."
      },
      "AllowedValues": [
        "open",
        "close"
      ],
      "Required": true,
      "Default": "open"
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::CLOUDFW::VpcFirewallCen",
      "Properties": {
        "NetworkInstanceId": {
          "Ref": "NetworkInstanceId"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "CenId": {
          "Ref": "CenId"
        },
        "VpcRegion": {
          "Ref": "ALIYUN::Region"
        },
        "FirewallVpcZoneId": {
          "Fn::Select": [
            "0",
            {
              "Fn::GetAZs": {
                "Ref": "ALIYUN::Region"
              }
            }
          ]
        },
        "VpcFirewallName": {
          "Ref": "VpcFirewallName"
        },
        "FirewallSwitch": {
          "Ref": "FirewallSwitch"
        }
      }
    }
  },
  "Outputs": {
    "VpcFirewallId": {
      "Description": "The instance ID of the VPC firewall.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "VpcFirewallId"
        ]
      }
    }
  }
}