ALIYUN::VPC::RouteTable is used to create a custom routing table.

Syntax

{
  "Type": "ALIYUN::VPC::RouteTable",
  "Properties": {
    "VpcId": String,
    "RouteTableName": String,
    "Description": String
  }
}

Properties

Name Type Required Editable Description Validity
VpcId String Yes No The ID of the VPC to which the custom routing table belongs. None
RouteTableName String No Yes The name of the routing table. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
Description String No Yes The description of the routing table. The description must be 2 to 256 characters in length. It must start with a letter and cannot start with http:// or https://.

Response parameters

Fn::GetAtt

  • RouteTableId: the ID of the routing table.
  • VpcId: the ID of the VPC to which the custom routing table belongs.
  • RouteTableName: the name of the routing table.
  • RouteTableType: the type of the routing table.
  • VSwitchIds: the IDs of VSwitches in the VPC.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "RouteTable": {
      "Type": "ALIYUN::VPC::RouteTable",
      "Properties": {
        "RouteTableName": {
          "Ref": "RouteTableName"
        },
        "VpcId": {
          "Ref": "VpcId"
        },
        "Description": {
          "Ref": "Description"
        }
      }
    }
  },
  "Parameters": {
    "RouteTableName": {
      "Type": "String",
      "Description": "The name of the route table.The name must be 2 to 128 characters in length. It can contain letters, numbers, periods (.), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://."
    },
    "VpcId": {
      "Type": "String",
      "Description": "The ID of the VPC to which the custom route table belongs."
    },
    "Description": {
      "Type": "String",
      "Description": "The description of the route table.The description must be 2 to 256 characters in length and start with a letter, but cannot be start with http:// or https://."
    }
  },
  "Outputs": {
    "RouteTableId": {
      "Description": "The ID of the route table.",
      "Value": {
        "Fn::GetAtt": [
          "RouteTable",
          "RouteTableId"
        ]
      }
    },
    "VpcId": {
      "Description": "The ID of the VRouter to which the route table belongs.",
      "Value": {
        "Fn::GetAtt": [
          "RouteTable",
          "VpcId"
        ]
      }
    },
    "RouteTableType": {
      "Description": "The type of the route table.",
      "Value": {
        "Fn::GetAtt": [
          "RouteTable",
          "RouteTableType"
        ]
      }
    },
    "VSwitchIds": {
      "Description": "A list of VSwitches under the VPC.",
      "Value": {
        "Fn::GetAtt": [
          "RouteTable",
          "VSwitchIds"
        ]
      }
    },
    "RouteTableName": {
      "Description": "The name of the route table.",
      "Value": {
        "Fn::GetAtt": [
          "RouteTable",
          "RouteTableName"
        ]
      }
    }
  }
}

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  RouteTable:
    Type: ALIYUN::VPC::RouteTable
    Properties:
      RouteTableName:
        Ref: RouteTableName
      VpcId:
        Ref: VpcId
      Description:
        Ref: Description
Parameters:
  RouteTableName:
    Type: String
    Description: The name of the route table.The name must be 2 to 128 characters
      in length. It can contain letters, numbers, periods (.), underscores (_), and
      hyphens (-). It must start with a letter and cannot start with http:// or https://.
  VpcId:
    Type: String
    Description: The ID of the VPC to which the custom route table belongs.
  Description:
    Type: String
    Description: The description of the route table.The description must be 2 to 256
      characters in length and start with a letter, but cannot be start with http://
      or https://.
Outputs:
  RouteTableId:
    Description: The ID of the route table.
    Value:
      Fn::GetAtt:
      - RouteTable
      - RouteTableId
  VpcId:
    Description: The ID of the VRouter to which the route table belongs.
    Value:
      Fn::GetAtt:
      - RouteTable
      - VpcId
  RouteTableType:
    Description: The type of the route table.
    Value:
      Fn::GetAtt:
      - RouteTable
      - RouteTableType
  VSwitchIds:
    Description: A list of VSwitches under the VPC.
    Value:
      Fn::GetAtt:
      - RouteTable
      - VSwitchIds
  RouteTableName:
    Description: The name of the route table.
    Value:
      Fn::GetAtt:
      - RouteTable
      - RouteTableName