1. Packages
  2. Scaleway
  3. API Docs
  4. s2svpn
  5. getRoutingPolicy
Viewing docs for Scaleway v1.44.1
published on Monday, Mar 9, 2026 by pulumiverse
scaleway logo
Viewing docs for Scaleway v1.44.1
published on Monday, Mar 9, 2026 by pulumiverse

    For further information refer to the Site-to-Site VPN API documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    // Get info by routing policy ID
    const myPolicy = scaleway.s2svpn.getRoutingPolicy({
        routingPolicyId: "11111111-1111-1111-1111-111111111111",
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    # Get info by routing policy ID
    my_policy = scaleway.s2svpn.get_routing_policy(routing_policy_id="11111111-1111-1111-1111-111111111111")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/s2svpn"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Get info by routing policy ID
    		_, err := s2svpn.LookupRoutingPolicy(ctx, &s2svpn.LookupRoutingPolicyArgs{
    			RoutingPolicyId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        // Get info by routing policy ID
        var myPolicy = Scaleway.S2svpn.GetRoutingPolicy.Invoke(new()
        {
            RoutingPolicyId = "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.s2svpn.S2svpnFunctions;
    import com.pulumi.scaleway.s2svpn.inputs.GetRoutingPolicyArgs;
    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 routing policy ID
            final var myPolicy = S2svpnFunctions.getRoutingPolicy(GetRoutingPolicyArgs.builder()
                .routingPolicyId("11111111-1111-1111-1111-111111111111")
                .build());
    
        }
    }
    
    variables:
      # Get info by routing policy ID
      myPolicy:
        fn::invoke:
          function: scaleway:s2svpn:getRoutingPolicy
          arguments:
            routingPolicyId: 11111111-1111-1111-1111-111111111111
    
    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    // Get info by name
    const myPolicy = scaleway.s2svpn.getRoutingPolicy({
        name: "foobar",
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    # Get info by name
    my_policy = scaleway.s2svpn.get_routing_policy(name="foobar")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/s2svpn"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Get info by name
    		_, err := s2svpn.LookupRoutingPolicy(ctx, &s2svpn.LookupRoutingPolicyArgs{
    			Name: pulumi.StringRef("foobar"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        // Get info by name
        var myPolicy = Scaleway.S2svpn.GetRoutingPolicy.Invoke(new()
        {
            Name = "foobar",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.s2svpn.S2svpnFunctions;
    import com.pulumi.scaleway.s2svpn.inputs.GetRoutingPolicyArgs;
    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 name
            final var myPolicy = S2svpnFunctions.getRoutingPolicy(GetRoutingPolicyArgs.builder()
                .name("foobar")
                .build());
    
        }
    }
    
    variables:
      # Get info by name
      myPolicy:
        fn::invoke:
          function: scaleway:s2svpn:getRoutingPolicy
          arguments:
            name: foobar
    

    Using getRoutingPolicy

    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 getRoutingPolicy(args: GetRoutingPolicyArgs, opts?: InvokeOptions): Promise<GetRoutingPolicyResult>
    function getRoutingPolicyOutput(args: GetRoutingPolicyOutputArgs, opts?: InvokeOptions): Output<GetRoutingPolicyResult>
    def get_routing_policy(name: Optional[str] = None,
                           project_id: Optional[str] = None,
                           region: Optional[str] = None,
                           routing_policy_id: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetRoutingPolicyResult
    def get_routing_policy_output(name: Optional[pulumi.Input[str]] = None,
                           project_id: Optional[pulumi.Input[str]] = None,
                           region: Optional[pulumi.Input[str]] = None,
                           routing_policy_id: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetRoutingPolicyResult]
    func LookupRoutingPolicy(ctx *Context, args *LookupRoutingPolicyArgs, opts ...InvokeOption) (*LookupRoutingPolicyResult, error)
    func LookupRoutingPolicyOutput(ctx *Context, args *LookupRoutingPolicyOutputArgs, opts ...InvokeOption) LookupRoutingPolicyResultOutput

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

    public static class GetRoutingPolicy 
    {
        public static Task<GetRoutingPolicyResult> InvokeAsync(GetRoutingPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetRoutingPolicyResult> Invoke(GetRoutingPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRoutingPolicyResult> getRoutingPolicy(GetRoutingPolicyArgs args, InvokeOptions options)
    public static Output<GetRoutingPolicyResult> getRoutingPolicy(GetRoutingPolicyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: scaleway:s2svpn/getRoutingPolicy:getRoutingPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the routing policy.
    ProjectId string
    The ID of the project the routing policy is associated with.
    Region string
    region) The region in which the routing policy exists.
    RoutingPolicyId string

    The routing policy ID.

    Note You must specify at least one: name and/or routing_policy_id.

    Name string
    The name of the routing policy.
    ProjectId string
    The ID of the project the routing policy is associated with.
    Region string
    region) The region in which the routing policy exists.
    RoutingPolicyId string

    The routing policy ID.

    Note You must specify at least one: name and/or routing_policy_id.

    name String
    The name of the routing policy.
    projectId String
    The ID of the project the routing policy is associated with.
    region String
    region) The region in which the routing policy exists.
    routingPolicyId String

    The routing policy ID.

    Note You must specify at least one: name and/or routing_policy_id.

    name string
    The name of the routing policy.
    projectId string
    The ID of the project the routing policy is associated with.
    region string
    region) The region in which the routing policy exists.
    routingPolicyId string

    The routing policy ID.

    Note You must specify at least one: name and/or routing_policy_id.

    name str
    The name of the routing policy.
    project_id str
    The ID of the project the routing policy is associated with.
    region str
    region) The region in which the routing policy exists.
    routing_policy_id str

    The routing policy ID.

    Note You must specify at least one: name and/or routing_policy_id.

    name String
    The name of the routing policy.
    projectId String
    The ID of the project the routing policy is associated with.
    region String
    region) The region in which the routing policy exists.
    routingPolicyId String

    The routing policy ID.

    Note You must specify at least one: name and/or routing_policy_id.

    getRoutingPolicy Result

    The following output properties are available:

    CreatedAt string
    The date and time of creation of the routing policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsIpv6 bool
    Whether the routing policy is for IPv6 prefixes.
    OrganizationId string
    The Organization ID the routing policy is associated with.
    PrefixFilterIns List<string>
    List of IP prefixes accepted from the peer gateway.
    PrefixFilterOuts List<string>
    List of IP prefixes advertised to the peer gateway.
    Tags List<string>
    The tags associated with the routing policy.
    UpdatedAt string
    The date and time of the last update of the routing policy.
    Name string
    ProjectId string
    Region string
    RoutingPolicyId string
    CreatedAt string
    The date and time of creation of the routing policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsIpv6 bool
    Whether the routing policy is for IPv6 prefixes.
    OrganizationId string
    The Organization ID the routing policy is associated with.
    PrefixFilterIns []string
    List of IP prefixes accepted from the peer gateway.
    PrefixFilterOuts []string
    List of IP prefixes advertised to the peer gateway.
    Tags []string
    The tags associated with the routing policy.
    UpdatedAt string
    The date and time of the last update of the routing policy.
    Name string
    ProjectId string
    Region string
    RoutingPolicyId string
    createdAt String
    The date and time of creation of the routing policy.
    id String
    The provider-assigned unique ID for this managed resource.
    isIpv6 Boolean
    Whether the routing policy is for IPv6 prefixes.
    organizationId String
    The Organization ID the routing policy is associated with.
    prefixFilterIns List<String>
    List of IP prefixes accepted from the peer gateway.
    prefixFilterOuts List<String>
    List of IP prefixes advertised to the peer gateway.
    tags List<String>
    The tags associated with the routing policy.
    updatedAt String
    The date and time of the last update of the routing policy.
    name String
    projectId String
    region String
    routingPolicyId String
    createdAt string
    The date and time of creation of the routing policy.
    id string
    The provider-assigned unique ID for this managed resource.
    isIpv6 boolean
    Whether the routing policy is for IPv6 prefixes.
    organizationId string
    The Organization ID the routing policy is associated with.
    prefixFilterIns string[]
    List of IP prefixes accepted from the peer gateway.
    prefixFilterOuts string[]
    List of IP prefixes advertised to the peer gateway.
    tags string[]
    The tags associated with the routing policy.
    updatedAt string
    The date and time of the last update of the routing policy.
    name string
    projectId string
    region string
    routingPolicyId string
    created_at str
    The date and time of creation of the routing policy.
    id str
    The provider-assigned unique ID for this managed resource.
    is_ipv6 bool
    Whether the routing policy is for IPv6 prefixes.
    organization_id str
    The Organization ID the routing policy is associated with.
    prefix_filter_ins Sequence[str]
    List of IP prefixes accepted from the peer gateway.
    prefix_filter_outs Sequence[str]
    List of IP prefixes advertised to the peer gateway.
    tags Sequence[str]
    The tags associated with the routing policy.
    updated_at str
    The date and time of the last update of the routing policy.
    name str
    project_id str
    region str
    routing_policy_id str
    createdAt String
    The date and time of creation of the routing policy.
    id String
    The provider-assigned unique ID for this managed resource.
    isIpv6 Boolean
    Whether the routing policy is for IPv6 prefixes.
    organizationId String
    The Organization ID the routing policy is associated with.
    prefixFilterIns List<String>
    List of IP prefixes accepted from the peer gateway.
    prefixFilterOuts List<String>
    List of IP prefixes advertised to the peer gateway.
    tags List<String>
    The tags associated with the routing policy.
    updatedAt String
    The date and time of the last update of the routing policy.
    name String
    projectId String
    region String
    routingPolicyId 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.44.1
    published on Monday, Mar 9, 2026 by pulumiverse
      Try Pulumi Cloud free. Your team will thank you.