1. Packages
  2. OVH
  3. API Docs
  4. CloudProjectDatabase
  5. getKafkaTopic
OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud

ovh.CloudProjectDatabase.getKafkaTopic

Explore with Pulumi AI

ovh logo
OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud

    Use this data source to get information about a topic of a kafka cluster associated with a public cloud project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@pulumi/ovh";
    
    const topic = ovh.CloudProjectDatabase.getKafkaTopic({
        serviceName: "XXX",
        clusterId: "YYY",
        id: "ZZZ",
    });
    export const topicName = topic.then(topic => topic.name);
    
    import pulumi
    import pulumi_ovh as ovh
    
    topic = ovh.CloudProjectDatabase.get_kafka_topic(service_name="XXX",
        cluster_id="YYY",
        id="ZZZ")
    pulumi.export("topicName", topic.name)
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/go/ovh/CloudProjectDatabase"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		topic, err := CloudProjectDatabase.GetKafkaTopic(ctx, &cloudprojectdatabase.GetKafkaTopicArgs{
    			ServiceName: "XXX",
    			ClusterId:   "YYY",
    			Id:          "ZZZ",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("topicName", topic.Name)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var topic = Ovh.CloudProjectDatabase.GetKafkaTopic.Invoke(new()
        {
            ServiceName = "XXX",
            ClusterId = "YYY",
            Id = "ZZZ",
        });
    
        return new Dictionary<string, object?>
        {
            ["topicName"] = topic.Apply(getKafkaTopicResult => getKafkaTopicResult.Name),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.CloudProjectDatabase.CloudProjectDatabaseFunctions;
    import com.pulumi.ovh.CloudProjectDatabase.inputs.GetKafkaTopicArgs;
    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) {
            final var topic = CloudProjectDatabaseFunctions.getKafkaTopic(GetKafkaTopicArgs.builder()
                .serviceName("XXX")
                .clusterId("YYY")
                .id("ZZZ")
                .build());
    
            ctx.export("topicName", topic.applyValue(getKafkaTopicResult -> getKafkaTopicResult.name()));
        }
    }
    
    variables:
      topic:
        fn::invoke:
          Function: ovh:CloudProjectDatabase:getKafkaTopic
          Arguments:
            serviceName: XXX
            clusterId: YYY
            id: ZZZ
    outputs:
      topicName: ${topic.name}
    

    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(cluster_id: Optional[str] = None,
                        id: Optional[str] = None,
                        service_name: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetKafkaTopicResult
    def get_kafka_topic_output(cluster_id: Optional[pulumi.Input[str]] = None,
                        id: Optional[pulumi.Input[str]] = None,
                        service_name: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetKafkaTopicResult]
    func GetKafkaTopic(ctx *Context, args *GetKafkaTopicArgs, opts ...InvokeOption) (*GetKafkaTopicResult, error)
    func GetKafkaTopicOutput(ctx *Context, args *GetKafkaTopicOutputArgs, opts ...InvokeOption) GetKafkaTopicResultOutput

    > Note: This function is named GetKafkaTopic 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: ovh:CloudProjectDatabase/getKafkaTopic:getKafkaTopic
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ClusterId string
    Cluster ID
    Id string
    Topic ID
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    ClusterId string
    Cluster ID
    Id string
    Topic ID
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    clusterId String
    Cluster ID
    id String
    Topic ID
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    clusterId string
    Cluster ID
    id string
    Topic ID
    serviceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    cluster_id str
    Cluster ID
    id str
    Topic ID
    service_name str
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    clusterId String
    Cluster ID
    id String
    Topic ID
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

    getKafkaTopic Result

    The following output properties are available:

    ClusterId string
    See Argument Reference above.
    Id string
    See Argument Reference above.
    MinInsyncReplicas int
    Minimum insync replica accepted for this topic.
    Name string
    Name of the topic.
    Partitions int
    Number of partitions for this topic.
    Replication int
    Number of replication for this topic.
    RetentionBytes int
    Number of bytes for the retention of the data for this topic. Inferior to 0 mean Unlimited
    RetentionHours int
    Number of hours for the retention of the data for this topic. Inferior to 0 mean Unlimited
    ServiceName string
    See Argument Reference above.
    ClusterId string
    See Argument Reference above.
    Id string
    See Argument Reference above.
    MinInsyncReplicas int
    Minimum insync replica accepted for this topic.
    Name string
    Name of the topic.
    Partitions int
    Number of partitions for this topic.
    Replication int
    Number of replication for this topic.
    RetentionBytes int
    Number of bytes for the retention of the data for this topic. Inferior to 0 mean Unlimited
    RetentionHours int
    Number of hours for the retention of the data for this topic. Inferior to 0 mean Unlimited
    ServiceName string
    See Argument Reference above.
    clusterId String
    See Argument Reference above.
    id String
    See Argument Reference above.
    minInsyncReplicas Integer
    Minimum insync replica accepted for this topic.
    name String
    Name of the topic.
    partitions Integer
    Number of partitions for this topic.
    replication Integer
    Number of replication for this topic.
    retentionBytes Integer
    Number of bytes for the retention of the data for this topic. Inferior to 0 mean Unlimited
    retentionHours Integer
    Number of hours for the retention of the data for this topic. Inferior to 0 mean Unlimited
    serviceName String
    See Argument Reference above.
    clusterId string
    See Argument Reference above.
    id string
    See Argument Reference above.
    minInsyncReplicas number
    Minimum insync replica accepted for this topic.
    name string
    Name of the topic.
    partitions number
    Number of partitions for this topic.
    replication number
    Number of replication for this topic.
    retentionBytes number
    Number of bytes for the retention of the data for this topic. Inferior to 0 mean Unlimited
    retentionHours number
    Number of hours for the retention of the data for this topic. Inferior to 0 mean Unlimited
    serviceName string
    See Argument Reference above.
    cluster_id str
    See Argument Reference above.
    id str
    See Argument Reference above.
    min_insync_replicas int
    Minimum insync replica accepted for this topic.
    name str
    Name of the topic.
    partitions int
    Number of partitions for this topic.
    replication int
    Number of replication for this topic.
    retention_bytes int
    Number of bytes for the retention of the data for this topic. Inferior to 0 mean Unlimited
    retention_hours int
    Number of hours for the retention of the data for this topic. Inferior to 0 mean Unlimited
    service_name str
    See Argument Reference above.
    clusterId String
    See Argument Reference above.
    id String
    See Argument Reference above.
    minInsyncReplicas Number
    Minimum insync replica accepted for this topic.
    name String
    Name of the topic.
    partitions Number
    Number of partitions for this topic.
    replication Number
    Number of replication for this topic.
    retentionBytes Number
    Number of bytes for the retention of the data for this topic. Inferior to 0 mean Unlimited
    retentionHours Number
    Number of hours for the retention of the data for this topic. Inferior to 0 mean Unlimited
    serviceName String
    See Argument Reference above.

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud