GetTopics
This data source provides a list of MNS topics in an Alibaba Cloud account according to the specified parameters.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var topics = Output.Create(AliCloud.Mns.GetTopics.InvokeAsync(new AliCloud.Mns.GetTopicsArgs
{
NamePrefix = "tf-",
}));
this.FirstTopicId = topics.Apply(topics => topics.Topics[0].Id);
}
[Output("firstTopicId")]
public Output<string> FirstTopicId { get; set; }
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
topics = alicloud.mns.get_topics(name_prefix="tf-")
pulumi.export("firstTopicId", topics.topics[0]["id"])import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const topics = pulumi.output(alicloud.mns.getTopics({
namePrefix: "tf-",
}, { async: true }));
export const firstTopicId = topics.topics[0].id;Using GetTopics
function getTopics(args: GetTopicsArgs, opts?: InvokeOptions): Promise<GetTopicsResult>function get_topics(name_prefix=None, output_file=None, opts=None)func GetTopics(ctx *Context, args *GetTopicsArgs, opts ...InvokeOption) (*GetTopicsResult, error)public static class GetTopics {
public static Task<GetTopicsResult> InvokeAsync(GetTopicsArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Name
Prefix string A string to filter resulting topics by their name prefixs.
- Output
File string
- Name
Prefix string A string to filter resulting topics by their name prefixs.
- Output
File string
- name
Prefix string A string to filter resulting topics by their name prefixs.
- output
File string
- name_
prefix str A string to filter resulting topics by their name prefixs.
- output_
file str
GetTopics Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Names List<string>
A list of topic names.
- Topics
List<Pulumi.
Ali Cloud. Mns. Outputs. Get Topics Topic> A list of topics. Each element contains the following attributes:
- Name
Prefix string - Output
File string
- Id string
The provider-assigned unique ID for this managed resource.
- Names []string
A list of topic names.
- Topics
[]Get
Topics Topic A list of topics. Each element contains the following attributes:
- Name
Prefix string - Output
File string
- id string
The provider-assigned unique ID for this managed resource.
- names string[]
A list of topic names.
- topics
Get
Topics Topic[] A list of topics. Each element contains the following attributes:
- name
Prefix string - output
File string
- id str
The provider-assigned unique ID for this managed resource.
- names List[str]
A list of topic names.
- topics
List[Get
Topics Topic] A list of topics. Each element contains the following attributes:
- name_
prefix str - output_
file str
Supporting Types
GetTopicsTopic
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Id string
The id of the topic. The value is set to
name.- Logging
Enabled bool Whether to enable logging.
- Maximum
Message intSize This indicates the maximum length, in bytes, of any message body sent to the topic.
- Name string
The name of the topic.
- Id string
The id of the topic. The value is set to
name.- Logging
Enabled bool Whether to enable logging.
- Maximum
Message intSize This indicates the maximum length, in bytes, of any message body sent to the topic.
- Name string
The name of the topic.
- id string
The id of the topic. The value is set to
name.- logging
Enabled boolean Whether to enable logging.
- maximum
Message numberSize This indicates the maximum length, in bytes, of any message body sent to the topic.
- name string
The name of the topic.
- id str
The id of the topic. The value is set to
name.- logging_
enabled bool Whether to enable logging.
- maximum_
message_ floatsize This indicates the maximum length, in bytes, of any message body sent to the topic.
- name str
The name of the topic.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.