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

ovh.CloudProject.getLoadBalancer

Explore with Pulumi AI

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

Get the details of a public cloud project loadbalancer.

Example Usage

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

const lbLoadBalancer = ovh.CloudProject.getLoadBalancer({
    serviceName: "XXXXXX",
    regionName: "XXX",
    id: "XXX",
});
export const lb = lbLoadBalancer;
Copy
import pulumi
import pulumi_ovh as ovh

lb_load_balancer = ovh.CloudProject.get_load_balancer(service_name="XXXXXX",
    region_name="XXX",
    id="XXX")
pulumi.export("lb", lb_load_balancer)
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 {
		lbLoadBalancer, err := cloudproject.GetLoadBalancer(ctx, &cloudproject.GetLoadBalancerArgs{
			ServiceName: "XXXXXX",
			RegionName:  "XXX",
			Id:          "XXX",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("lb", lbLoadBalancer)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;

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

    return new Dictionary<string, object?>
    {
        ["lb"] = lbLoadBalancer,
    };
});
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.GetLoadBalancerArgs;
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 lbLoadBalancer = CloudProjectFunctions.getLoadBalancer(GetLoadBalancerArgs.builder()
            .serviceName("XXXXXX")
            .regionName("XXX")
            .id("XXX")
            .build());

        ctx.export("lb", lbLoadBalancer);
    }
}
Copy
variables:
  lbLoadBalancer:
    fn::invoke:
      function: ovh:CloudProject:getLoadBalancer
      arguments:
        serviceName: XXXXXX
        regionName: XXX
        id: XXX
outputs:
  lb: ${lbLoadBalancer}
Copy

Using getLoadBalancer

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 getLoadBalancer(args: GetLoadBalancerArgs, opts?: InvokeOptions): Promise<GetLoadBalancerResult>
function getLoadBalancerOutput(args: GetLoadBalancerOutputArgs, opts?: InvokeOptions): Output<GetLoadBalancerResult>
Copy
def get_load_balancer(id: Optional[str] = None,
                      region_name: Optional[str] = None,
                      service_name: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetLoadBalancerResult
def get_load_balancer_output(id: Optional[pulumi.Input[str]] = None,
                      region_name: Optional[pulumi.Input[str]] = None,
                      service_name: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetLoadBalancerResult]
Copy
func GetLoadBalancer(ctx *Context, args *GetLoadBalancerArgs, opts ...InvokeOption) (*GetLoadBalancerResult, error)
func GetLoadBalancerOutput(ctx *Context, args *GetLoadBalancerOutputArgs, opts ...InvokeOption) GetLoadBalancerResultOutput
Copy

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

public static class GetLoadBalancer 
{
    public static Task<GetLoadBalancerResult> InvokeAsync(GetLoadBalancerArgs args, InvokeOptions? opts = null)
    public static Output<GetLoadBalancerResult> Invoke(GetLoadBalancerInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetLoadBalancerResult> getLoadBalancer(GetLoadBalancerArgs args, InvokeOptions options)
public static Output<GetLoadBalancerResult> getLoadBalancer(GetLoadBalancerArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ovh:CloudProject/getLoadBalancer:getLoadBalancer
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id This property is required. string
ID of the loadbalancer
RegionName This property is required. string
Region of the loadbalancer.
ServiceName This property is required. string
The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
Id This property is required. string
ID of the loadbalancer
RegionName This property is required. string
Region of the loadbalancer.
ServiceName This property is required. string
The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
id This property is required. String
ID of the loadbalancer
regionName This property is required. String
Region of the loadbalancer.
serviceName This property is required. String
The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
id This property is required. string
ID of the loadbalancer
regionName This property is required. string
Region of the loadbalancer.
serviceName This property is required. string
The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
id This property is required. str
ID of the loadbalancer
region_name This property is required. str
Region of the loadbalancer.
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.
id This property is required. String
ID of the loadbalancer
regionName This property is required. String
Region of the loadbalancer.
serviceName This property is required. String
The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

getLoadBalancer Result

The following output properties are available:

CreatedAt string
Date of creation of the loadbalancer
FlavorId string
ID of the flavor
FloatingIp GetLoadBalancerFloatingIp
Information about the floating IP
Id string
ID of the floating IP
Name string
Name of the loadbalancer
OperatingStatus string
Operating status of the loadbalancer
ProvisioningStatus string
Provisioning status of the loadbalancer
RegionName string
Region of the loadbalancer
ServiceName string
ID of the public cloud project
UpdatedAt string
Last update date of the loadbalancer
VipAddress string
IP address of the Virtual IP
VipNetworkId string
Openstack ID of the network for the Virtual IP
VipSubnetId string
ID of the subnet for the Virtual IP
CreatedAt string
Date of creation of the loadbalancer
FlavorId string
ID of the flavor
FloatingIp GetLoadBalancerFloatingIp
Information about the floating IP
Id string
ID of the floating IP
Name string
Name of the loadbalancer
OperatingStatus string
Operating status of the loadbalancer
ProvisioningStatus string
Provisioning status of the loadbalancer
RegionName string
Region of the loadbalancer
ServiceName string
ID of the public cloud project
UpdatedAt string
Last update date of the loadbalancer
VipAddress string
IP address of the Virtual IP
VipNetworkId string
Openstack ID of the network for the Virtual IP
VipSubnetId string
ID of the subnet for the Virtual IP
createdAt String
Date of creation of the loadbalancer
flavorId String
ID of the flavor
floatingIp GetLoadBalancerFloatingIp
Information about the floating IP
id String
ID of the floating IP
name String
Name of the loadbalancer
operatingStatus String
Operating status of the loadbalancer
provisioningStatus String
Provisioning status of the loadbalancer
regionName String
Region of the loadbalancer
serviceName String
ID of the public cloud project
updatedAt String
Last update date of the loadbalancer
vipAddress String
IP address of the Virtual IP
vipNetworkId String
Openstack ID of the network for the Virtual IP
vipSubnetId String
ID of the subnet for the Virtual IP
createdAt string
Date of creation of the loadbalancer
flavorId string
ID of the flavor
floatingIp GetLoadBalancerFloatingIp
Information about the floating IP
id string
ID of the floating IP
name string
Name of the loadbalancer
operatingStatus string
Operating status of the loadbalancer
provisioningStatus string
Provisioning status of the loadbalancer
regionName string
Region of the loadbalancer
serviceName string
ID of the public cloud project
updatedAt string
Last update date of the loadbalancer
vipAddress string
IP address of the Virtual IP
vipNetworkId string
Openstack ID of the network for the Virtual IP
vipSubnetId string
ID of the subnet for the Virtual IP
created_at str
Date of creation of the loadbalancer
flavor_id str
ID of the flavor
floating_ip cloudproject.GetLoadBalancerFloatingIp
Information about the floating IP
id str
ID of the floating IP
name str
Name of the loadbalancer
operating_status str
Operating status of the loadbalancer
provisioning_status str
Provisioning status of the loadbalancer
region_name str
Region of the loadbalancer
service_name str
ID of the public cloud project
updated_at str
Last update date of the loadbalancer
vip_address str
IP address of the Virtual IP
vip_network_id str
Openstack ID of the network for the Virtual IP
vip_subnet_id str
ID of the subnet for the Virtual IP
createdAt String
Date of creation of the loadbalancer
flavorId String
ID of the flavor
floatingIp Property Map
Information about the floating IP
id String
ID of the floating IP
name String
Name of the loadbalancer
operatingStatus String
Operating status of the loadbalancer
provisioningStatus String
Provisioning status of the loadbalancer
regionName String
Region of the loadbalancer
serviceName String
ID of the public cloud project
updatedAt String
Last update date of the loadbalancer
vipAddress String
IP address of the Virtual IP
vipNetworkId String
Openstack ID of the network for the Virtual IP
vipSubnetId String
ID of the subnet for the Virtual IP

Supporting Types

GetLoadBalancerFloatingIp

Id This property is required. string
ID of the loadbalancer
Ip This property is required. string
Value of the floating IP
Id This property is required. string
ID of the loadbalancer
Ip This property is required. string
Value of the floating IP
id This property is required. String
ID of the loadbalancer
ip This property is required. String
Value of the floating IP
id This property is required. string
ID of the loadbalancer
ip This property is required. string
Value of the floating IP
id This property is required. str
ID of the loadbalancer
ip This property is required. str
Value of the floating IP
id This property is required. String
ID of the loadbalancer
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