Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi
alicloud.cen.getTransitRouters
Explore with Pulumi AI
This data source provides CEN Transit Routers available to the user.What is Cen Transit Routers
NOTE: Available in 1.126.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = alicloud.cen.getTransitRouters({
    cenId: "cen-id1",
});
export const firstTransitRoutersType = _default.then(_default => _default.transitRouters?.[0]?.type);
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.cen.get_transit_routers(cen_id="cen-id1")
pulumi.export("firstTransitRoutersType", default.transit_routers[0].type)
package main
import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cen"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := cen.GetTransitRouters(ctx, &cen.GetTransitRoutersArgs{
			CenId: "cen-id1",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstTransitRoutersType", _default.TransitRouters[0].Type)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() => 
{
    var @default = AliCloud.Cen.GetTransitRouters.Invoke(new()
    {
        CenId = "cen-id1",
    });
    return new Dictionary<string, object?>
    {
        ["firstTransitRoutersType"] = @default.Apply(@default => @default.Apply(getTransitRoutersResult => getTransitRoutersResult.TransitRouters[0]?.Type)),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cen.CenFunctions;
import com.pulumi.alicloud.cen.inputs.GetTransitRoutersArgs;
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 default = CenFunctions.getTransitRouters(GetTransitRoutersArgs.builder()
            .cenId("cen-id1")
            .build());
        ctx.export("firstTransitRoutersType", default_.transitRouters()[0].type());
    }
}
variables:
  default:
    fn::invoke:
      function: alicloud:cen:getTransitRouters
      arguments:
        cenId: cen-id1
outputs:
  firstTransitRoutersType: ${default.transitRouters[0].type}
Using getTransitRouters
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 getTransitRouters(args: GetTransitRoutersArgs, opts?: InvokeOptions): Promise<GetTransitRoutersResult>
function getTransitRoutersOutput(args: GetTransitRoutersOutputArgs, opts?: InvokeOptions): Output<GetTransitRoutersResult>def get_transit_routers(cen_id: Optional[str] = None,
                        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_ids: Optional[Sequence[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> GetTransitRoutersResult
def get_transit_routers_output(cen_id: Optional[pulumi.Input[str]] = None,
                        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_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetTransitRoutersResult]func GetTransitRouters(ctx *Context, args *GetTransitRoutersArgs, opts ...InvokeOption) (*GetTransitRoutersResult, error)
func GetTransitRoutersOutput(ctx *Context, args *GetTransitRoutersOutputArgs, opts ...InvokeOption) GetTransitRoutersResultOutput> Note: This function is named GetTransitRouters in the Go SDK.
public static class GetTransitRouters 
{
    public static Task<GetTransitRoutersResult> InvokeAsync(GetTransitRoutersArgs args, InvokeOptions? opts = null)
    public static Output<GetTransitRoutersResult> Invoke(GetTransitRoutersInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetTransitRoutersResult> getTransitRouters(GetTransitRoutersArgs args, InvokeOptions options)
public static Output<GetTransitRoutersResult> getTransitRouters(GetTransitRoutersArgs args, InvokeOptions options)
fn::invoke:
  function: alicloud:cen/getTransitRouters:getTransitRouters
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CenId string
- The ID of the CEN instance.
- Ids List<string>
- A list of resource id. The element value is same as <cen_id>:<transit_router_id>`.
- NameRegex string
- A regex string to filter CEN Transit Routers by name.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- Status string
- The status of the resource. Valid values Active,Creating,DeletingandUpdating.
- TransitRouter stringId 
- The ID of the transit router.
- TransitRouter List<string>Ids 
- A list of ID of the transit router.
- CenId string
- The ID of the CEN instance.
- Ids []string
- A list of resource id. The element value is same as <cen_id>:<transit_router_id>`.
- NameRegex string
- A regex string to filter CEN Transit Routers by name.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- Status string
- The status of the resource. Valid values Active,Creating,DeletingandUpdating.
- TransitRouter stringId 
- The ID of the transit router.
- TransitRouter []stringIds 
- A list of ID of the transit router.
- cenId String
- The ID of the CEN instance.
- ids List<String>
- A list of resource id. The element value is same as <cen_id>:<transit_router_id>`.
- nameRegex String
- A regex string to filter CEN Transit Routers by name.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- status String
- The status of the resource. Valid values Active,Creating,DeletingandUpdating.
- transitRouter StringId 
- The ID of the transit router.
- transitRouter List<String>Ids 
- A list of ID of the transit router.
- cenId string
- The ID of the CEN instance.
- ids string[]
- A list of resource id. The element value is same as <cen_id>:<transit_router_id>`.
- nameRegex string
- A regex string to filter CEN Transit Routers by name.
- outputFile string
- File name where to save data source results (after running pulumi preview).
- status string
- The status of the resource. Valid values Active,Creating,DeletingandUpdating.
- transitRouter stringId 
- The ID of the transit router.
- transitRouter string[]Ids 
- A list of ID of the transit router.
- cen_id str
- The ID of the CEN instance.
- ids Sequence[str]
- A list of resource id. The element value is same as <cen_id>:<transit_router_id>`.
- name_regex str
- A regex string to filter CEN Transit Routers by name.
- output_file str
- File name where to save data source results (after running pulumi preview).
- status str
- The status of the resource. Valid values Active,Creating,DeletingandUpdating.
- transit_router_ strid 
- The ID of the transit router.
- transit_router_ Sequence[str]ids 
- A list of ID of the transit router.
- cenId String
- The ID of the CEN instance.
- ids List<String>
- A list of resource id. The element value is same as <cen_id>:<transit_router_id>`.
- nameRegex String
- A regex string to filter CEN Transit Routers by name.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- status String
- The status of the resource. Valid values Active,Creating,DeletingandUpdating.
- transitRouter StringId 
- The ID of the transit router.
- transitRouter List<String>Ids 
- A list of ID of the transit router.
getTransitRouters Result
The following output properties are available:
- CenId string
- The ID of the CEN instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Names List<string>
- A list of CEN Transit Routers names.
- TransitRouters List<Pulumi.Ali Cloud. Cen. Outputs. Get Transit Routers Transit Router> 
- A list of CEN Transit Routers. Each element contains the following attributes:
- Ids List<string>
- NameRegex string
- OutputFile string
- Status string
- The status of the transit router attachment.
- TransitRouter stringId 
- The ID of the transit router.
- TransitRouter List<string>Ids 
- CenId string
- The ID of the CEN instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Names []string
- A list of CEN Transit Routers names.
- TransitRouters []GetTransit Routers Transit Router 
- A list of CEN Transit Routers. Each element contains the following attributes:
- Ids []string
- NameRegex string
- OutputFile string
- Status string
- The status of the transit router attachment.
- TransitRouter stringId 
- The ID of the transit router.
- TransitRouter []stringIds 
- cenId String
- The ID of the CEN instance.
- id String
- The provider-assigned unique ID for this managed resource.
- names List<String>
- A list of CEN Transit Routers names.
- transitRouters List<GetTransit Routers Transit Router> 
- A list of CEN Transit Routers. Each element contains the following attributes:
- ids List<String>
- nameRegex String
- outputFile String
- status String
- The status of the transit router attachment.
- transitRouter StringId 
- The ID of the transit router.
- transitRouter List<String>Ids 
- cenId string
- The ID of the CEN instance.
- id string
- The provider-assigned unique ID for this managed resource.
- names string[]
- A list of CEN Transit Routers names.
- transitRouters GetTransit Routers Transit Router[] 
- A list of CEN Transit Routers. Each element contains the following attributes:
- ids string[]
- nameRegex string
- outputFile string
- status string
- The status of the transit router attachment.
- transitRouter stringId 
- The ID of the transit router.
- transitRouter string[]Ids 
- cen_id str
- The ID of the CEN instance.
- id str
- The provider-assigned unique ID for this managed resource.
- names Sequence[str]
- A list of CEN Transit Routers names.
- transit_routers Sequence[GetTransit Routers Transit Router] 
- A list of CEN Transit Routers. Each element contains the following attributes:
- ids Sequence[str]
- name_regex str
- output_file str
- status str
- The status of the transit router attachment.
- transit_router_ strid 
- The ID of the transit router.
- transit_router_ Sequence[str]ids 
- cenId String
- The ID of the CEN instance.
- id String
- The provider-assigned unique ID for this managed resource.
- names List<String>
- A list of CEN Transit Routers names.
- transitRouters List<Property Map>
- A list of CEN Transit Routers. Each element contains the following attributes:
- ids List<String>
- nameRegex String
- outputFile String
- status String
- The status of the transit router attachment.
- transitRouter StringId 
- The ID of the transit router.
- transitRouter List<String>Ids 
Supporting Types
GetTransitRoutersTransitRouter    
- AliUid string
- The UID of the Aliyun.
- CenId string
- The ID of the CEN instance.
- Id string
- The ID of the resource, It is formatted to <cen_id>:<transit_router_id>. NOTE: Before 1.151.0, It is formatted to<transit_router_id>.
- Status string
- The status of the resource. Valid values Active,Creating,DeletingandUpdating.
- TransitRouter stringDescription 
- The description of the transit router.
- TransitRouter stringId 
- The ID of the transit router.
- TransitRouter stringName 
- The name of the transit router.
- Type string
- The Type of the transit router.
- XgwVip string
- The vip of the XGW.
- AliUid string
- The UID of the Aliyun.
- CenId string
- The ID of the CEN instance.
- Id string
- The ID of the resource, It is formatted to <cen_id>:<transit_router_id>. NOTE: Before 1.151.0, It is formatted to<transit_router_id>.
- Status string
- The status of the resource. Valid values Active,Creating,DeletingandUpdating.
- TransitRouter stringDescription 
- The description of the transit router.
- TransitRouter stringId 
- The ID of the transit router.
- TransitRouter stringName 
- The name of the transit router.
- Type string
- The Type of the transit router.
- XgwVip string
- The vip of the XGW.
- aliUid String
- The UID of the Aliyun.
- cenId String
- The ID of the CEN instance.
- id String
- The ID of the resource, It is formatted to <cen_id>:<transit_router_id>. NOTE: Before 1.151.0, It is formatted to<transit_router_id>.
- status String
- The status of the resource. Valid values Active,Creating,DeletingandUpdating.
- transitRouter StringDescription 
- The description of the transit router.
- transitRouter StringId 
- The ID of the transit router.
- transitRouter StringName 
- The name of the transit router.
- type String
- The Type of the transit router.
- xgwVip String
- The vip of the XGW.
- aliUid string
- The UID of the Aliyun.
- cenId string
- The ID of the CEN instance.
- id string
- The ID of the resource, It is formatted to <cen_id>:<transit_router_id>. NOTE: Before 1.151.0, It is formatted to<transit_router_id>.
- status string
- The status of the resource. Valid values Active,Creating,DeletingandUpdating.
- transitRouter stringDescription 
- The description of the transit router.
- transitRouter stringId 
- The ID of the transit router.
- transitRouter stringName 
- The name of the transit router.
- type string
- The Type of the transit router.
- xgwVip string
- The vip of the XGW.
- ali_uid str
- The UID of the Aliyun.
- cen_id str
- The ID of the CEN instance.
- id str
- The ID of the resource, It is formatted to <cen_id>:<transit_router_id>. NOTE: Before 1.151.0, It is formatted to<transit_router_id>.
- status str
- The status of the resource. Valid values Active,Creating,DeletingandUpdating.
- transit_router_ strdescription 
- The description of the transit router.
- transit_router_ strid 
- The ID of the transit router.
- transit_router_ strname 
- The name of the transit router.
- type str
- The Type of the transit router.
- xgw_vip str
- The vip of the XGW.
- aliUid String
- The UID of the Aliyun.
- cenId String
- The ID of the CEN instance.
- id String
- The ID of the resource, It is formatted to <cen_id>:<transit_router_id>. NOTE: Before 1.151.0, It is formatted to<transit_router_id>.
- status String
- The status of the resource. Valid values Active,Creating,DeletingandUpdating.
- transitRouter StringDescription 
- The description of the transit router.
- transitRouter StringId 
- The ID of the transit router.
- transitRouter StringName 
- The name of the transit router.
- type String
- The Type of the transit router.
- xgwVip String
- The vip of the XGW.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the alicloudTerraform Provider.