getTopic

suspend fun getTopic(argument: GetTopicPlainArgs): GetTopicResult

Use this data source to access information about an existing Service Bus Topic.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.servicebus.ServicebusFunctions;
import com.pulumi.azure.servicebus.inputs.GetTopicArgs;
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 example = ServicebusFunctions.getTopic(GetTopicArgs.builder()
.name("existing")
.namespaceId("existing")
.build());
ctx.export("id", example.applyValue(getTopicResult -> getTopicResult.id()));
}
}

Return

A collection of values returned by getTopic.

Parameters

argument

A collection of arguments for invoking getTopic.


suspend fun getTopic(name: String, namespaceId: String? = null, namespaceName: String? = null, resourceGroupName: String? = null): GetTopicResult

Return

A collection of values returned by getTopic.

See also

Parameters

name

The name of this Service Bus Topic.

namespaceId

The ID of the ServiceBus Namespace where the Service Bus Topic exists.

namespaceName

The name of the Service Bus Namespace.

resourceGroupName

The name of the Resource Group where the Service Bus Topic exists.

Note: namespace_name and resource_group_name has been deprecated and will be removed in version 4.0 of the provider in favour of namespace_id.


suspend fun getTopic(argument: suspend GetTopicPlainArgsBuilder.() -> Unit): GetTopicResult

Return

A collection of values returned by getTopic.

See also

Parameters

argument

Builder for com.pulumi.azure.servicebus.kotlin.inputs.GetTopicPlainArgs.