1. Packages
  2. Packages
  3. Scaleway
  4. API Docs
  5. network
  6. getRoute
Viewing docs for Scaleway v1.48.0
published on Wednesday, Apr 29, 2026 by pulumiverse
scaleway logo
Viewing docs for Scaleway v1.48.0
published on Wednesday, Apr 29, 2026 by pulumiverse

    Gets information about a VPC route.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    // Get info by filters
    const byFilters = scaleway.network.getRoute({
        vpcId: myVpc.id,
        tags: ["my-tag"],
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    # Get info by filters
    by_filters = scaleway.network.get_route(vpc_id=my_vpc["id"],
        tags=["my-tag"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/network"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Get info by filters
    		_, err := network.LookupRoute(ctx, &network.LookupRouteArgs{
    			VpcId: pulumi.StringRef(myVpc.Id),
    			Tags: []string{
    				"my-tag",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        // Get info by filters
        var byFilters = Scaleway.Network.GetRoute.Invoke(new()
        {
            VpcId = myVpc.Id,
            Tags = new[]
            {
                "my-tag",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.network.NetworkFunctions;
    import com.pulumi.scaleway.network.inputs.GetRouteArgs;
    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) {
            // Get info by filters
            final var byFilters = NetworkFunctions.getRoute(GetRouteArgs.builder()
                .vpcId(myVpc.id())
                .tags("my-tag")
                .build());
    
        }
    }
    
    variables:
      # Get info by filters
      byFilters:
        fn::invoke:
          function: scaleway:network:getRoute
          arguments:
            vpcId: ${myVpc.id}
            tags:
              - my-tag
    
    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    // Get info by route ID
    const byId = scaleway.network.getRoute({
        routeId: "fr-par/11111111-1111-1111-1111-111111111111",
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    # Get info by route ID
    by_id = scaleway.network.get_route(route_id="fr-par/11111111-1111-1111-1111-111111111111")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/network"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Get info by route ID
    		_, err := network.LookupRoute(ctx, &network.LookupRouteArgs{
    			RouteId: pulumi.StringRef("fr-par/11111111-1111-1111-1111-111111111111"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        // Get info by route ID
        var byId = Scaleway.Network.GetRoute.Invoke(new()
        {
            RouteId = "fr-par/11111111-1111-1111-1111-111111111111",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.network.NetworkFunctions;
    import com.pulumi.scaleway.network.inputs.GetRouteArgs;
    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) {
            // Get info by route ID
            final var byId = NetworkFunctions.getRoute(GetRouteArgs.builder()
                .routeId("fr-par/11111111-1111-1111-1111-111111111111")
                .build());
    
        }
    }
    
    variables:
      # Get info by route ID
      byId:
        fn::invoke:
          function: scaleway:network:getRoute
          arguments:
            routeId: fr-par/11111111-1111-1111-1111-111111111111
    

    Using getRoute

    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 getRoute(args: GetRouteArgs, opts?: InvokeOptions): Promise<GetRouteResult>
    function getRouteOutput(args: GetRouteOutputArgs, opts?: InvokeOptions): Output<GetRouteResult>
    def get_route(is_ipv6: Optional[bool] = None,
                  nexthop_private_network_id: Optional[str] = None,
                  nexthop_resource_id: Optional[str] = None,
                  nexthop_resource_type: Optional[str] = None,
                  region: Optional[str] = None,
                  route_id: Optional[str] = None,
                  tags: Optional[Sequence[str]] = None,
                  vpc_id: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetRouteResult
    def get_route_output(is_ipv6: pulumi.Input[Optional[bool]] = None,
                  nexthop_private_network_id: pulumi.Input[Optional[str]] = None,
                  nexthop_resource_id: pulumi.Input[Optional[str]] = None,
                  nexthop_resource_type: pulumi.Input[Optional[str]] = None,
                  region: pulumi.Input[Optional[str]] = None,
                  route_id: pulumi.Input[Optional[str]] = None,
                  tags: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
                  vpc_id: pulumi.Input[Optional[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetRouteResult]
    func LookupRoute(ctx *Context, args *LookupRouteArgs, opts ...InvokeOption) (*LookupRouteResult, error)
    func LookupRouteOutput(ctx *Context, args *LookupRouteOutputArgs, opts ...InvokeOption) LookupRouteResultOutput

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

    public static class GetRoute 
    {
        public static Task<GetRouteResult> InvokeAsync(GetRouteArgs args, InvokeOptions? opts = null)
        public static Output<GetRouteResult> Invoke(GetRouteInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRouteResult> getRoute(GetRouteArgs args, InvokeOptions options)
    public static Output<GetRouteResult> getRoute(GetRouteArgs args, InvokeOptions options)
    
    fn::invoke:
      function: scaleway:network/getRoute:getRoute
      arguments:
        # arguments dictionary

    The following arguments are supported:

    IsIpv6 bool
    If true, only routes with an IPv6 destination will be returned.
    NexthopPrivateNetworkId string
    The next hop private network ID to filter for. Only routes with a matching next hop private network ID will be returned.
    NexthopResourceId string
    The next hop resource ID to filter for. Only routes with a matching next hop resource ID will be returned.
    NexthopResourceType string
    The next hop resource type to filter for. Only routes with a matching next hop resource type will be returned.
    Region string

    region). The region in which the route exists.

    Note: When using filter arguments, the filters must match exactly one route. If zero or multiple routes are found, an error will be returned.

    RouteId string

    The ID of the route.

    The following filter arguments are supported (cannot be used with routeId):

    Tags List<string>
    List of tags to filter for. Only routes with these exact tags will be returned.
    VpcId string
    The VPC ID to filter for. Only routes within this VPC will be returned.
    IsIpv6 bool
    If true, only routes with an IPv6 destination will be returned.
    NexthopPrivateNetworkId string
    The next hop private network ID to filter for. Only routes with a matching next hop private network ID will be returned.
    NexthopResourceId string
    The next hop resource ID to filter for. Only routes with a matching next hop resource ID will be returned.
    NexthopResourceType string
    The next hop resource type to filter for. Only routes with a matching next hop resource type will be returned.
    Region string

    region). The region in which the route exists.

    Note: When using filter arguments, the filters must match exactly one route. If zero or multiple routes are found, an error will be returned.

    RouteId string

    The ID of the route.

    The following filter arguments are supported (cannot be used with routeId):

    Tags []string
    List of tags to filter for. Only routes with these exact tags will be returned.
    VpcId string
    The VPC ID to filter for. Only routes within this VPC will be returned.
    isIpv6 Boolean
    If true, only routes with an IPv6 destination will be returned.
    nexthopPrivateNetworkId String
    The next hop private network ID to filter for. Only routes with a matching next hop private network ID will be returned.
    nexthopResourceId String
    The next hop resource ID to filter for. Only routes with a matching next hop resource ID will be returned.
    nexthopResourceType String
    The next hop resource type to filter for. Only routes with a matching next hop resource type will be returned.
    region String

    region). The region in which the route exists.

    Note: When using filter arguments, the filters must match exactly one route. If zero or multiple routes are found, an error will be returned.

    routeId String

    The ID of the route.

    The following filter arguments are supported (cannot be used with routeId):

    tags List<String>
    List of tags to filter for. Only routes with these exact tags will be returned.
    vpcId String
    The VPC ID to filter for. Only routes within this VPC will be returned.
    isIpv6 boolean
    If true, only routes with an IPv6 destination will be returned.
    nexthopPrivateNetworkId string
    The next hop private network ID to filter for. Only routes with a matching next hop private network ID will be returned.
    nexthopResourceId string
    The next hop resource ID to filter for. Only routes with a matching next hop resource ID will be returned.
    nexthopResourceType string
    The next hop resource type to filter for. Only routes with a matching next hop resource type will be returned.
    region string

    region). The region in which the route exists.

    Note: When using filter arguments, the filters must match exactly one route. If zero or multiple routes are found, an error will be returned.

    routeId string

    The ID of the route.

    The following filter arguments are supported (cannot be used with routeId):

    tags string[]
    List of tags to filter for. Only routes with these exact tags will be returned.
    vpcId string
    The VPC ID to filter for. Only routes within this VPC will be returned.
    is_ipv6 bool
    If true, only routes with an IPv6 destination will be returned.
    nexthop_private_network_id str
    The next hop private network ID to filter for. Only routes with a matching next hop private network ID will be returned.
    nexthop_resource_id str
    The next hop resource ID to filter for. Only routes with a matching next hop resource ID will be returned.
    nexthop_resource_type str
    The next hop resource type to filter for. Only routes with a matching next hop resource type will be returned.
    region str

    region). The region in which the route exists.

    Note: When using filter arguments, the filters must match exactly one route. If zero or multiple routes are found, an error will be returned.

    route_id str

    The ID of the route.

    The following filter arguments are supported (cannot be used with routeId):

    tags Sequence[str]
    List of tags to filter for. Only routes with these exact tags will be returned.
    vpc_id str
    The VPC ID to filter for. Only routes within this VPC will be returned.
    isIpv6 Boolean
    If true, only routes with an IPv6 destination will be returned.
    nexthopPrivateNetworkId String
    The next hop private network ID to filter for. Only routes with a matching next hop private network ID will be returned.
    nexthopResourceId String
    The next hop resource ID to filter for. Only routes with a matching next hop resource ID will be returned.
    nexthopResourceType String
    The next hop resource type to filter for. Only routes with a matching next hop resource type will be returned.
    region String

    region). The region in which the route exists.

    Note: When using filter arguments, the filters must match exactly one route. If zero or multiple routes are found, an error will be returned.

    routeId String

    The ID of the route.

    The following filter arguments are supported (cannot be used with routeId):

    tags List<String>
    List of tags to filter for. Only routes with these exact tags will be returned.
    vpcId String
    The VPC ID to filter for. Only routes within this VPC will be returned.

    getRoute Result

    The following output properties are available:

    CreatedAt string
    Description string
    Destination string
    Id string
    The provider-assigned unique ID for this managed resource.
    NexthopVpcConnectorId string
    UpdatedAt string
    IsIpv6 bool
    NexthopPrivateNetworkId string
    NexthopResourceId string
    NexthopResourceType string
    Region string
    RouteId string
    Tags List<string>
    VpcId string
    CreatedAt string
    Description string
    Destination string
    Id string
    The provider-assigned unique ID for this managed resource.
    NexthopVpcConnectorId string
    UpdatedAt string
    IsIpv6 bool
    NexthopPrivateNetworkId string
    NexthopResourceId string
    NexthopResourceType string
    Region string
    RouteId string
    Tags []string
    VpcId string
    createdAt String
    description String
    destination String
    id String
    The provider-assigned unique ID for this managed resource.
    nexthopVpcConnectorId String
    updatedAt String
    isIpv6 Boolean
    nexthopPrivateNetworkId String
    nexthopResourceId String
    nexthopResourceType String
    region String
    routeId String
    tags List<String>
    vpcId String
    createdAt string
    description string
    destination string
    id string
    The provider-assigned unique ID for this managed resource.
    nexthopVpcConnectorId string
    updatedAt string
    isIpv6 boolean
    nexthopPrivateNetworkId string
    nexthopResourceId string
    nexthopResourceType string
    region string
    routeId string
    tags string[]
    vpcId string
    created_at str
    description str
    destination str
    id str
    The provider-assigned unique ID for this managed resource.
    nexthop_vpc_connector_id str
    updated_at str
    is_ipv6 bool
    nexthop_private_network_id str
    nexthop_resource_id str
    nexthop_resource_type str
    region str
    route_id str
    tags Sequence[str]
    vpc_id str
    createdAt String
    description String
    destination String
    id String
    The provider-assigned unique ID for this managed resource.
    nexthopVpcConnectorId String
    updatedAt String
    isIpv6 Boolean
    nexthopPrivateNetworkId String
    nexthopResourceId String
    nexthopResourceType String
    region String
    routeId String
    tags List<String>
    vpcId String

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Viewing docs for Scaleway v1.48.0
    published on Wednesday, Apr 29, 2026 by pulumiverse
      Try Pulumi Cloud free. Your team will thank you.