tencentcloud.ClsCkafkaConsumer
Explore with Pulumi AI
Provides a resource to create a cls ckafka_consumer
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const ckafkaConsumer = new tencentcloud.ClsCkafkaConsumer("ckafkaConsumer", {
ckafka: {
instanceId: "ckafka-qzoeaqx8",
instanceName: "ckafka-instance",
topicId: "topic-c6tm4kpm",
topicName: "name",
vip: "172.16.112.23",
vport: "9092",
},
compression: 1,
content: {
enableTag: true,
metaFields: [
"__FILENAME__",
"__HOSTNAME__",
"__PKGID__",
"__SOURCE__",
"__TIMESTAMP__",
],
tagJsonNotTiled: true,
timestampAccuracy: 2,
},
needContent: true,
topicId: "7e34a3a7-635e-4da8-9005-88106c1fde69",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
ckafka_consumer = tencentcloud.ClsCkafkaConsumer("ckafkaConsumer",
ckafka={
"instance_id": "ckafka-qzoeaqx8",
"instance_name": "ckafka-instance",
"topic_id": "topic-c6tm4kpm",
"topic_name": "name",
"vip": "172.16.112.23",
"vport": "9092",
},
compression=1,
content={
"enable_tag": True,
"meta_fields": [
"__FILENAME__",
"__HOSTNAME__",
"__PKGID__",
"__SOURCE__",
"__TIMESTAMP__",
],
"tag_json_not_tiled": True,
"timestamp_accuracy": 2,
},
need_content=True,
topic_id="7e34a3a7-635e-4da8-9005-88106c1fde69")
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.NewClsCkafkaConsumer(ctx, "ckafkaConsumer", &tencentcloud.ClsCkafkaConsumerArgs{
Ckafka: &tencentcloud.ClsCkafkaConsumerCkafkaArgs{
InstanceId: pulumi.String("ckafka-qzoeaqx8"),
InstanceName: pulumi.String("ckafka-instance"),
TopicId: pulumi.String("topic-c6tm4kpm"),
TopicName: pulumi.String("name"),
Vip: pulumi.String("172.16.112.23"),
Vport: pulumi.String("9092"),
},
Compression: pulumi.Float64(1),
Content: &tencentcloud.ClsCkafkaConsumerContentArgs{
EnableTag: pulumi.Bool(true),
MetaFields: pulumi.StringArray{
pulumi.String("__FILENAME__"),
pulumi.String("__HOSTNAME__"),
pulumi.String("__PKGID__"),
pulumi.String("__SOURCE__"),
pulumi.String("__TIMESTAMP__"),
},
TagJsonNotTiled: pulumi.Bool(true),
TimestampAccuracy: pulumi.Float64(2),
},
NeedContent: pulumi.Bool(true),
TopicId: pulumi.String("7e34a3a7-635e-4da8-9005-88106c1fde69"),
})
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 ckafkaConsumer = new Tencentcloud.ClsCkafkaConsumer("ckafkaConsumer", new()
{
Ckafka = new Tencentcloud.Inputs.ClsCkafkaConsumerCkafkaArgs
{
InstanceId = "ckafka-qzoeaqx8",
InstanceName = "ckafka-instance",
TopicId = "topic-c6tm4kpm",
TopicName = "name",
Vip = "172.16.112.23",
Vport = "9092",
},
Compression = 1,
Content = new Tencentcloud.Inputs.ClsCkafkaConsumerContentArgs
{
EnableTag = true,
MetaFields = new[]
{
"__FILENAME__",
"__HOSTNAME__",
"__PKGID__",
"__SOURCE__",
"__TIMESTAMP__",
},
TagJsonNotTiled = true,
TimestampAccuracy = 2,
},
NeedContent = true,
TopicId = "7e34a3a7-635e-4da8-9005-88106c1fde69",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ClsCkafkaConsumer;
import com.pulumi.tencentcloud.ClsCkafkaConsumerArgs;
import com.pulumi.tencentcloud.inputs.ClsCkafkaConsumerCkafkaArgs;
import com.pulumi.tencentcloud.inputs.ClsCkafkaConsumerContentArgs;
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 ckafkaConsumer = new ClsCkafkaConsumer("ckafkaConsumer", ClsCkafkaConsumerArgs.builder()
.ckafka(ClsCkafkaConsumerCkafkaArgs.builder()
.instanceId("ckafka-qzoeaqx8")
.instanceName("ckafka-instance")
.topicId("topic-c6tm4kpm")
.topicName("name")
.vip("172.16.112.23")
.vport("9092")
.build())
.compression(1)
.content(ClsCkafkaConsumerContentArgs.builder()
.enableTag(true)
.metaFields(
"__FILENAME__",
"__HOSTNAME__",
"__PKGID__",
"__SOURCE__",
"__TIMESTAMP__")
.tagJsonNotTiled(true)
.timestampAccuracy(2)
.build())
.needContent(true)
.topicId("7e34a3a7-635e-4da8-9005-88106c1fde69")
.build());
}
}
resources:
ckafkaConsumer:
type: tencentcloud:ClsCkafkaConsumer
properties:
ckafka:
instanceId: ckafka-qzoeaqx8
instanceName: ckafka-instance
topicId: topic-c6tm4kpm
topicName: name
vip: 172.16.112.23
vport: '9092'
compression: 1
content:
enableTag: true
metaFields:
- __FILENAME__
- __HOSTNAME__
- __PKGID__
- __SOURCE__
- __TIMESTAMP__
tagJsonNotTiled: true
timestampAccuracy: 2
needContent: true
topicId: 7e34a3a7-635e-4da8-9005-88106c1fde69
Create ClsCkafkaConsumer Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ClsCkafkaConsumer(name: string, args: ClsCkafkaConsumerArgs, opts?: CustomResourceOptions);
@overload
def ClsCkafkaConsumer(resource_name: str,
args: ClsCkafkaConsumerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ClsCkafkaConsumer(resource_name: str,
opts: Optional[ResourceOptions] = None,
topic_id: Optional[str] = None,
ckafka: Optional[ClsCkafkaConsumerCkafkaArgs] = None,
cls_ckafka_consumer_id: Optional[str] = None,
compression: Optional[float] = None,
content: Optional[ClsCkafkaConsumerContentArgs] = None,
need_content: Optional[bool] = None)
func NewClsCkafkaConsumer(ctx *Context, name string, args ClsCkafkaConsumerArgs, opts ...ResourceOption) (*ClsCkafkaConsumer, error)
public ClsCkafkaConsumer(string name, ClsCkafkaConsumerArgs args, CustomResourceOptions? opts = null)
public ClsCkafkaConsumer(String name, ClsCkafkaConsumerArgs args)
public ClsCkafkaConsumer(String name, ClsCkafkaConsumerArgs args, CustomResourceOptions options)
type: tencentcloud:ClsCkafkaConsumer
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 ClsCkafkaConsumerArgs
- 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 ClsCkafkaConsumerArgs
- 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 ClsCkafkaConsumerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClsCkafkaConsumerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ClsCkafkaConsumerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ClsCkafkaConsumer 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 ClsCkafkaConsumer resource accepts the following input properties:
- Topic
Id string - topic id.
- Ckafka
Cls
Ckafka Consumer Ckafka - ckafka info.
- Cls
Ckafka stringConsumer Id - ID of the resource.
- Compression double
- compression method. 0 for NONE, 2 for SNAPPY, 3 for LZ4.
- Content
Cls
Ckafka Consumer Content - metadata information.
- Need
Content bool - whether to deliver the metadata information of the log.
- Topic
Id string - topic id.
- Ckafka
Cls
Ckafka Consumer Ckafka Args - ckafka info.
- Cls
Ckafka stringConsumer Id - ID of the resource.
- Compression float64
- compression method. 0 for NONE, 2 for SNAPPY, 3 for LZ4.
- Content
Cls
Ckafka Consumer Content Args - metadata information.
- Need
Content bool - whether to deliver the metadata information of the log.
- topic
Id String - topic id.
- ckafka
Cls
Ckafka Consumer Ckafka - ckafka info.
- cls
Ckafka StringConsumer Id - ID of the resource.
- compression Double
- compression method. 0 for NONE, 2 for SNAPPY, 3 for LZ4.
- content
Cls
Ckafka Consumer Content - metadata information.
- need
Content Boolean - whether to deliver the metadata information of the log.
- topic
Id string - topic id.
- ckafka
Cls
Ckafka Consumer Ckafka - ckafka info.
- cls
Ckafka stringConsumer Id - ID of the resource.
- compression number
- compression method. 0 for NONE, 2 for SNAPPY, 3 for LZ4.
- content
Cls
Ckafka Consumer Content - metadata information.
- need
Content boolean - whether to deliver the metadata information of the log.
- topic_
id str - topic id.
- ckafka
Cls
Ckafka Consumer Ckafka Args - ckafka info.
- cls_
ckafka_ strconsumer_ id - ID of the resource.
- compression float
- compression method. 0 for NONE, 2 for SNAPPY, 3 for LZ4.
- content
Cls
Ckafka Consumer Content Args - metadata information.
- need_
content bool - whether to deliver the metadata information of the log.
- topic
Id String - topic id.
- ckafka Property Map
- ckafka info.
- cls
Ckafka StringConsumer Id - ID of the resource.
- compression Number
- compression method. 0 for NONE, 2 for SNAPPY, 3 for LZ4.
- content Property Map
- metadata information.
- need
Content Boolean - whether to deliver the metadata information of the log.
Outputs
All input properties are implicitly available as output properties. Additionally, the ClsCkafkaConsumer 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 ClsCkafkaConsumer Resource
Get an existing ClsCkafkaConsumer 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?: ClsCkafkaConsumerState, opts?: CustomResourceOptions): ClsCkafkaConsumer
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
ckafka: Optional[ClsCkafkaConsumerCkafkaArgs] = None,
cls_ckafka_consumer_id: Optional[str] = None,
compression: Optional[float] = None,
content: Optional[ClsCkafkaConsumerContentArgs] = None,
need_content: Optional[bool] = None,
topic_id: Optional[str] = None) -> ClsCkafkaConsumer
func GetClsCkafkaConsumer(ctx *Context, name string, id IDInput, state *ClsCkafkaConsumerState, opts ...ResourceOption) (*ClsCkafkaConsumer, error)
public static ClsCkafkaConsumer Get(string name, Input<string> id, ClsCkafkaConsumerState? state, CustomResourceOptions? opts = null)
public static ClsCkafkaConsumer get(String name, Output<String> id, ClsCkafkaConsumerState state, CustomResourceOptions options)
resources: _: type: tencentcloud:ClsCkafkaConsumer 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.
- Ckafka
Cls
Ckafka Consumer Ckafka - ckafka info.
- Cls
Ckafka stringConsumer Id - ID of the resource.
- Compression double
- compression method. 0 for NONE, 2 for SNAPPY, 3 for LZ4.
- Content
Cls
Ckafka Consumer Content - metadata information.
- Need
Content bool - whether to deliver the metadata information of the log.
- Topic
Id string - topic id.
- Ckafka
Cls
Ckafka Consumer Ckafka Args - ckafka info.
- Cls
Ckafka stringConsumer Id - ID of the resource.
- Compression float64
- compression method. 0 for NONE, 2 for SNAPPY, 3 for LZ4.
- Content
Cls
Ckafka Consumer Content Args - metadata information.
- Need
Content bool - whether to deliver the metadata information of the log.
- Topic
Id string - topic id.
- ckafka
Cls
Ckafka Consumer Ckafka - ckafka info.
- cls
Ckafka StringConsumer Id - ID of the resource.
- compression Double
- compression method. 0 for NONE, 2 for SNAPPY, 3 for LZ4.
- content
Cls
Ckafka Consumer Content - metadata information.
- need
Content Boolean - whether to deliver the metadata information of the log.
- topic
Id String - topic id.
- ckafka
Cls
Ckafka Consumer Ckafka - ckafka info.
- cls
Ckafka stringConsumer Id - ID of the resource.
- compression number
- compression method. 0 for NONE, 2 for SNAPPY, 3 for LZ4.
- content
Cls
Ckafka Consumer Content - metadata information.
- need
Content boolean - whether to deliver the metadata information of the log.
- topic
Id string - topic id.
- ckafka
Cls
Ckafka Consumer Ckafka Args - ckafka info.
- cls_
ckafka_ strconsumer_ id - ID of the resource.
- compression float
- compression method. 0 for NONE, 2 for SNAPPY, 3 for LZ4.
- content
Cls
Ckafka Consumer Content Args - metadata information.
- need_
content bool - whether to deliver the metadata information of the log.
- topic_
id str - topic id.
- ckafka Property Map
- ckafka info.
- cls
Ckafka StringConsumer Id - ID of the resource.
- compression Number
- compression method. 0 for NONE, 2 for SNAPPY, 3 for LZ4.
- content Property Map
- metadata information.
- need
Content Boolean - whether to deliver the metadata information of the log.
- topic
Id String - topic id.
Supporting Types
ClsCkafkaConsumerCkafka, ClsCkafkaConsumerCkafkaArgs
- Instance
Id string - instance id.
- Instance
Name string - instance name.
- Topic
Id string - topic id of ckafka.
- Topic
Name string - topic name of ckafka.
- Vip string
- vip.
- Vport string
- vport.
- Instance
Id string - instance id.
- Instance
Name string - instance name.
- Topic
Id string - topic id of ckafka.
- Topic
Name string - topic name of ckafka.
- Vip string
- vip.
- Vport string
- vport.
- instance
Id String - instance id.
- instance
Name String - instance name.
- topic
Id String - topic id of ckafka.
- topic
Name String - topic name of ckafka.
- vip String
- vip.
- vport String
- vport.
- instance
Id string - instance id.
- instance
Name string - instance name.
- topic
Id string - topic id of ckafka.
- topic
Name string - topic name of ckafka.
- vip string
- vip.
- vport string
- vport.
- instance_
id str - instance id.
- instance_
name str - instance name.
- topic_
id str - topic id of ckafka.
- topic_
name str - topic name of ckafka.
- vip str
- vip.
- vport str
- vport.
- instance
Id String - instance id.
- instance
Name String - instance name.
- topic
Id String - topic id of ckafka.
- topic
Name String - topic name of ckafka.
- vip String
- vip.
- vport String
- vport.
ClsCkafkaConsumerContent, ClsCkafkaConsumerContentArgs
- Enable
Tag bool - whether to deliver the TAG info.
- Meta
Fields List<string> - metadata info list.
- Tag
Json boolNot Tiled - whether to tiling tag json.
- Timestamp
Accuracy double - delivery timestamp precision,1 for second, 2 for millisecond.
- Enable
Tag bool - whether to deliver the TAG info.
- Meta
Fields []string - metadata info list.
- Tag
Json boolNot Tiled - whether to tiling tag json.
- Timestamp
Accuracy float64 - delivery timestamp precision,1 for second, 2 for millisecond.
- enable
Tag Boolean - whether to deliver the TAG info.
- meta
Fields List<String> - metadata info list.
- tag
Json BooleanNot Tiled - whether to tiling tag json.
- timestamp
Accuracy Double - delivery timestamp precision,1 for second, 2 for millisecond.
- enable
Tag boolean - whether to deliver the TAG info.
- meta
Fields string[] - metadata info list.
- tag
Json booleanNot Tiled - whether to tiling tag json.
- timestamp
Accuracy number - delivery timestamp precision,1 for second, 2 for millisecond.
- enable_
tag bool - whether to deliver the TAG info.
- meta_
fields Sequence[str] - metadata info list.
- tag_
json_ boolnot_ tiled - whether to tiling tag json.
- timestamp_
accuracy float - delivery timestamp precision,1 for second, 2 for millisecond.
- enable
Tag Boolean - whether to deliver the TAG info.
- meta
Fields List<String> - metadata info list.
- tag
Json BooleanNot Tiled - whether to tiling tag json.
- timestamp
Accuracy Number - delivery timestamp precision,1 for second, 2 for millisecond.
Import
cls ckafka_consumer can be imported using the id, e.g.
$ pulumi import tencentcloud:index/clsCkafkaConsumer:ClsCkafkaConsumer ckafka_consumer topic_id
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.