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:

NamePrefix string

A string to filter resulting topics by their name prefixs.

OutputFile string
NamePrefix string

A string to filter resulting topics by their name prefixs.

OutputFile string
namePrefix string

A string to filter resulting topics by their name prefixs.

outputFile 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.AliCloud.Mns.Outputs.GetTopicsTopic>

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

NamePrefix string
OutputFile string
Id string

The provider-assigned unique ID for this managed resource.

Names []string

A list of topic names.

Topics []GetTopicsTopic

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

NamePrefix string
OutputFile string
id string

The provider-assigned unique ID for this managed resource.

names string[]

A list of topic names.

topics GetTopicsTopic[]

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

namePrefix string
outputFile string
id str

The provider-assigned unique ID for this managed resource.

names List[str]

A list of topic names.

topics List[GetTopicsTopic]

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.

LoggingEnabled bool

Whether to enable logging.

MaximumMessageSize int

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.

LoggingEnabled bool

Whether to enable logging.

MaximumMessageSize int

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.

loggingEnabled boolean

Whether to enable logging.

maximumMessageSize number

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_size float

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 alicloud Terraform Provider.