1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. getVpcRouteIdsV2
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.getVpcRouteIdsV2

Explore with Pulumi AI

flexibleengine logo
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

    !> WARNING: It has been deprecated, use flexibleengine.VpcRouteTable to get the route details.

    flexibleengine.getVpcRouteIdsV2 provides 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 flexibleengine from "@pulumi/flexibleengine";
    
    const config = new pulumi.Config();
    const vpcId = config.requireObject("vpcId");
    const example = flexibleengine.getVpcRouteIdsV2({
        vpcId: vpcId,
    });
    const vpcRoute = .map(__index => (flexibleengine.getVpcRouteV2({
        id: _arg0_.ids[__index],
    })));
    export const routeNexthop = vpcRoute.then(vpcRoute => vpcRoute.map(__item => __item.nexthop));
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    config = pulumi.Config()
    vpc_id = config.require_object("vpcId")
    example = flexibleengine.get_vpc_route_ids_v2(vpc_id=vpc_id)
    vpc_route = [flexibleengine.get_vpc_route_v2(id=example.ids[__index]) for __index in range(len(example.ids))]
    pulumi.export("routeNexthop", [__item.nexthop for __item in vpc_route])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
    	"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, "")
    vpcId := cfg.RequireObject("vpcId")
    example, err := flexibleengine.GetVpcRouteIdsV2(ctx, &flexibleengine.GetVpcRouteIdsV2Args{
    VpcId: vpcId,
    }, nil);
    if err != nil {
    return err
    }
    vpcRoute := "TODO: For expression";
    ctx.Export("routeNexthop", pulumi.StringArray(%!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ #-functions-%sflexibleengine:index-getVpcRouteIdsV2:getVpcRouteIdsV2.pp:9,13-31)))
    return nil
    })
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Flexibleengine = Pulumi.Flexibleengine;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var vpcId = config.RequireObject<dynamic>("vpcId");
        var example = Flexibleengine.GetVpcRouteIdsV2.Invoke(new()
        {
            VpcId = vpcId,
        });
    
        var vpcRoute = ;
    
        return new Dictionary<string, object?>
        {
            ["routeNexthop"] = vpcRoute.Apply(vpcRoute => vpcRoute.Select(__item => __item.Nexthop).ToList()),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.FlexibleengineFunctions;
    import com.pulumi.flexibleengine.inputs.GetVpcRouteIdsV2Args;
    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 vpcId = config.get("vpcId");
            final var example = FlexibleengineFunctions.getVpcRouteIdsV2(GetVpcRouteIdsV2Args.builder()
                .vpcId(vpcId)
                .build());
    
            final var vpcRoute = "TODO: ForExpression";
    
            ctx.export("routeNexthop", vpcRoute.stream().map(element -> element.nexthop()).collect(toList()));
        }
    }
    
    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: flexibleengine: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
    The region in which to obtain the V1 VPC client. A VPC client is needed to retrieve VPCs. If omitted, the region argument of the provider is used.
    VpcId string
    The VPC ID that you want to filter from.
    Id string
    Region string
    The region in which to obtain the V1 VPC client. A VPC client is needed to retrieve VPCs. If omitted, the region argument of the provider is used.
    vpcId String
    The VPC ID that you want to filter from.
    id String
    region String
    The region in which to obtain the V1 VPC client. A VPC client is needed to retrieve VPCs. If omitted, the region argument of the provider is used.
    vpcId string
    The VPC ID that you want to filter from.
    id string
    region string
    The region in which to obtain the V1 VPC client. A VPC client is needed to retrieve VPCs. If omitted, the region argument of the provider is used.
    vpc_id str
    The VPC ID that you want to filter from.
    id str
    region str
    The region in which to obtain the V1 VPC client. A VPC client is needed to retrieve VPCs. If omitted, the region argument of the provider is used.
    vpcId String
    The VPC ID that you want to filter from.
    id String
    region String
    The region in which to obtain the V1 VPC client. A VPC client is needed to retrieve VPCs. If omitted, the region argument of the provider is used.

    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
    flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
    License
    Notes
    This Pulumi package is based on the flexibleengine Terraform Provider.
    flexibleengine logo
    flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud