1. Packages
  2. Volcengine
  3. API Docs
  4. tls
  5. KafkaConsumer
Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine

volcengine.tls.KafkaConsumer

Explore with Pulumi AI

Provides a resource to manage tls kafka consumer

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";

const foo = new volcengine.tls.KafkaConsumer("foo", {topicId: "cfb5c08b-0c7a-44fa-8971-8afc12f1b123"});
Copy
import pulumi
import pulumi_volcengine as volcengine

foo = volcengine.tls.KafkaConsumer("foo", topic_id="cfb5c08b-0c7a-44fa-8971-8afc12f1b123")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/tls"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tls.NewKafkaConsumer(ctx, "foo", &tls.KafkaConsumerArgs{
			TopicId: pulumi.String("cfb5c08b-0c7a-44fa-8971-8afc12f1b123"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;

return await Deployment.RunAsync(() => 
{
    var foo = new Volcengine.Tls.KafkaConsumer("foo", new()
    {
        TopicId = "cfb5c08b-0c7a-44fa-8971-8afc12f1b123",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.tls.KafkaConsumer;
import com.pulumi.volcengine.tls.KafkaConsumerArgs;
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 foo = new KafkaConsumer("foo", KafkaConsumerArgs.builder()        
            .topicId("cfb5c08b-0c7a-44fa-8971-8afc12f1b123")
            .build());

    }
}
Copy
resources:
  foo:
    type: volcengine:tls:KafkaConsumer
    properties:
      topicId: cfb5c08b-0c7a-44fa-8971-8afc12f1b123
Copy

Create KafkaConsumer Resource

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

Constructor syntax

new KafkaConsumer(name: string, args: KafkaConsumerArgs, opts?: CustomResourceOptions);
@overload
def KafkaConsumer(resource_name: str,
                  args: KafkaConsumerArgs,
                  opts: Optional[ResourceOptions] = None)

@overload
def KafkaConsumer(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  topic_id: Optional[str] = None)
func NewKafkaConsumer(ctx *Context, name string, args KafkaConsumerArgs, opts ...ResourceOption) (*KafkaConsumer, error)
public KafkaConsumer(string name, KafkaConsumerArgs args, CustomResourceOptions? opts = null)
public KafkaConsumer(String name, KafkaConsumerArgs args)
public KafkaConsumer(String name, KafkaConsumerArgs args, CustomResourceOptions options)
type: volcengine:tls:KafkaConsumer
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. KafkaConsumerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. KafkaConsumerArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. KafkaConsumerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. KafkaConsumerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. KafkaConsumerArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var kafkaConsumerResource = new Volcengine.Tls.KafkaConsumer("kafkaConsumerResource", new()
{
    TopicId = "string",
});
Copy
example, err := tls.NewKafkaConsumer(ctx, "kafkaConsumerResource", &tls.KafkaConsumerArgs{
	TopicId: pulumi.String("string"),
})
Copy
var kafkaConsumerResource = new KafkaConsumer("kafkaConsumerResource", KafkaConsumerArgs.builder()
    .topicId("string")
    .build());
Copy
kafka_consumer_resource = volcengine.tls.KafkaConsumer("kafkaConsumerResource", topic_id="string")
Copy
const kafkaConsumerResource = new volcengine.tls.KafkaConsumer("kafkaConsumerResource", {topicId: "string"});
Copy
type: volcengine:tls:KafkaConsumer
properties:
    topicId: string
Copy

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

TopicId
This property is required.
Changes to this property will trigger replacement.
string
The id of topic.
TopicId
This property is required.
Changes to this property will trigger replacement.
string
The id of topic.
topicId
This property is required.
Changes to this property will trigger replacement.
String
The id of topic.
topicId
This property is required.
Changes to this property will trigger replacement.
string
The id of topic.
topic_id
This property is required.
Changes to this property will trigger replacement.
str
The id of topic.
topicId
This property is required.
Changes to this property will trigger replacement.
String
The id of topic.

Outputs

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

AllowConsume bool
Whether allow consume.
ConsumeTopic string
The topic of consume.
Id string
The provider-assigned unique ID for this managed resource.
AllowConsume bool
Whether allow consume.
ConsumeTopic string
The topic of consume.
Id string
The provider-assigned unique ID for this managed resource.
allowConsume Boolean
Whether allow consume.
consumeTopic String
The topic of consume.
id String
The provider-assigned unique ID for this managed resource.
allowConsume boolean
Whether allow consume.
consumeTopic string
The topic of consume.
id string
The provider-assigned unique ID for this managed resource.
allow_consume bool
Whether allow consume.
consume_topic str
The topic of consume.
id str
The provider-assigned unique ID for this managed resource.
allowConsume Boolean
Whether allow consume.
consumeTopic String
The topic of consume.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing KafkaConsumer Resource

Get an existing KafkaConsumer 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?: KafkaConsumerState, opts?: CustomResourceOptions): KafkaConsumer
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        allow_consume: Optional[bool] = None,
        consume_topic: Optional[str] = None,
        topic_id: Optional[str] = None) -> KafkaConsumer
func GetKafkaConsumer(ctx *Context, name string, id IDInput, state *KafkaConsumerState, opts ...ResourceOption) (*KafkaConsumer, error)
public static KafkaConsumer Get(string name, Input<string> id, KafkaConsumerState? state, CustomResourceOptions? opts = null)
public static KafkaConsumer get(String name, Output<String> id, KafkaConsumerState state, CustomResourceOptions options)
resources:  _:    type: volcengine:tls:KafkaConsumer    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AllowConsume bool
Whether allow consume.
ConsumeTopic string
The topic of consume.
TopicId Changes to this property will trigger replacement. string
The id of topic.
AllowConsume bool
Whether allow consume.
ConsumeTopic string
The topic of consume.
TopicId Changes to this property will trigger replacement. string
The id of topic.
allowConsume Boolean
Whether allow consume.
consumeTopic String
The topic of consume.
topicId Changes to this property will trigger replacement. String
The id of topic.
allowConsume boolean
Whether allow consume.
consumeTopic string
The topic of consume.
topicId Changes to this property will trigger replacement. string
The id of topic.
allow_consume bool
Whether allow consume.
consume_topic str
The topic of consume.
topic_id Changes to this property will trigger replacement. str
The id of topic.
allowConsume Boolean
Whether allow consume.
consumeTopic String
The topic of consume.
topicId Changes to this property will trigger replacement. String
The id of topic.

Import

Tls Kafka Consumer can be imported using the kafka:topic_id, e.g.

$ pulumi import volcengine:tls/kafkaConsumer:KafkaConsumer default kafka:edf051ed-3c46-49ba-9339-bea628fedc15
Copy

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

Package Details

Repository
volcengine volcengine/pulumi-volcengine
License
Apache-2.0
Notes
This Pulumi package is based on the volcengine Terraform Provider.