GetTopics

This data source provides a list of ALIKAFKA Topics in an Alibaba Cloud account according to the specified filters.

NOTE: Available in 1.56.0+

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var topicsDs = Output.Create(AliCloud.ActionTrail.GetTopics.InvokeAsync(new AliCloud.ActionTrail.GetTopicsArgs
        {
            InstanceId = "xxx",
            NameRegex = "alikafkaTopicName",
            OutputFile = "topics.txt",
        }));
        this.FirstTopicName = topicsDs.Apply(topicsDs => topicsDs.Topics[0].Topic);
    }

    [Output("firstTopicName")]
    public Output<string> FirstTopicName { get; set; }
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

topics_ds = alicloud.actiontrail.get_topics(instance_id="xxx",
    name_regex="alikafkaTopicName",
    output_file="topics.txt")
pulumi.export("firstTopicName", topics_ds.topics[0]["topic"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const topicsDs = pulumi.output(alicloud.actiontrail.getTopics({
    instanceId: "xxx",
    nameRegex: "alikafkaTopicName",
    outputFile: "topics.txt",
}, { async: true }));

export const firstTopicName = topicsDs.topics[0].topic;

Using GetTopics

function getTopics(args: GetTopicsArgs, opts?: InvokeOptions): Promise<GetTopicsResult>
function  get_topics(instance_id=None, name_regex=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:

InstanceId string
NameRegex string

A regex string to filter results by the topic name.

OutputFile string
InstanceId string
NameRegex string

A regex string to filter results by the topic name.

OutputFile string
instanceId string
nameRegex string

A regex string to filter results by the topic name.

outputFile string
instance_id str
name_regex str

A regex string to filter results by the topic name.

output_file str

GetTopics Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

InstanceId string
Names List<string>

A list of topic names.

Topics List<Pulumi.AliCloud.ActionTrail.Outputs.GetTopicsTopic>

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

NameRegex string
OutputFile string
Id string

The provider-assigned unique ID for this managed resource.

InstanceId string
Names []string

A list of topic names.

Topics []GetTopicsTopic

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

NameRegex string
OutputFile string
id string

The provider-assigned unique ID for this managed resource.

instanceId string
names string[]

A list of topic names.

topics GetTopicsTopic[]

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

nameRegex string
outputFile string
id str

The provider-assigned unique ID for this managed resource.

instance_id str
names List[str]

A list of topic names.

topics List[GetTopicsTopic]

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

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

CompactTopic bool

whether the current topic is kafka compact topic or not.

CreateTime string

Time of creation.

LocalTopic bool

whether the current topic is kafka local topic or not.

PartitionNum int

Partition number of the topic.

Remark string

Remark of the topic.

Status int

The current status code of the topic. There are three values to describe the topic status: 0 stands for the topic is in service, 1 stands for freezing and 2 stands for pause.

Topic string

The name of the topic.

CompactTopic bool

whether the current topic is kafka compact topic or not.

CreateTime string

Time of creation.

LocalTopic bool

whether the current topic is kafka local topic or not.

PartitionNum int

Partition number of the topic.

Remark string

Remark of the topic.

Status int

The current status code of the topic. There are three values to describe the topic status: 0 stands for the topic is in service, 1 stands for freezing and 2 stands for pause.

Topic string

The name of the topic.

compactTopic boolean

whether the current topic is kafka compact topic or not.

createTime string

Time of creation.

localTopic boolean

whether the current topic is kafka local topic or not.

partitionNum number

Partition number of the topic.

remark string

Remark of the topic.

status number

The current status code of the topic. There are three values to describe the topic status: 0 stands for the topic is in service, 1 stands for freezing and 2 stands for pause.

topic string

The name of the topic.

compact_topic bool

whether the current topic is kafka compact topic or not.

create_time str

Time of creation.

local_topic bool

whether the current topic is kafka local topic or not.

partition_num float

Partition number of the topic.

remark str

Remark of the topic.

status float

The current status code of the topic. There are three values to describe the topic status: 0 stands for the topic is in service, 1 stands for freezing and 2 stands for pause.

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