tencentcloud.ClickhouseXmlConfig
Explore with Pulumi AI
Provides a resource to create a clickhouse xml_config
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const xmlConfig = new tencentcloud.ClickhouseXmlConfig("xmlConfig", {
instanceId: "cdwch-datuhk3z",
modifyConfContext: {
fileName: "metrika.xml",
filePath: "/etc/clickhouse-server",
newConfValue: "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHlhbmRleD4KICAgIDx6b29rZWVwZXItc2VydmVycz4KICAgIDwvem9va2VlcGVyLXNlcnZlcnM+CjwveWFuZGV4Pgo=",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
xml_config = tencentcloud.ClickhouseXmlConfig("xmlConfig",
instance_id="cdwch-datuhk3z",
modify_conf_context={
"file_name": "metrika.xml",
"file_path": "/etc/clickhouse-server",
"new_conf_value": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHlhbmRleD4KICAgIDx6b29rZWVwZXItc2VydmVycz4KICAgIDwvem9va2VlcGVyLXNlcnZlcnM+CjwveWFuZGV4Pgo=",
})
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.NewClickhouseXmlConfig(ctx, "xmlConfig", &tencentcloud.ClickhouseXmlConfigArgs{
InstanceId: pulumi.String("cdwch-datuhk3z"),
ModifyConfContext: &tencentcloud.ClickhouseXmlConfigModifyConfContextArgs{
FileName: pulumi.String("metrika.xml"),
FilePath: pulumi.String("/etc/clickhouse-server"),
NewConfValue: pulumi.String("PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHlhbmRleD4KICAgIDx6b29rZWVwZXItc2VydmVycz4KICAgIDwvem9va2VlcGVyLXNlcnZlcnM+CjwveWFuZGV4Pgo="),
},
})
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 xmlConfig = new Tencentcloud.ClickhouseXmlConfig("xmlConfig", new()
{
InstanceId = "cdwch-datuhk3z",
ModifyConfContext = new Tencentcloud.Inputs.ClickhouseXmlConfigModifyConfContextArgs
{
FileName = "metrika.xml",
FilePath = "/etc/clickhouse-server",
NewConfValue = "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHlhbmRleD4KICAgIDx6b29rZWVwZXItc2VydmVycz4KICAgIDwvem9va2VlcGVyLXNlcnZlcnM+CjwveWFuZGV4Pgo=",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ClickhouseXmlConfig;
import com.pulumi.tencentcloud.ClickhouseXmlConfigArgs;
import com.pulumi.tencentcloud.inputs.ClickhouseXmlConfigModifyConfContextArgs;
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 xmlConfig = new ClickhouseXmlConfig("xmlConfig", ClickhouseXmlConfigArgs.builder()
.instanceId("cdwch-datuhk3z")
.modifyConfContext(ClickhouseXmlConfigModifyConfContextArgs.builder()
.fileName("metrika.xml")
.filePath("/etc/clickhouse-server")
.newConfValue("PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHlhbmRleD4KICAgIDx6b29rZWVwZXItc2VydmVycz4KICAgIDwvem9va2VlcGVyLXNlcnZlcnM+CjwveWFuZGV4Pgo=")
.build())
.build());
}
}
resources:
xmlConfig:
type: tencentcloud:ClickhouseXmlConfig
properties:
instanceId: cdwch-datuhk3z
modifyConfContext:
fileName: metrika.xml
filePath: /etc/clickhouse-server
newConfValue: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHlhbmRleD4KICAgIDx6b29rZWVwZXItc2VydmVycz4KICAgIDwvem9va2VlcGVyLXNlcnZlcnM+CjwveWFuZGV4Pgo=
Create ClickhouseXmlConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ClickhouseXmlConfig(name: string, args: ClickhouseXmlConfigArgs, opts?: CustomResourceOptions);
@overload
def ClickhouseXmlConfig(resource_name: str,
args: ClickhouseXmlConfigArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ClickhouseXmlConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
modify_conf_context: Optional[ClickhouseXmlConfigModifyConfContextArgs] = None,
clickhouse_xml_config_id: Optional[str] = None)
func NewClickhouseXmlConfig(ctx *Context, name string, args ClickhouseXmlConfigArgs, opts ...ResourceOption) (*ClickhouseXmlConfig, error)
public ClickhouseXmlConfig(string name, ClickhouseXmlConfigArgs args, CustomResourceOptions? opts = null)
public ClickhouseXmlConfig(String name, ClickhouseXmlConfigArgs args)
public ClickhouseXmlConfig(String name, ClickhouseXmlConfigArgs args, CustomResourceOptions options)
type: tencentcloud:ClickhouseXmlConfig
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 ClickhouseXmlConfigArgs
- 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 ClickhouseXmlConfigArgs
- 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 ClickhouseXmlConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClickhouseXmlConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ClickhouseXmlConfigArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ClickhouseXmlConfig 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 ClickhouseXmlConfig resource accepts the following input properties:
- Instance
Id string - Cluster ID.
- Modify
Conf ClickhouseContext Xml Config Modify Conf Context - Configuration file modification information.
- Clickhouse
Xml stringConfig Id - ID of the resource.
- Instance
Id string - Cluster ID.
- Modify
Conf ClickhouseContext Xml Config Modify Conf Context Args - Configuration file modification information.
- Clickhouse
Xml stringConfig Id - ID of the resource.
- instance
Id String - Cluster ID.
- modify
Conf ClickhouseContext Xml Config Modify Conf Context - Configuration file modification information.
- clickhouse
Xml StringConfig Id - ID of the resource.
- instance
Id string - Cluster ID.
- modify
Conf ClickhouseContext Xml Config Modify Conf Context - Configuration file modification information.
- clickhouse
Xml stringConfig Id - ID of the resource.
- instance_
id str - Cluster ID.
- modify_
conf_ Clickhousecontext Xml Config Modify Conf Context Args - Configuration file modification information.
- clickhouse_
xml_ strconfig_ id - ID of the resource.
- instance
Id String - Cluster ID.
- modify
Conf Property MapContext - Configuration file modification information.
- clickhouse
Xml StringConfig Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the ClickhouseXmlConfig 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 ClickhouseXmlConfig Resource
Get an existing ClickhouseXmlConfig 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?: ClickhouseXmlConfigState, opts?: CustomResourceOptions): ClickhouseXmlConfig
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
clickhouse_xml_config_id: Optional[str] = None,
instance_id: Optional[str] = None,
modify_conf_context: Optional[ClickhouseXmlConfigModifyConfContextArgs] = None) -> ClickhouseXmlConfig
func GetClickhouseXmlConfig(ctx *Context, name string, id IDInput, state *ClickhouseXmlConfigState, opts ...ResourceOption) (*ClickhouseXmlConfig, error)
public static ClickhouseXmlConfig Get(string name, Input<string> id, ClickhouseXmlConfigState? state, CustomResourceOptions? opts = null)
public static ClickhouseXmlConfig get(String name, Output<String> id, ClickhouseXmlConfigState state, CustomResourceOptions options)
resources: _: type: tencentcloud:ClickhouseXmlConfig 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.
- Clickhouse
Xml stringConfig Id - ID of the resource.
- Instance
Id string - Cluster ID.
- Modify
Conf ClickhouseContext Xml Config Modify Conf Context - Configuration file modification information.
- Clickhouse
Xml stringConfig Id - ID of the resource.
- Instance
Id string - Cluster ID.
- Modify
Conf ClickhouseContext Xml Config Modify Conf Context Args - Configuration file modification information.
- clickhouse
Xml StringConfig Id - ID of the resource.
- instance
Id String - Cluster ID.
- modify
Conf ClickhouseContext Xml Config Modify Conf Context - Configuration file modification information.
- clickhouse
Xml stringConfig Id - ID of the resource.
- instance
Id string - Cluster ID.
- modify
Conf ClickhouseContext Xml Config Modify Conf Context - Configuration file modification information.
- clickhouse_
xml_ strconfig_ id - ID of the resource.
- instance_
id str - Cluster ID.
- modify_
conf_ Clickhousecontext Xml Config Modify Conf Context Args - Configuration file modification information.
- clickhouse
Xml StringConfig Id - ID of the resource.
- instance
Id String - Cluster ID.
- modify
Conf Property MapContext - Configuration file modification information.
Supporting Types
ClickhouseXmlConfigModifyConfContext, ClickhouseXmlConfigModifyConfContextArgs
- File
Name string - Configuration file name.
- New
Conf stringValue - New content of configuration file, base64 encoded.
- File
Path string - Path to save configuration file.
- File
Name string - Configuration file name.
- New
Conf stringValue - New content of configuration file, base64 encoded.
- File
Path string - Path to save configuration file.
- file
Name String - Configuration file name.
- new
Conf StringValue - New content of configuration file, base64 encoded.
- file
Path String - Path to save configuration file.
- file
Name string - Configuration file name.
- new
Conf stringValue - New content of configuration file, base64 encoded.
- file
Path string - Path to save configuration file.
- file_
name str - Configuration file name.
- new_
conf_ strvalue - New content of configuration file, base64 encoded.
- file_
path str - Path to save configuration file.
- file
Name String - Configuration file name.
- new
Conf StringValue - New content of configuration file, base64 encoded.
- file
Path String - Path to save configuration file.
Import
clickhouse xml_config can be imported using the id, e.g.
$ pulumi import tencentcloud:index/clickhouseXmlConfig:ClickhouseXmlConfig xml_config cdwch-datuhk3z#metrika.xml
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.