Alibaba Cloud v3.87.0 published on Saturday, Oct 18, 2025 by Pulumi
alicloud.cen.getTransitRouterRouteTables
This data source provides the CEN Transit Router Route Tables of the current Alibaba Cloud user.
NOTE: Available since v1.126.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = new alicloud.cen.Instance("default", {
cenInstanceName: name,
protectionLevel: "REDUCED",
});
const defaultTransitRouter = new alicloud.cen.TransitRouter("default", {
cenId: _default.id,
transitRouterName: name,
});
const defaultTransitRouterRouteTable = new alicloud.cen.TransitRouterRouteTable("default", {
transitRouterId: defaultTransitRouter.transitRouterId,
transitRouterRouteTableDescription: name,
transitRouterRouteTableName: name,
});
const ids = alicloud.cen.getTransitRouterRouteTablesOutput({
transitRouterId: defaultTransitRouterRouteTable.transitRouterId,
ids: [defaultTransitRouterRouteTable.transitRouterRouteTableId],
});
export const cenTransitRouterRouteTableId0 = ids.apply(ids => ids.tables?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.cen.Instance("default",
cen_instance_name=name,
protection_level="REDUCED")
default_transit_router = alicloud.cen.TransitRouter("default",
cen_id=default.id,
transit_router_name=name)
default_transit_router_route_table = alicloud.cen.TransitRouterRouteTable("default",
transit_router_id=default_transit_router.transit_router_id,
transit_router_route_table_description=name,
transit_router_route_table_name=name)
ids = alicloud.cen.get_transit_router_route_tables_output(transit_router_id=default_transit_router_route_table.transit_router_id,
ids=[default_transit_router_route_table.transit_router_route_table_id])
pulumi.export("cenTransitRouterRouteTableId0", ids.tables[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cen"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := cen.NewInstance(ctx, "default", &cen.InstanceArgs{
CenInstanceName: pulumi.String(name),
ProtectionLevel: pulumi.String("REDUCED"),
})
if err != nil {
return err
}
defaultTransitRouter, err := cen.NewTransitRouter(ctx, "default", &cen.TransitRouterArgs{
CenId: _default.ID(),
TransitRouterName: pulumi.String(name),
})
if err != nil {
return err
}
defaultTransitRouterRouteTable, err := cen.NewTransitRouterRouteTable(ctx, "default", &cen.TransitRouterRouteTableArgs{
TransitRouterId: defaultTransitRouter.TransitRouterId,
TransitRouterRouteTableDescription: pulumi.String(name),
TransitRouterRouteTableName: pulumi.String(name),
})
if err != nil {
return err
}
ids := cen.GetTransitRouterRouteTablesOutput(ctx, cen.GetTransitRouterRouteTablesOutputArgs{
TransitRouterId: defaultTransitRouterRouteTable.TransitRouterId,
Ids: pulumi.StringArray{
defaultTransitRouterRouteTable.TransitRouterRouteTableId,
},
}, nil)
ctx.Export("cenTransitRouterRouteTableId0", ids.ApplyT(func(ids cen.GetTransitRouterRouteTablesResult) (*string, error) {
return &ids.Tables[0].Id, nil
}).(pulumi.StringPtrOutput))
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = new AliCloud.Cen.Instance("default", new()
{
CenInstanceName = name,
ProtectionLevel = "REDUCED",
});
var defaultTransitRouter = new AliCloud.Cen.TransitRouter("default", new()
{
CenId = @default.Id,
TransitRouterName = name,
});
var defaultTransitRouterRouteTable = new AliCloud.Cen.TransitRouterRouteTable("default", new()
{
TransitRouterId = defaultTransitRouter.TransitRouterId,
TransitRouterRouteTableDescription = name,
TransitRouterRouteTableName = name,
});
var ids = AliCloud.Cen.GetTransitRouterRouteTables.Invoke(new()
{
TransitRouterId = defaultTransitRouterRouteTable.TransitRouterId,
Ids = new[]
{
defaultTransitRouterRouteTable.TransitRouterRouteTableId,
},
});
return new Dictionary<string, object?>
{
["cenTransitRouterRouteTableId0"] = ids.Apply(getTransitRouterRouteTablesResult => getTransitRouterRouteTablesResult.Tables[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cen.Instance;
import com.pulumi.alicloud.cen.InstanceArgs;
import com.pulumi.alicloud.cen.TransitRouter;
import com.pulumi.alicloud.cen.TransitRouterArgs;
import com.pulumi.alicloud.cen.TransitRouterRouteTable;
import com.pulumi.alicloud.cen.TransitRouterRouteTableArgs;
import com.pulumi.alicloud.cen.CenFunctions;
import com.pulumi.alicloud.cen.inputs.GetTransitRouterRouteTablesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var default_ = new Instance("default", InstanceArgs.builder()
.cenInstanceName(name)
.protectionLevel("REDUCED")
.build());
var defaultTransitRouter = new TransitRouter("defaultTransitRouter", TransitRouterArgs.builder()
.cenId(default_.id())
.transitRouterName(name)
.build());
var defaultTransitRouterRouteTable = new TransitRouterRouteTable("defaultTransitRouterRouteTable", TransitRouterRouteTableArgs.builder()
.transitRouterId(defaultTransitRouter.transitRouterId())
.transitRouterRouteTableDescription(name)
.transitRouterRouteTableName(name)
.build());
final var ids = CenFunctions.getTransitRouterRouteTables(GetTransitRouterRouteTablesArgs.builder()
.transitRouterId(defaultTransitRouterRouteTable.transitRouterId())
.ids(defaultTransitRouterRouteTable.transitRouterRouteTableId())
.build());
ctx.export("cenTransitRouterRouteTableId0", ids.applyValue(_ids -> _ids.tables()[0].id()));
}
}
configuration:
name:
type: string
default: terraform-example
resources:
default:
type: alicloud:cen:Instance
properties:
cenInstanceName: ${name}
protectionLevel: REDUCED
defaultTransitRouter:
type: alicloud:cen:TransitRouter
name: default
properties:
cenId: ${default.id}
transitRouterName: ${name}
defaultTransitRouterRouteTable:
type: alicloud:cen:TransitRouterRouteTable
name: default
properties:
transitRouterId: ${defaultTransitRouter.transitRouterId}
transitRouterRouteTableDescription: ${name}
transitRouterRouteTableName: ${name}
variables:
ids:
fn::invoke:
function: alicloud:cen:getTransitRouterRouteTables
arguments:
transitRouterId: ${defaultTransitRouterRouteTable.transitRouterId}
ids:
- ${defaultTransitRouterRouteTable.transitRouterRouteTableId}
outputs:
cenTransitRouterRouteTableId0: ${ids.tables[0].id}
Using getTransitRouterRouteTables
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getTransitRouterRouteTables(args: GetTransitRouterRouteTablesArgs, opts?: InvokeOptions): Promise<GetTransitRouterRouteTablesResult>
function getTransitRouterRouteTablesOutput(args: GetTransitRouterRouteTablesOutputArgs, opts?: InvokeOptions): Output<GetTransitRouterRouteTablesResult>def get_transit_router_route_tables(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
status: Optional[str] = None,
transit_router_id: Optional[str] = None,
transit_router_route_table_ids: Optional[Sequence[str]] = None,
transit_router_route_table_names: Optional[Sequence[str]] = None,
transit_router_route_table_status: Optional[str] = None,
transit_router_route_table_type: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetTransitRouterRouteTablesResult
def get_transit_router_route_tables_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
transit_router_id: Optional[pulumi.Input[str]] = None,
transit_router_route_table_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
transit_router_route_table_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
transit_router_route_table_status: Optional[pulumi.Input[str]] = None,
transit_router_route_table_type: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTransitRouterRouteTablesResult]func GetTransitRouterRouteTables(ctx *Context, args *GetTransitRouterRouteTablesArgs, opts ...InvokeOption) (*GetTransitRouterRouteTablesResult, error)
func GetTransitRouterRouteTablesOutput(ctx *Context, args *GetTransitRouterRouteTablesOutputArgs, opts ...InvokeOption) GetTransitRouterRouteTablesResultOutput> Note: This function is named GetTransitRouterRouteTables in the Go SDK.
public static class GetTransitRouterRouteTables
{
public static Task<GetTransitRouterRouteTablesResult> InvokeAsync(GetTransitRouterRouteTablesArgs args, InvokeOptions? opts = null)
public static Output<GetTransitRouterRouteTablesResult> Invoke(GetTransitRouterRouteTablesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetTransitRouterRouteTablesResult> getTransitRouterRouteTables(GetTransitRouterRouteTablesArgs args, InvokeOptions options)
public static Output<GetTransitRouterRouteTablesResult> getTransitRouterRouteTables(GetTransitRouterRouteTablesArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:cen/getTransitRouterRouteTables:getTransitRouterRouteTables
arguments:
# arguments dictionaryThe following arguments are supported:
- Transit
Router stringId - The ID of the Enterprise Edition transit router.
- Ids List<string>
- A list of Transit Router Route Table IDs.
- Name
Regex string - A regex string to filter results by Transit Router Route Table name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Status string
- The status of the route table. Valid values:
Creating,Active,Deleting. - Transit
Router List<string>Route Table Ids - A list of ID of the CEN Transit Router Route Table.
- Transit
Router List<string>Route Table Names - A list of name of the CEN Transit Router Route Table.
- Transit
Router stringRoute Table Status - The status of the route table. Valid values:
Creating,Active,Deleting. - Transit
Router stringRoute Table Type - The type of the route table. Valid values:
System,Custom.
- Transit
Router stringId - The ID of the Enterprise Edition transit router.
- Ids []string
- A list of Transit Router Route Table IDs.
- Name
Regex string - A regex string to filter results by Transit Router Route Table name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Status string
- The status of the route table. Valid values:
Creating,Active,Deleting. - Transit
Router []stringRoute Table Ids - A list of ID of the CEN Transit Router Route Table.
- Transit
Router []stringRoute Table Names - A list of name of the CEN Transit Router Route Table.
- Transit
Router stringRoute Table Status - The status of the route table. Valid values:
Creating,Active,Deleting. - Transit
Router stringRoute Table Type - The type of the route table. Valid values:
System,Custom.
- transit
Router StringId - The ID of the Enterprise Edition transit router.
- ids List<String>
- A list of Transit Router Route Table IDs.
- name
Regex String - A regex string to filter results by Transit Router Route Table name.
- output
File String - File name where to save data source results (after running
pulumi preview). - status String
- The status of the route table. Valid values:
Creating,Active,Deleting. - transit
Router List<String>Route Table Ids - A list of ID of the CEN Transit Router Route Table.
- transit
Router List<String>Route Table Names - A list of name of the CEN Transit Router Route Table.
- transit
Router StringRoute Table Status - The status of the route table. Valid values:
Creating,Active,Deleting. - transit
Router StringRoute Table Type - The type of the route table. Valid values:
System,Custom.
- transit
Router stringId - The ID of the Enterprise Edition transit router.
- ids string[]
- A list of Transit Router Route Table IDs.
- name
Regex string - A regex string to filter results by Transit Router Route Table name.
- output
File string - File name where to save data source results (after running
pulumi preview). - status string
- The status of the route table. Valid values:
Creating,Active,Deleting. - transit
Router string[]Route Table Ids - A list of ID of the CEN Transit Router Route Table.
- transit
Router string[]Route Table Names - A list of name of the CEN Transit Router Route Table.
- transit
Router stringRoute Table Status - The status of the route table. Valid values:
Creating,Active,Deleting. - transit
Router stringRoute Table Type - The type of the route table. Valid values:
System,Custom.
- transit_
router_ strid - The ID of the Enterprise Edition transit router.
- ids Sequence[str]
- A list of Transit Router Route Table IDs.
- name_
regex str - A regex string to filter results by Transit Router Route Table name.
- output_
file str - File name where to save data source results (after running
pulumi preview). - status str
- The status of the route table. Valid values:
Creating,Active,Deleting. - transit_
router_ Sequence[str]route_ table_ ids - A list of ID of the CEN Transit Router Route Table.
- transit_
router_ Sequence[str]route_ table_ names - A list of name of the CEN Transit Router Route Table.
- transit_
router_ strroute_ table_ status - The status of the route table. Valid values:
Creating,Active,Deleting. - transit_
router_ strroute_ table_ type - The type of the route table. Valid values:
System,Custom.
- transit
Router StringId - The ID of the Enterprise Edition transit router.
- ids List<String>
- A list of Transit Router Route Table IDs.
- name
Regex String - A regex string to filter results by Transit Router Route Table name.
- output
File String - File name where to save data source results (after running
pulumi preview). - status String
- The status of the route table. Valid values:
Creating,Active,Deleting. - transit
Router List<String>Route Table Ids - A list of ID of the CEN Transit Router Route Table.
- transit
Router List<String>Route Table Names - A list of name of the CEN Transit Router Route Table.
- transit
Router StringRoute Table Status - The status of the route table. Valid values:
Creating,Active,Deleting. - transit
Router StringRoute Table Type - The type of the route table. Valid values:
System,Custom.
getTransitRouterRouteTables Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- A list of Transit Router Route Table names.
- Tables
List<Pulumi.
Ali Cloud. Cen. Outputs. Get Transit Router Route Tables Table> - A list of Transit Router Route Tables. Each element contains the following attributes:
- Transit
Router stringId - Name
Regex string - Output
File string - Status string
- The status of the route table.
- Transit
Router List<string>Route Table Ids - Transit
Router List<string>Route Table Names - Transit
Router stringRoute Table Status - Transit
Router stringRoute Table Type - The type of the route table.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- A list of Transit Router Route Table names.
- Tables
[]Get
Transit Router Route Tables Table - A list of Transit Router Route Tables. Each element contains the following attributes:
- Transit
Router stringId - Name
Regex string - Output
File string - Status string
- The status of the route table.
- Transit
Router []stringRoute Table Ids - Transit
Router []stringRoute Table Names - Transit
Router stringRoute Table Status - Transit
Router stringRoute Table Type - The type of the route table.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- A list of Transit Router Route Table names.
- tables
List<Get
Transit Router Route Tables Table> - A list of Transit Router Route Tables. Each element contains the following attributes:
- transit
Router StringId - name
Regex String - output
File String - status String
- The status of the route table.
- transit
Router List<String>Route Table Ids - transit
Router List<String>Route Table Names - transit
Router StringRoute Table Status - transit
Router StringRoute Table Type - The type of the route table.
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- A list of Transit Router Route Table names.
- tables
Get
Transit Router Route Tables Table[] - A list of Transit Router Route Tables. Each element contains the following attributes:
- transit
Router stringId - name
Regex string - output
File string - status string
- The status of the route table.
- transit
Router string[]Route Table Ids - transit
Router string[]Route Table Names - transit
Router stringRoute Table Status - transit
Router stringRoute Table Type - The type of the route table.
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- A list of Transit Router Route Table names.
- tables
Sequence[Get
Transit Router Route Tables Table] - A list of Transit Router Route Tables. Each element contains the following attributes:
- transit_
router_ strid - name_
regex str - output_
file str - status str
- The status of the route table.
- transit_
router_ Sequence[str]route_ table_ ids - transit_
router_ Sequence[str]route_ table_ names - transit_
router_ strroute_ table_ status - transit_
router_ strroute_ table_ type - The type of the route table.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- A list of Transit Router Route Table names.
- tables List<Property Map>
- A list of Transit Router Route Tables. Each element contains the following attributes:
- transit
Router StringId - name
Regex String - output
File String - status String
- The status of the route table.
- transit
Router List<String>Route Table Ids - transit
Router List<String>Route Table Names - transit
Router StringRoute Table Status - transit
Router StringRoute Table Type - The type of the route table.
Supporting Types
GetTransitRouterRouteTablesTable
- Id string
- The ID of the Transit Router Route Table.
- Status string
- The status of the route table. Valid values:
Creating,Active,Deleting. - Transit
Router stringRoute Table Description - The description of the route table.
- Transit
Router stringRoute Table Id - The ID of the Transit Router Route Table.
- Transit
Router stringRoute Table Name - The name of the route table.
- Transit
Router stringRoute Table Type - The type of the route table. Valid values:
System,Custom.
- Id string
- The ID of the Transit Router Route Table.
- Status string
- The status of the route table. Valid values:
Creating,Active,Deleting. - Transit
Router stringRoute Table Description - The description of the route table.
- Transit
Router stringRoute Table Id - The ID of the Transit Router Route Table.
- Transit
Router stringRoute Table Name - The name of the route table.
- Transit
Router stringRoute Table Type - The type of the route table. Valid values:
System,Custom.
- id String
- The ID of the Transit Router Route Table.
- status String
- The status of the route table. Valid values:
Creating,Active,Deleting. - transit
Router StringRoute Table Description - The description of the route table.
- transit
Router StringRoute Table Id - The ID of the Transit Router Route Table.
- transit
Router StringRoute Table Name - The name of the route table.
- transit
Router StringRoute Table Type - The type of the route table. Valid values:
System,Custom.
- id string
- The ID of the Transit Router Route Table.
- status string
- The status of the route table. Valid values:
Creating,Active,Deleting. - transit
Router stringRoute Table Description - The description of the route table.
- transit
Router stringRoute Table Id - The ID of the Transit Router Route Table.
- transit
Router stringRoute Table Name - The name of the route table.
- transit
Router stringRoute Table Type - The type of the route table. Valid values:
System,Custom.
- id str
- The ID of the Transit Router Route Table.
- status str
- The status of the route table. Valid values:
Creating,Active,Deleting. - transit_
router_ strroute_ table_ description - The description of the route table.
- transit_
router_ strroute_ table_ id - The ID of the Transit Router Route Table.
- transit_
router_ strroute_ table_ name - The name of the route table.
- transit_
router_ strroute_ table_ type - The type of the route table. Valid values:
System,Custom.
- id String
- The ID of the Transit Router Route Table.
- status String
- The status of the route table. Valid values:
Creating,Active,Deleting. - transit
Router StringRoute Table Description - The description of the route table.
- transit
Router StringRoute Table Id - The ID of the Transit Router Route Table.
- transit
Router StringRoute Table Name - The name of the route table.
- transit
Router StringRoute Table Type - The type of the route table. Valid values:
System,Custom.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
