getServiceTopics

This data source provides the Message Notification Service Topics of the current Alibaba Cloud user.

NOTE: Available in v1.188.0+.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.message.MessageFunctions;
import com.pulumi.alicloud.message.inputs.GetServiceTopicsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var ids = MessageFunctions.getServiceTopics(GetServiceTopicsArgs.builder()
.ids("example_id")
.build());
ctx.export("topicId1", ids.applyValue(getServiceTopicsResult -> getServiceTopicsResult.topics()[0].id()));
final var name = MessageFunctions.getServiceTopics(GetServiceTopicsArgs.builder()
.topicName("tf-example")
.build());
ctx.export("topicId2", name.applyValue(getServiceTopicsResult -> getServiceTopicsResult.topics()[0].id()));
}
}

Return

A collection of values returned by getServiceTopics.

Parameters

argument

A collection of arguments for invoking getServiceTopics.


suspend fun getServiceTopics(ids: List<String>? = null, nameRegex: String? = null, outputFile: String? = null, pageNumber: Int? = null, pageSize: Int? = null, topicName: String? = null): GetServiceTopicsResult

Return

A collection of values returned by getServiceTopics.

See also

Parameters

ids

A list of Topic IDs. Its element value is same as Topic Name.

nameRegex

A regex string to filter results by Topic name.

outputFile

File name where to save data source results (after running pulumi preview).

pageNumber
pageSize
topicName

The name of the topic.


Return

A collection of values returned by getServiceTopics.

See also

Parameters

argument

Builder for com.pulumi.alicloud.message.kotlin.inputs.GetServiceTopicsPlainArgs.