GetTopicSubscriptions

This data source provides a list of MNS topic subscriptions in an Alibaba Cloud account according to the specified parameters.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var subscriptions = Output.Create(AliCloud.Mns.GetTopicSubscriptions.InvokeAsync(new AliCloud.Mns.GetTopicSubscriptionsArgs
        {
            NamePrefix = "tf-",
            TopicName = "topic_name",
        }));
        this.FirstTopicSubscriptionId = subscriptions.Apply(subscriptions => subscriptions.Subscriptions[0].Id);
    }

    [Output("firstTopicSubscriptionId")]
    public Output<string> FirstTopicSubscriptionId { get; set; }
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

subscriptions = alicloud.mns.get_topic_subscriptions(name_prefix="tf-",
    topic_name="topic_name")
pulumi.export("firstTopicSubscriptionId", subscriptions.subscriptions[0]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const subscriptions = pulumi.output(alicloud.mns.getTopicSubscriptions({
    namePrefix: "tf-",
    topicName: "topic_name",
}, { async: true }));

export const firstTopicSubscriptionId = subscriptions.subscriptions[0].id;

Using GetTopicSubscriptions

function getTopicSubscriptions(args: GetTopicSubscriptionsArgs, opts?: InvokeOptions): Promise<GetTopicSubscriptionsResult>
function  get_topic_subscriptions(name_prefix=None, output_file=None, topic_name=None, opts=None)
func GetTopicSubscriptions(ctx *Context, args *GetTopicSubscriptionsArgs, opts ...InvokeOption) (*GetTopicSubscriptionsResult, error)
public static class GetTopicSubscriptions {
    public static Task<GetTopicSubscriptionsResult> InvokeAsync(GetTopicSubscriptionsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

TopicName 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.

NamePrefix string

A string to filter resulting subscriptions of the topic by their name prefixs.

OutputFile string
TopicName 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.

NamePrefix string

A string to filter resulting subscriptions of the topic by their name prefixs.

OutputFile string
topicName 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.

namePrefix string

A string to filter resulting subscriptions of the topic by their name prefixs.

outputFile string
topic_name str

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.

name_prefix str

A string to filter resulting subscriptions of the topic by their name prefixs.

output_file str

GetTopicSubscriptions Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Names List<string>

A list of subscription names.

Subscriptions List<Pulumi.AliCloud.Mns.Outputs.GetTopicSubscriptionsSubscription>

A list of subscriptions. Each element contains the following attributes:

TopicName string
NamePrefix string
OutputFile string
Id string

The provider-assigned unique ID for this managed resource.

Names []string

A list of subscription names.

Subscriptions []GetTopicSubscriptionsSubscription

A list of subscriptions. Each element contains the following attributes:

TopicName string
NamePrefix string
OutputFile string
id string

The provider-assigned unique ID for this managed resource.

names string[]

A list of subscription names.

subscriptions GetTopicSubscriptionsSubscription[]

A list of subscriptions. Each element contains the following attributes:

topicName string
namePrefix string
outputFile string
id str

The provider-assigned unique ID for this managed resource.

names List[str]

A list of subscription names.

subscriptions List[GetTopicSubscriptionsSubscription]

A list of subscriptions. Each element contains the following attributes:

topic_name str
name_prefix str
output_file str

Supporting Types

GetTopicSubscriptionsSubscription

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Endpoint string

Describe the terminal address of the message received in this subscription. * filter_tag- A string to filter resulting messages of the topic by their message tag.

FilterTag string
Id string

The ID of the topic subscription. The value is set to name.

Name string

The name of the subscription. * topic_name- The topic which The subscription belongs to was named with the name.

NotifyContentFormat string

The NotifyContentFormat attribute of Subscription. This attribute specifies the content format of the messages pushed to users.

NotifyStrategy string

The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails.

TopicName 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.

Endpoint string

Describe the terminal address of the message received in this subscription. * filter_tag- A string to filter resulting messages of the topic by their message tag.

FilterTag string
Id string

The ID of the topic subscription. The value is set to name.

Name string

The name of the subscription. * topic_name- The topic which The subscription belongs to was named with the name.

NotifyContentFormat string

The NotifyContentFormat attribute of Subscription. This attribute specifies the content format of the messages pushed to users.

NotifyStrategy string

The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails.

TopicName 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.

endpoint string

Describe the terminal address of the message received in this subscription. * filter_tag- A string to filter resulting messages of the topic by their message tag.

filterTag string
id string

The ID of the topic subscription. The value is set to name.

name string

The name of the subscription. * topic_name- The topic which The subscription belongs to was named with the name.

notifyContentFormat string

The NotifyContentFormat attribute of Subscription. This attribute specifies the content format of the messages pushed to users.

notifyStrategy string

The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails.

topicName 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.

endpoint str

Describe the terminal address of the message received in this subscription. * filter_tag- A string to filter resulting messages of the topic by their message tag.

filter_tag str
id str

The ID of the topic subscription. The value is set to name.

name str

The name of the subscription. * topic_name- The topic which The subscription belongs to was named with the name.

notify_content_format str

The NotifyContentFormat attribute of Subscription. This attribute specifies the content format of the messages pushed to users.

notify_strategy str

The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails.

topic_name str

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.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.