ServiceSubscriptionArgs

data class ServiceSubscriptionArgs(val endpoint: Output<String>? = null, val filterTag: Output<String>? = null, val notifyContentFormat: Output<String>? = null, val notifyStrategy: Output<String>? = null, val pushType: Output<String>? = null, val subscriptionName: Output<String>? = null, val topicName: Output<String>? = null) : ConvertibleToJava<ServiceSubscriptionArgs>

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

NOTE: Available since v1.188.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.message.ServiceTopic;
import com.pulumi.alicloud.message.ServiceTopicArgs;
import com.pulumi.alicloud.message.ServiceSubscription;
import com.pulumi.alicloud.message.ServiceSubscriptionArgs;
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 defaultServiceTopic = new ServiceTopic("defaultServiceTopic", ServiceTopicArgs.builder()
.topicName(name)
.maxMessageSize(12357)
.loggingEnabled(true)
.build());
var defaultServiceSubscription = new ServiceSubscription("defaultServiceSubscription", ServiceSubscriptionArgs.builder()
.topicName(defaultServiceTopic.topicName())
.subscriptionName(name)
.endpoint("http://example.com")
.pushType("http")
.filterTag("tf-example")
.notifyContentFormat("XML")
.notifyStrategy("BACKOFF_RETRY")
.build());
}
}

Import

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

$ pulumi import alicloud:message/serviceSubscription:ServiceSubscription example <topic_name>:<subscription_name>

Constructors

Link copied to clipboard
fun ServiceSubscriptionArgs(endpoint: Output<String>? = null, filterTag: Output<String>? = null, notifyContentFormat: Output<String>? = null, notifyStrategy: Output<String>? = null, pushType: Output<String>? = null, subscriptionName: Output<String>? = null, topicName: Output<String>? = null)

Functions

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

Properties

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

The endpoint has three format. Available values format:

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

The tag that is used to filter messages. Only the messages that have the same tag can be pushed. A tag is a string that can be up to 16 characters in length. By default, no tag is specified to filter messages.

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

The NotifyContentFormat attribute of Subscription. This attribute specifies the content format of the messages pushed to users. Valid values: XML, JSON and SIMPLIFIED. Default value: XML.

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

The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails. Default value: BACKOFF_RETRY. Valid values:

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

The Push type of Subscription. The Valid values: http, queue, mpush, alisms and email.

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

Two topics subscription on a single account in the same topic cannot have the same name. A topic subscription 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.

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

The topic which The subscription belongs to was named with the 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.