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",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
classic = tencentcloud.Lb("classic",
forward="APPLICATION",
project_id=0,
type="OPEN")
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
})
}
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",
});
});
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());
}
}
resources:
classic:
type: tencentcloud:Lb
properties:
forward: APPLICATION
projectId: 0
type: OPEN
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)
type: tencentcloud:Lb
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 LbArgs
- 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 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 string
- The unique name of the resource.
- args LbArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LbArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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 string
- The network type of the LB. Valid value: 'OPEN', 'INTERNAL'.
- Forward string
- The type of the LB. Valid value: 'CLASSIC', 'APPLICATION'.
- Lb
Id string - ID of the resource.
- Name string
- The name of the LB.
- Project
Id double - The project id of the LB, unspecified or 0 stands for default project.
- Vpc
Id string - The VPC ID of the LB, unspecified or 0 stands for CVM basic network.
- Type string
- The network type of the LB. Valid value: 'OPEN', 'INTERNAL'.
- Forward string
- The type of the LB. Valid value: 'CLASSIC', 'APPLICATION'.
- Lb
Id string - ID of the resource.
- Name string
- The name of the LB.
- Project
Id float64 - The project id of the LB, unspecified or 0 stands for default project.
- Vpc
Id string - The VPC ID of the LB, unspecified or 0 stands for CVM basic network.
- type String
- The network type of the LB. Valid value: 'OPEN', 'INTERNAL'.
- forward String
- The type of the LB. Valid value: 'CLASSIC', 'APPLICATION'.
- lb
Id String - ID of the resource.
- name String
- The name of the LB.
- project
Id Double - The project id of the LB, unspecified or 0 stands for default project.
- vpc
Id String - The VPC ID of the LB, unspecified or 0 stands for CVM basic network.
- type string
- The network type of the LB. Valid value: 'OPEN', 'INTERNAL'.
- forward string
- The type of the LB. Valid value: 'CLASSIC', 'APPLICATION'.
- lb
Id string - ID of the resource.
- name string
- The name of the LB.
- project
Id number - The project id of the LB, unspecified or 0 stands for default project.
- vpc
Id string - The VPC ID of the LB, unspecified or 0 stands for CVM basic network.
- type 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 String
- The network type of the LB. Valid value: 'OPEN', 'INTERNAL'.
- forward String
- The type of the LB. Valid value: 'CLASSIC', 'APPLICATION'.
- lb
Id String - ID of the resource.
- name String
- The name of the LB.
- project
Id Number - The project id of the LB, unspecified or 0 stands for default project.
- vpc
Id 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:
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
- 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.
- Forward string
- The type of the LB. Valid value: 'CLASSIC', 'APPLICATION'.
- Lb
Id string - ID of the resource.
- Name string
- The name of the LB.
- Project
Id 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'.
- Vpc
Id 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'.
- Lb
Id string - ID of the resource.
- Name string
- The name of the LB.
- Project
Id 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'.
- Vpc
Id 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'.
- lb
Id String - ID of the resource.
- name String
- The name of the LB.
- project
Id 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'.
- vpc
Id 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'.
- lb
Id string - ID of the resource.
- name string
- The name of the LB.
- project
Id 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'.
- vpc
Id 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'.
- lb
Id String - ID of the resource.
- name String
- The name of the LB.
- project
Id 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'.
- vpc
Id 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.