O recurso ALIYUN::PVTZ::Rule adiciona uma regra de encaminhamento de tráfego DNS a um endpoint do Private Zone.
Sintaxe
{
"Type": "ALIYUN::PVTZ::Rule",
"Properties": {
"ForwardIp": List,
"ZoneName": String,
"Type": String,
"EndpointId": String,
"RuleName": String
}
}
Propriedades
|
Propriedade |
Tipo |
Obrigatória |
Editável |
Descrição |
Restrição |
|
ForwardIp |
List |
Sim |
Sim |
Configurações de endereço IP e porta do servidor externo de destino. |
Para mais informações, consulte Propriedades de ForwardIp. |
|
ZoneName |
String |
Sim |
Não |
Nome de domínio com tráfego DNS encaminhado para um servidor externo. |
Nenhuma. |
|
Type |
String |
Sim |
Não |
Tipo da regra de encaminhamento. |
Defina o valor como OUTBOUND. Esse tipo encaminha o tráfego DNS para endereços IP externos. |
|
EndpointId |
String |
Sim |
Não |
ID do endpoint que processa o tráfego DNS encaminhado. |
Nenhuma. |
|
RuleName |
String |
Sim |
Sim |
Nome da regra de encaminhamento. |
Nenhuma. |
Sintaxe de ForwardIp
"ForwardIp": [
{
"Ip": String,
"Port": Integer
}
]
Propriedades de ForwardIp
|
Propriedade |
Tipo |
Obrigatória |
Editável |
Descrição |
Restrição |
|
Ip |
String |
Sim |
Sim |
Endereço IP do servidor externo de destino. |
Nenhuma. |
|
Port |
Integer |
Sim |
Sim |
Número da porta do servidor externo de destino. |
Nenhuma. |
Valores de retorno
Fn::GetAtt
ForwardIp: configurações de endereço IP e porta do servidor externo de destino.
ZoneName: nome de domínio com tráfego DNS encaminhado.
Vpcs: virtual private clouds (VPCs) associadas à regra de encaminhamento.
Type: tipo da regra de encaminhamento.
EndpointName: nome do endpoint.
EndpointId: ID do endpoint.
CreateTime: data e hora de criação da regra de encaminhamento.
RuleName: nome da regra de encaminhamento.
Exemplos
-
Formato
YAMLROSTemplateFormatVersion: '2015-09-01' Parameters: EndpointId: Type: String Description: The ID of the endpoint. Resources: ExtensionResource: Type: ALIYUN::PVTZ::Rule Properties: ForwardIp: Ip: 172.16.1.1 Port: '8080' ZoneName: example.com Type: OUTBOUND EndpointId: Ref: EndpointId RuleName: TestRule Outputs: ForwardIp: Description: The information about each destination external server. Value: Fn::GetAtt: - ExtensionResource - ForwardIp ZoneName: Description: The domain name that requires Domain Name System (DNS) traffic forwarding. Value: Fn::GetAtt: - ExtensionResource - ZoneName Vpcs: Description: The information about each virtual private cloud (VPC) that is associated with the forwarding rule. Value: Fn::GetAtt: - ExtensionResource - Vpcs Type: Description: The type of the forwarding rule. Value: Fn::GetAtt: - ExtensionResource - Type EndpointName: Description: The name of the endpoint. Value: Fn::GetAtt: - ExtensionResource - EndpointName EndpointId: Description: The ID of the endpoint. Value: Fn::GetAtt: - ExtensionResource - EndpointId CreateTime: Description: The timestamp when the forwarding rule was created. Value: Fn::GetAtt: - ExtensionResource - CreateTime RuleName: Description: The name of the forwarding rule. Value: Fn::GetAtt: - ExtensionResource - RuleName -
Formato
JSON{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "EndpointId": { "Type": "String", "Description": "The ID of the endpoint." } }, "Resources": { "ExtensionResource": { "Type": "ALIYUN::PVTZ::Rule", "Properties": { "ForwardIp": { "Ip": "172.16.1.1", "Port": "8080" }, "ZoneName": "example.com", "Type": "OUTBOUND", "EndpointId": { "Ref": "EndpointId" }, "RuleName": "TestRule" } } }, "Outputs": { "ForwardIp": { "Description": "The information about each destination external server.", "Value": { "Fn::GetAtt": [ "ExtensionResource", "ForwardIp" ] } }, "ZoneName": { "Description": "The domain name that requires Domain Name System (DNS) traffic forwarding.", "Value": { "Fn::GetAtt": [ "ExtensionResource", "ZoneName" ] } }, "Vpcs": { "Description": "The information about each virtual private cloud (VPC) that is associated with the forwarding rule.", "Value": { "Fn::GetAtt": [ "ExtensionResource", "Vpcs" ] } }, "Type": { "Description": "The type of the forwarding rule.", "Value": { "Fn::GetAtt": [ "ExtensionResource", "Type" ] } }, "EndpointName": { "Description": "The name of the endpoint.", "Value": { "Fn::GetAtt": [ "ExtensionResource", "EndpointName" ] } }, "EndpointId": { "Description": "The ID of the endpoint.", "Value": { "Fn::GetAtt": [ "ExtensionResource", "EndpointId" ] } }, "CreateTime": { "Description": "The timestamp when the forwarding rule was created.", "Value": { "Fn::GetAtt": [ "ExtensionResource", "CreateTime" ] } }, "RuleName": { "Description": "The name of the forwarding rule.", "Value": { "Fn::GetAtt": [ "ExtensionResource", "RuleName" ] } } } }