1. Packages
  2. OVH
  3. API Docs
  4. CloudProject
  5. getLoadBalancers
OVHCloud v1.1.0 published on Thursday, Nov 21, 2024 by OVHcloud

ovh.CloudProject.getLoadBalancers

Explore with Pulumi AI

ovh logo
OVHCloud v1.1.0 published on Thursday, Nov 21, 2024 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;
    
    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)
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/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
    	})
    }
    
    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,
        };
    });
    
    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.applyValue(getLoadBalancersResult -> getLoadBalancersResult));
        }
    }
    
    variables:
      lbsLoadBalancers:
        fn::invoke:
          Function: ovh:CloudProject:getLoadBalancers
          Arguments:
            serviceName: XXXXXX
            regionName: XXX
    outputs:
      lbs: ${lbsLoadBalancers}
    

    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>
    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]
    func GetLoadBalancers(ctx *Context, args *GetLoadBalancersArgs, opts ...InvokeOption) (*GetLoadBalancersResult, error)
    func GetLoadBalancersOutput(ctx *Context, args *GetLoadBalancersOutputArgs, opts ...InvokeOption) GetLoadBalancersResultOutput

    > 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)
    }
    public static CompletableFuture<GetLoadBalancersResult> getLoadBalancers(GetLoadBalancersArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: ovh:CloudProject/getLoadBalancers:getLoadBalancers
      arguments:
        # arguments dictionary

    The following arguments are supported:

    RegionName string
    Region of the loadbalancers.
    ServiceName string
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    RegionName string
    Region of the loadbalancers.
    ServiceName string
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    regionName String
    Region of the loadbalancers.
    serviceName String
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    regionName string
    Region of the loadbalancers.
    serviceName string
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    region_name str
    Region of the loadbalancers.
    service_name str
    The ID of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    regionName String
    Region of the loadbalancers.
    serviceName 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 string
    Date of creation of the loadbalancer
    FlavorId string
    ID of the flavor
    FloatingIp GetLoadBalancersLoadbalancerFloatingIp
    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
    Region string
    Region of the loadbalancer
    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 GetLoadBalancersLoadbalancerFloatingIp
    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
    Region string
    Region of the loadbalancer
    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 GetLoadBalancersLoadbalancerFloatingIp
    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
    region String
    Region of the loadbalancer
    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 GetLoadBalancersLoadbalancerFloatingIp
    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
    region string
    Region of the loadbalancer
    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.GetLoadBalancersLoadbalancerFloatingIp
    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 str
    Region of the loadbalancer
    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
    region String
    Region of the loadbalancer
    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

    GetLoadBalancersLoadbalancerFloatingIp

    Id string
    ID of the floating IP
    Ip string
    Value of the floating IP
    Id string
    ID of the floating IP
    Ip string
    Value of the floating IP
    id String
    ID of the floating IP
    ip String
    Value of the floating IP
    id string
    ID of the floating IP
    ip string
    Value of the floating IP
    id str
    ID of the floating IP
    ip str
    Value of the floating IP
    id String
    ID of the floating IP
    ip 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.
    ovh logo
    OVHCloud v1.1.0 published on Thursday, Nov 21, 2024 by OVHcloud