1. Packages
  2. Scaleway
  3. API Docs
  4. getLbRoutes
Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse

scaleway.getLbRoutes

Explore with Pulumi AI

scaleway logo
Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse

    Gets information about multiple Load Balancer routes.

    For more information, see the main documentation or API documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumi/scaleway";
    
    // Find routes that share the same frontend ID
    const byFrontendID = scaleway.getLbRoutes({
        frontendId: frt01.id,
    });
    // Find routes by frontend ID and zone
    const myKey = scaleway.getLbRoutes({
        frontendId: "11111111-1111-1111-1111-111111111111",
        zone: "fr-par-2",
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    # Find routes that share the same frontend ID
    by_frontend_id = scaleway.get_lb_routes(frontend_id=frt01["id"])
    # Find routes by frontend ID and zone
    my_key = scaleway.get_lb_routes(frontend_id="11111111-1111-1111-1111-111111111111",
        zone="fr-par-2")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Find routes that share the same frontend ID
    		_, err := scaleway.GetLbRoutes(ctx, &scaleway.GetLbRoutesArgs{
    			FrontendId: pulumi.StringRef(frt01.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Find routes by frontend ID and zone
    		_, err = scaleway.GetLbRoutes(ctx, &scaleway.GetLbRoutesArgs{
    			FrontendId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
    			Zone:       pulumi.StringRef("fr-par-2"),
    		}, 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(() => 
    {
        // Find routes that share the same frontend ID
        var byFrontendID = Scaleway.GetLbRoutes.Invoke(new()
        {
            FrontendId = frt01.Id,
        });
    
        // Find routes by frontend ID and zone
        var myKey = Scaleway.GetLbRoutes.Invoke(new()
        {
            FrontendId = "11111111-1111-1111-1111-111111111111",
            Zone = "fr-par-2",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.ScalewayFunctions;
    import com.pulumi.scaleway.inputs.GetLbRoutesArgs;
    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) {
            // Find routes that share the same frontend ID
            final var byFrontendID = ScalewayFunctions.getLbRoutes(GetLbRoutesArgs.builder()
                .frontendId(frt01.id())
                .build());
    
            // Find routes by frontend ID and zone
            final var myKey = ScalewayFunctions.getLbRoutes(GetLbRoutesArgs.builder()
                .frontendId("11111111-1111-1111-1111-111111111111")
                .zone("fr-par-2")
                .build());
    
        }
    }
    
    variables:
      # Find routes that share the same frontend ID
      byFrontendID:
        fn::invoke:
          Function: scaleway:getLbRoutes
          Arguments:
            frontendId: ${frt01.id}
      # Find routes by frontend ID and zone
      myKey:
        fn::invoke:
          Function: scaleway:getLbRoutes
          Arguments:
            frontendId: 11111111-1111-1111-1111-111111111111
            zone: fr-par-2
    

    Using getLbRoutes

    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 getLbRoutes(args: GetLbRoutesArgs, opts?: InvokeOptions): Promise<GetLbRoutesResult>
    function getLbRoutesOutput(args: GetLbRoutesOutputArgs, opts?: InvokeOptions): Output<GetLbRoutesResult>
    def get_lb_routes(frontend_id: Optional[str] = None,
                      project_id: Optional[str] = None,
                      zone: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetLbRoutesResult
    def get_lb_routes_output(frontend_id: Optional[pulumi.Input[str]] = None,
                      project_id: Optional[pulumi.Input[str]] = None,
                      zone: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetLbRoutesResult]
    func GetLbRoutes(ctx *Context, args *GetLbRoutesArgs, opts ...InvokeOption) (*GetLbRoutesResult, error)
    func GetLbRoutesOutput(ctx *Context, args *GetLbRoutesOutputArgs, opts ...InvokeOption) GetLbRoutesResultOutput

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

    public static class GetLbRoutes 
    {
        public static Task<GetLbRoutesResult> InvokeAsync(GetLbRoutesArgs args, InvokeOptions? opts = null)
        public static Output<GetLbRoutesResult> Invoke(GetLbRoutesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetLbRoutesResult> getLbRoutes(GetLbRoutesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: scaleway:index/getLbRoutes:getLbRoutes
      arguments:
        # arguments dictionary

    The following arguments are supported:

    FrontendId string
    The frontend ID (the origin of the redirection), to filter for. Routes with a matching frontend ID are listed.
    ProjectId string
    Zone string
    zone) The zone in which the routes exist.
    FrontendId string
    The frontend ID (the origin of the redirection), to filter for. Routes with a matching frontend ID are listed.
    ProjectId string
    Zone string
    zone) The zone in which the routes exist.
    frontendId String
    The frontend ID (the origin of the redirection), to filter for. Routes with a matching frontend ID are listed.
    projectId String
    zone String
    zone) The zone in which the routes exist.
    frontendId string
    The frontend ID (the origin of the redirection), to filter for. Routes with a matching frontend ID are listed.
    projectId string
    zone string
    zone) The zone in which the routes exist.
    frontend_id str
    The frontend ID (the origin of the redirection), to filter for. Routes with a matching frontend ID are listed.
    project_id str
    zone str
    zone) The zone in which the routes exist.
    frontendId String
    The frontend ID (the origin of the redirection), to filter for. Routes with a matching frontend ID are listed.
    projectId String
    zone String
    zone) The zone in which the routes exist.

    getLbRoutes Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    OrganizationId string
    ProjectId string
    Routes List<Pulumiverse.Scaleway.Outputs.GetLbRoutesRoute>
    List of retrieved routes
    Zone string
    FrontendId string
    Id string
    The provider-assigned unique ID for this managed resource.
    OrganizationId string
    ProjectId string
    Routes []GetLbRoutesRoute
    List of retrieved routes
    Zone string
    FrontendId string
    id String
    The provider-assigned unique ID for this managed resource.
    organizationId String
    projectId String
    routes List<GetLbRoutesRoute>
    List of retrieved routes
    zone String
    frontendId String
    id string
    The provider-assigned unique ID for this managed resource.
    organizationId string
    projectId string
    routes GetLbRoutesRoute[]
    List of retrieved routes
    zone string
    frontendId string
    id str
    The provider-assigned unique ID for this managed resource.
    organization_id str
    project_id str
    routes Sequence[GetLbRoutesRoute]
    List of retrieved routes
    zone str
    frontend_id str
    id String
    The provider-assigned unique ID for this managed resource.
    organizationId String
    projectId String
    routes List<Property Map>
    List of retrieved routes
    zone String
    frontendId String

    Supporting Types

    GetLbRoutesRoute

    BackendId string
    The backend ID to redirect to
    CreatedAt string
    The date on which the route was created (RFC 3339 format).
    FrontendId string
    The frontend ID (the origin of the redirection), to filter for. Routes with a matching frontend ID are listed.
    Id string
    The associated route ID.
    MatchHostHeader string
    Specifies the host of the server to which the request is being sent.
    MatchSni string
    Server Name Indication TLS extension field from an incoming connection made via an SSL/TLS transport layer.
    UpdateAt string
    The date on which the route was last updated (RFC 3339 format).
    BackendId string
    The backend ID to redirect to
    CreatedAt string
    The date on which the route was created (RFC 3339 format).
    FrontendId string
    The frontend ID (the origin of the redirection), to filter for. Routes with a matching frontend ID are listed.
    Id string
    The associated route ID.
    MatchHostHeader string
    Specifies the host of the server to which the request is being sent.
    MatchSni string
    Server Name Indication TLS extension field from an incoming connection made via an SSL/TLS transport layer.
    UpdateAt string
    The date on which the route was last updated (RFC 3339 format).
    backendId String
    The backend ID to redirect to
    createdAt String
    The date on which the route was created (RFC 3339 format).
    frontendId String
    The frontend ID (the origin of the redirection), to filter for. Routes with a matching frontend ID are listed.
    id String
    The associated route ID.
    matchHostHeader String
    Specifies the host of the server to which the request is being sent.
    matchSni String
    Server Name Indication TLS extension field from an incoming connection made via an SSL/TLS transport layer.
    updateAt String
    The date on which the route was last updated (RFC 3339 format).
    backendId string
    The backend ID to redirect to
    createdAt string
    The date on which the route was created (RFC 3339 format).
    frontendId string
    The frontend ID (the origin of the redirection), to filter for. Routes with a matching frontend ID are listed.
    id string
    The associated route ID.
    matchHostHeader string
    Specifies the host of the server to which the request is being sent.
    matchSni string
    Server Name Indication TLS extension field from an incoming connection made via an SSL/TLS transport layer.
    updateAt string
    The date on which the route was last updated (RFC 3339 format).
    backend_id str
    The backend ID to redirect to
    created_at str
    The date on which the route was created (RFC 3339 format).
    frontend_id str
    The frontend ID (the origin of the redirection), to filter for. Routes with a matching frontend ID are listed.
    id str
    The associated route ID.
    match_host_header str
    Specifies the host of the server to which the request is being sent.
    match_sni str
    Server Name Indication TLS extension field from an incoming connection made via an SSL/TLS transport layer.
    update_at str
    The date on which the route was last updated (RFC 3339 format).
    backendId String
    The backend ID to redirect to
    createdAt String
    The date on which the route was created (RFC 3339 format).
    frontendId String
    The frontend ID (the origin of the redirection), to filter for. Routes with a matching frontend ID are listed.
    id String
    The associated route ID.
    matchHostHeader String
    Specifies the host of the server to which the request is being sent.
    matchSni String
    Server Name Indication TLS extension field from an incoming connection made via an SSL/TLS transport layer.
    updateAt String
    The date on which the route was last updated (RFC 3339 format).

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse