ServiceTopicArgs

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

Provides a Message Service Topic resource. For information about Message 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") || "terraform-example";
const _default = new alicloud.message.ServiceTopic("default", {
topicName: name,
maxMessageSize: 16888,
enableLogging: true,
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.message.ServiceTopic("default",
topic_name=name,
max_message_size=16888,
enable_logging=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") ?? "terraform-example";
var @default = new AliCloud.Message.ServiceTopic("default", new()
{
TopicName = name,
MaxMessageSize = 16888,
EnableLogging = 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 := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_, err := message.NewServiceTopic(ctx, "default", &message.ServiceTopicArgs{
TopicName: pulumi.String(name),
MaxMessageSize: pulumi.Int(16888),
EnableLogging: 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("terraform-example");
var default_ = new ServiceTopic("default", ServiceTopicArgs.builder()
.topicName(name)
.maxMessageSize(16888)
.enableLogging(true)
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
default:
type: alicloud:message:ServiceTopic
properties:
topicName: ${name}
maxMessageSize: 16888
enableLogging: true

Import

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

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

Constructors

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

Properties

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

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

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

. Field logging_enabled has been deprecated from provider version 1.241.0. New field enable_logging instead.

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

The maximum length of the message that is sent to the topic. Default value: 65536. Valid values: 1024 to 65536. Unit: bytes.

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

A mapping of tags to assign to the resource.

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

The name of the topic. The following arguments will be discarded. Please use new fields as soon as possible:

Functions

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