1. Packages
  2. Volcengine
  3. API Docs
  4. tls
  5. KafkaConsumer
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

volcengine.tls.KafkaConsumer

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

    Provides a resource to manage tls kafka consumer

    Example Usage

    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",
        });
    
    });
    
    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
    	})
    }
    
    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());
    
        }
    }
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo = volcengine.tls.KafkaConsumer("foo", topic_id="cfb5c08b-0c7a-44fa-8971-8afc12f1b123")
    
    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"});
    
    resources:
      foo:
        type: volcengine:tls:KafkaConsumer
        properties:
          topicId: cfb5c08b-0c7a-44fa-8971-8afc12f1b123
    

    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 string
    The unique name of the resource.
    args KafkaConsumerArgs
    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 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 string
    The unique name of the resource.
    args KafkaConsumerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args KafkaConsumerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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",
    });
    
    example, err := tls.NewKafkaConsumer(ctx, "kafkaConsumerResource", &tls.KafkaConsumerArgs{
    	TopicId: pulumi.String("string"),
    })
    
    var kafkaConsumerResource = new KafkaConsumer("kafkaConsumerResource", KafkaConsumerArgs.builder()
        .topicId("string")
        .build());
    
    kafka_consumer_resource = volcengine.tls.KafkaConsumer("kafkaConsumerResource", topic_id="string")
    
    const kafkaConsumerResource = new volcengine.tls.KafkaConsumer("kafkaConsumerResource", {topicId: "string"});
    
    type: volcengine:tls:KafkaConsumer
    properties:
        topicId: string
    

    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

    The KafkaConsumer resource accepts the following input properties:

    TopicId string
    The id of topic.
    TopicId string
    The id of topic.
    topicId String
    The id of topic.
    topicId string
    The id of topic.
    topic_id str
    The id of topic.
    topicId 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)
    Resource lookup is not supported in YAML
    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:
    AllowConsume bool
    Whether allow consume.
    ConsumeTopic string
    The topic of consume.
    TopicId string
    The id of topic.
    AllowConsume bool
    Whether allow consume.
    ConsumeTopic string
    The topic of consume.
    TopicId string
    The id of topic.
    allowConsume Boolean
    Whether allow consume.
    consumeTopic String
    The topic of consume.
    topicId String
    The id of topic.
    allowConsume boolean
    Whether allow consume.
    consumeTopic string
    The topic of consume.
    topicId string
    The id of topic.
    allow_consume bool
    Whether allow consume.
    consume_topic str
    The topic of consume.
    topic_id str
    The id of topic.
    allowConsume Boolean
    Whether allow consume.
    consumeTopic String
    The topic of consume.
    topicId 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
    

    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.
    volcengine logo
    Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine