Class KafkaTopic
Example Usage
using Pulumi;
using Aiven = Pulumi.Aiven;
class MyStack : Stack
{
public MyStack()
{
var mytesttopic = new Aiven.KafkaTopic("mytesttopic", new Aiven.KafkaTopicArgs
{
CleanupPolicy = "delete",
MinimumInSyncReplicas = 2,
Partitions = 5,
Project = aiven_project.Myproject.Project,
Replication = 3,
RetentionBytes = -1,
RetentionHours = 72,
ServiceName = aiven_service.Myservice.Service_name,
TopicName = "<TOPIC_NAME>",
});
}
}
Inherited Members
Namespace: Pulumi.Aiven
Assembly: Pulumi.Aiven.dll
Syntax
public class KafkaTopic : CustomResource
Constructors
View SourceKafkaTopic(String, KafkaTopicArgs, CustomResourceOptions)
Create a KafkaTopic resource with the given unique name, arguments, and options.
Declaration
public KafkaTopic(string name, KafkaTopicArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| KafkaTopicArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceCleanupPolicy
Topic cleanup policy. Allowed values: delete, compact
Declaration
public Output<string> CleanupPolicy { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
MinimumInSyncReplicas
Minimum required nodes in-sync replicas (ISR) to produce to a partition
Declaration
public Output<int?> MinimumInSyncReplicas { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Partitions
Number of partitions to create in the topic
Declaration
public Output<int> Partitions { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Project
Project to link the kafka topic to
Declaration
public Output<string> Project { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Replication
Replication factor for the topic
Declaration
public Output<int> Replication { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
RetentionBytes
Retention bytes
Declaration
public Output<int?> RetentionBytes { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
RetentionHours
Retention period (hours)
Declaration
public Output<int?> RetentionHours { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
ServiceName
Service to link the kafka topic to
Declaration
public Output<string> ServiceName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
TerminationProtection
It is a Terraform client-side deletion protection, which prevents a Kafka topic from being deleted. It is recommended to enable this for any production Kafka topic containing critical data.
Declaration
public Output<bool?> TerminationProtection { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
TopicName
Topic name
Declaration
public Output<string> TopicName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, KafkaTopicState, CustomResourceOptions)
Get an existing KafkaTopic resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static KafkaTopic Get(string name, Input<string> id, KafkaTopicState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| KafkaTopicState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| KafkaTopic |