Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.cen.getTransitRouterRouteTables
Explore with Pulumi AI
This data source provides CEN Transit Router Route Tables available to the user.What is Cen Transit Router Route Tables
NOTE: Available since v1.126.0.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const defaultInstance = new alicloud.cen.Instance("default", {
cenInstanceName: name,
protectionLevel: "REDUCED",
});
const defaultTransitRouter = new alicloud.cen.TransitRouter("default", {
cenId: defaultInstance.id,
transitRouterName: name,
});
const defaultTransitRouterRouteTable = new alicloud.cen.TransitRouterRouteTable("default", {
transitRouterId: defaultTransitRouter.transitRouterId,
transitRouterRouteTableDescription: "desp",
transitRouterRouteTableName: name,
});
const default = alicloud.cen.getTransitRouterRouteTablesOutput({
transitRouterId: defaultTransitRouter.transitRouterId,
});
export const firstTransitRouterRouteTableType = _default.apply(_default => _default.tables?.[0]?.transitRouterRouteTableType);
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-example"
default_instance = alicloud.cen.Instance("default",
cen_instance_name=name,
protection_level="REDUCED")
default_transit_router = alicloud.cen.TransitRouter("default",
cen_id=default_instance.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="desp",
transit_router_route_table_name=name)
default = alicloud.cen.get_transit_router_route_tables_output(transit_router_id=default_transit_router.transit_router_id)
pulumi.export("firstTransitRouterRouteTableType", default.tables[0].transit_router_route_table_type)
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 := "tf-example";
if param := cfg.Get("name"); param != ""{
name = param
}
defaultInstance, 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: defaultInstance.ID(),
TransitRouterName: pulumi.String(name),
})
if err != nil {
return err
}
_, err = cen.NewTransitRouterRouteTable(ctx, "default", &cen.TransitRouterRouteTableArgs{
TransitRouterId: defaultTransitRouter.TransitRouterId,
TransitRouterRouteTableDescription: pulumi.String("desp"),
TransitRouterRouteTableName: pulumi.String(name),
})
if err != nil {
return err
}
_default := cen.GetTransitRouterRouteTablesOutput(ctx, cen.GetTransitRouterRouteTablesOutputArgs{
TransitRouterId: defaultTransitRouter.TransitRouterId,
}, nil);
ctx.Export("firstTransitRouterRouteTableType", _default.ApplyT(func(_default cen.GetTransitRouterRouteTablesResult) (*string, error) {
return &default.Tables[0].TransitRouterRouteTableType, 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") ?? "tf-example";
var defaultInstance = new AliCloud.Cen.Instance("default", new()
{
CenInstanceName = name,
ProtectionLevel = "REDUCED",
});
var defaultTransitRouter = new AliCloud.Cen.TransitRouter("default", new()
{
CenId = defaultInstance.Id,
TransitRouterName = name,
});
var defaultTransitRouterRouteTable = new AliCloud.Cen.TransitRouterRouteTable("default", new()
{
TransitRouterId = defaultTransitRouter.TransitRouterId,
TransitRouterRouteTableDescription = "desp",
TransitRouterRouteTableName = name,
});
var @default = AliCloud.Cen.GetTransitRouterRouteTables.Invoke(new()
{
TransitRouterId = defaultTransitRouter.TransitRouterId,
});
return new Dictionary<string, object?>
{
["firstTransitRouterRouteTableType"] = @default.Apply(@default => @default.Apply(getTransitRouterRouteTablesResult => getTransitRouterRouteTablesResult.Tables[0]?.TransitRouterRouteTableType)),
};
});
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("tf-example");
var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
.cenInstanceName(name)
.protectionLevel("REDUCED")
.build());
var defaultTransitRouter = new TransitRouter("defaultTransitRouter", TransitRouterArgs.builder()
.cenId(defaultInstance.id())
.transitRouterName(name)
.build());
var defaultTransitRouterRouteTable = new TransitRouterRouteTable("defaultTransitRouterRouteTable", TransitRouterRouteTableArgs.builder()
.transitRouterId(defaultTransitRouter.transitRouterId())
.transitRouterRouteTableDescription("desp")
.transitRouterRouteTableName(name)
.build());
final var default = CenFunctions.getTransitRouterRouteTables(GetTransitRouterRouteTablesArgs.builder()
.transitRouterId(defaultTransitRouter.transitRouterId())
.build());
ctx.export("firstTransitRouterRouteTableType", default_.applyValue(default_ -> default_.tables()[0].transitRouterRouteTableType()));
}
}
configuration:
name:
type: string
default: tf-example
resources:
defaultInstance:
type: alicloud:cen:Instance
name: default
properties:
cenInstanceName: ${name}
protectionLevel: REDUCED
defaultTransitRouter:
type: alicloud:cen:TransitRouter
name: default
properties:
cenId: ${defaultInstance.id}
transitRouterName: ${name}
defaultTransitRouterRouteTable:
type: alicloud:cen:TransitRouterRouteTable
name: default
properties:
transitRouterId: ${defaultTransitRouter.transitRouterId}
transitRouterRouteTableDescription: desp
transitRouterRouteTableName: ${name}
variables:
default:
fn::invoke:
Function: alicloud:cen:getTransitRouterRouteTables
Arguments:
transitRouterId: ${defaultTransitRouter.transitRouterId}
outputs:
firstTransitRouterRouteTableType: ${default.tables[0].transitRouterRouteTableType}
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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:cen/getTransitRouterRouteTables:getTransitRouterRouteTables
arguments:
# arguments dictionary
The following arguments are supported:
- Transit
Router stringId - ID of the CEN Transit Router Route Table.
- Ids List<string>
- A list of CEN Transit Router Route Table IDs.
- Name
Regex string - A regex string to filter CEN Transit Router Route Table by name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status string
- The status of the transit router route table to query. Valid values
Creating
,Active
andDeleting
.. - 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 transit router route table to query. Valid values
Creating
,Active
andDeleting
.. - Transit
Router stringRoute Table Type - The type of the transit router route table to query. Valid values
System
andCustom
.
- Transit
Router stringId - ID of the CEN Transit Router Route Table.
- Ids []string
- A list of CEN Transit Router Route Table IDs.
- Name
Regex string - A regex string to filter CEN Transit Router Route Table by name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status string
- The status of the transit router route table to query. Valid values
Creating
,Active
andDeleting
.. - 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 transit router route table to query. Valid values
Creating
,Active
andDeleting
.. - Transit
Router stringRoute Table Type - The type of the transit router route table to query. Valid values
System
andCustom
.
- transit
Router StringId - ID of the CEN Transit Router Route Table.
- ids List<String>
- A list of CEN Transit Router Route Table IDs.
- name
Regex String - A regex string to filter CEN Transit Router Route Table by name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - status String
- The status of the transit router route table to query. Valid values
Creating
,Active
andDeleting
.. - 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 transit router route table to query. Valid values
Creating
,Active
andDeleting
.. - transit
Router StringRoute Table Type - The type of the transit router route table to query. Valid values
System
andCustom
.
- transit
Router stringId - ID of the CEN Transit Router Route Table.
- ids string[]
- A list of CEN Transit Router Route Table IDs.
- name
Regex string - A regex string to filter CEN Transit Router Route Table by name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - status string
- The status of the transit router route table to query. Valid values
Creating
,Active
andDeleting
.. - 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 transit router route table to query. Valid values
Creating
,Active
andDeleting
.. - transit
Router stringRoute Table Type - The type of the transit router route table to query. Valid values
System
andCustom
.
- transit_
router_ strid - ID of the CEN Transit Router Route Table.
- ids Sequence[str]
- A list of CEN Transit Router Route Table IDs.
- name_
regex str - A regex string to filter CEN Transit Router Route Table by name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - status str
- The status of the transit router route table to query. Valid values
Creating
,Active
andDeleting
.. - 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 transit router route table to query. Valid values
Creating
,Active
andDeleting
.. - transit_
router_ strroute_ table_ type - The type of the transit router route table to query. Valid values
System
andCustom
.
- transit
Router StringId - ID of the CEN Transit Router Route Table.
- ids List<String>
- A list of CEN Transit Router Route Table IDs.
- name
Regex String - A regex string to filter CEN Transit Router Route Table by name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - status String
- The status of the transit router route table to query. Valid values
Creating
,Active
andDeleting
.. - 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 transit router route table to query. Valid values
Creating
,Active
andDeleting
.. - transit
Router StringRoute Table Type - The type of the transit router route table to query. Valid values
System
andCustom
.
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 name of CEN Transit Router Route Tables.
- Tables
List<Pulumi.
Ali Cloud. Cen. Outputs. Get Transit Router Route Tables Table> - A list of CEN Route Entries. 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 - Type of the transit router route table.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- A list of name of CEN Transit Router Route Tables.
- Tables
[]Get
Transit Router Route Tables Table - A list of CEN Route Entries. 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 - Type of the transit router route table.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- A list of name of CEN Transit Router Route Tables.
- tables
List<Get
Transit Router Route Tables Table> - A list of CEN Route Entries. 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 - Type of the transit router route table.
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- A list of name of CEN Transit Router Route Tables.
- tables
Get
Transit Router Route Tables Table[] - A list of CEN Route Entries. 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 - Type of the transit router route table.
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- A list of name of CEN Transit Router Route Tables.
- tables
Sequence[Get
Transit Router Route Tables Table] - A list of CEN Route Entries. 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 - Type of the transit router route table.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- A list of name of CEN Transit Router Route Tables.
- tables List<Property Map>
- A list of CEN Route Entries. 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 - Type of the transit router route table.
Supporting Types
GetTransitRouterRouteTablesTable
- Id string
- ID of resource.
- Status string
- The status of the transit router route table to query. Valid values
Creating
,Active
andDeleting
.. - Transit
Router stringRoute Table Description - The description of the transit router route table.
- Transit
Router stringRoute Table Id - ID of the trabsit router route table.
- Transit
Router stringRoute Table Name - Name of the transit router route table.
- Transit
Router stringRoute Table Type - The type of the transit router route table to query. Valid values
System
andCustom
.
- Id string
- ID of resource.
- Status string
- The status of the transit router route table to query. Valid values
Creating
,Active
andDeleting
.. - Transit
Router stringRoute Table Description - The description of the transit router route table.
- Transit
Router stringRoute Table Id - ID of the trabsit router route table.
- Transit
Router stringRoute Table Name - Name of the transit router route table.
- Transit
Router stringRoute Table Type - The type of the transit router route table to query. Valid values
System
andCustom
.
- id String
- ID of resource.
- status String
- The status of the transit router route table to query. Valid values
Creating
,Active
andDeleting
.. - transit
Router StringRoute Table Description - The description of the transit router route table.
- transit
Router StringRoute Table Id - ID of the trabsit router route table.
- transit
Router StringRoute Table Name - Name of the transit router route table.
- transit
Router StringRoute Table Type - The type of the transit router route table to query. Valid values
System
andCustom
.
- id string
- ID of resource.
- status string
- The status of the transit router route table to query. Valid values
Creating
,Active
andDeleting
.. - transit
Router stringRoute Table Description - The description of the transit router route table.
- transit
Router stringRoute Table Id - ID of the trabsit router route table.
- transit
Router stringRoute Table Name - Name of the transit router route table.
- transit
Router stringRoute Table Type - The type of the transit router route table to query. Valid values
System
andCustom
.
- id str
- ID of resource.
- status str
- The status of the transit router route table to query. Valid values
Creating
,Active
andDeleting
.. - transit_
router_ strroute_ table_ description - The description of the transit router route table.
- transit_
router_ strroute_ table_ id - ID of the trabsit router route table.
- transit_
router_ strroute_ table_ name - Name of the transit router route table.
- transit_
router_ strroute_ table_ type - The type of the transit router route table to query. Valid values
System
andCustom
.
- id String
- ID of resource.
- status String
- The status of the transit router route table to query. Valid values
Creating
,Active
andDeleting
.. - transit
Router StringRoute Table Description - The description of the transit router route table.
- transit
Router StringRoute Table Id - ID of the trabsit router route table.
- transit
Router StringRoute Table Name - Name of the transit router route table.
- transit
Router StringRoute Table Type - The type of the transit router route table to query. Valid values
System
andCustom
.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.