1. Packages
  2. Upstash
  3. API Docs
  4. getKafkaTopic
Upstash v0.2.0 published on Wednesday, May 24, 2023 by Upstash

upstash.getKafkaTopic

Explore with Pulumi AI

upstash logo
Upstash v0.2.0 published on Wednesday, May 24, 2023 by Upstash

    Example Usage

    using Pulumi;
    using Upstash = Pulumi.Upstash;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var kafkaTopicData = Output.Create(Upstash.GetKafkaTopic.InvokeAsync(new Upstash.GetKafkaTopicArgs
            {
                TopicId = resource.Upstash_kafka_topic.ExampleKafkaTopic.Topic_id,
            }));
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-upstash/sdk/go/upstash"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/upstash/pulumi-upstash/sdk/go/upstash"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := upstash.LookupKafkaTopic(ctx, &GetKafkaTopicArgs{
    			TopicId: resource.Upstash_kafka_topic.ExampleKafkaTopic.Topic_id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import java.util.*;
    import java.io.*;
    import java.nio.*;
    import com.pulumi.*;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var kafkaTopicData = Output.of(UpstashFunctions.getKafkaTopic(GetKafkaTopicArgs.builder()
                .topicId(resource.upstash_kafka_topic().exampleKafkaTopic().topic_id())
                .build()));
    
        }
    }
    
    import pulumi
    import pulumi_upstash as upstash
    
    kafka_topic_data = upstash.get_kafka_topic(topic_id=resource["upstash_kafka_topic"]["exampleKafkaTopic"]["topic_id"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as upstash from "@pulumi/upstash";
    
    const kafkaTopicData = upstash.getKafkaTopic({
        topicId: resource.upstash_kafka_topic.exampleKafkaTopic.topic_id,
    });
    
    variables:
      kafkaTopicData:
        Fn::Invoke:
          Function: upstash:getKafkaTopic
          Arguments:
            topicId: ${resource.upstash_kafka_topic.exampleKafkaTopic.topic_id}
    

    Using getKafkaTopic

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getKafkaTopic(args: GetKafkaTopicArgs, opts?: InvokeOptions): Promise<GetKafkaTopicResult>
    function getKafkaTopicOutput(args: GetKafkaTopicOutputArgs, opts?: InvokeOptions): Output<GetKafkaTopicResult>
    def get_kafka_topic(topic_id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetKafkaTopicResult
    def get_kafka_topic_output(topic_id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetKafkaTopicResult]
    func LookupKafkaTopic(ctx *Context, args *LookupKafkaTopicArgs, opts ...InvokeOption) (*LookupKafkaTopicResult, error)
    func LookupKafkaTopicOutput(ctx *Context, args *LookupKafkaTopicOutputArgs, opts ...InvokeOption) LookupKafkaTopicResultOutput

    > Note: This function is named LookupKafkaTopic in the Go SDK.

    public static class GetKafkaTopic 
    {
        public static Task<GetKafkaTopicResult> InvokeAsync(GetKafkaTopicArgs args, InvokeOptions? opts = null)
        public static Output<GetKafkaTopicResult> Invoke(GetKafkaTopicInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetKafkaTopicResult> getKafkaTopic(GetKafkaTopicArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: upstash:index/getKafkaTopic:getKafkaTopic
      arguments:
        # arguments dictionary

    The following arguments are supported:

    TopicId string
    TopicId string
    topicId String
    topicId string
    topicId String

    getKafkaTopic Result

    The following output properties are available:

    CleanupPolicy string
    ClusterId string
    CreationTime int
    Id string
    The provider-assigned unique ID for this managed resource.
    MaxMessageSize int
    Multizone bool
    Partitions int
    Password string
    Region string
    RestEndpoint string
    RetentionSize int
    RetentionTime int
    State string
    TcpEndpoint string
    TopicId string
    TopicName string
    Username string
    CleanupPolicy string
    ClusterId string
    CreationTime int
    Id string
    The provider-assigned unique ID for this managed resource.
    MaxMessageSize int
    Multizone bool
    Partitions int
    Password string
    Region string
    RestEndpoint string
    RetentionSize int
    RetentionTime int
    State string
    TcpEndpoint string
    TopicId string
    TopicName string
    Username string
    cleanupPolicy String
    clusterId String
    creationTime Integer
    id String
    The provider-assigned unique ID for this managed resource.
    maxMessageSize Integer
    multizone Boolean
    partitions Integer
    password String
    region String
    restEndpoint String
    retentionSize Integer
    retentionTime Integer
    state String
    tcpEndpoint String
    topicId String
    topicName String
    username String
    cleanupPolicy string
    clusterId string
    creationTime number
    id string
    The provider-assigned unique ID for this managed resource.
    maxMessageSize number
    multizone boolean
    partitions number
    password string
    region string
    restEndpoint string
    retentionSize number
    retentionTime number
    state string
    tcpEndpoint string
    topicId string
    topicName string
    username string
    cleanup_policy str
    cluster_id str
    creation_time int
    id str
    The provider-assigned unique ID for this managed resource.
    max_message_size int
    multizone bool
    partitions int
    password str
    region str
    rest_endpoint str
    retention_size int
    retention_time int
    state str
    tcp_endpoint str
    topic_id str
    topic_name str
    username str
    cleanupPolicy String
    clusterId String
    creationTime Number
    id String
    The provider-assigned unique ID for this managed resource.
    maxMessageSize Number
    multizone Boolean
    partitions Number
    password String
    region String
    restEndpoint String
    retentionSize Number
    retentionTime Number
    state String
    tcpEndpoint String
    topicId String
    topicName String
    username String

    Package Details

    Repository
    upstash upstash/pulumi-upstash
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the upstash Terraform Provider.
    upstash logo
    Upstash v0.2.0 published on Wednesday, May 24, 2023 by Upstash