1. Packages
  2. Vcd Provider
  3. API Docs
  4. getLbVirtualServer
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

vcd.getLbVirtualServer

Explore with Pulumi AI

vcd logo
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

    Provides a VMware Cloud Director edge gateway load balancer virtual server data source. Adds an edge gateway internal or uplink interface as a virtual server. A virtual server has a public IP address and services all incoming client requests.

    Note: To make load balancing work one must ensure that load balancing is enabled on edge gateway (edge gateway must be advanced). This depends on NSX version to work properly. Please refer to VMware Product Interoperability Matrices to check supported VMware Cloud Director and NSX for vSphere configurations.

    Note: The VMware Cloud Director API for NSX supports a subset of the operations and objects defined in the NSX vSphere API Guide. The API supports NSX 6.2, 6.3, and 6.4.

    Supported in provider v2.4+

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vcd from "@pulumi/vcd";
    
    const my_vs = vcd.getLbVirtualServer({
        edgeGateway: "my-edge-gw",
        name: "not-managed",
        org: "my-org",
        vdc: "my-org-vdc",
    });
    
    import pulumi
    import pulumi_vcd as vcd
    
    my_vs = vcd.get_lb_virtual_server(edge_gateway="my-edge-gw",
        name="not-managed",
        org="my-org",
        vdc="my-org-vdc")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vcd/v3/vcd"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vcd.LookupLbVirtualServer(ctx, &vcd.LookupLbVirtualServerArgs{
    			EdgeGateway: "my-edge-gw",
    			Name:        "not-managed",
    			Org:         pulumi.StringRef("my-org"),
    			Vdc:         pulumi.StringRef("my-org-vdc"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vcd = Pulumi.Vcd;
    
    return await Deployment.RunAsync(() => 
    {
        var my_vs = Vcd.GetLbVirtualServer.Invoke(new()
        {
            EdgeGateway = "my-edge-gw",
            Name = "not-managed",
            Org = "my-org",
            Vdc = "my-org-vdc",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vcd.VcdFunctions;
    import com.pulumi.vcd.inputs.GetLbVirtualServerArgs;
    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 my-vs = VcdFunctions.getLbVirtualServer(GetLbVirtualServerArgs.builder()
                .edgeGateway("my-edge-gw")
                .name("not-managed")
                .org("my-org")
                .vdc("my-org-vdc")
                .build());
    
        }
    }
    
    variables:
      my-vs:
        fn::invoke:
          function: vcd:getLbVirtualServer
          arguments:
            edgeGateway: my-edge-gw
            name: not-managed
            org: my-org
            vdc: my-org-vdc
    

    Using getLbVirtualServer

    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 getLbVirtualServer(args: GetLbVirtualServerArgs, opts?: InvokeOptions): Promise<GetLbVirtualServerResult>
    function getLbVirtualServerOutput(args: GetLbVirtualServerOutputArgs, opts?: InvokeOptions): Output<GetLbVirtualServerResult>
    def get_lb_virtual_server(edge_gateway: Optional[str] = None,
                              id: Optional[str] = None,
                              name: Optional[str] = None,
                              org: Optional[str] = None,
                              vdc: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetLbVirtualServerResult
    def get_lb_virtual_server_output(edge_gateway: Optional[pulumi.Input[str]] = None,
                              id: Optional[pulumi.Input[str]] = None,
                              name: Optional[pulumi.Input[str]] = None,
                              org: Optional[pulumi.Input[str]] = None,
                              vdc: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetLbVirtualServerResult]
    func LookupLbVirtualServer(ctx *Context, args *LookupLbVirtualServerArgs, opts ...InvokeOption) (*LookupLbVirtualServerResult, error)
    func LookupLbVirtualServerOutput(ctx *Context, args *LookupLbVirtualServerOutputArgs, opts ...InvokeOption) LookupLbVirtualServerResultOutput

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

    public static class GetLbVirtualServer 
    {
        public static Task<GetLbVirtualServerResult> InvokeAsync(GetLbVirtualServerArgs args, InvokeOptions? opts = null)
        public static Output<GetLbVirtualServerResult> Invoke(GetLbVirtualServerInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetLbVirtualServerResult> getLbVirtualServer(GetLbVirtualServerArgs args, InvokeOptions options)
    public static Output<GetLbVirtualServerResult> getLbVirtualServer(GetLbVirtualServerArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vcd:index/getLbVirtualServer:getLbVirtualServer
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EdgeGateway string
    The name of the edge gateway on which the virtual server is defined
    Name string
    Name for identifying the exact virtual server
    Id string
    Org string
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
    Vdc string
    The name of VDC to use, optional if defined at provider level
    EdgeGateway string
    The name of the edge gateway on which the virtual server is defined
    Name string
    Name for identifying the exact virtual server
    Id string
    Org string
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
    Vdc string
    The name of VDC to use, optional if defined at provider level
    edgeGateway String
    The name of the edge gateway on which the virtual server is defined
    name String
    Name for identifying the exact virtual server
    id String
    org String
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
    vdc String
    The name of VDC to use, optional if defined at provider level
    edgeGateway string
    The name of the edge gateway on which the virtual server is defined
    name string
    Name for identifying the exact virtual server
    id string
    org string
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
    vdc string
    The name of VDC to use, optional if defined at provider level
    edge_gateway str
    The name of the edge gateway on which the virtual server is defined
    name str
    Name for identifying the exact virtual server
    id str
    org str
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
    vdc str
    The name of VDC to use, optional if defined at provider level
    edgeGateway String
    The name of the edge gateway on which the virtual server is defined
    name String
    Name for identifying the exact virtual server
    id String
    org String
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
    vdc String
    The name of VDC to use, optional if defined at provider level

    getLbVirtualServer Result

    The following output properties are available:

    AppProfileId string
    AppRuleIds List<string>
    ConnectionLimit double
    ConnectionRateLimit double
    Description string
    EdgeGateway string
    EnableAcceleration bool
    Enabled bool
    Id string
    IpAddress string
    Name string
    Port double
    Protocol string
    ServerPoolId string
    Org string
    Vdc string
    AppProfileId string
    AppRuleIds []string
    ConnectionLimit float64
    ConnectionRateLimit float64
    Description string
    EdgeGateway string
    EnableAcceleration bool
    Enabled bool
    Id string
    IpAddress string
    Name string
    Port float64
    Protocol string
    ServerPoolId string
    Org string
    Vdc string
    appProfileId String
    appRuleIds List<String>
    connectionLimit Double
    connectionRateLimit Double
    description String
    edgeGateway String
    enableAcceleration Boolean
    enabled Boolean
    id String
    ipAddress String
    name String
    port Double
    protocol String
    serverPoolId String
    org String
    vdc String
    appProfileId string
    appRuleIds string[]
    connectionLimit number
    connectionRateLimit number
    description string
    edgeGateway string
    enableAcceleration boolean
    enabled boolean
    id string
    ipAddress string
    name string
    port number
    protocol string
    serverPoolId string
    org string
    vdc string
    appProfileId String
    appRuleIds List<String>
    connectionLimit Number
    connectionRateLimit Number
    description String
    edgeGateway String
    enableAcceleration Boolean
    enabled Boolean
    id String
    ipAddress String
    name String
    port Number
    protocol String
    serverPoolId String
    org String
    vdc String

    Package Details

    Repository
    vcd vmware/terraform-provider-vcd
    License
    Notes
    This Pulumi package is based on the vcd Terraform Provider.
    vcd logo
    vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware