1. Packages
  2. Aiven
  3. API Docs
  4. getKafkaTopic
Aiven v6.18.0 published on Thursday, Jun 27, 2024 by Pulumi

aiven.getKafkaTopic

Explore with Pulumi AI

aiven logo
Aiven v6.18.0 published on Thursday, Jun 27, 2024 by Pulumi

    Gets information about an Aiven for Apache Kafka® topic.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aiven from "@pulumi/aiven";
    
    const exampleTopic = aiven.getKafkaTopic({
        project: exampleProject.project,
        serviceName: exampleKafka.serviceName,
        topicName: "example-topic",
    });
    
    import pulumi
    import pulumi_aiven as aiven
    
    example_topic = aiven.get_kafka_topic(project=example_project["project"],
        service_name=example_kafka["serviceName"],
        topic_name="example-topic")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := aiven.LookupKafkaTopic(ctx, &aiven.LookupKafkaTopicArgs{
    			Project:     exampleProject.Project,
    			ServiceName: exampleKafka.ServiceName,
    			TopicName:   "example-topic",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aiven = Pulumi.Aiven;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleTopic = Aiven.GetKafkaTopic.Invoke(new()
        {
            Project = exampleProject.Project,
            ServiceName = exampleKafka.ServiceName,
            TopicName = "example-topic",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aiven.AivenFunctions;
    import com.pulumi.aiven.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 exampleTopic = AivenFunctions.getKafkaTopic(GetKafkaTopicArgs.builder()
                .project(exampleProject.project())
                .serviceName(exampleKafka.serviceName())
                .topicName("example-topic")
                .build());
    
        }
    }
    
    variables:
      exampleTopic:
        fn::invoke:
          Function: aiven:getKafkaTopic
          Arguments:
            project: ${exampleProject.project}
            serviceName: ${exampleKafka.serviceName}
            topicName: example-topic
    

    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(project: Optional[str] = None,
                        service_name: Optional[str] = None,
                        topic_name: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetKafkaTopicResult
    def get_kafka_topic_output(project: Optional[pulumi.Input[str]] = None,
                        service_name: Optional[pulumi.Input[str]] = None,
                        topic_name: 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: aiven:index/getKafkaTopic:getKafkaTopic
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    ServiceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    TopicName string
    The name of the topic. Changing this property forces recreation of the resource.
    Project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    ServiceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    TopicName string
    The name of the topic. Changing this property forces recreation of the resource.
    project String
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    serviceName String
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    topicName String
    The name of the topic. Changing this property forces recreation of the resource.
    project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    serviceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    topicName string
    The name of the topic. Changing this property forces recreation of the resource.
    project str
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    service_name str
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    topic_name str
    The name of the topic. Changing this property forces recreation of the resource.
    project String
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    serviceName String
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    topicName String
    The name of the topic. Changing this property forces recreation of the resource.

    getKafkaTopic Result

    The following output properties are available:

    Configs List<GetKafkaTopicConfig>
    Kafka topic configuration.
    Id string
    The provider-assigned unique ID for this managed resource.
    Partitions int
    The number of partitions to create in the topic.
    Project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    Replication int
    The replication factor for the topic.
    ServiceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    Tags List<GetKafkaTopicTag>
    Tags for the Kafka topic.
    TerminationProtection bool
    TopicName string
    The name of the topic. Changing this property forces recreation of the resource.
    Configs []GetKafkaTopicConfig
    Kafka topic configuration.
    Id string
    The provider-assigned unique ID for this managed resource.
    Partitions int
    The number of partitions to create in the topic.
    Project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    Replication int
    The replication factor for the topic.
    ServiceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    Tags []GetKafkaTopicTag
    Tags for the Kafka topic.
    TerminationProtection bool
    TopicName string
    The name of the topic. Changing this property forces recreation of the resource.
    configs List<GetKafkaTopicConfig>
    Kafka topic configuration.
    id String
    The provider-assigned unique ID for this managed resource.
    partitions Integer
    The number of partitions to create in the topic.
    project String
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    replication Integer
    The replication factor for the topic.
    serviceName String
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    tags List<GetKafkaTopicTag>
    Tags for the Kafka topic.
    terminationProtection Boolean
    topicName String
    The name of the topic. Changing this property forces recreation of the resource.
    configs GetKafkaTopicConfig[]
    Kafka topic configuration.
    id string
    The provider-assigned unique ID for this managed resource.
    partitions number
    The number of partitions to create in the topic.
    project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    replication number
    The replication factor for the topic.
    serviceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    tags GetKafkaTopicTag[]
    Tags for the Kafka topic.
    terminationProtection boolean
    topicName string
    The name of the topic. Changing this property forces recreation of the resource.
    configs Sequence[GetKafkaTopicConfig]
    Kafka topic configuration.
    id str
    The provider-assigned unique ID for this managed resource.
    partitions int
    The number of partitions to create in the topic.
    project str
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    replication int
    The replication factor for the topic.
    service_name str
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    tags Sequence[GetKafkaTopicTag]
    Tags for the Kafka topic.
    termination_protection bool
    topic_name str
    The name of the topic. Changing this property forces recreation of the resource.
    configs List<Property Map>
    Kafka topic configuration.
    id String
    The provider-assigned unique ID for this managed resource.
    partitions Number
    The number of partitions to create in the topic.
    project String
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    replication Number
    The replication factor for the topic.
    serviceName String
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    tags List<Property Map>
    Tags for the Kafka topic.
    terminationProtection Boolean
    topicName String
    The name of the topic. Changing this property forces recreation of the resource.

    Supporting Types

    GetKafkaTopicConfig

    CleanupPolicy string
    cleanup.policy value
    CompressionType string
    compression.type value
    DeleteRetentionMs string
    delete.retention.ms value
    FileDeleteDelayMs string
    file.delete.delay.ms value
    FlushMessages string
    flush.messages value
    FlushMs string
    flush.ms value
    IndexIntervalBytes string
    index.interval.bytes value
    LocalRetentionBytes string
    local.retention.bytes value
    LocalRetentionMs string
    local.retention.ms value
    MaxCompactionLagMs string
    max.compaction.lag.ms value
    MaxMessageBytes string
    max.message.bytes value
    MessageDownconversionEnable bool
    message.downconversion.enable value
    MessageFormatVersion string
    message.format.version value
    MessageTimestampDifferenceMaxMs string
    message.timestamp.difference.max.ms value
    MessageTimestampType string
    message.timestamp.type value
    MinCleanableDirtyRatio double
    min.cleanable.dirty.ratio value
    MinCompactionLagMs string
    min.compaction.lag.ms value
    MinInsyncReplicas string
    min.insync.replicas value
    Preallocate bool
    preallocate value
    RemoteStorageEnable bool
    remote.storage.enable value
    RetentionBytes string
    retention.bytes value
    RetentionMs string
    retention.ms value
    SegmentBytes string
    segment.bytes value
    SegmentIndexBytes string
    segment.index.bytes value
    SegmentJitterMs string
    segment.jitter.ms value
    SegmentMs string
    segment.ms value
    UncleanLeaderElectionEnable bool
    unclean.leader.election.enable value; This field is deprecated and no longer functional.

    Deprecated: This field is deprecated and no longer functional.

    CleanupPolicy string
    cleanup.policy value
    CompressionType string
    compression.type value
    DeleteRetentionMs string
    delete.retention.ms value
    FileDeleteDelayMs string
    file.delete.delay.ms value
    FlushMessages string
    flush.messages value
    FlushMs string
    flush.ms value
    IndexIntervalBytes string
    index.interval.bytes value
    LocalRetentionBytes string
    local.retention.bytes value
    LocalRetentionMs string
    local.retention.ms value
    MaxCompactionLagMs string
    max.compaction.lag.ms value
    MaxMessageBytes string
    max.message.bytes value
    MessageDownconversionEnable bool
    message.downconversion.enable value
    MessageFormatVersion string
    message.format.version value
    MessageTimestampDifferenceMaxMs string
    message.timestamp.difference.max.ms value
    MessageTimestampType string
    message.timestamp.type value
    MinCleanableDirtyRatio float64
    min.cleanable.dirty.ratio value
    MinCompactionLagMs string
    min.compaction.lag.ms value
    MinInsyncReplicas string
    min.insync.replicas value
    Preallocate bool
    preallocate value
    RemoteStorageEnable bool
    remote.storage.enable value
    RetentionBytes string
    retention.bytes value
    RetentionMs string
    retention.ms value
    SegmentBytes string
    segment.bytes value
    SegmentIndexBytes string
    segment.index.bytes value
    SegmentJitterMs string
    segment.jitter.ms value
    SegmentMs string
    segment.ms value
    UncleanLeaderElectionEnable bool
    unclean.leader.election.enable value; This field is deprecated and no longer functional.

    Deprecated: This field is deprecated and no longer functional.

    cleanupPolicy String
    cleanup.policy value
    compressionType String
    compression.type value
    deleteRetentionMs String
    delete.retention.ms value
    fileDeleteDelayMs String
    file.delete.delay.ms value
    flushMessages String
    flush.messages value
    flushMs String
    flush.ms value
    indexIntervalBytes String
    index.interval.bytes value
    localRetentionBytes String
    local.retention.bytes value
    localRetentionMs String
    local.retention.ms value
    maxCompactionLagMs String
    max.compaction.lag.ms value
    maxMessageBytes String
    max.message.bytes value
    messageDownconversionEnable Boolean
    message.downconversion.enable value
    messageFormatVersion String
    message.format.version value
    messageTimestampDifferenceMaxMs String
    message.timestamp.difference.max.ms value
    messageTimestampType String
    message.timestamp.type value
    minCleanableDirtyRatio Double
    min.cleanable.dirty.ratio value
    minCompactionLagMs String
    min.compaction.lag.ms value
    minInsyncReplicas String
    min.insync.replicas value
    preallocate Boolean
    preallocate value
    remoteStorageEnable Boolean
    remote.storage.enable value
    retentionBytes String
    retention.bytes value
    retentionMs String
    retention.ms value
    segmentBytes String
    segment.bytes value
    segmentIndexBytes String
    segment.index.bytes value
    segmentJitterMs String
    segment.jitter.ms value
    segmentMs String
    segment.ms value
    uncleanLeaderElectionEnable Boolean
    unclean.leader.election.enable value; This field is deprecated and no longer functional.

    Deprecated: This field is deprecated and no longer functional.

    cleanupPolicy string
    cleanup.policy value
    compressionType string
    compression.type value
    deleteRetentionMs string
    delete.retention.ms value
    fileDeleteDelayMs string
    file.delete.delay.ms value
    flushMessages string
    flush.messages value
    flushMs string
    flush.ms value
    indexIntervalBytes string
    index.interval.bytes value
    localRetentionBytes string
    local.retention.bytes value
    localRetentionMs string
    local.retention.ms value
    maxCompactionLagMs string
    max.compaction.lag.ms value
    maxMessageBytes string
    max.message.bytes value
    messageDownconversionEnable boolean
    message.downconversion.enable value
    messageFormatVersion string
    message.format.version value
    messageTimestampDifferenceMaxMs string
    message.timestamp.difference.max.ms value
    messageTimestampType string
    message.timestamp.type value
    minCleanableDirtyRatio number
    min.cleanable.dirty.ratio value
    minCompactionLagMs string
    min.compaction.lag.ms value
    minInsyncReplicas string
    min.insync.replicas value
    preallocate boolean
    preallocate value
    remoteStorageEnable boolean
    remote.storage.enable value
    retentionBytes string
    retention.bytes value
    retentionMs string
    retention.ms value
    segmentBytes string
    segment.bytes value
    segmentIndexBytes string
    segment.index.bytes value
    segmentJitterMs string
    segment.jitter.ms value
    segmentMs string
    segment.ms value
    uncleanLeaderElectionEnable boolean
    unclean.leader.election.enable value; This field is deprecated and no longer functional.

    Deprecated: This field is deprecated and no longer functional.

    cleanup_policy str
    cleanup.policy value
    compression_type str
    compression.type value
    delete_retention_ms str
    delete.retention.ms value
    file_delete_delay_ms str
    file.delete.delay.ms value
    flush_messages str
    flush.messages value
    flush_ms str
    flush.ms value
    index_interval_bytes str
    index.interval.bytes value
    local_retention_bytes str
    local.retention.bytes value
    local_retention_ms str
    local.retention.ms value
    max_compaction_lag_ms str
    max.compaction.lag.ms value
    max_message_bytes str
    max.message.bytes value
    message_downconversion_enable bool
    message.downconversion.enable value
    message_format_version str
    message.format.version value
    message_timestamp_difference_max_ms str
    message.timestamp.difference.max.ms value
    message_timestamp_type str
    message.timestamp.type value
    min_cleanable_dirty_ratio float
    min.cleanable.dirty.ratio value
    min_compaction_lag_ms str
    min.compaction.lag.ms value
    min_insync_replicas str
    min.insync.replicas value
    preallocate bool
    preallocate value
    remote_storage_enable bool
    remote.storage.enable value
    retention_bytes str
    retention.bytes value
    retention_ms str
    retention.ms value
    segment_bytes str
    segment.bytes value
    segment_index_bytes str
    segment.index.bytes value
    segment_jitter_ms str
    segment.jitter.ms value
    segment_ms str
    segment.ms value
    unclean_leader_election_enable bool
    unclean.leader.election.enable value; This field is deprecated and no longer functional.

    Deprecated: This field is deprecated and no longer functional.

    cleanupPolicy String
    cleanup.policy value
    compressionType String
    compression.type value
    deleteRetentionMs String
    delete.retention.ms value
    fileDeleteDelayMs String
    file.delete.delay.ms value
    flushMessages String
    flush.messages value
    flushMs String
    flush.ms value
    indexIntervalBytes String
    index.interval.bytes value
    localRetentionBytes String
    local.retention.bytes value
    localRetentionMs String
    local.retention.ms value
    maxCompactionLagMs String
    max.compaction.lag.ms value
    maxMessageBytes String
    max.message.bytes value
    messageDownconversionEnable Boolean
    message.downconversion.enable value
    messageFormatVersion String
    message.format.version value
    messageTimestampDifferenceMaxMs String
    message.timestamp.difference.max.ms value
    messageTimestampType String
    message.timestamp.type value
    minCleanableDirtyRatio Number
    min.cleanable.dirty.ratio value
    minCompactionLagMs String
    min.compaction.lag.ms value
    minInsyncReplicas String
    min.insync.replicas value
    preallocate Boolean
    preallocate value
    remoteStorageEnable Boolean
    remote.storage.enable value
    retentionBytes String
    retention.bytes value
    retentionMs String
    retention.ms value
    segmentBytes String
    segment.bytes value
    segmentIndexBytes String
    segment.index.bytes value
    segmentJitterMs String
    segment.jitter.ms value
    segmentMs String
    segment.ms value
    uncleanLeaderElectionEnable Boolean
    unclean.leader.election.enable value; This field is deprecated and no longer functional.

    Deprecated: This field is deprecated and no longer functional.

    GetKafkaTopicTag

    Key string
    Topic tag key. Maximum length: 64.
    Value string
    Topic tag value. Maximum length: 256.
    Key string
    Topic tag key. Maximum length: 64.
    Value string
    Topic tag value. Maximum length: 256.
    key String
    Topic tag key. Maximum length: 64.
    value String
    Topic tag value. Maximum length: 256.
    key string
    Topic tag key. Maximum length: 64.
    value string
    Topic tag value. Maximum length: 256.
    key str
    Topic tag key. Maximum length: 64.
    value str
    Topic tag value. Maximum length: 256.
    key String
    Topic tag key. Maximum length: 64.
    value String
    Topic tag value. Maximum length: 256.

    Package Details

    Repository
    Aiven pulumi/pulumi-aiven
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aiven Terraform Provider.
    aiven logo
    Aiven v6.18.0 published on Thursday, Jun 27, 2024 by Pulumi