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:
- Instance
Id string - Name
Regex string A regex string to filter results by the topic name.
- Output
File string
- Instance
Id string - Name
Regex string A regex string to filter results by the topic name.
- Output
File string
- instance
Id string - name
Regex string A regex string to filter results by the topic name.
- output
File 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.
- Instance
Id string - Names List<string>
A list of topic names.
- Topics
List<Pulumi.
Ali Cloud. Action Trail. Outputs. Get Topics Topic> A list of topics. Each element contains the following attributes:
- Name
Regex string - Output
File string
- Id string
The provider-assigned unique ID for this managed resource.
- Instance
Id string - Names []string
A list of topic names.
- Topics
[]Get
Topics Topic A list of topics. Each element contains the following attributes:
- Name
Regex string - Output
File string
- id string
The provider-assigned unique ID for this managed resource.
- instance
Id string - names string[]
A list of topic names.
- topics
Get
Topics Topic[] A list of topics. Each element contains the following attributes:
- name
Regex string - output
File 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[Get
Topics Topic] 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.
- Compact
Topic bool whether the current topic is kafka compact topic or not.
- Create
Time string Time of creation.
- Local
Topic bool whether the current topic is kafka local topic or not.
- Partition
Num 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.
- Compact
Topic bool whether the current topic is kafka compact topic or not.
- Create
Time string Time of creation.
- Local
Topic bool whether the current topic is kafka local topic or not.
- Partition
Num 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.
- compact
Topic boolean whether the current topic is kafka compact topic or not.
- create
Time string Time of creation.
- local
Topic boolean whether the current topic is kafka local topic or not.
- partition
Num 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
alicloudTerraform Provider.