getSubscription

Use this data source to access information about an existing ServiceBus Subscription.

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.GetSubscriptionArgs;
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.getSubscription(GetSubscriptionArgs.builder()
.name("examplesubscription")
.topicId("exampletopic")
.build());
ctx.export("servicebusSubscription", data.azurerm_servicebus_namespace().example());
}
}

Return

A collection of values returned by getSubscription.

Parameters

argument

A collection of arguments for invoking getSubscription.


suspend fun getSubscription(name: String, namespaceName: String? = null, resourceGroupName: String? = null, topicId: String? = null, topicName: String? = null): GetSubscriptionResult

Return

A collection of values returned by getSubscription.

See also

Parameters

name

Specifies the name of the ServiceBus Subscription.

namespaceName

The name of the ServiceBus Namespace.

resourceGroupName

Specifies the name of the Resource Group where the ServiceBus Namespace exists.

topicId

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

topicName

The name of the ServiceBus Topic.

Note: namespace_nameresource_group_name and topic_name has been deprecated and will be removed in version 4.0 of the provider in favour of topic_id.


Return

A collection of values returned by getSubscription.

See also

Parameters

argument

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