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,
"RefreshOptions": 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. | After this property is specified, the value of RouterType 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. | Valid values:
|
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. |
RefreshOptions | String | No | Yes | The refresh policy for data source resources when the stack is updated. | Valid values:
|
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: |
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:
|
Description | String | The description of the route table. | None. |
VSwitchIds | List | The IDs of the vSwitches that are deployed in the VPC. | Example: |
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:
|
Status | String | The status of the route table. | Valid values:
|
AssociateType | String | The type of the cloud resource with which the route table is associated. | Valid values:
|
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"
]
}
}
}
}