Aiven v6.18.0 published on Thursday, Jun 27, 2024 by Pulumi
aiven.getKafkaTopic
Explore with Pulumi AI
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.
- Service
Name 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.
- Topic
Name 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.
- Service
Name 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.
- Topic
Name 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.
- service
Name 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.
- topic
Name 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.
- service
Name 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.
- topic
Name 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.
- service
Name 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.
- topic
Name String - The name of the topic. Changing this property forces recreation of the resource.
getKafkaTopic Result
The following output properties are available:
- Configs
List<Get
Kafka Topic Config> - 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.
- Service
Name 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.
- List<Get
Kafka Topic Tag> - Tags for the Kafka topic.
- Termination
Protection bool - Topic
Name string - The name of the topic. Changing this property forces recreation of the resource.
- Configs
[]Get
Kafka Topic Config - 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.
- Service
Name 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.
- []Get
Kafka Topic Tag - Tags for the Kafka topic.
- Termination
Protection bool - Topic
Name string - The name of the topic. Changing this property forces recreation of the resource.
- configs
List<Get
Kafka Topic Config> - 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.
- service
Name 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.
- List<Get
Kafka Topic Tag> - Tags for the Kafka topic.
- termination
Protection Boolean - topic
Name String - The name of the topic. Changing this property forces recreation of the resource.
- configs
Get
Kafka Topic Config[] - 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.
- service
Name 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.
- Get
Kafka Topic Tag[] - Tags for the Kafka topic.
- termination
Protection boolean - topic
Name string - The name of the topic. Changing this property forces recreation of the resource.
- configs
Sequence[Get
Kafka Topic Config] - 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.
- Sequence[Get
Kafka Topic Tag] - 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.
- service
Name 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.
- List<Property Map>
- Tags for the Kafka topic.
- termination
Protection Boolean - topic
Name String - The name of the topic. Changing this property forces recreation of the resource.
Supporting Types
GetKafkaTopicConfig
- Cleanup
Policy string - cleanup.policy value
- Compression
Type string - compression.type value
- Delete
Retention stringMs - delete.retention.ms value
- File
Delete stringDelay Ms - file.delete.delay.ms value
- Flush
Messages string - flush.messages value
- Flush
Ms string - flush.ms value
- Index
Interval stringBytes - index.interval.bytes value
- Local
Retention stringBytes - local.retention.bytes value
- Local
Retention stringMs - local.retention.ms value
- Max
Compaction stringLag Ms - max.compaction.lag.ms value
- Max
Message stringBytes - max.message.bytes value
- Message
Downconversion boolEnable - message.downconversion.enable value
- Message
Format stringVersion - message.format.version value
- Message
Timestamp stringDifference Max Ms - message.timestamp.difference.max.ms value
- Message
Timestamp stringType - message.timestamp.type value
- Min
Cleanable doubleDirty Ratio - min.cleanable.dirty.ratio value
- Min
Compaction stringLag Ms - min.compaction.lag.ms value
- Min
Insync stringReplicas - min.insync.replicas value
- Preallocate bool
- preallocate value
- Remote
Storage boolEnable - remote.storage.enable value
- Retention
Bytes string - retention.bytes value
- Retention
Ms string - retention.ms value
- Segment
Bytes string - segment.bytes value
- Segment
Index stringBytes - segment.index.bytes value
- Segment
Jitter stringMs - segment.jitter.ms value
- Segment
Ms string - segment.ms value
- Unclean
Leader boolElection Enable - unclean.leader.election.enable value; This field is deprecated and no longer functional.
- Cleanup
Policy string - cleanup.policy value
- Compression
Type string - compression.type value
- Delete
Retention stringMs - delete.retention.ms value
- File
Delete stringDelay Ms - file.delete.delay.ms value
- Flush
Messages string - flush.messages value
- Flush
Ms string - flush.ms value
- Index
Interval stringBytes - index.interval.bytes value
- Local
Retention stringBytes - local.retention.bytes value
- Local
Retention stringMs - local.retention.ms value
- Max
Compaction stringLag Ms - max.compaction.lag.ms value
- Max
Message stringBytes - max.message.bytes value
- Message
Downconversion boolEnable - message.downconversion.enable value
- Message
Format stringVersion - message.format.version value
- Message
Timestamp stringDifference Max Ms - message.timestamp.difference.max.ms value
- Message
Timestamp stringType - message.timestamp.type value
- Min
Cleanable float64Dirty Ratio - min.cleanable.dirty.ratio value
- Min
Compaction stringLag Ms - min.compaction.lag.ms value
- Min
Insync stringReplicas - min.insync.replicas value
- Preallocate bool
- preallocate value
- Remote
Storage boolEnable - remote.storage.enable value
- Retention
Bytes string - retention.bytes value
- Retention
Ms string - retention.ms value
- Segment
Bytes string - segment.bytes value
- Segment
Index stringBytes - segment.index.bytes value
- Segment
Jitter stringMs - segment.jitter.ms value
- Segment
Ms string - segment.ms value
- Unclean
Leader boolElection Enable - unclean.leader.election.enable value; This field is deprecated and no longer functional.
- cleanup
Policy String - cleanup.policy value
- compression
Type String - compression.type value
- delete
Retention StringMs - delete.retention.ms value
- file
Delete StringDelay Ms - file.delete.delay.ms value
- flush
Messages String - flush.messages value
- flush
Ms String - flush.ms value
- index
Interval StringBytes - index.interval.bytes value
- local
Retention StringBytes - local.retention.bytes value
- local
Retention StringMs - local.retention.ms value
- max
Compaction StringLag Ms - max.compaction.lag.ms value
- max
Message StringBytes - max.message.bytes value
- message
Downconversion BooleanEnable - message.downconversion.enable value
- message
Format StringVersion - message.format.version value
- message
Timestamp StringDifference Max Ms - message.timestamp.difference.max.ms value
- message
Timestamp StringType - message.timestamp.type value
- min
Cleanable DoubleDirty Ratio - min.cleanable.dirty.ratio value
- min
Compaction StringLag Ms - min.compaction.lag.ms value
- min
Insync StringReplicas - min.insync.replicas value
- preallocate Boolean
- preallocate value
- remote
Storage BooleanEnable - remote.storage.enable value
- retention
Bytes String - retention.bytes value
- retention
Ms String - retention.ms value
- segment
Bytes String - segment.bytes value
- segment
Index StringBytes - segment.index.bytes value
- segment
Jitter StringMs - segment.jitter.ms value
- segment
Ms String - segment.ms value
- unclean
Leader BooleanElection Enable - unclean.leader.election.enable value; This field is deprecated and no longer functional.
- cleanup
Policy string - cleanup.policy value
- compression
Type string - compression.type value
- delete
Retention stringMs - delete.retention.ms value
- file
Delete stringDelay Ms - file.delete.delay.ms value
- flush
Messages string - flush.messages value
- flush
Ms string - flush.ms value
- index
Interval stringBytes - index.interval.bytes value
- local
Retention stringBytes - local.retention.bytes value
- local
Retention stringMs - local.retention.ms value
- max
Compaction stringLag Ms - max.compaction.lag.ms value
- max
Message stringBytes - max.message.bytes value
- message
Downconversion booleanEnable - message.downconversion.enable value
- message
Format stringVersion - message.format.version value
- message
Timestamp stringDifference Max Ms - message.timestamp.difference.max.ms value
- message
Timestamp stringType - message.timestamp.type value
- min
Cleanable numberDirty Ratio - min.cleanable.dirty.ratio value
- min
Compaction stringLag Ms - min.compaction.lag.ms value
- min
Insync stringReplicas - min.insync.replicas value
- preallocate boolean
- preallocate value
- remote
Storage booleanEnable - remote.storage.enable value
- retention
Bytes string - retention.bytes value
- retention
Ms string - retention.ms value
- segment
Bytes string - segment.bytes value
- segment
Index stringBytes - segment.index.bytes value
- segment
Jitter stringMs - segment.jitter.ms value
- segment
Ms string - segment.ms value
- unclean
Leader booleanElection Enable - unclean.leader.election.enable value; This field is deprecated and no longer functional.
- cleanup_
policy str - cleanup.policy value
- compression_
type str - compression.type value
- delete_
retention_ strms - delete.retention.ms value
- file_
delete_ strdelay_ ms - file.delete.delay.ms value
- flush_
messages str - flush.messages value
- flush_
ms str - flush.ms value
- index_
interval_ strbytes - index.interval.bytes value
- local_
retention_ strbytes - local.retention.bytes value
- local_
retention_ strms - local.retention.ms value
- max_
compaction_ strlag_ ms - max.compaction.lag.ms value
- max_
message_ strbytes - max.message.bytes value
- message_
downconversion_ boolenable - message.downconversion.enable value
- message_
format_ strversion - message.format.version value
- message_
timestamp_ strdifference_ max_ ms - message.timestamp.difference.max.ms value
- message_
timestamp_ strtype - message.timestamp.type value
- min_
cleanable_ floatdirty_ ratio - min.cleanable.dirty.ratio value
- min_
compaction_ strlag_ ms - min.compaction.lag.ms value
- min_
insync_ strreplicas - min.insync.replicas value
- preallocate bool
- preallocate value
- remote_
storage_ boolenable - remote.storage.enable value
- retention_
bytes str - retention.bytes value
- retention_
ms str - retention.ms value
- segment_
bytes str - segment.bytes value
- segment_
index_ strbytes - segment.index.bytes value
- segment_
jitter_ strms - segment.jitter.ms value
- segment_
ms str - segment.ms value
- unclean_
leader_ boolelection_ enable - unclean.leader.election.enable value; This field is deprecated and no longer functional.
- cleanup
Policy String - cleanup.policy value
- compression
Type String - compression.type value
- delete
Retention StringMs - delete.retention.ms value
- file
Delete StringDelay Ms - file.delete.delay.ms value
- flush
Messages String - flush.messages value
- flush
Ms String - flush.ms value
- index
Interval StringBytes - index.interval.bytes value
- local
Retention StringBytes - local.retention.bytes value
- local
Retention StringMs - local.retention.ms value
- max
Compaction StringLag Ms - max.compaction.lag.ms value
- max
Message StringBytes - max.message.bytes value
- message
Downconversion BooleanEnable - message.downconversion.enable value
- message
Format StringVersion - message.format.version value
- message
Timestamp StringDifference Max Ms - message.timestamp.difference.max.ms value
- message
Timestamp StringType - message.timestamp.type value
- min
Cleanable NumberDirty Ratio - min.cleanable.dirty.ratio value
- min
Compaction StringLag Ms - min.compaction.lag.ms value
- min
Insync StringReplicas - min.insync.replicas value
- preallocate Boolean
- preallocate value
- remote
Storage BooleanEnable - remote.storage.enable value
- retention
Bytes String - retention.bytes value
- retention
Ms String - retention.ms value
- segment
Bytes String - segment.bytes value
- segment
Index StringBytes - segment.index.bytes value
- segment
Jitter StringMs - segment.jitter.ms value
- segment
Ms String - segment.ms value
- unclean
Leader BooleanElection Enable - unclean.leader.election.enable value; This field is deprecated and no longer functional.
GetKafkaTopicTag
Package Details
- Repository
- Aiven pulumi/pulumi-aiven
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aiven
Terraform Provider.