1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. ClbCustomizedConfigV2
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.ClbCustomizedConfigV2

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

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

    Example Usage

    If config_type is SERVER

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.ClbCustomizedConfigV2("example", {
        configContent: `client_max_body_size 224M;\x0d
    client_body_timeout 60s;`,
        configName: "tf-example",
        configType: "SERVER",
    });
    export const configId = example.configId;
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.ClbCustomizedConfigV2("example",
        config_content="""client_max_body_size 224M;\x0d
    client_body_timeout 60s;""",
        config_name="tf-example",
        config_type="SERVER")
    pulumi.export("configId", example.config_id)
    
    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 {
    		example, err := tencentcloud.NewClbCustomizedConfigV2(ctx, "example", &tencentcloud.ClbCustomizedConfigV2Args{
    			ConfigContent: pulumi.String("client_max_body_size 224M;
    \nclient_body_timeout 60s;"),
    			ConfigName:    pulumi.String("tf-example"),
    			ConfigType:    pulumi.String("SERVER"),
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("configId", example.ConfigId)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Tencentcloud.ClbCustomizedConfigV2("example", new()
        {
            ConfigContent = @"client_max_body_size 224M;
    client_body_timeout 60s;",
            ConfigName = "tf-example",
            ConfigType = "SERVER",
        });
    
        return new Dictionary<string, object?>
        {
            ["configId"] = example.ConfigId,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.ClbCustomizedConfigV2;
    import com.pulumi.tencentcloud.ClbCustomizedConfigV2Args;
    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 ClbCustomizedConfigV2("example", ClbCustomizedConfigV2Args.builder()
                .configContent("""
    client_max_body_size 224M;
    client_body_timeout 60s;            """)
                .configName("tf-example")
                .configType("SERVER")
                .build());
    
            ctx.export("configId", example.configId());
        }
    }
    
    resources:
      example:
        type: tencentcloud:ClbCustomizedConfigV2
        properties:
          configContent: "client_max_body_size 224M;\r\nclient_body_timeout 60s;"
          configName: tf-example
          configType: SERVER
    outputs:
      configId: ${example.configId}
    

    If config_type is LOCATION

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.ClbCustomizedConfigV2("example", {
        configContent: `client_max_body_size 224M;\x0d
    client_body_timeout 60s;`,
        configName: "tf-example",
        configType: "LOCATION",
    });
    export const configId = example.configId;
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.ClbCustomizedConfigV2("example",
        config_content="""client_max_body_size 224M;\x0d
    client_body_timeout 60s;""",
        config_name="tf-example",
        config_type="LOCATION")
    pulumi.export("configId", example.config_id)
    
    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 {
    		example, err := tencentcloud.NewClbCustomizedConfigV2(ctx, "example", &tencentcloud.ClbCustomizedConfigV2Args{
    			ConfigContent: pulumi.String("client_max_body_size 224M;
    \nclient_body_timeout 60s;"),
    			ConfigName:    pulumi.String("tf-example"),
    			ConfigType:    pulumi.String("LOCATION"),
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("configId", example.ConfigId)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Tencentcloud.ClbCustomizedConfigV2("example", new()
        {
            ConfigContent = @"client_max_body_size 224M;
    client_body_timeout 60s;",
            ConfigName = "tf-example",
            ConfigType = "LOCATION",
        });
    
        return new Dictionary<string, object?>
        {
            ["configId"] = example.ConfigId,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.ClbCustomizedConfigV2;
    import com.pulumi.tencentcloud.ClbCustomizedConfigV2Args;
    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 ClbCustomizedConfigV2("example", ClbCustomizedConfigV2Args.builder()
                .configContent("""
    client_max_body_size 224M;
    client_body_timeout 60s;            """)
                .configName("tf-example")
                .configType("LOCATION")
                .build());
    
            ctx.export("configId", example.configId());
        }
    }
    
    resources:
      example:
        type: tencentcloud:ClbCustomizedConfigV2
        properties:
          configContent: "client_max_body_size 224M;\r\nclient_body_timeout 60s;"
          configName: tf-example
          configType: LOCATION
    outputs:
      configId: ${example.configId}
    

    Create ClbCustomizedConfigV2 Resource

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

    Constructor syntax

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

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

    ConfigContent string
    Content of Customized Config.
    ConfigName string
    Name of Customized Config.
    ConfigType string
    Type of Customized Config. Valid values: SERVER and LOCATION.
    ClbCustomizedConfigV2Id string
    ID of the resource.
    ConfigContent string
    Content of Customized Config.
    ConfigName string
    Name of Customized Config.
    ConfigType string
    Type of Customized Config. Valid values: SERVER and LOCATION.
    ClbCustomizedConfigV2Id string
    ID of the resource.
    configContent String
    Content of Customized Config.
    configName String
    Name of Customized Config.
    configType String
    Type of Customized Config. Valid values: SERVER and LOCATION.
    clbCustomizedConfigV2Id String
    ID of the resource.
    configContent string
    Content of Customized Config.
    configName string
    Name of Customized Config.
    configType string
    Type of Customized Config. Valid values: SERVER and LOCATION.
    clbCustomizedConfigV2Id string
    ID of the resource.
    config_content str
    Content of Customized Config.
    config_name str
    Name of Customized Config.
    config_type str
    Type of Customized Config. Valid values: SERVER and LOCATION.
    clb_customized_config_v2_id str
    ID of the resource.
    configContent String
    Content of Customized Config.
    configName String
    Name of Customized Config.
    configType String
    Type of Customized Config. Valid values: SERVER and LOCATION.
    clbCustomizedConfigV2Id String
    ID of the resource.

    Outputs

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

    ConfigId string
    ID 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.
    ConfigId string
    ID 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.
    configId String
    ID 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.
    configId string
    ID 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.
    config_id str
    ID 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.
    configId String
    ID 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 ClbCustomizedConfigV2 Resource

    Get an existing ClbCustomizedConfigV2 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?: ClbCustomizedConfigV2State, opts?: CustomResourceOptions): ClbCustomizedConfigV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            clb_customized_config_v2_id: Optional[str] = None,
            config_content: Optional[str] = None,
            config_id: Optional[str] = None,
            config_name: Optional[str] = None,
            config_type: Optional[str] = None,
            create_time: Optional[str] = None,
            update_time: Optional[str] = None) -> ClbCustomizedConfigV2
    func GetClbCustomizedConfigV2(ctx *Context, name string, id IDInput, state *ClbCustomizedConfigV2State, opts ...ResourceOption) (*ClbCustomizedConfigV2, error)
    public static ClbCustomizedConfigV2 Get(string name, Input<string> id, ClbCustomizedConfigV2State? state, CustomResourceOptions? opts = null)
    public static ClbCustomizedConfigV2 get(String name, Output<String> id, ClbCustomizedConfigV2State state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:ClbCustomizedConfigV2    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:
    ClbCustomizedConfigV2Id string
    ID of the resource.
    ConfigContent string
    Content of Customized Config.
    ConfigId string
    ID of Customized Config.
    ConfigName string
    Name of Customized Config.
    ConfigType string
    Type of Customized Config. Valid values: SERVER and LOCATION.
    CreateTime string
    Create time of Customized Config.
    UpdateTime string
    Update time of Customized Config.
    ClbCustomizedConfigV2Id string
    ID of the resource.
    ConfigContent string
    Content of Customized Config.
    ConfigId string
    ID of Customized Config.
    ConfigName string
    Name of Customized Config.
    ConfigType string
    Type of Customized Config. Valid values: SERVER and LOCATION.
    CreateTime string
    Create time of Customized Config.
    UpdateTime string
    Update time of Customized Config.
    clbCustomizedConfigV2Id String
    ID of the resource.
    configContent String
    Content of Customized Config.
    configId String
    ID of Customized Config.
    configName String
    Name of Customized Config.
    configType String
    Type of Customized Config. Valid values: SERVER and LOCATION.
    createTime String
    Create time of Customized Config.
    updateTime String
    Update time of Customized Config.
    clbCustomizedConfigV2Id string
    ID of the resource.
    configContent string
    Content of Customized Config.
    configId string
    ID of Customized Config.
    configName string
    Name of Customized Config.
    configType string
    Type of Customized Config. Valid values: SERVER and LOCATION.
    createTime string
    Create time of Customized Config.
    updateTime string
    Update time of Customized Config.
    clb_customized_config_v2_id str
    ID of the resource.
    config_content str
    Content of Customized Config.
    config_id str
    ID of Customized Config.
    config_name str
    Name of Customized Config.
    config_type str
    Type of Customized Config. Valid values: SERVER and LOCATION.
    create_time str
    Create time of Customized Config.
    update_time str
    Update time of Customized Config.
    clbCustomizedConfigV2Id String
    ID of the resource.
    configContent String
    Content of Customized Config.
    configId String
    ID of Customized Config.
    configName String
    Name of Customized Config.
    configType String
    Type of Customized Config. Valid values: SERVER and LOCATION.
    createTime String
    Create time of Customized Config.
    updateTime String
    Update time of Customized Config.

    Import

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

    $ pulumi import tencentcloud:index/clbCustomizedConfigV2:ClbCustomizedConfigV2 example pz-diowqstq#SERVER
    

    Or

    $ pulumi import tencentcloud:index/clbCustomizedConfigV2:ClbCustomizedConfigV2 example pz-4r10y4b2#LOCATION
    

    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.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack