1. Packages
  2. Upstash
  3. API Docs
  4. getKafkaCluster
Upstash v0.3.14 published on Friday, Aug 9, 2024 by Upstash

upstash.getKafkaCluster

Explore with Pulumi AI

upstash logo
Upstash v0.3.14 published on Friday, Aug 9, 2024 by Upstash

    Example Usage

    using Pulumi;
    using Upstash = Pulumi.Upstash;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var clusterData = Output.Create(Upstash.GetKafkaCluster.InvokeAsync(new Upstash.GetKafkaClusterArgs
            {
                ClusterId = resource.Upstash_kafka_cluster.ExampleCluster.Cluster_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.LookupKafkaCluster(ctx, &GetKafkaClusterArgs{
    			ClusterId: resource.Upstash_kafka_cluster.ExampleCluster.Cluster_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 clusterData = Output.of(UpstashFunctions.getKafkaCluster(GetKafkaClusterArgs.builder()
                .clusterId(resource.upstash_kafka_cluster().exampleCluster().cluster_id())
                .build()));
    
        }
    }
    
    import pulumi
    import pulumi_upstash as upstash
    
    cluster_data = upstash.get_kafka_cluster(cluster_id=resource["upstash_kafka_cluster"]["exampleCluster"]["cluster_id"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as upstash from "@pulumi/upstash";
    
    const clusterData = upstash.getKafkaCluster({
        clusterId: resource.upstash_kafka_cluster.exampleCluster.cluster_id,
    });
    
    variables:
      clusterData:
        Fn::Invoke:
          Function: upstash:getKafkaCluster
          Arguments:
            clusterId: ${resource.upstash_kafka_cluster.exampleCluster.cluster_id}
    

    Using getKafkaCluster

    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 getKafkaCluster(args: GetKafkaClusterArgs, opts?: InvokeOptions): Promise<GetKafkaClusterResult>
    function getKafkaClusterOutput(args: GetKafkaClusterOutputArgs, opts?: InvokeOptions): Output<GetKafkaClusterResult>
    def get_kafka_cluster(cluster_id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetKafkaClusterResult
    def get_kafka_cluster_output(cluster_id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetKafkaClusterResult]
    func LookupKafkaCluster(ctx *Context, args *LookupKafkaClusterArgs, opts ...InvokeOption) (*LookupKafkaClusterResult, error)
    func LookupKafkaClusterOutput(ctx *Context, args *LookupKafkaClusterOutputArgs, opts ...InvokeOption) LookupKafkaClusterResultOutput

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

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

    The following arguments are supported:

    ClusterId string
    ClusterId string
    clusterId String
    clusterId string
    clusterId String

    getKafkaCluster Result

    The following output properties are available:

    ClusterId string
    ClusterName string
    CreationTime int
    Id string
    The provider-assigned unique ID for this managed resource.
    MaxMessageSize int
    MaxMessagesPerSecond int
    MaxPartitions int
    MaxRetentionSize int
    MaxRetentionTime int
    Multizone bool
    Password string
    Region string
    RestEndpoint string
    State string
    TcpEndpoint string
    Type string
    Username string
    ClusterId string
    ClusterName string
    CreationTime int
    Id string
    The provider-assigned unique ID for this managed resource.
    MaxMessageSize int
    MaxMessagesPerSecond int
    MaxPartitions int
    MaxRetentionSize int
    MaxRetentionTime int
    Multizone bool
    Password string
    Region string
    RestEndpoint string
    State string
    TcpEndpoint string
    Type string
    Username string
    clusterId String
    clusterName String
    creationTime Integer
    id String
    The provider-assigned unique ID for this managed resource.
    maxMessageSize Integer
    maxMessagesPerSecond Integer
    maxPartitions Integer
    maxRetentionSize Integer
    maxRetentionTime Integer
    multizone Boolean
    password String
    region String
    restEndpoint String
    state String
    tcpEndpoint String
    type String
    username String
    clusterId string
    clusterName string
    creationTime number
    id string
    The provider-assigned unique ID for this managed resource.
    maxMessageSize number
    maxMessagesPerSecond number
    maxPartitions number
    maxRetentionSize number
    maxRetentionTime number
    multizone boolean
    password string
    region string
    restEndpoint string
    state string
    tcpEndpoint string
    type string
    username string
    clusterId String
    clusterName String
    creationTime Number
    id String
    The provider-assigned unique ID for this managed resource.
    maxMessageSize Number
    maxMessagesPerSecond Number
    maxPartitions Number
    maxRetentionSize Number
    maxRetentionTime Number
    multizone Boolean
    password String
    region String
    restEndpoint String
    state String
    tcpEndpoint String
    type 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.3.14 published on Friday, Aug 9, 2024 by Upstash