DATASOURCE::VPC::RouteEntries is used to query routes.

Syntax

{
  "Type": "DATASOURCE::VPC::RouteEntries",
  "Properties": {
    "NextHopType": String,
    "RouteEntryId": String,
    "RouteTableId": String,
    "IpVersion": String,
    "RouteEntryName": String,
    "RouteEntryType": String,
    "NextHopId": String,
    "DestinationCidrBlock": String
  }
}

Properties

Property Type Required Editable Description Constraint
NextHopType String No Yes The type of the next hop. Default value: Instance. Valid values:
  • Instance: an Elastic Compute Service (ECS) instance
  • HaVip: a high-availability virtual IP address (HAVIP)
  • VpnGateway: a VPN gateway
  • NatGateway: a NAT gateway
  • NetworkInterface: a secondary elastic network interface (ENI)
  • RouterInterface: a router interface
  • IPv6Gateway: an IPv6 gateway
  • Attachment: a transit router
RouteEntryId String No Yes The ID of the route. None.
RouteTableId String Yes Yes The ID of the route table. None.
IpVersion String No Yes The IP version of the protocol. Valid values:
  • IPv4
  • IPv6
RouteEntryName String No Yes The name of the route. None.
RouteEntryType String No Yes The type of the route. Valid values:
  • Custom: custom route
  • System: system route
  • BGP: Border Gateway Protocol (BGP) route
  • CEN: Cloud Enterprise Network (CEN) route
NextHopId String No Yes The ID of the next hop. None.
DestinationCidrBlock String No Yes The destination CIDR block of the route. IPv4 and IPv6 CIDR blocks are supported.

Example: 192.168.2.0/24.

Return values (Fn::GetAtt)

  • RouteEntryIds: the IDs of the routes.
  • RouteEntries: details of the routes.
Property Type Description Constraint
RouteEntryIds List The IDs of the routes. Example: ['rte-bp1mnnr2al0naomnp****', 'rte-hu2mnnr3al0naomnp****'].
RouteEntries List Details of the routes. None.
Status String The state of the route. Valid values:
  • Pending: The route is being configured.
  • Available: The route is available.
  • Modifying: The route is being modified.
Type String The type of the route. Valid values:
  • Custom: custom route
  • System: system route
  • BGP: BGP route
  • CEN: CEN route
IpVersion String The IP version of the protocol. Valid values:
  • IPv4
  • IPv6
Description String The description of the route. None.
RouteEntryName String The name of the route. None.
DestinationCidrBlock String The destination CIDR block of the route. None.
RouteEntryId String The ID of the route. None.
RouteTableId String The ID of the route table. None.
NextHops List Details of the next hop. Example: [ { "NextHopId": "eni-bp16v0fuhulfl5e1****", "NextHopRelatedInfo": {}, "NextHopType": "NetworkInterface" }].

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "RouteTableId": {
      "Type": "String",
      "Description": "The ID of the route."
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::VPC::RouteEntries",
      "Properties": {
        "RouteTableId": {
          "Ref": "RouteTableId"
        }
      }
    }
  },
  "Outputs": {
    "RouteEntries": {
      "Description": "The list of The route entries.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "RouteEntries"
        ]
      }
    },
    "RouteEntryIds": {
      "Description": "the list of the route entry ids.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "RouteEntryIds"
        ]
      }
    }
  }
}