ServiceTopicArgs

data class ServiceTopicArgs(val loggingEnabled: Output<Boolean>? = null, val maxMessageSize: Output<Int>? = null, val topicName: Output<String>? = null) : ConvertibleToJava<ServiceTopicArgs>

Provides a Message Notification Service Topic resource. For information about Message Notification Service Topic and how to use it, see What is Topic.

NOTE: Available since v1.188.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const _default = new alicloud.message.ServiceTopic("default", {
topicName: name,
maxMessageSize: 12357,
loggingEnabled: true,
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-example"
default = alicloud.message.ServiceTopic("default",
topic_name=name,
max_message_size=12357,
logging_enabled=True)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tf-example";
var @default = new AliCloud.Message.ServiceTopic("default", new()
{
TopicName = name,
MaxMessageSize = 12357,
LoggingEnabled = true,
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/message"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "tf-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_, err := message.NewServiceTopic(ctx, "default", &message.ServiceTopicArgs{
TopicName: pulumi.String(name),
MaxMessageSize: pulumi.Int(12357),
LoggingEnabled: pulumi.Bool(true),
})
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.message.ServiceTopic;
import com.pulumi.alicloud.message.ServiceTopicArgs;
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("tf-example");
var default_ = new ServiceTopic("default", ServiceTopicArgs.builder()
.topicName(name)
.maxMessageSize(12357)
.loggingEnabled(true)
.build());
}
}
configuration:
name:
type: string
default: tf-example
resources:
default:
type: alicloud:message:ServiceTopic
properties:
topicName: ${name}
maxMessageSize: 12357
loggingEnabled: true

Import

Message Notification Service Topic can be imported using the id or topic_name, e.g.

$ pulumi import alicloud:message/serviceTopic:ServiceTopic example <topic_name>

Constructors

Link copied to clipboard
constructor(loggingEnabled: Output<Boolean>? = null, maxMessageSize: Output<Int>? = null, topicName: Output<String>? = null)

Properties

Link copied to clipboard
val loggingEnabled: Output<Boolean>? = null

Specifies whether to enable the log management feature. Default value: false. Valid values:

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

The maximum size of a message body that can be sent to the topic. Unit: bytes. Valid values: 1024-65536. Default value: 65536.

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

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 255 characters.

Functions

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