1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. vpc
  5. getRouterInterfaces
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.vpc.getRouterInterfaces

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    This data source provides information about router interfaces that connect VPCs together.

    DEPRECATED: This datasource has been deprecated from version 1.199.0. Please use new data source alicloud_express_connect_router_interfaces.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const routerInterfacesDs = alicloud.vpc.getRouterInterfaces({
        nameRegex: "^testenv",
        status: "Active",
    });
    export const firstRouterInterfaceId = routerInterfacesDs.then(routerInterfacesDs => routerInterfacesDs.interfaces?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    router_interfaces_ds = alicloud.vpc.get_router_interfaces(name_regex="^testenv",
        status="Active")
    pulumi.export("firstRouterInterfaceId", router_interfaces_ds.interfaces[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		routerInterfacesDs, err := vpc.GetRouterInterfaces(ctx, &vpc.GetRouterInterfacesArgs{
    			NameRegex: pulumi.StringRef("^testenv"),
    			Status:    pulumi.StringRef("Active"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstRouterInterfaceId", routerInterfacesDs.Interfaces[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var routerInterfacesDs = AliCloud.Vpc.GetRouterInterfaces.Invoke(new()
        {
            NameRegex = "^testenv",
            Status = "Active",
        });
    
        return new Dictionary<string, object?>
        {
            ["firstRouterInterfaceId"] = routerInterfacesDs.Apply(getRouterInterfacesResult => getRouterInterfacesResult.Interfaces[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.vpc.VpcFunctions;
    import com.pulumi.alicloud.vpc.inputs.GetRouterInterfacesArgs;
    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 routerInterfacesDs = VpcFunctions.getRouterInterfaces(GetRouterInterfacesArgs.builder()
                .nameRegex("^testenv")
                .status("Active")
                .build());
    
            ctx.export("firstRouterInterfaceId", routerInterfacesDs.applyValue(getRouterInterfacesResult -> getRouterInterfacesResult.interfaces()[0].id()));
        }
    }
    
    variables:
      routerInterfacesDs:
        fn::invoke:
          Function: alicloud:vpc:getRouterInterfaces
          Arguments:
            nameRegex: ^testenv
            status: Active
    outputs:
      firstRouterInterfaceId: ${routerInterfacesDs.interfaces[0].id}
    

    Using getRouterInterfaces

    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 getRouterInterfaces(args: GetRouterInterfacesArgs, opts?: InvokeOptions): Promise<GetRouterInterfacesResult>
    function getRouterInterfacesOutput(args: GetRouterInterfacesOutputArgs, opts?: InvokeOptions): Output<GetRouterInterfacesResult>
    def get_router_interfaces(ids: Optional[Sequence[str]] = None,
                              name_regex: Optional[str] = None,
                              opposite_interface_id: Optional[str] = None,
                              opposite_interface_owner_id: Optional[str] = None,
                              output_file: Optional[str] = None,
                              role: Optional[str] = None,
                              router_id: Optional[str] = None,
                              router_type: Optional[str] = None,
                              specification: Optional[str] = None,
                              status: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetRouterInterfacesResult
    def get_router_interfaces_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                              name_regex: Optional[pulumi.Input[str]] = None,
                              opposite_interface_id: Optional[pulumi.Input[str]] = None,
                              opposite_interface_owner_id: Optional[pulumi.Input[str]] = None,
                              output_file: Optional[pulumi.Input[str]] = None,
                              role: Optional[pulumi.Input[str]] = None,
                              router_id: Optional[pulumi.Input[str]] = None,
                              router_type: Optional[pulumi.Input[str]] = None,
                              specification: Optional[pulumi.Input[str]] = None,
                              status: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetRouterInterfacesResult]
    func GetRouterInterfaces(ctx *Context, args *GetRouterInterfacesArgs, opts ...InvokeOption) (*GetRouterInterfacesResult, error)
    func GetRouterInterfacesOutput(ctx *Context, args *GetRouterInterfacesOutputArgs, opts ...InvokeOption) GetRouterInterfacesResultOutput

    > Note: This function is named GetRouterInterfaces in the Go SDK.

    public static class GetRouterInterfaces 
    {
        public static Task<GetRouterInterfacesResult> InvokeAsync(GetRouterInterfacesArgs args, InvokeOptions? opts = null)
        public static Output<GetRouterInterfacesResult> Invoke(GetRouterInterfacesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRouterInterfacesResult> getRouterInterfaces(GetRouterInterfacesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:vpc/getRouterInterfaces:getRouterInterfaces
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of router interface IDs.
    NameRegex string
    A regex string used to filter by router interface name.
    OppositeInterfaceId string
    ID of the peer router interface.
    OppositeInterfaceOwnerId string
    Account ID of the owner of the peer router interface.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Role string
    Role of the router interface. Valid values are InitiatingSide (connection initiator) and AcceptingSide (connection receiver). The value of this parameter must be InitiatingSide if the router_type is set to VBR.
    RouterId string
    ID of the VRouter located in the local region.
    RouterType string
    Router type in the local region. Valid values are VRouter and VBR (physical connection).
    Specification string
    Specification of the link, such as Small.1 (10Mb), Middle.1 (100Mb), Large.2 (2Gb), ...etc.
    Status string
    Expected status. Valid values are Active, Inactive and Idle.
    Ids []string
    A list of router interface IDs.
    NameRegex string
    A regex string used to filter by router interface name.
    OppositeInterfaceId string
    ID of the peer router interface.
    OppositeInterfaceOwnerId string
    Account ID of the owner of the peer router interface.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Role string
    Role of the router interface. Valid values are InitiatingSide (connection initiator) and AcceptingSide (connection receiver). The value of this parameter must be InitiatingSide if the router_type is set to VBR.
    RouterId string
    ID of the VRouter located in the local region.
    RouterType string
    Router type in the local region. Valid values are VRouter and VBR (physical connection).
    Specification string
    Specification of the link, such as Small.1 (10Mb), Middle.1 (100Mb), Large.2 (2Gb), ...etc.
    Status string
    Expected status. Valid values are Active, Inactive and Idle.
    ids List<String>
    A list of router interface IDs.
    nameRegex String
    A regex string used to filter by router interface name.
    oppositeInterfaceId String
    ID of the peer router interface.
    oppositeInterfaceOwnerId String
    Account ID of the owner of the peer router interface.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    role String
    Role of the router interface. Valid values are InitiatingSide (connection initiator) and AcceptingSide (connection receiver). The value of this parameter must be InitiatingSide if the router_type is set to VBR.
    routerId String
    ID of the VRouter located in the local region.
    routerType String
    Router type in the local region. Valid values are VRouter and VBR (physical connection).
    specification String
    Specification of the link, such as Small.1 (10Mb), Middle.1 (100Mb), Large.2 (2Gb), ...etc.
    status String
    Expected status. Valid values are Active, Inactive and Idle.
    ids string[]
    A list of router interface IDs.
    nameRegex string
    A regex string used to filter by router interface name.
    oppositeInterfaceId string
    ID of the peer router interface.
    oppositeInterfaceOwnerId string
    Account ID of the owner of the peer router interface.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    role string
    Role of the router interface. Valid values are InitiatingSide (connection initiator) and AcceptingSide (connection receiver). The value of this parameter must be InitiatingSide if the router_type is set to VBR.
    routerId string
    ID of the VRouter located in the local region.
    routerType string
    Router type in the local region. Valid values are VRouter and VBR (physical connection).
    specification string
    Specification of the link, such as Small.1 (10Mb), Middle.1 (100Mb), Large.2 (2Gb), ...etc.
    status string
    Expected status. Valid values are Active, Inactive and Idle.
    ids Sequence[str]
    A list of router interface IDs.
    name_regex str
    A regex string used to filter by router interface name.
    opposite_interface_id str
    ID of the peer router interface.
    opposite_interface_owner_id str
    Account ID of the owner of the peer router interface.
    output_file str
    File name where to save data source results (after running pulumi preview).
    role str
    Role of the router interface. Valid values are InitiatingSide (connection initiator) and AcceptingSide (connection receiver). The value of this parameter must be InitiatingSide if the router_type is set to VBR.
    router_id str
    ID of the VRouter located in the local region.
    router_type str
    Router type in the local region. Valid values are VRouter and VBR (physical connection).
    specification str
    Specification of the link, such as Small.1 (10Mb), Middle.1 (100Mb), Large.2 (2Gb), ...etc.
    status str
    Expected status. Valid values are Active, Inactive and Idle.
    ids List<String>
    A list of router interface IDs.
    nameRegex String
    A regex string used to filter by router interface name.
    oppositeInterfaceId String
    ID of the peer router interface.
    oppositeInterfaceOwnerId String
    Account ID of the owner of the peer router interface.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    role String
    Role of the router interface. Valid values are InitiatingSide (connection initiator) and AcceptingSide (connection receiver). The value of this parameter must be InitiatingSide if the router_type is set to VBR.
    routerId String
    ID of the VRouter located in the local region.
    routerType String
    Router type in the local region. Valid values are VRouter and VBR (physical connection).
    specification String
    Specification of the link, such as Small.1 (10Mb), Middle.1 (100Mb), Large.2 (2Gb), ...etc.
    status String
    Expected status. Valid values are Active, Inactive and Idle.

    getRouterInterfaces Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of router interface IDs.
    Interfaces List<Pulumi.AliCloud.Vpc.Outputs.GetRouterInterfacesInterface>
    A list of router interfaces. Each element contains the following attributes:
    Names List<string>
    A list of router interface names.
    NameRegex string
    OppositeInterfaceId string
    Peer router interface ID.
    OppositeInterfaceOwnerId string
    Account ID of the owner of the peer router interface.
    OutputFile string
    Role string
    Router interface role. Possible values: InitiatingSide and AcceptingSide.
    RouterId string
    ID of the VRouter located in the local region.
    RouterType string
    Router type in the local region. Possible values: VRouter and VBR.
    Specification string
    Router interface specification. Possible values: Small.1, Middle.1, Large.2, ...etc.
    Status string
    Router interface status. Possible values: Active, Inactive and Idle.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of router interface IDs.
    Interfaces []GetRouterInterfacesInterface
    A list of router interfaces. Each element contains the following attributes:
    Names []string
    A list of router interface names.
    NameRegex string
    OppositeInterfaceId string
    Peer router interface ID.
    OppositeInterfaceOwnerId string
    Account ID of the owner of the peer router interface.
    OutputFile string
    Role string
    Router interface role. Possible values: InitiatingSide and AcceptingSide.
    RouterId string
    ID of the VRouter located in the local region.
    RouterType string
    Router type in the local region. Possible values: VRouter and VBR.
    Specification string
    Router interface specification. Possible values: Small.1, Middle.1, Large.2, ...etc.
    Status string
    Router interface status. Possible values: Active, Inactive and Idle.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of router interface IDs.
    interfaces List<GetRouterInterfacesInterface>
    A list of router interfaces. Each element contains the following attributes:
    names List<String>
    A list of router interface names.
    nameRegex String
    oppositeInterfaceId String
    Peer router interface ID.
    oppositeInterfaceOwnerId String
    Account ID of the owner of the peer router interface.
    outputFile String
    role String
    Router interface role. Possible values: InitiatingSide and AcceptingSide.
    routerId String
    ID of the VRouter located in the local region.
    routerType String
    Router type in the local region. Possible values: VRouter and VBR.
    specification String
    Router interface specification. Possible values: Small.1, Middle.1, Large.2, ...etc.
    status String
    Router interface status. Possible values: Active, Inactive and Idle.
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of router interface IDs.
    interfaces GetRouterInterfacesInterface[]
    A list of router interfaces. Each element contains the following attributes:
    names string[]
    A list of router interface names.
    nameRegex string
    oppositeInterfaceId string
    Peer router interface ID.
    oppositeInterfaceOwnerId string
    Account ID of the owner of the peer router interface.
    outputFile string
    role string
    Router interface role. Possible values: InitiatingSide and AcceptingSide.
    routerId string
    ID of the VRouter located in the local region.
    routerType string
    Router type in the local region. Possible values: VRouter and VBR.
    specification string
    Router interface specification. Possible values: Small.1, Middle.1, Large.2, ...etc.
    status string
    Router interface status. Possible values: Active, Inactive and Idle.
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of router interface IDs.
    interfaces Sequence[GetRouterInterfacesInterface]
    A list of router interfaces. Each element contains the following attributes:
    names Sequence[str]
    A list of router interface names.
    name_regex str
    opposite_interface_id str
    Peer router interface ID.
    opposite_interface_owner_id str
    Account ID of the owner of the peer router interface.
    output_file str
    role str
    Router interface role. Possible values: InitiatingSide and AcceptingSide.
    router_id str
    ID of the VRouter located in the local region.
    router_type str
    Router type in the local region. Possible values: VRouter and VBR.
    specification str
    Router interface specification. Possible values: Small.1, Middle.1, Large.2, ...etc.
    status str
    Router interface status. Possible values: Active, Inactive and Idle.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of router interface IDs.
    interfaces List<Property Map>
    A list of router interfaces. Each element contains the following attributes:
    names List<String>
    A list of router interface names.
    nameRegex String
    oppositeInterfaceId String
    Peer router interface ID.
    oppositeInterfaceOwnerId String
    Account ID of the owner of the peer router interface.
    outputFile String
    role String
    Router interface role. Possible values: InitiatingSide and AcceptingSide.
    routerId String
    ID of the VRouter located in the local region.
    routerType String
    Router type in the local region. Possible values: VRouter and VBR.
    specification String
    Router interface specification. Possible values: Small.1, Middle.1, Large.2, ...etc.
    status String
    Router interface status. Possible values: Active, Inactive and Idle.

    Supporting Types

    GetRouterInterfacesInterface

    AccessPointId string
    ID of the access point used by the VBR.
    CreationTime string
    Router interface creation time.
    Description string
    Router interface description.
    HealthCheckSourceIp string
    Source IP address used to perform health check on the physical connection.
    HealthCheckTargetIp string
    Destination IP address used to perform health check on the physical connection.
    Id string
    Router interface ID.
    Name string
    Router interface name.
    OppositeInterfaceId string
    ID of the peer router interface.
    OppositeInterfaceOwnerId string
    Account ID of the owner of the peer router interface.
    OppositeRegionId string
    Peer router region ID.
    OppositeRouterId string
    Peer router ID.
    OppositeRouterType string
    Router type in the peer region. Possible values: VRouter and VBR.
    Role string
    Role of the router interface. Valid values are InitiatingSide (connection initiator) and AcceptingSide (connection receiver). The value of this parameter must be InitiatingSide if the router_type is set to VBR.
    RouterId string
    ID of the VRouter located in the local region.
    RouterType string
    Router type in the local region. Valid values are VRouter and VBR (physical connection).
    Specification string
    Specification of the link, such as Small.1 (10Mb), Middle.1 (100Mb), Large.2 (2Gb), ...etc.
    Status string
    Expected status. Valid values are Active, Inactive and Idle.
    VpcId string
    ID of the VPC that owns the router in the local region.
    AccessPointId string
    ID of the access point used by the VBR.
    CreationTime string
    Router interface creation time.
    Description string
    Router interface description.
    HealthCheckSourceIp string
    Source IP address used to perform health check on the physical connection.
    HealthCheckTargetIp string
    Destination IP address used to perform health check on the physical connection.
    Id string
    Router interface ID.
    Name string
    Router interface name.
    OppositeInterfaceId string
    ID of the peer router interface.
    OppositeInterfaceOwnerId string
    Account ID of the owner of the peer router interface.
    OppositeRegionId string
    Peer router region ID.
    OppositeRouterId string
    Peer router ID.
    OppositeRouterType string
    Router type in the peer region. Possible values: VRouter and VBR.
    Role string
    Role of the router interface. Valid values are InitiatingSide (connection initiator) and AcceptingSide (connection receiver). The value of this parameter must be InitiatingSide if the router_type is set to VBR.
    RouterId string
    ID of the VRouter located in the local region.
    RouterType string
    Router type in the local region. Valid values are VRouter and VBR (physical connection).
    Specification string
    Specification of the link, such as Small.1 (10Mb), Middle.1 (100Mb), Large.2 (2Gb), ...etc.
    Status string
    Expected status. Valid values are Active, Inactive and Idle.
    VpcId string
    ID of the VPC that owns the router in the local region.
    accessPointId String
    ID of the access point used by the VBR.
    creationTime String
    Router interface creation time.
    description String
    Router interface description.
    healthCheckSourceIp String
    Source IP address used to perform health check on the physical connection.
    healthCheckTargetIp String
    Destination IP address used to perform health check on the physical connection.
    id String
    Router interface ID.
    name String
    Router interface name.
    oppositeInterfaceId String
    ID of the peer router interface.
    oppositeInterfaceOwnerId String
    Account ID of the owner of the peer router interface.
    oppositeRegionId String
    Peer router region ID.
    oppositeRouterId String
    Peer router ID.
    oppositeRouterType String
    Router type in the peer region. Possible values: VRouter and VBR.
    role String
    Role of the router interface. Valid values are InitiatingSide (connection initiator) and AcceptingSide (connection receiver). The value of this parameter must be InitiatingSide if the router_type is set to VBR.
    routerId String
    ID of the VRouter located in the local region.
    routerType String
    Router type in the local region. Valid values are VRouter and VBR (physical connection).
    specification String
    Specification of the link, such as Small.1 (10Mb), Middle.1 (100Mb), Large.2 (2Gb), ...etc.
    status String
    Expected status. Valid values are Active, Inactive and Idle.
    vpcId String
    ID of the VPC that owns the router in the local region.
    accessPointId string
    ID of the access point used by the VBR.
    creationTime string
    Router interface creation time.
    description string
    Router interface description.
    healthCheckSourceIp string
    Source IP address used to perform health check on the physical connection.
    healthCheckTargetIp string
    Destination IP address used to perform health check on the physical connection.
    id string
    Router interface ID.
    name string
    Router interface name.
    oppositeInterfaceId string
    ID of the peer router interface.
    oppositeInterfaceOwnerId string
    Account ID of the owner of the peer router interface.
    oppositeRegionId string
    Peer router region ID.
    oppositeRouterId string
    Peer router ID.
    oppositeRouterType string
    Router type in the peer region. Possible values: VRouter and VBR.
    role string
    Role of the router interface. Valid values are InitiatingSide (connection initiator) and AcceptingSide (connection receiver). The value of this parameter must be InitiatingSide if the router_type is set to VBR.
    routerId string
    ID of the VRouter located in the local region.
    routerType string
    Router type in the local region. Valid values are VRouter and VBR (physical connection).
    specification string
    Specification of the link, such as Small.1 (10Mb), Middle.1 (100Mb), Large.2 (2Gb), ...etc.
    status string
    Expected status. Valid values are Active, Inactive and Idle.
    vpcId string
    ID of the VPC that owns the router in the local region.
    access_point_id str
    ID of the access point used by the VBR.
    creation_time str
    Router interface creation time.
    description str
    Router interface description.
    health_check_source_ip str
    Source IP address used to perform health check on the physical connection.
    health_check_target_ip str
    Destination IP address used to perform health check on the physical connection.
    id str
    Router interface ID.
    name str
    Router interface name.
    opposite_interface_id str
    ID of the peer router interface.
    opposite_interface_owner_id str
    Account ID of the owner of the peer router interface.
    opposite_region_id str
    Peer router region ID.
    opposite_router_id str
    Peer router ID.
    opposite_router_type str
    Router type in the peer region. Possible values: VRouter and VBR.
    role str
    Role of the router interface. Valid values are InitiatingSide (connection initiator) and AcceptingSide (connection receiver). The value of this parameter must be InitiatingSide if the router_type is set to VBR.
    router_id str
    ID of the VRouter located in the local region.
    router_type str
    Router type in the local region. Valid values are VRouter and VBR (physical connection).
    specification str
    Specification of the link, such as Small.1 (10Mb), Middle.1 (100Mb), Large.2 (2Gb), ...etc.
    status str
    Expected status. Valid values are Active, Inactive and Idle.
    vpc_id str
    ID of the VPC that owns the router in the local region.
    accessPointId String
    ID of the access point used by the VBR.
    creationTime String
    Router interface creation time.
    description String
    Router interface description.
    healthCheckSourceIp String
    Source IP address used to perform health check on the physical connection.
    healthCheckTargetIp String
    Destination IP address used to perform health check on the physical connection.
    id String
    Router interface ID.
    name String
    Router interface name.
    oppositeInterfaceId String
    ID of the peer router interface.
    oppositeInterfaceOwnerId String
    Account ID of the owner of the peer router interface.
    oppositeRegionId String
    Peer router region ID.
    oppositeRouterId String
    Peer router ID.
    oppositeRouterType String
    Router type in the peer region. Possible values: VRouter and VBR.
    role String
    Role of the router interface. Valid values are InitiatingSide (connection initiator) and AcceptingSide (connection receiver). The value of this parameter must be InitiatingSide if the router_type is set to VBR.
    routerId String
    ID of the VRouter located in the local region.
    routerType String
    Router type in the local region. Valid values are VRouter and VBR (physical connection).
    specification String
    Specification of the link, such as Small.1 (10Mb), Middle.1 (100Mb), Large.2 (2Gb), ...etc.
    status String
    Expected status. Valid values are Active, Inactive and Idle.
    vpcId String
    ID of the VPC that owns the router in the local region.

    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.57.1 published on Wednesday, Jun 26, 2024 by Pulumi