Topic

class Topic : KotlinCustomResource

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const topic = new alicloud.mns.Topic("topic", {
name: "tf-example-mnstopic",
maximumMessageSize: 65536,
loggingEnabled: false,
});
import pulumi
import pulumi_alicloud as alicloud
topic = alicloud.mns.Topic("topic",
name="tf-example-mnstopic",
maximum_message_size=65536,
logging_enabled=False)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var topic = new AliCloud.Mns.Topic("topic", new()
{
Name = "tf-example-mnstopic",
MaximumMessageSize = 65536,
LoggingEnabled = false,
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/mns"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := mns.NewTopic(ctx, "topic", &mns.TopicArgs{
Name: pulumi.String("tf-example-mnstopic"),
MaximumMessageSize: pulumi.Int(65536),
LoggingEnabled: pulumi.Bool(false),
})
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.alicloud.mns.Topic;
import com.pulumi.alicloud.mns.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 topic = new Topic("topic", TopicArgs.builder()
.name("tf-example-mnstopic")
.maximumMessageSize(65536)
.loggingEnabled(false)
.build());
}
}
resources:
topic:
type: alicloud:mns:Topic
properties:
name: tf-example-mnstopic
maximumMessageSize: 65536
loggingEnabled: false

Import

MNS Topic can be imported using the id or name, e.g.

$ pulumi import alicloud:mns/topic:Topic topic topicName

Properties

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val loggingEnabled: Output<Boolean>?

Is logging enabled? true or false. Default value to false.

Link copied to clipboard
val maximumMessageSize: Output<Int>?

This indicates the maximum length, in bytes, of any message body sent to the topic. Valid value range: 1024-65536, i.e., 1K to 64K. Default value to 65536.

Link copied to clipboard
val name: Output<String>

Two topics on a single account in the same region cannot have the same name. A topic name must start with an English letter or a digit, and can contain English letters, digits, and hyphens, with the length not exceeding 256 characters.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val urn: Output<String>