Use ALIYUN::VPC::RouteTable para criar uma tabela de rotas personalizada.
Não é possível criar tabelas de rotas nas seguintes regiões:
China (Beijing)
China (Shenzhen)
China (Hangzhou)
Sintaxe
{
"Type": "ALIYUN::VPC::RouteTable",
"Properties": {
"RouteTableName": String,
"VpcId": String,
"Description": String,
"AssociateType": String,
"Tags": List
}
}
Propriedades
Parâmetro | Tipo | Obrigatório | Atualizável | Descrição | Restrições |
VpcId | String | Sim | Não | ID da VPC à qual a tabela de rotas personalizada pertence. | Nenhuma |
RouteTableName | String | Não | Sim | Nome da tabela de rotas. | O nome deve ter de 2 a 128 caracteres. Deve começar com uma letra ou caractere chinês e não pode iniciar com |
Description | String | Não | Sim | Descrição da tabela de rotas. | A descrição deve ter de 2 a 256 caracteres. Deve começar com uma letra ou caractere chinês e não pode iniciar com |
AssociateType | String | Não | Não | Tipo da tabela de rotas. | Valores válidos:
|
Tags | List | Não | Não | Lista de tags para aplicar à tabela de rotas. | É possível adicionar até 20 tags. Cada tag consiste em um par chave-valor. O valor da tag pode estar vazio. Para mais informações, consulte Propriedades de tags. |
Sintaxe de tags
"Tags": [
{
"Value": String,
"Key": String
}
]
Propriedades de tags
|
Parâmetro |
Tipo |
Obrigatório |
Atualizável |
Descrição |
Restrições |
|
Key |
String |
Sim |
Não |
Chave da tag. |
A chave deve ter de 1 a 128 caracteres. Não pode começar com |
|
Value |
String |
Não |
Não |
Valor da tag. |
O valor deve ter de 0 a 128 caracteres. Não pode começar com |
Valores de retorno
Fn::GetAtt
RouteTableId: ID da tabela de rotas.
VpcId: ID da VPC que contém a tabela de rotas personalizada.
RouteTableName: nome da tabela de rotas.
RouteTableType: tipo da tabela de rotas.
VSwitchIds: IDs dos vSwitches na VPC.
Exemplos
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
RouteTableName:
Type: String
Description: The name of the route table. The name must be 2 to 128 characters long. It must start with a letter or a Chinese character and cannot start with http:// or https://. It can contain letters, Chinese characters, digits, periods (.), underscores (_), and hyphens (-).
VpcId:
Type: String
AssociationProperty: ALIYUN::ECS::VPC::VPCId
Resources:
RouteTable:
Type: ALIYUN::VPC::RouteTable
Properties:
RouteTableName: TestRouteTable
VpcId:
Ref: VpcId
Outputs:
RouteTableId:
Description: The ID of the route table.
Value:
Fn::GetAtt:
- RouteTable
- RouteTableId
VpcId:
Description: The ID of the VPC that contains the route table.
Value:
Fn::GetAtt:
- RouteTable
- VpcId
RouteTableType:
Description: The type of the route table.
Value:
Fn::GetAtt:
- RouteTable
- RouteTableType
VSwitchIds:
Description: The IDs of VSwitches in the VPC.
Value:
Fn::GetAtt:
- RouteTable
- VSwitchIds
RouteTableName:
Description: The name of the route table.
Value:
Fn::GetAtt:
- RouteTable
- RouteTableName
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"RouteTableName": {
"Type": "String",
"Description": "The name of the route table. The name must be 2 to 128 characters long. It must start with a letter or a Chinese character and cannot start with http:// or https://. It can contain letters, Chinese characters, digits, periods (.), underscores (_), and hyphens (-)."
},
"VpcId": {
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
}
},
"Resources": {
"RouteTable": {
"Type": "ALIYUN::VPC::RouteTable",
"Properties": {
"RouteTableName": "TestRouteTable",
"VpcId": {
"Ref": "VpcId"
}
}
}
},
"Outputs": {
"RouteTableId": {
"Description": "The ID of the route table.",
"Value": {
"Fn::GetAtt": [
"RouteTable",
"RouteTableId"
]
}
},
"VpcId": {
"Description": "The ID of the VPC that contains the route table.",
"Value": {
"Fn::GetAtt": [
"RouteTable",
"VpcId"
]
}
},
"RouteTableType": {
"Description": "The type of the route table.",
"Value": {
"Fn::GetAtt": [
"RouteTable",
"RouteTableType"
]
}
},
"VSwitchIds": {
"Description": "The IDs of VSwitches in the VPC.",
"Value": {
"Fn::GetAtt": [
"RouteTable",
"VSwitchIds"
]
}
},
"RouteTableName": {
"Description": "The name of the route table.",
"Value": {
"Fn::GetAtt": [
"RouteTable",
"RouteTableName"
]
}
}
}
}