TopicArgs

data class TopicArgs(val instanceId: Output<String>? = null, val messageType: Output<Int>? = null, val perm: Output<Int>? = null, val remark: Output<String>? = null, val tags: Output<Map<String, Any>>? = null, val topic: Output<String>? = null, val topicName: Output<String>? = null) : ConvertibleToJava<TopicArgs>

Provides an ONS topic resource. For more information about how to use it, see RocketMQ Topic Management API.

NOTE: Available in 1.53.0+

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.rocketmq.Instance;
import com.pulumi.alicloud.rocketmq.InstanceArgs;
import com.pulumi.alicloud.rocketmq.Topic;
import com.pulumi.alicloud.rocketmq.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) {
final var config = ctx.config();
final var name = config.get("name").orElse("onsInstanceName");
final var topic = config.get("topic").orElse("onsTopicName");
var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
.remark("default_ons_instance_remark")
.build());
var defaultTopic = new Topic("defaultTopic", TopicArgs.builder()
.topicName(topic)
.instanceId(defaultInstance.id())
.messageType(0)
.remark("dafault_ons_topic_remark")
.build());
}
}

Import

ONS TOPIC can be imported using the id, e.g.

$ pulumi import alicloud:rocketmq/topic:Topic topic MQ_INST_1234567890_Baso1234567:onsTopicDemo

Constructors

Link copied to clipboard
fun TopicArgs(instanceId: Output<String>? = null, messageType: Output<Int>? = null, perm: Output<Int>? = null, remark: Output<String>? = null, tags: Output<Map<String, Any>>? = null, topic: Output<String>? = null, topicName: Output<String>? = null)

Functions

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

Properties

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

ID of the ONS Instance that owns the topics.

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

The type of the message. Read Ons Topic Create for further details.

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

This attribute has been deprecated.

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

This attribute is a concise description of topic. The length cannot exceed 128.

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

A mapping of tags to assign to the resource.

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

Replaced by topic_name after version 1.97.0.

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

Name of the topic. Two topics on a single instance cannot have the same name and the name cannot start with 'GID' or 'CID'. The length cannot exceed 64 characters.