Associa uma tabela de rotas de gateway a um gateway IPv4 ou IPv6 na mesma Virtual Private Cloud (VPC).
Sintaxe
{
"Type": "ALIYUN::VPC::RouteTableWithGatewayAssociation",
"Properties": {
"GatewayType": String,
"GatewayId": String,
"RouteTableId": String
}
}
Propriedades
|
Propriedade |
Tipo |
Obrigatória |
Editável |
Descrição |
Restrição |
|
GatewayType |
String |
Sim |
Não |
Tipo do gateway. |
Defina o valor como Ipv4Gateway. |
|
GatewayId |
String |
Sim |
Não |
ID do gateway IPv4. |
Nenhuma. |
|
RouteTableId |
String |
Sim |
Não |
ID da tabela de rotas do gateway. |
Nenhuma. |
Valores de retorno
Fn::GetAtt
RouteTableId: ID da tabela de rotas do gateway.
GatewayId: ID do gateway.
Exemplos
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
RouteTableId:
Type: String
Description:
en: The ID of route table that gateway is to be bound.
Required: true
GatewayType:
Type: String
Description:
en: Types of the associated gateway instance.
AllowedValues:
- Ipv4Gateway
Required: true
GatewayId:
Type: String
Description:
en: |-
The ID of the IPv4 gateway that is to be associated.
The IPv4 gateway instance must be activated.
Required: true
Resources:
RouteTableWithGatewayAssociation:
Type: ALIYUN::VPC::RouteTableWithGatewayAssociation
Properties:
RouteTableId:
Ref: RouteTableId
GatewayType:
Ref: GatewayType
GatewayId:
Ref: GatewayId
Outputs:
RouteTableId:
Description: The ID of route table that gateway is to be bound.
Value:
Fn::GetAtt:
- RouteTableWithGatewayAssociation
- RouteTableId
GatewayId:
Description: The ID of the IPv4 gateway that is to be associated.
Value:
Fn::GetAtt:
- RouteTableWithGatewayAssociation
- GatewayId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"RouteTableId": {
"Type": "String",
"Description": {
"en": "The ID of route table that gateway is to be bound."
},
"Required": true
},
"GatewayType": {
"Type": "String",
"Description": {
"en": "Types of the associated gateway instance."
},
"AllowedValues": [
"Ipv4Gateway"
],
"Required": true
},
"GatewayId": {
"Type": "String",
"Description": {
"en": "The ID of the IPv4 gateway that is to be associated.\nThe IPv4 gateway instance must be activated."
},
"Required": true
}
},
"Resources": {
"RouteTableWithGatewayAssociation": {
"Type": "ALIYUN::VPC::RouteTableWithGatewayAssociation",
"Properties": {
"RouteTableId": {
"Ref": "RouteTableId"
},
"GatewayType": {
"Ref": "GatewayType"
},
"GatewayId": {
"Ref": "GatewayId"
}
}
}
},
"Outputs": {
"RouteTableId": {
"Description": "The ID of route table that gateway is to be bound.",
"Value": {
"Fn::GetAtt": [
"RouteTableWithGatewayAssociation",
"RouteTableId"
]
}
},
"GatewayId": {
"Description": "The ID of the IPv4 gateway that is to be associated.",
"Value": {
"Fn::GetAtt": [
"RouteTableWithGatewayAssociation",
"GatewayId"
]
}
}
}
}