1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. ClbCustomizedConfig
tencentcloud 1.81.184 published on Tuesday, Apr 22, 2025 by tencentcloudstack

tencentcloud.ClbCustomizedConfig

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.184 published on Tuesday, Apr 22, 2025 by tencentcloudstack

    Provides a resource to create a CLB customized config which type is CLB.

    Example Usage

    Create clb customized config without CLB instance

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.ClbCustomizedConfig("example", {
        configContent: `client_max_body_size 224M;\x0d
    client_body_timeout 60s;
    `,
        configName: "tf-example",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.ClbCustomizedConfig("example",
        config_content="""client_max_body_size 224M;\x0d
    client_body_timeout 60s;
    """,
        config_name="tf-example")
    
    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.NewClbCustomizedConfig(ctx, "example", &tencentcloud.ClbCustomizedConfigArgs{
    			ConfigContent: pulumi.String("client_max_body_size 224M;
    \nclient_body_timeout 60s;\n"),
    			ConfigName:    pulumi.String("tf-example"),
    		})
    		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 example = new Tencentcloud.ClbCustomizedConfig("example", new()
        {
            ConfigContent = @"client_max_body_size 224M;
    client_body_timeout 60s;
    ",
            ConfigName = "tf-example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.ClbCustomizedConfig;
    import com.pulumi.tencentcloud.ClbCustomizedConfigArgs;
    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 example = new ClbCustomizedConfig("example", ClbCustomizedConfigArgs.builder()
                .configContent("""
    client_max_body_size 224M;
    client_body_timeout 60s;
                """)
                .configName("tf-example")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:ClbCustomizedConfig
        properties:
          configContent: "client_max_body_size 224M;\r\nclient_body_timeout 60s;\n"
          configName: tf-example
    

    Create clb customized config with CLB instances

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.ClbCustomizedConfig("example", {
        configContent: `client_max_body_size 224M;\x0d
    client_body_timeout 60s;
    `,
        configName: "tf-example",
        loadBalancerIds: [
            "lb-l6cp6jt4",
            "lb-muk4zzxi",
        ],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.ClbCustomizedConfig("example",
        config_content="""client_max_body_size 224M;\x0d
    client_body_timeout 60s;
    """,
        config_name="tf-example",
        load_balancer_ids=[
            "lb-l6cp6jt4",
            "lb-muk4zzxi",
        ])
    
    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.NewClbCustomizedConfig(ctx, "example", &tencentcloud.ClbCustomizedConfigArgs{
    			ConfigContent: pulumi.String("client_max_body_size 224M;
    \nclient_body_timeout 60s;\n"),
    			ConfigName:    pulumi.String("tf-example"),
    			LoadBalancerIds: pulumi.StringArray{
    				pulumi.String("lb-l6cp6jt4"),
    				pulumi.String("lb-muk4zzxi"),
    			},
    		})
    		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 example = new Tencentcloud.ClbCustomizedConfig("example", new()
        {
            ConfigContent = @"client_max_body_size 224M;
    client_body_timeout 60s;
    ",
            ConfigName = "tf-example",
            LoadBalancerIds = new[]
            {
                "lb-l6cp6jt4",
                "lb-muk4zzxi",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.ClbCustomizedConfig;
    import com.pulumi.tencentcloud.ClbCustomizedConfigArgs;
    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 example = new ClbCustomizedConfig("example", ClbCustomizedConfigArgs.builder()
                .configContent("""
    client_max_body_size 224M;
    client_body_timeout 60s;
                """)
                .configName("tf-example")
                .loadBalancerIds(            
                    "lb-l6cp6jt4",
                    "lb-muk4zzxi")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:ClbCustomizedConfig
        properties:
          configContent: "client_max_body_size 224M;\r\nclient_body_timeout 60s;\n"
          configName: tf-example
          loadBalancerIds:
            - lb-l6cp6jt4
            - lb-muk4zzxi
    

    Create ClbCustomizedConfig Resource

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

    Constructor syntax

    new ClbCustomizedConfig(name: string, args: ClbCustomizedConfigArgs, opts?: CustomResourceOptions);
    @overload
    def ClbCustomizedConfig(resource_name: str,
                            args: ClbCustomizedConfigArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def ClbCustomizedConfig(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            config_content: Optional[str] = None,
                            config_name: Optional[str] = None,
                            clb_customized_config_id: Optional[str] = None,
                            load_balancer_ids: Optional[Sequence[str]] = None)
    func NewClbCustomizedConfig(ctx *Context, name string, args ClbCustomizedConfigArgs, opts ...ResourceOption) (*ClbCustomizedConfig, error)
    public ClbCustomizedConfig(string name, ClbCustomizedConfigArgs args, CustomResourceOptions? opts = null)
    public ClbCustomizedConfig(String name, ClbCustomizedConfigArgs args)
    public ClbCustomizedConfig(String name, ClbCustomizedConfigArgs args, CustomResourceOptions options)
    
    type: tencentcloud:ClbCustomizedConfig
    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 ClbCustomizedConfigArgs
    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 ClbCustomizedConfigArgs
    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 ClbCustomizedConfigArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ClbCustomizedConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ClbCustomizedConfigArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    ConfigContent string
    Content of Customized Config.
    ConfigName string
    Name of Customized Config.
    ClbCustomizedConfigId string
    ID of the resource.
    LoadBalancerIds List<string>
    List of LoadBalancer Ids.
    ConfigContent string
    Content of Customized Config.
    ConfigName string
    Name of Customized Config.
    ClbCustomizedConfigId string
    ID of the resource.
    LoadBalancerIds []string
    List of LoadBalancer Ids.
    configContent String
    Content of Customized Config.
    configName String
    Name of Customized Config.
    clbCustomizedConfigId String
    ID of the resource.
    loadBalancerIds List<String>
    List of LoadBalancer Ids.
    configContent string
    Content of Customized Config.
    configName string
    Name of Customized Config.
    clbCustomizedConfigId string
    ID of the resource.
    loadBalancerIds string[]
    List of LoadBalancer Ids.
    config_content str
    Content of Customized Config.
    config_name str
    Name of Customized Config.
    clb_customized_config_id str
    ID of the resource.
    load_balancer_ids Sequence[str]
    List of LoadBalancer Ids.
    configContent String
    Content of Customized Config.
    configName String
    Name of Customized Config.
    clbCustomizedConfigId String
    ID of the resource.
    loadBalancerIds List<String>
    List of LoadBalancer Ids.

    Outputs

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

    CreateTime string
    Create time of Customized Config.
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdateTime string
    Update time of Customized Config.
    CreateTime string
    Create time of Customized Config.
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdateTime string
    Update time of Customized Config.
    createTime String
    Create time of Customized Config.
    id String
    The provider-assigned unique ID for this managed resource.
    updateTime String
    Update time of Customized Config.
    createTime string
    Create time of Customized Config.
    id string
    The provider-assigned unique ID for this managed resource.
    updateTime string
    Update time of Customized Config.
    create_time str
    Create time of Customized Config.
    id str
    The provider-assigned unique ID for this managed resource.
    update_time str
    Update time of Customized Config.
    createTime String
    Create time of Customized Config.
    id String
    The provider-assigned unique ID for this managed resource.
    updateTime String
    Update time of Customized Config.

    Look up Existing ClbCustomizedConfig Resource

    Get an existing ClbCustomizedConfig 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?: ClbCustomizedConfigState, opts?: CustomResourceOptions): ClbCustomizedConfig
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            clb_customized_config_id: Optional[str] = None,
            config_content: Optional[str] = None,
            config_name: Optional[str] = None,
            create_time: Optional[str] = None,
            load_balancer_ids: Optional[Sequence[str]] = None,
            update_time: Optional[str] = None) -> ClbCustomizedConfig
    func GetClbCustomizedConfig(ctx *Context, name string, id IDInput, state *ClbCustomizedConfigState, opts ...ResourceOption) (*ClbCustomizedConfig, error)
    public static ClbCustomizedConfig Get(string name, Input<string> id, ClbCustomizedConfigState? state, CustomResourceOptions? opts = null)
    public static ClbCustomizedConfig get(String name, Output<String> id, ClbCustomizedConfigState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:ClbCustomizedConfig    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:
    ClbCustomizedConfigId string
    ID of the resource.
    ConfigContent string
    Content of Customized Config.
    ConfigName string
    Name of Customized Config.
    CreateTime string
    Create time of Customized Config.
    LoadBalancerIds List<string>
    List of LoadBalancer Ids.
    UpdateTime string
    Update time of Customized Config.
    ClbCustomizedConfigId string
    ID of the resource.
    ConfigContent string
    Content of Customized Config.
    ConfigName string
    Name of Customized Config.
    CreateTime string
    Create time of Customized Config.
    LoadBalancerIds []string
    List of LoadBalancer Ids.
    UpdateTime string
    Update time of Customized Config.
    clbCustomizedConfigId String
    ID of the resource.
    configContent String
    Content of Customized Config.
    configName String
    Name of Customized Config.
    createTime String
    Create time of Customized Config.
    loadBalancerIds List<String>
    List of LoadBalancer Ids.
    updateTime String
    Update time of Customized Config.
    clbCustomizedConfigId string
    ID of the resource.
    configContent string
    Content of Customized Config.
    configName string
    Name of Customized Config.
    createTime string
    Create time of Customized Config.
    loadBalancerIds string[]
    List of LoadBalancer Ids.
    updateTime string
    Update time of Customized Config.
    clb_customized_config_id str
    ID of the resource.
    config_content str
    Content of Customized Config.
    config_name str
    Name of Customized Config.
    create_time str
    Create time of Customized Config.
    load_balancer_ids Sequence[str]
    List of LoadBalancer Ids.
    update_time str
    Update time of Customized Config.
    clbCustomizedConfigId String
    ID of the resource.
    configContent String
    Content of Customized Config.
    configName String
    Name of Customized Config.
    createTime String
    Create time of Customized Config.
    loadBalancerIds List<String>
    List of LoadBalancer Ids.
    updateTime String
    Update time of Customized Config.

    Import

    CLB customized config can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/clbCustomizedConfig:ClbCustomizedConfig example pz-diowqstq
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.184 published on Tuesday, Apr 22, 2025 by tencentcloudstack