Class Topic
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
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var config = new Config();
var name = config.Get("name") ?? "onsInstanceName";
var topic = config.Get("topic") ?? "onsTopicName";
var defaultInstance = new AliCloud.RocketMQ.Instance("defaultInstance", new AliCloud.RocketMQ.InstanceArgs
{
Remark = "default_ons_instance_remark",
});
var defaultTopic = new AliCloud.RocketMQ.Topic("defaultTopic", new AliCloud.RocketMQ.TopicArgs
{
InstanceId = defaultInstance.Id,
MessageType = 0,
Remark = "dafault_ons_topic_remark",
Topic = topic,
});
}
}
Inherited Members
Namespace: Pulumi.AliCloud.RocketMQ
Assembly: Pulumi.AliCloud.dll
Syntax
public class Topic : CustomResource
Constructors
View SourceTopic(String, TopicArgs, CustomResourceOptions)
Create a Topic resource with the given unique name, arguments, and options.
Declaration
public Topic(string name, TopicArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| TopicArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceInstanceId
ID of the ONS Instance that owns the topics.
Declaration
public Output<string> InstanceId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
MessageType
The type of the message. Read Ons Topic Create for further details.
Declaration
public Output<int> MessageType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Perm
This attribute is used to set the read-write mode for the topic. Read Request parameters for further details.
Declaration
public Output<int?> Perm { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Remark
This attribute is a concise description of topic. The length cannot exceed 128.
Declaration
public Output<string> Remark { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
TopicName
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.
Declaration
public Output<string> TopicName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, TopicState, CustomResourceOptions)
Get an existing Topic resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Topic Get(string name, Input<string> id, TopicState 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. |
| TopicState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Topic |