1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. getVpcRouteIdsV2
opentelekomcloud 1.36.52 published on Thursday, Nov 6, 2025 by opentelekomcloud

opentelekomcloud.getVpcRouteIdsV2

Start a Neo task
Explain and create an opentelekomcloud.getVpcRouteIdsV2 resource
opentelekomcloud logo
opentelekomcloud 1.36.52 published on Thursday, Nov 6, 2025 by opentelekomcloud

    Up-to-date reference of API arguments for VPC route you can get at documentation portal

    Use this data source to get a list of route ids for a vpc_id.

    This resource can be useful for getting back a list of route ids for a vpc.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const vpcId = config.requireObject<any>("vpcId");
    const example = opentelekomcloud.getVpcRouteIdsV2({
        vpcId: vpcId,
    });
    const vpcRoute = .reduce((__obj, [__key, __value]) => ({ ...__obj, [__key]: opentelekomcloud.getVpcRouteV2({
        id: __value,
    }) }));
    export const routeNexthop = .map(hop => (hop.cidr));
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    vpc_id = config.require_object("vpcId")
    example = opentelekomcloud.get_vpc_route_ids_v2(vpc_id=vpc_id)
    vpc_route = {__key: opentelekomcloud.get_vpc_route_v2(id=__value) for __key, __value in subnet_ids["ids"]}
    pulumi.export("routeNexthop", [hop["cidr"] for hop in subnet])
    
    Example coming soon!
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var vpcId = config.RequireObject<dynamic>("vpcId");
        var example = Opentelekomcloud.GetVpcRouteIdsV2.Invoke(new()
        {
            VpcId = vpcId,
        });
    
        var vpcRoute = .ToDictionary(item => {
            var __key = item.Key;
            return __key;
        }, item => {
            var __value = item.Value;
            return Opentelekomcloud.GetVpcRouteV2.Invoke(new()
            {
                Id = __value,
            });
        });
    
        return new Dictionary<string, object?>
        {
            ["routeNexthop"] = .Select(hop => 
            {
                return hop.Cidr;
            }).ToList(),
        };
    });
    
    Example coming soon!
    
    Example coming soon!
    

    Using getVpcRouteIdsV2

    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 getVpcRouteIdsV2(args: GetVpcRouteIdsV2Args, opts?: InvokeOptions): Promise<GetVpcRouteIdsV2Result>
    function getVpcRouteIdsV2Output(args: GetVpcRouteIdsV2OutputArgs, opts?: InvokeOptions): Output<GetVpcRouteIdsV2Result>
    def get_vpc_route_ids_v2(id: Optional[str] = None,
                             region: Optional[str] = None,
                             vpc_id: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetVpcRouteIdsV2Result
    def get_vpc_route_ids_v2_output(id: Optional[pulumi.Input[str]] = None,
                             region: Optional[pulumi.Input[str]] = None,
                             vpc_id: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetVpcRouteIdsV2Result]
    func GetVpcRouteIdsV2(ctx *Context, args *GetVpcRouteIdsV2Args, opts ...InvokeOption) (*GetVpcRouteIdsV2Result, error)
    func GetVpcRouteIdsV2Output(ctx *Context, args *GetVpcRouteIdsV2OutputArgs, opts ...InvokeOption) GetVpcRouteIdsV2ResultOutput

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

    public static class GetVpcRouteIdsV2 
    {
        public static Task<GetVpcRouteIdsV2Result> InvokeAsync(GetVpcRouteIdsV2Args args, InvokeOptions? opts = null)
        public static Output<GetVpcRouteIdsV2Result> Invoke(GetVpcRouteIdsV2InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVpcRouteIdsV2Result> getVpcRouteIdsV2(GetVpcRouteIdsV2Args args, InvokeOptions options)
    public static Output<GetVpcRouteIdsV2Result> getVpcRouteIdsV2(GetVpcRouteIdsV2Args args, InvokeOptions options)
    
    fn::invoke:
      function: opentelekomcloud:index/getVpcRouteIdsV2:getVpcRouteIdsV2
      arguments:
        # arguments dictionary

    The following arguments are supported:

    VpcId string
    The VPC ID that you want to filter from.
    Id string
    Region string
    VpcId string
    The VPC ID that you want to filter from.
    Id string
    Region string
    vpcId String
    The VPC ID that you want to filter from.
    id String
    region String
    vpcId string
    The VPC ID that you want to filter from.
    id string
    region string
    vpc_id str
    The VPC ID that you want to filter from.
    id str
    region str
    vpcId String
    The VPC ID that you want to filter from.
    id String
    region String

    getVpcRouteIdsV2 Result

    The following output properties are available:

    Id string
    Ids List<string>
    A list of all the route ids found. This data source will fail if none are found.
    Region string
    VpcId string
    Id string
    Ids []string
    A list of all the route ids found. This data source will fail if none are found.
    Region string
    VpcId string
    id String
    ids List<String>
    A list of all the route ids found. This data source will fail if none are found.
    region String
    vpcId String
    id string
    ids string[]
    A list of all the route ids found. This data source will fail if none are found.
    region string
    vpcId string
    id str
    ids Sequence[str]
    A list of all the route ids found. This data source will fail if none are found.
    region str
    vpc_id str
    id String
    ids List<String>
    A list of all the route ids found. This data source will fail if none are found.
    region String
    vpcId String

    Package Details

    Repository
    opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
    License
    Notes
    This Pulumi package is based on the opentelekomcloud Terraform Provider.
    opentelekomcloud logo
    opentelekomcloud 1.36.52 published on Thursday, Nov 6, 2025 by opentelekomcloud
      Meet Neo: Your AI Platform Teammate