1. Packages
  2. Ibm Provider
  3. API Docs
  4. LbVpxService
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.LbVpxService

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Example Usage

    In the following example, you can create a VPX load balancer:

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const testService = new ibm.LbVpxService("testService", {
        vipId: ibm_lb_vpx_vip.testacc_vip.id,
        destinationIpAddress: ibm_compute_vm_instance.test_server.ipv4_address,
        destinationPort: 80,
        weight: 55,
        connectionLimit: 5000,
        healthCheck: "HTTP",
        usip: "NO",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    test_service = ibm.LbVpxService("testService",
        vip_id=ibm_lb_vpx_vip["testacc_vip"]["id"],
        destination_ip_address=ibm_compute_vm_instance["test_server"]["ipv4_address"],
        destination_port=80,
        weight=55,
        connection_limit=5000,
        health_check="HTTP",
        usip="NO")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.NewLbVpxService(ctx, "testService", &ibm.LbVpxServiceArgs{
    			VipId:                pulumi.Any(ibm_lb_vpx_vip.Testacc_vip.Id),
    			DestinationIpAddress: pulumi.Any(ibm_compute_vm_instance.Test_server.Ipv4_address),
    			DestinationPort:      pulumi.Float64(80),
    			Weight:               pulumi.Float64(55),
    			ConnectionLimit:      pulumi.Float64(5000),
    			HealthCheck:          pulumi.String("HTTP"),
    			Usip:                 pulumi.String("NO"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var testService = new Ibm.LbVpxService("testService", new()
        {
            VipId = ibm_lb_vpx_vip.Testacc_vip.Id,
            DestinationIpAddress = ibm_compute_vm_instance.Test_server.Ipv4_address,
            DestinationPort = 80,
            Weight = 55,
            ConnectionLimit = 5000,
            HealthCheck = "HTTP",
            Usip = "NO",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.LbVpxService;
    import com.pulumi.ibm.LbVpxServiceArgs;
    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) {
            var testService = new LbVpxService("testService", LbVpxServiceArgs.builder()
                .vipId(ibm_lb_vpx_vip.testacc_vip().id())
                .destinationIpAddress(ibm_compute_vm_instance.test_server().ipv4_address())
                .destinationPort(80)
                .weight(55)
                .connectionLimit(5000)
                .healthCheck("HTTP")
                .usip("NO")
                .build());
    
        }
    }
    
    resources:
      testService:
        type: ibm:LbVpxService
        properties:
          vipId: ${ibm_lb_vpx_vip.testacc_vip.id}
          destinationIpAddress: ${ibm_compute_vm_instance.test_server.ipv4_address}
          destinationPort: 80
          weight: 55
          connectionLimit: 5000
          healthCheck: HTTP
          usip: NO
    

    Argument reference

    Review the argument references that you can specify for your resource.

    • connection_limit- (Required, Integer) The connection limit for this service. Acceptable values are 0- 4294967294. See the Citrix Netscaler Docs for details.
    • destination_ip_address - (Required, Forces new resource, String)The IP address of the server to which traffic directs. If you use Netscaler VPX 10.1, you must indicate a public IP address in an IBM Cloud Classic Infrastructure (SoftLayer) account. If you use Netscaler VPX 10.5, you can use any IP address.
    • destination_port- (Required, Integer) The destination port of the server to which traffic directs.
    • health_check- (Required, String) The health check type. See the IBM Cloud Classic Infrastructure (SoftLayer) API Docs for details.
    • name- (Required, Forces new resource, String) The ID of the VPX load balancer service.
    • tags- (Optional, Array of string) Tags associated with the VPX load balancer service instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
    • usip- (Optional, Forces new resource, String) Whether the service reports the source IP of the client to the service being load balance. Acceptable values are YES or NO. The default value is NO. Note This argument is only available for VPX 10.5.
    • vip_id- (Required, Forces new resource, String) The ID of the VPX load balancer virtual IP address to which the service is assigned.
    • weight - (Required, Integer) The percentage of the total connection limit allocated to the load balancer between all your services. See the IBM Cloud Classic Infrastructure (SoftLayer) API Docs for details. Note If you use Netscaler VPX 10.5, the weight value is ignored.

    Create LbVpxService Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new LbVpxService(name: string, args: LbVpxServiceArgs, opts?: CustomResourceOptions);
    @overload
    def LbVpxService(resource_name: str,
                     args: LbVpxServiceArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def LbVpxService(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     connection_limit: Optional[float] = None,
                     destination_ip_address: Optional[str] = None,
                     destination_port: Optional[float] = None,
                     health_check: Optional[str] = None,
                     vip_id: Optional[str] = None,
                     weight: Optional[float] = None,
                     lb_vpx_service_id: Optional[str] = None,
                     name: Optional[str] = None,
                     tags: Optional[Sequence[str]] = None,
                     usip: Optional[str] = None)
    func NewLbVpxService(ctx *Context, name string, args LbVpxServiceArgs, opts ...ResourceOption) (*LbVpxService, error)
    public LbVpxService(string name, LbVpxServiceArgs args, CustomResourceOptions? opts = null)
    public LbVpxService(String name, LbVpxServiceArgs args)
    public LbVpxService(String name, LbVpxServiceArgs args, CustomResourceOptions options)
    
    type: ibm:LbVpxService
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args LbVpxServiceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args LbVpxServiceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args LbVpxServiceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LbVpxServiceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LbVpxServiceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var lbVpxServiceResource = new Ibm.LbVpxService("lbVpxServiceResource", new()
    {
        ConnectionLimit = 0,
        DestinationIpAddress = "string",
        DestinationPort = 0,
        HealthCheck = "string",
        VipId = "string",
        Weight = 0,
        LbVpxServiceId = "string",
        Name = "string",
        Tags = new[]
        {
            "string",
        },
        Usip = "string",
    });
    
    example, err := ibm.NewLbVpxService(ctx, "lbVpxServiceResource", &ibm.LbVpxServiceArgs{
    	ConnectionLimit:      pulumi.Float64(0),
    	DestinationIpAddress: pulumi.String("string"),
    	DestinationPort:      pulumi.Float64(0),
    	HealthCheck:          pulumi.String("string"),
    	VipId:                pulumi.String("string"),
    	Weight:               pulumi.Float64(0),
    	LbVpxServiceId:       pulumi.String("string"),
    	Name:                 pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Usip: pulumi.String("string"),
    })
    
    var lbVpxServiceResource = new LbVpxService("lbVpxServiceResource", LbVpxServiceArgs.builder()
        .connectionLimit(0)
        .destinationIpAddress("string")
        .destinationPort(0)
        .healthCheck("string")
        .vipId("string")
        .weight(0)
        .lbVpxServiceId("string")
        .name("string")
        .tags("string")
        .usip("string")
        .build());
    
    lb_vpx_service_resource = ibm.LbVpxService("lbVpxServiceResource",
        connection_limit=0,
        destination_ip_address="string",
        destination_port=0,
        health_check="string",
        vip_id="string",
        weight=0,
        lb_vpx_service_id="string",
        name="string",
        tags=["string"],
        usip="string")
    
    const lbVpxServiceResource = new ibm.LbVpxService("lbVpxServiceResource", {
        connectionLimit: 0,
        destinationIpAddress: "string",
        destinationPort: 0,
        healthCheck: "string",
        vipId: "string",
        weight: 0,
        lbVpxServiceId: "string",
        name: "string",
        tags: ["string"],
        usip: "string",
    });
    
    type: ibm:LbVpxService
    properties:
        connectionLimit: 0
        destinationIpAddress: string
        destinationPort: 0
        healthCheck: string
        lbVpxServiceId: string
        name: string
        tags:
            - string
        usip: string
        vipId: string
        weight: 0
    

    LbVpxService Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The LbVpxService resource accepts the following input properties:

    ConnectionLimit double
    Number of connections limit
    DestinationIpAddress string
    Destination IP Address
    DestinationPort double
    Destination Port number
    HealthCheck string
    Health check info
    VipId string
    VIP id
    Weight double
    Weight value
    LbVpxServiceId string
    (String) The unique identifier of the VPX load balancer service.
    Name string
    name
    Tags List<string>
    list of tags associated with the resource
    Usip string
    usip info
    ConnectionLimit float64
    Number of connections limit
    DestinationIpAddress string
    Destination IP Address
    DestinationPort float64
    Destination Port number
    HealthCheck string
    Health check info
    VipId string
    VIP id
    Weight float64
    Weight value
    LbVpxServiceId string
    (String) The unique identifier of the VPX load balancer service.
    Name string
    name
    Tags []string
    list of tags associated with the resource
    Usip string
    usip info
    connectionLimit Double
    Number of connections limit
    destinationIpAddress String
    Destination IP Address
    destinationPort Double
    Destination Port number
    healthCheck String
    Health check info
    vipId String
    VIP id
    weight Double
    Weight value
    lbVpxServiceId String
    (String) The unique identifier of the VPX load balancer service.
    name String
    name
    tags List<String>
    list of tags associated with the resource
    usip String
    usip info
    connectionLimit number
    Number of connections limit
    destinationIpAddress string
    Destination IP Address
    destinationPort number
    Destination Port number
    healthCheck string
    Health check info
    vipId string
    VIP id
    weight number
    Weight value
    lbVpxServiceId string
    (String) The unique identifier of the VPX load balancer service.
    name string
    name
    tags string[]
    list of tags associated with the resource
    usip string
    usip info
    connection_limit float
    Number of connections limit
    destination_ip_address str
    Destination IP Address
    destination_port float
    Destination Port number
    health_check str
    Health check info
    vip_id str
    VIP id
    weight float
    Weight value
    lb_vpx_service_id str
    (String) The unique identifier of the VPX load balancer service.
    name str
    name
    tags Sequence[str]
    list of tags associated with the resource
    usip str
    usip info
    connectionLimit Number
    Number of connections limit
    destinationIpAddress String
    Destination IP Address
    destinationPort Number
    Destination Port number
    healthCheck String
    Health check info
    vipId String
    VIP id
    weight Number
    Weight value
    lbVpxServiceId String
    (String) The unique identifier of the VPX load balancer service.
    name String
    name
    tags List<String>
    list of tags associated with the resource
    usip String
    usip info

    Outputs

    All input properties are implicitly available as output properties. Additionally, the LbVpxService resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing LbVpxService Resource

    Get an existing LbVpxService resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: LbVpxServiceState, opts?: CustomResourceOptions): LbVpxService
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            connection_limit: Optional[float] = None,
            destination_ip_address: Optional[str] = None,
            destination_port: Optional[float] = None,
            health_check: Optional[str] = None,
            lb_vpx_service_id: Optional[str] = None,
            name: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            usip: Optional[str] = None,
            vip_id: Optional[str] = None,
            weight: Optional[float] = None) -> LbVpxService
    func GetLbVpxService(ctx *Context, name string, id IDInput, state *LbVpxServiceState, opts ...ResourceOption) (*LbVpxService, error)
    public static LbVpxService Get(string name, Input<string> id, LbVpxServiceState? state, CustomResourceOptions? opts = null)
    public static LbVpxService get(String name, Output<String> id, LbVpxServiceState state, CustomResourceOptions options)
    resources:  _:    type: ibm:LbVpxService    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ConnectionLimit double
    Number of connections limit
    DestinationIpAddress string
    Destination IP Address
    DestinationPort double
    Destination Port number
    HealthCheck string
    Health check info
    LbVpxServiceId string
    (String) The unique identifier of the VPX load balancer service.
    Name string
    name
    Tags List<string>
    list of tags associated with the resource
    Usip string
    usip info
    VipId string
    VIP id
    Weight double
    Weight value
    ConnectionLimit float64
    Number of connections limit
    DestinationIpAddress string
    Destination IP Address
    DestinationPort float64
    Destination Port number
    HealthCheck string
    Health check info
    LbVpxServiceId string
    (String) The unique identifier of the VPX load balancer service.
    Name string
    name
    Tags []string
    list of tags associated with the resource
    Usip string
    usip info
    VipId string
    VIP id
    Weight float64
    Weight value
    connectionLimit Double
    Number of connections limit
    destinationIpAddress String
    Destination IP Address
    destinationPort Double
    Destination Port number
    healthCheck String
    Health check info
    lbVpxServiceId String
    (String) The unique identifier of the VPX load balancer service.
    name String
    name
    tags List<String>
    list of tags associated with the resource
    usip String
    usip info
    vipId String
    VIP id
    weight Double
    Weight value
    connectionLimit number
    Number of connections limit
    destinationIpAddress string
    Destination IP Address
    destinationPort number
    Destination Port number
    healthCheck string
    Health check info
    lbVpxServiceId string
    (String) The unique identifier of the VPX load balancer service.
    name string
    name
    tags string[]
    list of tags associated with the resource
    usip string
    usip info
    vipId string
    VIP id
    weight number
    Weight value
    connection_limit float
    Number of connections limit
    destination_ip_address str
    Destination IP Address
    destination_port float
    Destination Port number
    health_check str
    Health check info
    lb_vpx_service_id str
    (String) The unique identifier of the VPX load balancer service.
    name str
    name
    tags Sequence[str]
    list of tags associated with the resource
    usip str
    usip info
    vip_id str
    VIP id
    weight float
    Weight value
    connectionLimit Number
    Number of connections limit
    destinationIpAddress String
    Destination IP Address
    destinationPort Number
    Destination Port number
    healthCheck String
    Health check info
    lbVpxServiceId String
    (String) The unique identifier of the VPX load balancer service.
    name String
    name
    tags List<String>
    list of tags associated with the resource
    usip String
    usip info
    vipId String
    VIP id
    weight Number
    Weight value

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud