1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. message
  5. ServiceSubscription
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.message.ServiceSubscription

Explore with Pulumi AI

Provides a Message Service Subscription resource.

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

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,
});
const defaultServiceSubscription = new alicloud.message.ServiceSubscription("default", {
    topicName: _default.topicName,
    subscriptionName: name,
    endpoint: "http://example.com",
    pushType: "http",
    filterTag: name,
    notifyContentFormat: "XML",
    notifyStrategy: "BACKOFF_RETRY",
});
Copy
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)
default_service_subscription = alicloud.message.ServiceSubscription("default",
    topic_name=default.topic_name,
    subscription_name=name,
    endpoint="http://example.com",
    push_type="http",
    filter_tag=name,
    notify_content_format="XML",
    notify_strategy="BACKOFF_RETRY")
Copy
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
		}
		_default, err := message.NewServiceTopic(ctx, "default", &message.ServiceTopicArgs{
			TopicName:      pulumi.String(name),
			MaxMessageSize: pulumi.Int(16888),
			EnableLogging:  pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = message.NewServiceSubscription(ctx, "default", &message.ServiceSubscriptionArgs{
			TopicName:           _default.TopicName,
			SubscriptionName:    pulumi.String(name),
			Endpoint:            pulumi.String("http://example.com"),
			PushType:            pulumi.String("http"),
			FilterTag:           pulumi.String(name),
			NotifyContentFormat: pulumi.String("XML"),
			NotifyStrategy:      pulumi.String("BACKOFF_RETRY"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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,
    });

    var defaultServiceSubscription = new AliCloud.Message.ServiceSubscription("default", new()
    {
        TopicName = @default.TopicName,
        SubscriptionName = name,
        Endpoint = "http://example.com",
        PushType = "http",
        FilterTag = name,
        NotifyContentFormat = "XML",
        NotifyStrategy = "BACKOFF_RETRY",
    });

});
Copy
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("terraform-example");
        var default_ = new ServiceTopic("default", ServiceTopicArgs.builder()
            .topicName(name)
            .maxMessageSize(16888)
            .enableLogging(true)
            .build());

        var defaultServiceSubscription = new ServiceSubscription("defaultServiceSubscription", ServiceSubscriptionArgs.builder()
            .topicName(default_.topicName())
            .subscriptionName(name)
            .endpoint("http://example.com")
            .pushType("http")
            .filterTag(name)
            .notifyContentFormat("XML")
            .notifyStrategy("BACKOFF_RETRY")
            .build());

    }
}
Copy
configuration:
  name:
    type: string
    default: terraform-example
resources:
  default:
    type: alicloud:message:ServiceTopic
    properties:
      topicName: ${name}
      maxMessageSize: 16888
      enableLogging: true
  defaultServiceSubscription:
    type: alicloud:message:ServiceSubscription
    name: default
    properties:
      topicName: ${default.topicName}
      subscriptionName: ${name}
      endpoint: http://example.com
      pushType: http
      filterTag: ${name}
      notifyContentFormat: XML
      notifyStrategy: BACKOFF_RETRY
Copy

Create ServiceSubscription Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ServiceSubscription(name: string, args: ServiceSubscriptionArgs, opts?: CustomResourceOptions);
@overload
def ServiceSubscription(resource_name: str,
                        args: ServiceSubscriptionArgs,
                        opts: Optional[ResourceOptions] = None)

@overload
def ServiceSubscription(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        endpoint: Optional[str] = None,
                        push_type: Optional[str] = None,
                        subscription_name: Optional[str] = None,
                        topic_name: Optional[str] = None,
                        dlq_policy: Optional[ServiceSubscriptionDlqPolicyArgs] = None,
                        filter_tag: Optional[str] = None,
                        notify_content_format: Optional[str] = None,
                        notify_strategy: Optional[str] = None)
func NewServiceSubscription(ctx *Context, name string, args ServiceSubscriptionArgs, opts ...ResourceOption) (*ServiceSubscription, error)
public ServiceSubscription(string name, ServiceSubscriptionArgs args, CustomResourceOptions? opts = null)
public ServiceSubscription(String name, ServiceSubscriptionArgs args)
public ServiceSubscription(String name, ServiceSubscriptionArgs args, CustomResourceOptions options)
type: alicloud:message:ServiceSubscription
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ServiceSubscriptionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ServiceSubscriptionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ServiceSubscriptionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ServiceSubscriptionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ServiceSubscriptionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var serviceSubscriptionResource = new AliCloud.Message.ServiceSubscription("serviceSubscriptionResource", new()
{
    Endpoint = "string",
    PushType = "string",
    SubscriptionName = "string",
    TopicName = "string",
    DlqPolicy = new AliCloud.Message.Inputs.ServiceSubscriptionDlqPolicyArgs
    {
        DeadLetterTargetQueue = "string",
        Enabled = false,
    },
    FilterTag = "string",
    NotifyContentFormat = "string",
    NotifyStrategy = "string",
});
Copy
example, err := message.NewServiceSubscription(ctx, "serviceSubscriptionResource", &message.ServiceSubscriptionArgs{
	Endpoint:         pulumi.String("string"),
	PushType:         pulumi.String("string"),
	SubscriptionName: pulumi.String("string"),
	TopicName:        pulumi.String("string"),
	DlqPolicy: &message.ServiceSubscriptionDlqPolicyArgs{
		DeadLetterTargetQueue: pulumi.String("string"),
		Enabled:               pulumi.Bool(false),
	},
	FilterTag:           pulumi.String("string"),
	NotifyContentFormat: pulumi.String("string"),
	NotifyStrategy:      pulumi.String("string"),
})
Copy
var serviceSubscriptionResource = new ServiceSubscription("serviceSubscriptionResource", ServiceSubscriptionArgs.builder()
    .endpoint("string")
    .pushType("string")
    .subscriptionName("string")
    .topicName("string")
    .dlqPolicy(ServiceSubscriptionDlqPolicyArgs.builder()
        .deadLetterTargetQueue("string")
        .enabled(false)
        .build())
    .filterTag("string")
    .notifyContentFormat("string")
    .notifyStrategy("string")
    .build());
Copy
service_subscription_resource = alicloud.message.ServiceSubscription("serviceSubscriptionResource",
    endpoint="string",
    push_type="string",
    subscription_name="string",
    topic_name="string",
    dlq_policy={
        "dead_letter_target_queue": "string",
        "enabled": False,
    },
    filter_tag="string",
    notify_content_format="string",
    notify_strategy="string")
Copy
const serviceSubscriptionResource = new alicloud.message.ServiceSubscription("serviceSubscriptionResource", {
    endpoint: "string",
    pushType: "string",
    subscriptionName: "string",
    topicName: "string",
    dlqPolicy: {
        deadLetterTargetQueue: "string",
        enabled: false,
    },
    filterTag: "string",
    notifyContentFormat: "string",
    notifyStrategy: "string",
});
Copy
type: alicloud:message:ServiceSubscription
properties:
    dlqPolicy:
        deadLetterTargetQueue: string
        enabled: false
    endpoint: string
    filterTag: string
    notifyContentFormat: string
    notifyStrategy: string
    pushType: string
    subscriptionName: string
    topicName: string
Copy

ServiceSubscription Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ServiceSubscription resource accepts the following input properties:

Endpoint
This property is required.
Changes to this property will trigger replacement.
string
The endpoint has three format. Available values format:

  • HTTP Format: http://xxx.com/xxx
  • Queue Format: acs:mns:{REGION}:{AccountID}:queues/{QueueName}
  • Email Format: mail:directmail:{MailAddress}
PushType This property is required. string
The Push type of Subscription. The Valid values: http, queue, mpush, alisms and email.
SubscriptionName
This property is required.
Changes to this property will trigger replacement.
string
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.
TopicName
This property is required.
Changes to this property will trigger replacement.
string
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.
DlqPolicy Pulumi.AliCloud.Message.Inputs.ServiceSubscriptionDlqPolicy
The dead-letter queue policy. See dlq_policy below.
FilterTag Changes to this property will trigger replacement. string
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.
NotifyContentFormat Changes to this property will trigger replacement. string
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.
NotifyStrategy string
The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails. Default value: BACKOFF_RETRY. Valid values:

  • BACKOFF_RETRY: retries with a fixed backoff interval.
  • EXPONENTIAL_DECAY_RETRY: retries with exponential backoff.
Endpoint
This property is required.
Changes to this property will trigger replacement.
string
The endpoint has three format. Available values format:

  • HTTP Format: http://xxx.com/xxx
  • Queue Format: acs:mns:{REGION}:{AccountID}:queues/{QueueName}
  • Email Format: mail:directmail:{MailAddress}
PushType This property is required. string
The Push type of Subscription. The Valid values: http, queue, mpush, alisms and email.
SubscriptionName
This property is required.
Changes to this property will trigger replacement.
string
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.
TopicName
This property is required.
Changes to this property will trigger replacement.
string
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.
DlqPolicy ServiceSubscriptionDlqPolicyArgs
The dead-letter queue policy. See dlq_policy below.
FilterTag Changes to this property will trigger replacement. string
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.
NotifyContentFormat Changes to this property will trigger replacement. string
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.
NotifyStrategy string
The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails. Default value: BACKOFF_RETRY. Valid values:

  • BACKOFF_RETRY: retries with a fixed backoff interval.
  • EXPONENTIAL_DECAY_RETRY: retries with exponential backoff.
endpoint
This property is required.
Changes to this property will trigger replacement.
String
The endpoint has three format. Available values format:

  • HTTP Format: http://xxx.com/xxx
  • Queue Format: acs:mns:{REGION}:{AccountID}:queues/{QueueName}
  • Email Format: mail:directmail:{MailAddress}
pushType This property is required. String
The Push type of Subscription. The Valid values: http, queue, mpush, alisms and email.
subscriptionName
This property is required.
Changes to this property will trigger replacement.
String
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.
topicName
This property is required.
Changes to this property will trigger replacement.
String
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.
dlqPolicy ServiceSubscriptionDlqPolicy
The dead-letter queue policy. See dlq_policy below.
filterTag Changes to this property will trigger replacement. String
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.
notifyContentFormat Changes to this property will trigger replacement. String
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.
notifyStrategy String
The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails. Default value: BACKOFF_RETRY. Valid values:

  • BACKOFF_RETRY: retries with a fixed backoff interval.
  • EXPONENTIAL_DECAY_RETRY: retries with exponential backoff.
endpoint
This property is required.
Changes to this property will trigger replacement.
string
The endpoint has three format. Available values format:

  • HTTP Format: http://xxx.com/xxx
  • Queue Format: acs:mns:{REGION}:{AccountID}:queues/{QueueName}
  • Email Format: mail:directmail:{MailAddress}
pushType This property is required. string
The Push type of Subscription. The Valid values: http, queue, mpush, alisms and email.
subscriptionName
This property is required.
Changes to this property will trigger replacement.
string
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.
topicName
This property is required.
Changes to this property will trigger replacement.
string
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.
dlqPolicy ServiceSubscriptionDlqPolicy
The dead-letter queue policy. See dlq_policy below.
filterTag Changes to this property will trigger replacement. string
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.
notifyContentFormat Changes to this property will trigger replacement. string
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.
notifyStrategy string
The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails. Default value: BACKOFF_RETRY. Valid values:

  • BACKOFF_RETRY: retries with a fixed backoff interval.
  • EXPONENTIAL_DECAY_RETRY: retries with exponential backoff.
endpoint
This property is required.
Changes to this property will trigger replacement.
str
The endpoint has three format. Available values format:

  • HTTP Format: http://xxx.com/xxx
  • Queue Format: acs:mns:{REGION}:{AccountID}:queues/{QueueName}
  • Email Format: mail:directmail:{MailAddress}
push_type This property is required. str
The Push type of Subscription. The Valid values: http, queue, mpush, alisms and email.
subscription_name
This property is required.
Changes to this property will trigger replacement.
str
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.
topic_name
This property is required.
Changes to this property will trigger replacement.
str
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.
dlq_policy ServiceSubscriptionDlqPolicyArgs
The dead-letter queue policy. See dlq_policy below.
filter_tag Changes to this property will trigger replacement. str
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.
notify_content_format Changes to this property will trigger replacement. str
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.
notify_strategy str
The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails. Default value: BACKOFF_RETRY. Valid values:

  • BACKOFF_RETRY: retries with a fixed backoff interval.
  • EXPONENTIAL_DECAY_RETRY: retries with exponential backoff.
endpoint
This property is required.
Changes to this property will trigger replacement.
String
The endpoint has three format. Available values format:

  • HTTP Format: http://xxx.com/xxx
  • Queue Format: acs:mns:{REGION}:{AccountID}:queues/{QueueName}
  • Email Format: mail:directmail:{MailAddress}
pushType This property is required. String
The Push type of Subscription. The Valid values: http, queue, mpush, alisms and email.
subscriptionName
This property is required.
Changes to this property will trigger replacement.
String
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.
topicName
This property is required.
Changes to this property will trigger replacement.
String
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.
dlqPolicy Property Map
The dead-letter queue policy. See dlq_policy below.
filterTag Changes to this property will trigger replacement. String
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.
notifyContentFormat Changes to this property will trigger replacement. String
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.
notifyStrategy String
The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails. Default value: BACKOFF_RETRY. Valid values:

  • BACKOFF_RETRY: retries with a fixed backoff interval.
  • EXPONENTIAL_DECAY_RETRY: retries with exponential backoff.

Outputs

All input properties are implicitly available as output properties. Additionally, the ServiceSubscription resource produces the following output properties:

CreateTime int
(Available since v1.244.0) The time when the subscription was created.
Id string
The provider-assigned unique ID for this managed resource.
CreateTime int
(Available since v1.244.0) The time when the subscription was created.
Id string
The provider-assigned unique ID for this managed resource.
createTime Integer
(Available since v1.244.0) The time when the subscription was created.
id String
The provider-assigned unique ID for this managed resource.
createTime number
(Available since v1.244.0) The time when the subscription was created.
id string
The provider-assigned unique ID for this managed resource.
create_time int
(Available since v1.244.0) The time when the subscription was created.
id str
The provider-assigned unique ID for this managed resource.
createTime Number
(Available since v1.244.0) The time when the subscription was created.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing ServiceSubscription Resource

Get an existing ServiceSubscription resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ServiceSubscriptionState, opts?: CustomResourceOptions): ServiceSubscription
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        create_time: Optional[int] = None,
        dlq_policy: Optional[ServiceSubscriptionDlqPolicyArgs] = None,
        endpoint: Optional[str] = None,
        filter_tag: Optional[str] = None,
        notify_content_format: Optional[str] = None,
        notify_strategy: Optional[str] = None,
        push_type: Optional[str] = None,
        subscription_name: Optional[str] = None,
        topic_name: Optional[str] = None) -> ServiceSubscription
func GetServiceSubscription(ctx *Context, name string, id IDInput, state *ServiceSubscriptionState, opts ...ResourceOption) (*ServiceSubscription, error)
public static ServiceSubscription Get(string name, Input<string> id, ServiceSubscriptionState? state, CustomResourceOptions? opts = null)
public static ServiceSubscription get(String name, Output<String> id, ServiceSubscriptionState state, CustomResourceOptions options)
resources:  _:    type: alicloud:message:ServiceSubscription    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
CreateTime int
(Available since v1.244.0) The time when the subscription was created.
DlqPolicy Pulumi.AliCloud.Message.Inputs.ServiceSubscriptionDlqPolicy
The dead-letter queue policy. See dlq_policy below.
Endpoint Changes to this property will trigger replacement. string
The endpoint has three format. Available values format:

  • HTTP Format: http://xxx.com/xxx
  • Queue Format: acs:mns:{REGION}:{AccountID}:queues/{QueueName}
  • Email Format: mail:directmail:{MailAddress}
FilterTag Changes to this property will trigger replacement. string
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.
NotifyContentFormat Changes to this property will trigger replacement. string
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.
NotifyStrategy string
The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails. Default value: BACKOFF_RETRY. Valid values:

  • BACKOFF_RETRY: retries with a fixed backoff interval.
  • EXPONENTIAL_DECAY_RETRY: retries with exponential backoff.
PushType string
The Push type of Subscription. The Valid values: http, queue, mpush, alisms and email.
SubscriptionName Changes to this property will trigger replacement. string
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.
TopicName Changes to this property will trigger replacement. string
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.
CreateTime int
(Available since v1.244.0) The time when the subscription was created.
DlqPolicy ServiceSubscriptionDlqPolicyArgs
The dead-letter queue policy. See dlq_policy below.
Endpoint Changes to this property will trigger replacement. string
The endpoint has three format. Available values format:

  • HTTP Format: http://xxx.com/xxx
  • Queue Format: acs:mns:{REGION}:{AccountID}:queues/{QueueName}
  • Email Format: mail:directmail:{MailAddress}
FilterTag Changes to this property will trigger replacement. string
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.
NotifyContentFormat Changes to this property will trigger replacement. string
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.
NotifyStrategy string
The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails. Default value: BACKOFF_RETRY. Valid values:

  • BACKOFF_RETRY: retries with a fixed backoff interval.
  • EXPONENTIAL_DECAY_RETRY: retries with exponential backoff.
PushType string
The Push type of Subscription. The Valid values: http, queue, mpush, alisms and email.
SubscriptionName Changes to this property will trigger replacement. string
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.
TopicName Changes to this property will trigger replacement. string
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.
createTime Integer
(Available since v1.244.0) The time when the subscription was created.
dlqPolicy ServiceSubscriptionDlqPolicy
The dead-letter queue policy. See dlq_policy below.
endpoint Changes to this property will trigger replacement. String
The endpoint has three format. Available values format:

  • HTTP Format: http://xxx.com/xxx
  • Queue Format: acs:mns:{REGION}:{AccountID}:queues/{QueueName}
  • Email Format: mail:directmail:{MailAddress}
filterTag Changes to this property will trigger replacement. String
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.
notifyContentFormat Changes to this property will trigger replacement. String
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.
notifyStrategy String
The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails. Default value: BACKOFF_RETRY. Valid values:

  • BACKOFF_RETRY: retries with a fixed backoff interval.
  • EXPONENTIAL_DECAY_RETRY: retries with exponential backoff.
pushType String
The Push type of Subscription. The Valid values: http, queue, mpush, alisms and email.
subscriptionName Changes to this property will trigger replacement. String
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.
topicName Changes to this property will trigger replacement. String
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.
createTime number
(Available since v1.244.0) The time when the subscription was created.
dlqPolicy ServiceSubscriptionDlqPolicy
The dead-letter queue policy. See dlq_policy below.
endpoint Changes to this property will trigger replacement. string
The endpoint has three format. Available values format:

  • HTTP Format: http://xxx.com/xxx
  • Queue Format: acs:mns:{REGION}:{AccountID}:queues/{QueueName}
  • Email Format: mail:directmail:{MailAddress}
filterTag Changes to this property will trigger replacement. string
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.
notifyContentFormat Changes to this property will trigger replacement. string
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.
notifyStrategy string
The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails. Default value: BACKOFF_RETRY. Valid values:

  • BACKOFF_RETRY: retries with a fixed backoff interval.
  • EXPONENTIAL_DECAY_RETRY: retries with exponential backoff.
pushType string
The Push type of Subscription. The Valid values: http, queue, mpush, alisms and email.
subscriptionName Changes to this property will trigger replacement. string
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.
topicName Changes to this property will trigger replacement. string
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.
create_time int
(Available since v1.244.0) The time when the subscription was created.
dlq_policy ServiceSubscriptionDlqPolicyArgs
The dead-letter queue policy. See dlq_policy below.
endpoint Changes to this property will trigger replacement. str
The endpoint has three format. Available values format:

  • HTTP Format: http://xxx.com/xxx
  • Queue Format: acs:mns:{REGION}:{AccountID}:queues/{QueueName}
  • Email Format: mail:directmail:{MailAddress}
filter_tag Changes to this property will trigger replacement. str
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.
notify_content_format Changes to this property will trigger replacement. str
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.
notify_strategy str
The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails. Default value: BACKOFF_RETRY. Valid values:

  • BACKOFF_RETRY: retries with a fixed backoff interval.
  • EXPONENTIAL_DECAY_RETRY: retries with exponential backoff.
push_type str
The Push type of Subscription. The Valid values: http, queue, mpush, alisms and email.
subscription_name Changes to this property will trigger replacement. str
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.
topic_name Changes to this property will trigger replacement. str
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.
createTime Number
(Available since v1.244.0) The time when the subscription was created.
dlqPolicy Property Map
The dead-letter queue policy. See dlq_policy below.
endpoint Changes to this property will trigger replacement. String
The endpoint has three format. Available values format:

  • HTTP Format: http://xxx.com/xxx
  • Queue Format: acs:mns:{REGION}:{AccountID}:queues/{QueueName}
  • Email Format: mail:directmail:{MailAddress}
filterTag Changes to this property will trigger replacement. String
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.
notifyContentFormat Changes to this property will trigger replacement. String
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.
notifyStrategy String
The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails. Default value: BACKOFF_RETRY. Valid values:

  • BACKOFF_RETRY: retries with a fixed backoff interval.
  • EXPONENTIAL_DECAY_RETRY: retries with exponential backoff.
pushType String
The Push type of Subscription. The Valid values: http, queue, mpush, alisms and email.
subscriptionName Changes to this property will trigger replacement. String
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.
topicName Changes to this property will trigger replacement. String
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.

Supporting Types

ServiceSubscriptionDlqPolicy
, ServiceSubscriptionDlqPolicyArgs

DeadLetterTargetQueue string
The queue to which dead-letter messages are delivered.
Enabled bool
Specifies whether to enable the dead-letter message delivery. Valid values: true, false.
DeadLetterTargetQueue string
The queue to which dead-letter messages are delivered.
Enabled bool
Specifies whether to enable the dead-letter message delivery. Valid values: true, false.
deadLetterTargetQueue String
The queue to which dead-letter messages are delivered.
enabled Boolean
Specifies whether to enable the dead-letter message delivery. Valid values: true, false.
deadLetterTargetQueue string
The queue to which dead-letter messages are delivered.
enabled boolean
Specifies whether to enable the dead-letter message delivery. Valid values: true, false.
dead_letter_target_queue str
The queue to which dead-letter messages are delivered.
enabled bool
Specifies whether to enable the dead-letter message delivery. Valid values: true, false.
deadLetterTargetQueue String
The queue to which dead-letter messages are delivered.
enabled Boolean
Specifies whether to enable the dead-letter message delivery. Valid values: true, false.

Import

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

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

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.