Crie um firewall de Virtual Private Cloud (VPC).
Sintaxe
{
"Type": "ALIYUN::CLOUDFW::VpcFirewallConfigure",
"Properties": {
"FirewallSwitch": String,
"LocalVpcRegion": String,
"LocalVpcCidrTableList": List,
"LocalVpcId": String,
"PeerVpcId": String,
"PeerVpcRegion": String,
"PeerVpcCidrTableList": List,
"VpcFirewallName": String,
"MemberUid": String
}
}
Propriedades
|
Propriedade |
Tipo |
Obrigatório |
Editável |
Descrição |
Restrição |
|
FirewallSwitch |
String |
Sim |
Sim |
Status do firewall de VPC após a criação. |
Valores válidos:
|
|
LocalVpcRegion |
String |
Sim |
Não |
ID da região da VPC local. |
Nota
Para obter mais informações sobre as regiões que oferecem suporte ao Cloud Firewall, consulte Regiões suportadas. |
|
LocalVpcCidrTableList |
List |
Sim |
Sim |
Blocos CIDR da VPC local. |
Para obter mais informações, consulte Propriedades de LocalVpcCidrTableList. |
|
LocalVpcId |
String |
Sim |
Não |
ID da VPC local. |
Nenhuma. |
|
PeerVpcId |
String |
Sim |
Não |
ID da VPC par. |
Nenhuma. |
|
PeerVpcRegion |
String |
Sim |
Não |
ID da região da VPC par. |
Nota
Para obter mais informações sobre as regiões que oferecem suporte ao Cloud Firewall, consulte Regiões suportadas. |
|
PeerVpcCidrTableList |
List |
Sim |
Sim |
Blocos CIDR da VPC par. |
Para obter mais informações, consulte Propriedades de PeerVpcCidrTableList. |
|
VpcFirewallName |
String |
Sim |
Sim |
Nome do firewall de VPC. |
Nenhuma. |
|
MemberUid |
String |
Não |
Não |
UID do membro no Alibaba Cloud. |
Nenhuma. |
Sintaxe de LocalVpcCidrTableList
"LocalVpcCidrTableList": [
{
"RouteTableId": String,
"RouteEntryList": List
}
]
Propriedades de LocalVpcCidrTableList
|
Propriedade |
Tipo |
Obrigatório |
Editável |
Descrição |
Restrição |
|
RouteTableId |
String |
Sim |
Não |
ID da tabela de rotas da VPC local. |
Nenhuma. |
|
RouteEntryList |
List |
Não |
Não |
Detalhes dos blocos CIDR da VPC local. |
Para obter mais informações, consulte a seção "Propriedades de RouteEntryList". |
Sintaxe de RouteEntryList
"RouteEntryList": [
{
"NextHopInstanceId": String,
"DestinationCidr": String
}
]
Propriedades de RouteEntryList
|
Propriedade |
Tipo |
Obrigatório |
Editável |
Descrição |
Restrição |
|
DestinationCidr |
String |
Sim |
Não |
Bloco CIDR de destino da VPC local. |
Nenhuma. |
|
NextHopInstanceId |
String |
Não |
Não |
ID da instância do próximo salto para a VPC local. |
Nenhuma. |
Sintaxe de PeerVpcCidrTableList
"PeerVpcCidrTableList": [
{
"RouteTableId": String,
"RouteEntryList": List
}
]
Propriedades de PeerVpcCidrTableList
|
Propriedade |
Tipo |
Obrigatório |
Editável |
Descrição |
Restrição |
|
RouteTableId |
String |
Sim |
Não |
ID da tabela de rotas da VPC par. |
Nenhuma. |
|
RouteEntryList |
List |
Não |
Não |
Detalhes dos blocos CIDR da VPC par. |
Para obter mais informações, consulte Propriedades de RouteEntryList. |
Valores de retorno
Fn::GetAtt
VpcFirewallId: ID do firewall de VPC.
Exemplos
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
LocalVpcCidrTableList:
AssociationPropertyMetadata:
Parameter:
AssociationPropertyMetadata:
Parameters:
RouteTableId:
Type: String
Description:
en: The ID of the route table for the local VPC.
Required: true
RouteEntryList:
AssociationPropertyMetadata:
Parameter:
AssociationPropertyMetadata:
Parameters:
NextHopInstanceId:
Type: Json
Description:
en: The NextHopInstanceId parameter indicates the instance ID of the next hop for the local VPC.
Required: false
DestinationCidr:
Type: String
Description:
en: The DestinationCidr parameter indicates the destination CIDR block of the local VPC.
Required: true
Type: Json
Required: false
AssociationProperty: List[Parameter]
Type: Json
Description:
en: The value is a JSON string that contains the DestinationCidr and NextHopInstanceId parameters.
Required: false
MinLength: 1
MaxLength: 100
Type: Json
Required: false
AssociationProperty: List[Parameter]
Type: Json
Description:
en: 'The CIDR blocks of the local VPC. '
Required: true
MinLength: 1
MaxLength: 1
VpcFirewallName:
Type: String
Description:
en: The instance name of the VPC firewall.
Required: true
PeerVpcCidrTableList:
AssociationPropertyMetadata:
Parameter:
AssociationPropertyMetadata:
Parameters:
RouteTableId:
Type: String
Description:
en: The ID of the route table for the peer VPC.
Required: true
RouteEntryList:
Type: Json
Description:
en: The value is a JSON string that contains the DestinationCidr and NextHopInstanceId parameters.
Required: false
MinLength: 1
MaxLength: 100
Type: Json
Required: false
AssociationProperty: List[Parameter]
Type: Json
Description:
en: 'The CIDR blocks of the peer VPC. '
Required: true
MinLength: 1
MaxLength: 1
LocalVpcId:
Type: String
Description:
en: The ID of the local VPC.
Required: true
AssociationProperty: ALIYUN::ECS::VPC::VPCId
PeerVpcId:
Type: String
Description:
en: The ID of the peer VPC.
Required: true
AssociationProperty: ALIYUN::ECS::VPC::VPCId
FirewallSwitch:
Type: String
Description:
en: |-
The status of the VPC firewall after you create the 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. To enable the firewall, you can call the ModifyVpcFirewallSwitchStatus operation.
AllowedValues:
- open
- close
Required: true
Default: open
Resources:
ExtensionResource:
Type: ALIYUN::CLOUDFW::VpcFirewallConfigure
Properties:
PeerVpcId:
Ref: PeerVpcId
PeerVpcRegion:
Ref: ALIYUN::Region
LocalVpcRegion:
Ref: ALIYUN::Region
LocalVpcCidrTableList:
Ref: LocalVpcCidrTableList
VpcFirewallName:
Ref: VpcFirewallName
PeerVpcCidrTableList:
Ref: PeerVpcCidrTableList
LocalVpcId:
Ref: LocalVpcId
FirewallSwitch:
Ref: FirewallSwitch
Outputs:
VpcFirewallId:
Description: The instance ID of the VPC firewall.
Value:
Fn::GetAtt:
- ExtensionResource
- VpcFirewallId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"LocalVpcCidrTableList": {
"AssociationPropertyMetadata": {
"Parameter": {
"AssociationPropertyMetadata": {
"Parameters": {
"RouteTableId": {
"Type": "String",
"Description": {
"en": "The ID of the route table for the local VPC."
},
"Required": true
},
"RouteEntryList": {
"AssociationPropertyMetadata": {
"Parameter": {
"AssociationPropertyMetadata": {
"Parameters": {
"NextHopInstanceId": {
"Type": "Json",
"Description": {
"en": "The NextHopInstanceId parameter indicates the instance ID of the next hop for the local VPC."
},
"Required": false
},
"DestinationCidr": {
"Type": "String",
"Description": {
"en": "The DestinationCidr parameter indicates the destination CIDR block of the local VPC."
},
"Required": true
}
}
},
"Type": "Json",
"Required": false
}
},
"AssociationProperty": "List[Parameter]",
"Type": "Json",
"Description": {
"en": "The value is a JSON string that contains the DestinationCidr and NextHopInstanceId parameters."
},
"Required": false,
"MinLength": 1,
"MaxLength": 100
}
}
},
"Type": "Json",
"Required": false
}
},
"AssociationProperty": "List[Parameter]",
"Type": "Json",
"Description": {
"en": "The CIDR blocks of the local VPC. "
},
"Required": true,
"MinLength": 1,
"MaxLength": 1
},
"VpcFirewallName": {
"Type": "String",
"Description": {
"en": "The instance name of the VPC firewall."
},
"Required": true
},
"PeerVpcCidrTableList": {
"AssociationPropertyMetadata": {
"Parameter": {
"AssociationPropertyMetadata": {
"Parameters": {
"RouteTableId": {
"Type": "String",
"Description": {
"en": "The ID of the route table for the peer VPC."
},
"Required": true
},
"RouteEntryList": {
"Type": "Json",
"Description": {
"en": "The value is a JSON string that contains the DestinationCidr and NextHopInstanceId parameters."
},
"Required": false,
"MinLength": 1,
"MaxLength": 100
}
}
},
"Type": "Json",
"Required": false
}
},
"AssociationProperty": "List[Parameter]",
"Type": "Json",
"Description": {
"en": "The CIDR blocks of the peer VPC. "
},
"Required": true,
"MinLength": 1,
"MaxLength": 1
},
"LocalVpcId": {
"Type": "String",
"Description": {
"en": "The ID of the local VPC."
},
"Required": true,
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
},
"PeerVpcId": {
"Type": "String",
"Description": {
"en": "The ID of the peer VPC."
},
"Required": true,
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
},
"FirewallSwitch": {
"Type": "String",
"Description": {
"en": "The status of the VPC firewall after you create the 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. To enable the firewall, you can call the ModifyVpcFirewallSwitchStatus operation."
},
"AllowedValues": [
"open",
"close"
],
"Required": true,
"Default": "open"
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::CLOUDFW::VpcFirewallConfigure",
"Properties": {
"PeerVpcId": {
"Ref": "PeerVpcId"
},
"PeerVpcRegion": {
"Ref": "ALIYUN::Region"
},
"LocalVpcRegion": {
"Ref": "ALIYUN::Region"
},
"LocalVpcCidrTableList": {
"Ref": "LocalVpcCidrTableList"
},
"VpcFirewallName": {
"Ref": "VpcFirewallName"
},
"PeerVpcCidrTableList": {
"Ref": "PeerVpcCidrTableList"
},
"LocalVpcId": {
"Ref": "LocalVpcId"
},
"FirewallSwitch": {
"Ref": "FirewallSwitch"
}
}
}
},
"Outputs": {
"VpcFirewallId": {
"Description": "The instance ID of the VPC firewall.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"VpcFirewallId"
]
}
}
}
}