TopicArgs

data class TopicArgs(val comment: Output<String>? = null, val lifeCycle: Output<Int>? = null, val name: Output<String>? = null, val projectName: Output<String>? = null, val recordSchema: Output<Map<String, Any>>? = null, val recordType: Output<String>? = null, val shardCount: Output<Int>? = null) : ConvertibleToJava<TopicArgs>

The topic is the basic unit of Datahub data source and is used to define one kind of data or stream. It contains a set of subscriptions. You can manage the datahub source of an application by using topics. Refer to details.

Example Usage

Basic Usage

  • BLob Topic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.datahub.Topic;
import com.pulumi.alicloud.datahub.TopicArgs;
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) {
var example = new Topic("example", TopicArgs.builder()
.comment("created by terraform")
.lifeCycle(7)
.projectName("tf_datahub_project")
.recordType("BLOB")
.shardCount(3)
.build());
}
}

Import

Datahub topic can be imported using the ID, e.g.

$ pulumi import alicloud:datahub/topic:Topic example tf_datahub_project:tf_datahub_topic

Constructors

Link copied to clipboard
fun TopicArgs(comment: Output<String>? = null, lifeCycle: Output<Int>? = null, name: Output<String>? = null, projectName: Output<String>? = null, recordSchema: Output<Map<String, Any>>? = null, recordType: Output<String>? = null, shardCount: Output<Int>? = null)

Functions

Link copied to clipboard
open override fun toJava(): TopicArgs

Properties

Link copied to clipboard
val comment: Output<String>? = null

Comment of the datahub topic. It cannot be longer than 255 characters.

Link copied to clipboard
val lifeCycle: Output<Int>? = null

How many days this topic lives. The permitted range of values is 1, 7. The default value is 3.

Link copied to clipboard
val name: Output<String>? = null

The name of the datahub topic. Its length is limited to 1-128 and only characters such as letters, digits and '_' are allowed. It is case-insensitive.

Link copied to clipboard
val projectName: Output<String>? = null

The name of the datahub project that this topic belongs to. It is case-insensitive.

Link copied to clipboard
val recordSchema: Output<Map<String, Any>>? = null

Schema of this topic, required only for TUPLE topic. Supported data types (case-insensitive) are:

Link copied to clipboard
val recordType: Output<String>? = null

The type of this topic. Its value must be one of {BLOB, TUPLE}. For BLOB topic, data will be organized as binary and encoded by BASE64. For TUPLE topic, data has fixed schema. The default value is "TUPLE" with a schema {STRING}.

Link copied to clipboard
val shardCount: Output<Int>? = null

The number of shards this topic contains. The permitted range of values is 1, 10. The default value is 1.