1. Packages
  2. OVH
  3. API Docs
  4. CloudProject
  5. getLoadBalancers
OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud

ovh.CloudProject.getLoadBalancers

Explore with Pulumi AI

OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud

List your public cloud loadbalancers.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";

const lbsLoadBalancers = ovh.CloudProject.getLoadBalancers({
    serviceName: "XXXXXX",
    regionName: "XXX",
});
export const lbs = lbsLoadBalancers;
Copy
import pulumi
import pulumi_ovh as ovh

lbs_load_balancers = ovh.CloudProject.get_load_balancers(service_name="XXXXXX",
    region_name="XXX")
pulumi.export("lbs", lbs_load_balancers)
Copy
package main

import (
	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudproject"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		lbsLoadBalancers, err := cloudproject.GetLoadBalancers(ctx, &cloudproject.GetLoadBalancersArgs{
			ServiceName: "XXXXXX",
			RegionName:  "XXX",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("lbs", lbsLoadBalancers)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;

return await Deployment.RunAsync(() => 
{
    var lbsLoadBalancers = Ovh.CloudProject.GetLoadBalancers.Invoke(new()
    {
        ServiceName = "XXXXXX",
        RegionName = "XXX",
    });

    return new Dictionary<string, object?>
    {
        ["lbs"] = lbsLoadBalancers,
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.CloudProject.CloudProjectFunctions;
import com.pulumi.ovh.CloudProject.inputs.GetLoadBalancersArgs;
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 lbsLoadBalancers = CloudProjectFunctions.getLoadBalancers(GetLoadBalancersArgs.builder()
            .serviceName("XXXXXX")
            .regionName("XXX")
            .build());

        ctx.export("lbs", lbsLoadBalancers);
    }
}
Copy
variables:
  lbsLoadBalancers:
    fn::invoke:
      function: ovh:CloudProject:getLoadBalancers
      arguments:
        serviceName: XXXXXX
        regionName: XXX
outputs:
  lbs: ${lbsLoadBalancers}
Copy

Using getLoadBalancers

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 getLoadBalancers(args: GetLoadBalancersArgs, opts?: InvokeOptions): Promise<GetLoadBalancersResult>
function getLoadBalancersOutput(args: GetLoadBalancersOutputArgs, opts?: InvokeOptions): Output<GetLoadBalancersResult>
Copy
def get_load_balancers(region_name: Optional[str] = None,
                       service_name: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetLoadBalancersResult
def get_load_balancers_output(region_name: Optional[pulumi.Input[str]] = None,
                       service_name: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetLoadBalancersResult]
Copy
func GetLoadBalancers(ctx *Context, args *GetLoadBalancersArgs, opts ...InvokeOption) (*GetLoadBalancersResult, error)
func GetLoadBalancersOutput(ctx *Context, args *GetLoadBalancersOutputArgs, opts ...InvokeOption) GetLoadBalancersResultOutput
Copy

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

public static class GetLoadBalancers 
{
    public static Task<GetLoadBalancersResult> InvokeAsync(GetLoadBalancersArgs args, InvokeOptions? opts = null)
    public static Output<GetLoadBalancersResult> Invoke(GetLoadBalancersInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetLoadBalancersResult> getLoadBalancers(GetLoadBalancersArgs args, InvokeOptions options)
public static Output<GetLoadBalancersResult> getLoadBalancers(GetLoadBalancersArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ovh:CloudProject/getLoadBalancers:getLoadBalancers
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

RegionName This property is required. string
Region of the loadbalancers.
ServiceName This property is required. string
The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
RegionName This property is required. string
Region of the loadbalancers.
ServiceName This property is required. string
The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
regionName This property is required. String
Region of the loadbalancers.
serviceName This property is required. String
The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
regionName This property is required. string
Region of the loadbalancers.
serviceName This property is required. string
The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
region_name This property is required. str
Region of the loadbalancers.
service_name This property is required. str
The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
regionName This property is required. String
Region of the loadbalancers.
serviceName This property is required. String
The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

getLoadBalancers Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Loadbalancers List<GetLoadBalancersLoadbalancer>
List of loadbalancer
RegionName string
Region of the loadbalancers
ServiceName string
ID of the public cloud project
Id string
The provider-assigned unique ID for this managed resource.
Loadbalancers []GetLoadBalancersLoadbalancer
List of loadbalancer
RegionName string
Region of the loadbalancers
ServiceName string
ID of the public cloud project
id String
The provider-assigned unique ID for this managed resource.
loadbalancers List<GetLoadBalancersLoadbalancer>
List of loadbalancer
regionName String
Region of the loadbalancers
serviceName String
ID of the public cloud project
id string
The provider-assigned unique ID for this managed resource.
loadbalancers GetLoadBalancersLoadbalancer[]
List of loadbalancer
regionName string
Region of the loadbalancers
serviceName string
ID of the public cloud project
id str
The provider-assigned unique ID for this managed resource.
loadbalancers Sequence[cloudproject.GetLoadBalancersLoadbalancer]
List of loadbalancer
region_name str
Region of the loadbalancers
service_name str
ID of the public cloud project
id String
The provider-assigned unique ID for this managed resource.
loadbalancers List<Property Map>
List of loadbalancer
regionName String
Region of the loadbalancers
serviceName String
ID of the public cloud project

Supporting Types

GetLoadBalancersLoadbalancer

CreatedAt This property is required. string
Date of creation of the loadbalancer
FlavorId This property is required. string
ID of the flavor
FloatingIp This property is required. GetLoadBalancersLoadbalancerFloatingIp
Information about the floating IP
Id This property is required. string
ID of the floating IP
Name This property is required. string
Name of the loadbalancer
OperatingStatus This property is required. string
Operating status of the loadbalancer
ProvisioningStatus This property is required. string
Provisioning status of the loadbalancer
Region This property is required. string
Region of the loadbalancer
UpdatedAt This property is required. string
Last update date of the loadbalancer
VipAddress This property is required. string
IP address of the Virtual IP
VipNetworkId This property is required. string
Openstack ID of the network for the Virtual IP
VipSubnetId This property is required. string
ID of the subnet for the Virtual IP
CreatedAt This property is required. string
Date of creation of the loadbalancer
FlavorId This property is required. string
ID of the flavor
FloatingIp This property is required. GetLoadBalancersLoadbalancerFloatingIp
Information about the floating IP
Id This property is required. string
ID of the floating IP
Name This property is required. string
Name of the loadbalancer
OperatingStatus This property is required. string
Operating status of the loadbalancer
ProvisioningStatus This property is required. string
Provisioning status of the loadbalancer
Region This property is required. string
Region of the loadbalancer
UpdatedAt This property is required. string
Last update date of the loadbalancer
VipAddress This property is required. string
IP address of the Virtual IP
VipNetworkId This property is required. string
Openstack ID of the network for the Virtual IP
VipSubnetId This property is required. string
ID of the subnet for the Virtual IP
createdAt This property is required. String
Date of creation of the loadbalancer
flavorId This property is required. String
ID of the flavor
floatingIp This property is required. GetLoadBalancersLoadbalancerFloatingIp
Information about the floating IP
id This property is required. String
ID of the floating IP
name This property is required. String
Name of the loadbalancer
operatingStatus This property is required. String
Operating status of the loadbalancer
provisioningStatus This property is required. String
Provisioning status of the loadbalancer
region This property is required. String
Region of the loadbalancer
updatedAt This property is required. String
Last update date of the loadbalancer
vipAddress This property is required. String
IP address of the Virtual IP
vipNetworkId This property is required. String
Openstack ID of the network for the Virtual IP
vipSubnetId This property is required. String
ID of the subnet for the Virtual IP
createdAt This property is required. string
Date of creation of the loadbalancer
flavorId This property is required. string
ID of the flavor
floatingIp This property is required. GetLoadBalancersLoadbalancerFloatingIp
Information about the floating IP
id This property is required. string
ID of the floating IP
name This property is required. string
Name of the loadbalancer
operatingStatus This property is required. string
Operating status of the loadbalancer
provisioningStatus This property is required. string
Provisioning status of the loadbalancer
region This property is required. string
Region of the loadbalancer
updatedAt This property is required. string
Last update date of the loadbalancer
vipAddress This property is required. string
IP address of the Virtual IP
vipNetworkId This property is required. string
Openstack ID of the network for the Virtual IP
vipSubnetId This property is required. string
ID of the subnet for the Virtual IP
created_at This property is required. str
Date of creation of the loadbalancer
flavor_id This property is required. str
ID of the flavor
floating_ip This property is required. cloudproject.GetLoadBalancersLoadbalancerFloatingIp
Information about the floating IP
id This property is required. str
ID of the floating IP
name This property is required. str
Name of the loadbalancer
operating_status This property is required. str
Operating status of the loadbalancer
provisioning_status This property is required. str
Provisioning status of the loadbalancer
region This property is required. str
Region of the loadbalancer
updated_at This property is required. str
Last update date of the loadbalancer
vip_address This property is required. str
IP address of the Virtual IP
vip_network_id This property is required. str
Openstack ID of the network for the Virtual IP
vip_subnet_id This property is required. str
ID of the subnet for the Virtual IP
createdAt This property is required. String
Date of creation of the loadbalancer
flavorId This property is required. String
ID of the flavor
floatingIp This property is required. Property Map
Information about the floating IP
id This property is required. String
ID of the floating IP
name This property is required. String
Name of the loadbalancer
operatingStatus This property is required. String
Operating status of the loadbalancer
provisioningStatus This property is required. String
Provisioning status of the loadbalancer
region This property is required. String
Region of the loadbalancer
updatedAt This property is required. String
Last update date of the loadbalancer
vipAddress This property is required. String
IP address of the Virtual IP
vipNetworkId This property is required. String
Openstack ID of the network for the Virtual IP
vipSubnetId This property is required. String
ID of the subnet for the Virtual IP

GetLoadBalancersLoadbalancerFloatingIp

Id This property is required. string
ID of the floating IP
Ip This property is required. string
Value of the floating IP
Id This property is required. string
ID of the floating IP
Ip This property is required. string
Value of the floating IP
id This property is required. String
ID of the floating IP
ip This property is required. String
Value of the floating IP
id This property is required. string
ID of the floating IP
ip This property is required. string
Value of the floating IP
id This property is required. str
ID of the floating IP
ip This property is required. str
Value of the floating IP
id This property is required. String
ID of the floating IP
ip This property is required. String
Value of the floating IP

Package Details

Repository
ovh ovh/pulumi-ovh
License
Apache-2.0
Notes
This Pulumi package is based on the ovh Terraform Provider.
OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud