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:
- Topic
Name 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.
- Name
Prefix string A string to filter resulting subscriptions of the topic by their name prefixs.
- Output
File string
- Topic
Name 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.
- Name
Prefix string A string to filter resulting subscriptions of the topic by their name prefixs.
- Output
File string
- topic
Name 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.
- name
Prefix string A string to filter resulting subscriptions of the topic by their name prefixs.
- output
File 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.
Ali Cloud. Mns. Outputs. Get Topic Subscriptions Subscription> A list of subscriptions. Each element contains the following attributes:
- Topic
Name string - Name
Prefix string - Output
File string
- Id string
The provider-assigned unique ID for this managed resource.
- Names []string
A list of subscription names.
- Subscriptions
[]Get
Topic Subscriptions Subscription A list of subscriptions. Each element contains the following attributes:
- Topic
Name string - Name
Prefix string - Output
File string
- id string
The provider-assigned unique ID for this managed resource.
- names string[]
A list of subscription names.
- subscriptions
Get
Topic Subscriptions Subscription[] A list of subscriptions. Each element contains the following attributes:
- topic
Name string - name
Prefix string - output
File string
- id str
The provider-assigned unique ID for this managed resource.
- names List[str]
A list of subscription names.
- subscriptions
List[Get
Topic Subscriptions Subscription] 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.- Filter
Tag 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.- Notify
Content stringFormat The NotifyContentFormat attribute of Subscription. This attribute specifies the content format of the messages pushed to users.
- Notify
Strategy string The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails.
- Topic
Name 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.- Filter
Tag 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.- Notify
Content stringFormat The NotifyContentFormat attribute of Subscription. This attribute specifies the content format of the messages pushed to users.
- Notify
Strategy string The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails.
- Topic
Name 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.- filter
Tag 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.- notify
Content stringFormat The NotifyContentFormat attribute of Subscription. This attribute specifies the content format of the messages pushed to users.
- notify
Strategy string The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails.
- topic
Name 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_ strformat 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
alicloudTerraform Provider.