<gh_stars>0// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Lbrlabs.PulumiPackage.Ovh.CloudProjectDatabase
{
    public static class GetKafkaTopic
    {
        /// <summary>
        /// Use this data source to get information about a topic of a kafka cluster associated with a public cloud project.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using System.Linq;
        /// using Pulumi;
        /// using Ovh = Pulumi.Ovh;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var topic = Ovh.CloudProjectDatabase.GetKafkaTopic.Invoke(new()
        ///     {
        ///         ServiceName = "XXX",
        ///         ClusterId = "YYY",
        ///         Id = "ZZZ",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["topicName"] = topic.Apply(getKafkaTopicResult =&gt; getKafkaTopicResult.Name),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetKafkaTopicResult> InvokeAsync(GetKafkaTopicArgs args, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.InvokeAsync<GetKafkaTopicResult>("ovh:CloudProjectDatabase/getKafkaTopic:getKafkaTopic", args ?? new GetKafkaTopicArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to get information about a topic of a kafka cluster associated with a public cloud project.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using System.Linq;
        /// using Pulumi;
        /// using Ovh = Pulumi.Ovh;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var topic = Ovh.CloudProjectDatabase.GetKafkaTopic.Invoke(new()
        ///     {
        ///         ServiceName = "XXX",
        ///         ClusterId = "YYY",
        ///         Id = "ZZZ",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["topicName"] = topic.Apply(getKafkaTopicResult =&gt; getKafkaTopicResult.Name),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetKafkaTopicResult> Invoke(GetKafkaTopicInvokeArgs args, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.Invoke<GetKafkaTopicResult>("ovh:CloudProjectDatabase/getKafkaTopic:getKafkaTopic", args ?? new GetKafkaTopicInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetKafkaTopicArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Cluster ID
        /// </summary>
        [Input("clusterId", required: true)]
        public string ClusterId { get; set; } = null!;

        /// <summary>
        /// Topic ID
        /// </summary>
        [Input("id", required: true)]
        public string Id { get; set; } = null!;

        /// <summary>
        /// The id of the public cloud project. If omitted,
        /// the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
        /// </summary>
        [Input("serviceName", required: true)]
        public string ServiceName { get; set; } = null!;

        public GetKafkaTopicArgs()
        {
        }
        public static new GetKafkaTopicArgs Empty => new GetKafkaTopicArgs();
    }

    public sealed class GetKafkaTopicInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Cluster ID
        /// </summary>
        [Input("clusterId", required: true)]
        public Input<string> ClusterId { get; set; } = null!;

        /// <summary>
        /// Topic ID
        /// </summary>
        [Input("id", required: true)]
        public Input<string> Id { get; set; } = null!;

        /// <summary>
        /// The id of the public cloud project. If omitted,
        /// the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
        /// </summary>
        [Input("serviceName", required: true)]
        public Input<string> ServiceName { get; set; } = null!;

        public GetKafkaTopicInvokeArgs()
        {
        }
        public static new GetKafkaTopicInvokeArgs Empty => new GetKafkaTopicInvokeArgs();
    }


    [OutputType]
    public sealed class GetKafkaTopicResult
    {
        /// <summary>
        /// See Argument Reference above.
        /// </summary>
        public readonly string ClusterId;
        /// <summary>
        /// See Argument Reference above.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// Minimum insync replica accepted for this topic.
        /// </summary>
        public readonly int MinInsyncReplicas;
        /// <summary>
        /// Name of the topic.
        /// </summary>
        public readonly string Name;
        /// <summary>
        /// Number of partitions for this topic.
        /// </summary>
        public readonly int Partitions;
        /// <summary>
        /// Number of replication for this topic.
        /// </summary>
        public readonly int Replication;
        /// <summary>
        /// Number of bytes for the retention of the data for this topic. Inferior to 0 mean Unlimited
        /// </summary>
        public readonly int RetentionBytes;
        /// <summary>
        /// Number of hours for the retention of the data for this topic. Inferior to 0 mean Unlimited
        /// </summary>
        public readonly int RetentionHours;
        /// <summary>
        /// See Argument Reference above.
        /// </summary>
        public readonly string ServiceName;

        [OutputConstructor]
        private GetKafkaTopicResult(
            string clusterId,

            string id,

            int minInsyncReplicas,

            string name,

            int partitions,

            int replication,

            int retentionBytes,

            int retentionHours,

            string serviceName)
        {
            ClusterId = clusterId;
            Id = id;
            MinInsyncReplicas = minInsyncReplicas;
            Name = name;
            Partitions = partitions;
            Replication = replication;
            RetentionBytes = retentionBytes;
            RetentionHours = retentionHours;
            ServiceName = serviceName;
        }
    }
}
