aiven.getKafkaTopic
Explore with Pulumi AI
The Kafka Topic data source provides information about the existing Aiven Kafka Topic.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aiven = Pulumi.Aiven;
return await Deployment.RunAsync(() =>
{
var mytesttopic = Aiven.GetKafkaTopic.Invoke(new()
{
Project = aiven_project.Myproject.Project,
ServiceName = aiven_kafka.Myservice.Service_name,
TopicName = "<TOPIC_NAME>",
});
});
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: aiven_project.Myproject.Project,
ServiceName: aiven_kafka.Myservice.Service_name,
TopicName: "<TOPIC_NAME>",
}, nil)
if err != nil {
return err
}
return nil
})
}
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 mytesttopic = AivenFunctions.getKafkaTopic(GetKafkaTopicArgs.builder()
.project(aiven_project.myproject().project())
.serviceName(aiven_kafka.myservice().service_name())
.topicName("<TOPIC_NAME>")
.build());
}
}
import pulumi
import pulumi_aiven as aiven
mytesttopic = aiven.get_kafka_topic(project=aiven_project["myproject"]["project"],
service_name=aiven_kafka["myservice"]["service_name"],
topic_name="<TOPIC_NAME>")
import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";
const mytesttopic = aiven.getKafkaTopic({
project: aiven_project.myproject.project,
serviceName: aiven_kafka.myservice.service_name,
topicName: "<TOPIC_NAME>",
});
variables:
mytesttopic:
fn::invoke:
Function: aiven:getKafkaTopic
Arguments:
project: ${aiven_project.myproject.project}
serviceName: ${aiven_kafka.myservice.service_name}
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(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
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Service
Name string Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Topic
Name string The name of the topic. This property cannot be changed, doing so forces recreation of the resource.
- Project string
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Service
Name string Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Topic
Name string The name of the topic. This property cannot be changed, doing so forces recreation of the resource.
- project String
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service
Name String Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- topic
Name String The name of the topic. This property cannot be changed, doing so forces recreation of the resource.
- project string
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service
Name string Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- topic
Name string The name of the topic. This property cannot be changed, doing so forces recreation of the resource.
- project str
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service_
name str Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- topic_
name str The name of the topic. This property cannot be changed, doing so forces recreation of the resource.
- project String
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- service
Name String Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- topic
Name String The name of the topic. This property cannot be changed, doing so 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
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Replication int
The replication factor for the topic.
- Service
Name string Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- List<Get
Kafka Topic Tag> Kafka Topic tag.
- Termination
Protection bool - Topic
Name string The name of the topic. This property cannot be changed, doing so 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
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Replication int
The replication factor for the topic.
- Service
Name string Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- []Get
Kafka Topic Tag Kafka Topic tag.
- Termination
Protection bool - Topic
Name string The name of the topic. This property cannot be changed, doing so 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
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- replication Integer
The replication factor for the topic.
- service
Name String Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- List<Get
Kafka Topic Tag> Kafka Topic tag.
- termination
Protection Boolean - topic
Name String The name of the topic. This property cannot be changed, doing so 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
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- replication number
The replication factor for the topic.
- service
Name string Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Get
Kafka Topic Tag[] Kafka Topic tag.
- termination
Protection boolean - topic
Name string The name of the topic. This property cannot be changed, doing so 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
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- replication int
The replication factor for the topic.
- service_
name str Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- Sequence[Get
Kafka Topic Tag] Kafka Topic tag.
- termination_
protection bool - topic_
name str The name of the topic. This property cannot be changed, doing so 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
Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- replication Number
The replication factor for the topic.
- service
Name String Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.
- List<Property Map>
Kafka Topic tag.
- termination
Protection Boolean - topic
Name String The name of the topic. This property cannot be changed, doing so forces recreation of the resource.
Supporting Types
GetKafkaTopicConfig
- Cleanup
Policy string - Compression
Type string - Delete
Retention stringMs - File
Delete stringDelay Ms - Flush
Messages string - Flush
Ms string - Index
Interval stringBytes - Max
Compaction stringLag Ms - Max
Message stringBytes - Message
Downconversion boolEnable - Message
Format stringVersion - Message
Timestamp stringDifference Max Ms - Message
Timestamp stringType - Min
Cleanable doubleDirty Ratio - Min
Compaction stringLag Ms - Min
Insync stringReplicas - Preallocate bool
- Retention
Bytes string - Retention
Ms string - Segment
Bytes string - Segment
Index stringBytes - Segment
Jitter stringMs - Segment
Ms string - Unclean
Leader boolElection Enable This field is deprecated and no longer functional.
- Cleanup
Policy string - Compression
Type string - Delete
Retention stringMs - File
Delete stringDelay Ms - Flush
Messages string - Flush
Ms string - Index
Interval stringBytes - Max
Compaction stringLag Ms - Max
Message stringBytes - Message
Downconversion boolEnable - Message
Format stringVersion - Message
Timestamp stringDifference Max Ms - Message
Timestamp stringType - Min
Cleanable float64Dirty Ratio - Min
Compaction stringLag Ms - Min
Insync stringReplicas - Preallocate bool
- Retention
Bytes string - Retention
Ms string - Segment
Bytes string - Segment
Index stringBytes - Segment
Jitter stringMs - Segment
Ms string - Unclean
Leader boolElection Enable This field is deprecated and no longer functional.
- cleanup
Policy String - compression
Type String - delete
Retention StringMs - file
Delete StringDelay Ms - flush
Messages String - flush
Ms String - index
Interval StringBytes - max
Compaction StringLag Ms - max
Message StringBytes - message
Downconversion BooleanEnable - message
Format StringVersion - message
Timestamp StringDifference Max Ms - message
Timestamp StringType - min
Cleanable DoubleDirty Ratio - min
Compaction StringLag Ms - min
Insync StringReplicas - preallocate Boolean
- retention
Bytes String - retention
Ms String - segment
Bytes String - segment
Index StringBytes - segment
Jitter StringMs - segment
Ms String - unclean
Leader BooleanElection Enable This field is deprecated and no longer functional.
- cleanup
Policy string - compression
Type string - delete
Retention stringMs - file
Delete stringDelay Ms - flush
Messages string - flush
Ms string - index
Interval stringBytes - max
Compaction stringLag Ms - max
Message stringBytes - message
Downconversion booleanEnable - message
Format stringVersion - message
Timestamp stringDifference Max Ms - message
Timestamp stringType - min
Cleanable numberDirty Ratio - min
Compaction stringLag Ms - min
Insync stringReplicas - preallocate boolean
- retention
Bytes string - retention
Ms string - segment
Bytes string - segment
Index stringBytes - segment
Jitter stringMs - segment
Ms string - unclean
Leader booleanElection Enable This field is deprecated and no longer functional.
- cleanup_
policy str - compression_
type str - delete_
retention_ strms - file_
delete_ strdelay_ ms - flush_
messages str - flush_
ms str - index_
interval_ strbytes - max_
compaction_ strlag_ ms - max_
message_ strbytes - message_
downconversion_ boolenable - message_
format_ strversion - message_
timestamp_ strdifference_ max_ ms - message_
timestamp_ strtype - min_
cleanable_ floatdirty_ ratio - min_
compaction_ strlag_ ms - min_
insync_ strreplicas - preallocate bool
- retention_
bytes str - retention_
ms str - segment_
bytes str - segment_
index_ strbytes - segment_
jitter_ strms - segment_
ms str - unclean_
leader_ boolelection_ enable This field is deprecated and no longer functional.
- cleanup
Policy String - compression
Type String - delete
Retention StringMs - file
Delete StringDelay Ms - flush
Messages String - flush
Ms String - index
Interval StringBytes - max
Compaction StringLag Ms - max
Message StringBytes - message
Downconversion BooleanEnable - message
Format StringVersion - message
Timestamp StringDifference Max Ms - message
Timestamp StringType - min
Cleanable NumberDirty Ratio - min
Compaction StringLag Ms - min
Insync StringReplicas - preallocate Boolean
- retention
Bytes String - retention
Ms String - segment
Bytes String - segment
Index StringBytes - segment
Jitter StringMs - segment
Ms String - unclean
Leader BooleanElection Enable 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.