1. Packages
  2. Alicloud Provider
  3. API Docs
  4. cen
  5. getTransitRouters
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.cen.getTransitRouters

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:cen/getTransitRouters:getTransitRouters
      arguments:
        # arguments dictionary

    The 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, Deleting and Updating.
    TransitRouterId string
    The ID of the transit router.
    TransitRouterIds List<string>
    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, Deleting and Updating.
    TransitRouterId string
    The ID of the transit router.
    TransitRouterIds []string
    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, Deleting and Updating.
    transitRouterId String
    The ID of the transit router.
    transitRouterIds List<String>
    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, Deleting and Updating.
    transitRouterId string
    The ID of the transit router.
    transitRouterIds string[]
    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, Deleting and Updating.
    transit_router_id str
    The ID of the transit router.
    transit_router_ids Sequence[str]
    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, Deleting and Updating.
    transitRouterId String
    The ID of the transit router.
    transitRouterIds List<String>
    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.AliCloud.Cen.Outputs.GetTransitRoutersTransitRouter>
    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.
    TransitRouterId string
    The ID of the transit router.
    TransitRouterIds List<string>
    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 []GetTransitRoutersTransitRouter
    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.
    TransitRouterId string
    The ID of the transit router.
    TransitRouterIds []string
    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<GetTransitRoutersTransitRouter>
    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.
    transitRouterId String
    The ID of the transit router.
    transitRouterIds List<String>
    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 GetTransitRoutersTransitRouter[]
    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.
    transitRouterId string
    The ID of the transit router.
    transitRouterIds string[]
    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[GetTransitRoutersTransitRouter]
    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_id str
    The ID of the transit router.
    transit_router_ids Sequence[str]
    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.
    transitRouterId String
    The ID of the transit router.
    transitRouterIds List<String>

    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, Deleting and Updating.
    TransitRouterDescription string
    The description of the transit router.
    TransitRouterId string
    The ID of the transit router.
    TransitRouterName string
    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, Deleting and Updating.
    TransitRouterDescription string
    The description of the transit router.
    TransitRouterId string
    The ID of the transit router.
    TransitRouterName string
    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, Deleting and Updating.
    transitRouterDescription String
    The description of the transit router.
    transitRouterId String
    The ID of the transit router.
    transitRouterName String
    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, Deleting and Updating.
    transitRouterDescription string
    The description of the transit router.
    transitRouterId string
    The ID of the transit router.
    transitRouterName string
    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, Deleting and Updating.
    transit_router_description str
    The description of the transit router.
    transit_router_id str
    The ID of the transit router.
    transit_router_name str
    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, Deleting and Updating.
    transitRouterDescription String
    The description of the transit router.
    transitRouterId String
    The ID of the transit router.
    transitRouterName String
    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 alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi