DATASOURCE::VPC::RouteTables is used to query route tables.

Syntax

{
  "Type": "DATASOURCE::VPC::RouteTables",
  "Properties": {
    "RouteTableId": String,
    "VpcId": String,
    "ResourceGroupId": String,
    "RouterType": String,
    "RouterId": String,
    "RouteTableName": String
  }
}

Properties

Property Type Required Editable Description Constraint
RouteTableId String No Yes The ID of the route table. None.
VpcId String No Yes The region ID of the virtual private cloud (VPC) to which the route table belongs. When this property is specified, the value of the RouterType property is automatically set to VRouter.
ResourceGroupId String No Yes The ID of the resource group to which the route table belongs. None.
RouterType String No Yes The type of the router to which the route table belongs. Default value: VRouter. Valid values:
  • VRouter
  • VBR
RouterId String No Yes The ID of the router to which the route table belongs. None.
RouteTableName String No Yes The name of the route table. None.

Return values (Fn::GetAtt)

  • RouteTableIds: the IDs of the route tables.
  • RouteTables: details of the route tables.
Property Type Description Constraint
RouteTableIds List The IDs of the route tables. Example: ['vtb-bp145q7glnuzdvzu2****', 'vtb-hdk275q7glnuzdvzu2****'].
RouteTables List Details of the route tables. None.
CreationTime String The time when the route table was created. None.
RouterType String The type of the router to which the route table belongs. Valid values:
  • VRouter
  • VBR
Description String The description of the route table. None.
VSwitchIds List The IDs of the vSwitches that are deployed in the VPC. Example: ["vsw-2zes0bvbgwub7gbg1****"].
RouterId String The ID of the router to which the route table belongs. None.
RouteTableId String The ID of the route table. None.
RouteTableName String The name of the route table. None.
VpcId String The ID of the VPC to which the route table belongs. None.
RouteTableType String The type of the route table. Valid values:
  • System: system route table
  • Custom: custom route table
Status String The state of the route table. Valid values:
  • Pending: The route table is being configured.
  • Available: The route table is available.
AssociateType String The type of the cloud resource that is associated with the route table. Valid values:
  • VSwitch: vSwitch route table
  • Gateway: gateway route table
OwnerId String The ID of the Alibaba Cloud account to which the route table belongs. None.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "RouteTableName": {
      "Type": "String",
      "Default": "test123",
      "Description": "The name of the route table."
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::VPC::RouteTables",
      "Properties": {
        "RouteTableName": {
          "Ref": "RouteTableName"
        }
      }
    }
  },
  "Outputs": {
    "RouteTableIds": {
      "Description": "the list of the route table ids.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "RouteTableIds"
        ]
      }
    },
    "RouteTables": {
      "Description": "The list of The route tables.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "RouteTables"
        ]
      }
    }
  }
}