1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. Lb
tencentcloud 1.81.187 published on Monday, Apr 28, 2025 by tencentcloudstack

tencentcloud.Lb

Explore with Pulumi AI

Provides a Load Balancer resource.

NOTE: It has been deprecated and replaced by tencentcloud.ClbInstance.

Example Usage

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

const classic = new tencentcloud.Lb("classic", {
    forward: "APPLICATION",
    projectId: 0,
    type: "OPEN",
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

classic = tencentcloud.Lb("classic",
    forward="APPLICATION",
    project_id=0,
    type="OPEN")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tencentcloud.NewLb(ctx, "classic", &tencentcloud.LbArgs{
			Forward:   pulumi.String("APPLICATION"),
			ProjectId: pulumi.Float64(0),
			Type:      pulumi.String("OPEN"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var classic = new Tencentcloud.Lb("classic", new()
    {
        Forward = "APPLICATION",
        ProjectId = 0,
        Type = "OPEN",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Lb;
import com.pulumi.tencentcloud.LbArgs;
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 classic = new Lb("classic", LbArgs.builder()
            .forward("APPLICATION")
            .projectId(0)
            .type("OPEN")
            .build());

    }
}
Copy
resources:
  classic:
    type: tencentcloud:Lb
    properties:
      forward: APPLICATION
      projectId: 0
      type: OPEN
Copy

Create Lb Resource

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

Constructor syntax

new Lb(name: string, args: LbArgs, opts?: CustomResourceOptions);
@overload
def Lb(resource_name: str,
       args: LbArgs,
       opts: Optional[ResourceOptions] = None)

@overload
def Lb(resource_name: str,
       opts: Optional[ResourceOptions] = None,
       type: Optional[str] = None,
       forward: Optional[str] = None,
       lb_id: Optional[str] = None,
       name: Optional[str] = None,
       project_id: Optional[float] = None,
       vpc_id: Optional[str] = None)
func NewLb(ctx *Context, name string, args LbArgs, opts ...ResourceOption) (*Lb, error)
public Lb(string name, LbArgs args, CustomResourceOptions? opts = null)
public Lb(String name, LbArgs args)
public Lb(String name, LbArgs args, CustomResourceOptions options)
type: tencentcloud:Lb
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

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

Lb 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 Lb resource accepts the following input properties:

Type This property is required. string
The network type of the LB. Valid value: 'OPEN', 'INTERNAL'.
Forward string
The type of the LB. Valid value: 'CLASSIC', 'APPLICATION'.
LbId string
ID of the resource.
Name string
The name of the LB.
ProjectId double
The project id of the LB, unspecified or 0 stands for default project.
VpcId string
The VPC ID of the LB, unspecified or 0 stands for CVM basic network.
Type This property is required. string
The network type of the LB. Valid value: 'OPEN', 'INTERNAL'.
Forward string
The type of the LB. Valid value: 'CLASSIC', 'APPLICATION'.
LbId string
ID of the resource.
Name string
The name of the LB.
ProjectId float64
The project id of the LB, unspecified or 0 stands for default project.
VpcId string
The VPC ID of the LB, unspecified or 0 stands for CVM basic network.
type This property is required. String
The network type of the LB. Valid value: 'OPEN', 'INTERNAL'.
forward String
The type of the LB. Valid value: 'CLASSIC', 'APPLICATION'.
lbId String
ID of the resource.
name String
The name of the LB.
projectId Double
The project id of the LB, unspecified or 0 stands for default project.
vpcId String
The VPC ID of the LB, unspecified or 0 stands for CVM basic network.
type This property is required. string
The network type of the LB. Valid value: 'OPEN', 'INTERNAL'.
forward string
The type of the LB. Valid value: 'CLASSIC', 'APPLICATION'.
lbId string
ID of the resource.
name string
The name of the LB.
projectId number
The project id of the LB, unspecified or 0 stands for default project.
vpcId string
The VPC ID of the LB, unspecified or 0 stands for CVM basic network.
type This property is required. str
The network type of the LB. Valid value: 'OPEN', 'INTERNAL'.
forward str
The type of the LB. Valid value: 'CLASSIC', 'APPLICATION'.
lb_id str
ID of the resource.
name str
The name of the LB.
project_id float
The project id of the LB, unspecified or 0 stands for default project.
vpc_id str
The VPC ID of the LB, unspecified or 0 stands for CVM basic network.
type This property is required. String
The network type of the LB. Valid value: 'OPEN', 'INTERNAL'.
forward String
The type of the LB. Valid value: 'CLASSIC', 'APPLICATION'.
lbId String
ID of the resource.
name String
The name of the LB.
projectId Number
The project id of the LB, unspecified or 0 stands for default project.
vpcId String
The VPC ID of the LB, unspecified or 0 stands for CVM basic network.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Status string
The status of the LB.
Id string
The provider-assigned unique ID for this managed resource.
Status string
The status of the LB.
id String
The provider-assigned unique ID for this managed resource.
status String
The status of the LB.
id string
The provider-assigned unique ID for this managed resource.
status string
The status of the LB.
id str
The provider-assigned unique ID for this managed resource.
status str
The status of the LB.
id String
The provider-assigned unique ID for this managed resource.
status String
The status of the LB.

Look up Existing Lb Resource

Get an existing Lb 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?: LbState, opts?: CustomResourceOptions): Lb
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        forward: Optional[str] = None,
        lb_id: Optional[str] = None,
        name: Optional[str] = None,
        project_id: Optional[float] = None,
        status: Optional[str] = None,
        type: Optional[str] = None,
        vpc_id: Optional[str] = None) -> Lb
func GetLb(ctx *Context, name string, id IDInput, state *LbState, opts ...ResourceOption) (*Lb, error)
public static Lb Get(string name, Input<string> id, LbState? state, CustomResourceOptions? opts = null)
public static Lb get(String name, Output<String> id, LbState state, CustomResourceOptions options)
resources:  _:    type: tencentcloud:Lb    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Forward string
The type of the LB. Valid value: 'CLASSIC', 'APPLICATION'.
LbId string
ID of the resource.
Name string
The name of the LB.
ProjectId double
The project id of the LB, unspecified or 0 stands for default project.
Status string
The status of the LB.
Type string
The network type of the LB. Valid value: 'OPEN', 'INTERNAL'.
VpcId string
The VPC ID of the LB, unspecified or 0 stands for CVM basic network.
Forward string
The type of the LB. Valid value: 'CLASSIC', 'APPLICATION'.
LbId string
ID of the resource.
Name string
The name of the LB.
ProjectId float64
The project id of the LB, unspecified or 0 stands for default project.
Status string
The status of the LB.
Type string
The network type of the LB. Valid value: 'OPEN', 'INTERNAL'.
VpcId string
The VPC ID of the LB, unspecified or 0 stands for CVM basic network.
forward String
The type of the LB. Valid value: 'CLASSIC', 'APPLICATION'.
lbId String
ID of the resource.
name String
The name of the LB.
projectId Double
The project id of the LB, unspecified or 0 stands for default project.
status String
The status of the LB.
type String
The network type of the LB. Valid value: 'OPEN', 'INTERNAL'.
vpcId String
The VPC ID of the LB, unspecified or 0 stands for CVM basic network.
forward string
The type of the LB. Valid value: 'CLASSIC', 'APPLICATION'.
lbId string
ID of the resource.
name string
The name of the LB.
projectId number
The project id of the LB, unspecified or 0 stands for default project.
status string
The status of the LB.
type string
The network type of the LB. Valid value: 'OPEN', 'INTERNAL'.
vpcId string
The VPC ID of the LB, unspecified or 0 stands for CVM basic network.
forward str
The type of the LB. Valid value: 'CLASSIC', 'APPLICATION'.
lb_id str
ID of the resource.
name str
The name of the LB.
project_id float
The project id of the LB, unspecified or 0 stands for default project.
status str
The status of the LB.
type str
The network type of the LB. Valid value: 'OPEN', 'INTERNAL'.
vpc_id str
The VPC ID of the LB, unspecified or 0 stands for CVM basic network.
forward String
The type of the LB. Valid value: 'CLASSIC', 'APPLICATION'.
lbId String
ID of the resource.
name String
The name of the LB.
projectId Number
The project id of the LB, unspecified or 0 stands for default project.
status String
The status of the LB.
type String
The network type of the LB. Valid value: 'OPEN', 'INTERNAL'.
vpcId String
The VPC ID of the LB, unspecified or 0 stands for CVM basic network.

Package Details

Repository
tencentcloud tencentcloudstack/terraform-provider-tencentcloud
License
Notes
This Pulumi package is based on the tencentcloud Terraform Provider.