get Topic Authorization Rule
suspend fun getTopicAuthorizationRule(argument: GetTopicAuthorizationRulePlainArgs): GetTopicAuthorizationRuleResult
Use this data source to access information about a ServiceBus Topic Authorization Rule within a ServiceBus Topic.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.servicebus.getTopicAuthorizationRule({
name: "example-tfex_name",
resourceGroupName: "example-resources",
namespaceName: "example-namespace",
topicName: "example-servicebus_topic",
});
export const servicebusAuthorizationRuleId = exampleAzuremServicebusTopicAuthorizationRule.id;
Content copied to clipboard
import pulumi
import pulumi_azure as azure
example = azure.servicebus.get_topic_authorization_rule(name="example-tfex_name",
resource_group_name="example-resources",
namespace_name="example-namespace",
topic_name="example-servicebus_topic")
pulumi.export("servicebusAuthorizationRuleId", example_azurem_servicebus_topic_authorization_rule["id"])
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.ServiceBus.GetTopicAuthorizationRule.Invoke(new()
{
Name = "example-tfex_name",
ResourceGroupName = "example-resources",
NamespaceName = "example-namespace",
TopicName = "example-servicebus_topic",
});
return new Dictionary<string, object?>
{
["servicebusAuthorizationRuleId"] = exampleAzuremServicebusTopicAuthorizationRule.Id,
};
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/servicebus"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := servicebus.LookupTopicAuthorizationRule(ctx, &servicebus.LookupTopicAuthorizationRuleArgs{
Name: "example-tfex_name",
ResourceGroupName: pulumi.StringRef("example-resources"),
NamespaceName: pulumi.StringRef("example-namespace"),
TopicName: pulumi.StringRef("example-servicebus_topic"),
}, nil)
if err != nil {
return err
}
ctx.Export("servicebusAuthorizationRuleId", exampleAzuremServicebusTopicAuthorizationRule.Id)
return nil
})
}
Content copied to clipboard
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.GetTopicAuthorizationRuleArgs;
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.getTopicAuthorizationRule(GetTopicAuthorizationRuleArgs.builder()
.name("example-tfex_name")
.resourceGroupName("example-resources")
.namespaceName("example-namespace")
.topicName("example-servicebus_topic")
.build());
ctx.export("servicebusAuthorizationRuleId", exampleAzuremServicebusTopicAuthorizationRule.id());
}
}
Content copied to clipboard
variables:
example:
fn::invoke:
function: azure:servicebus:getTopicAuthorizationRule
arguments:
name: example-tfex_name
resourceGroupName: example-resources
namespaceName: example-namespace
topicName: example-servicebus_topic
outputs:
servicebusAuthorizationRuleId: ${exampleAzuremServicebusTopicAuthorizationRule.id}
Content copied to clipboard
API Providers
This data source uses the following Azure API Providers:
Microsoft.ServiceBus
: 2021-06-01-preview
Return
A collection of values returned by getTopicAuthorizationRule.
Parameters
argument
A collection of arguments for invoking getTopicAuthorizationRule.
suspend fun getTopicAuthorizationRule(name: String, namespaceName: String? = null, queueName: String? = null, resourceGroupName: String? = null, topicId: String? = null, topicName: String? = null): GetTopicAuthorizationRuleResult
Return
A collection of values returned by getTopicAuthorizationRule.
Parameters
name
The name of the ServiceBus Topic Authorization Rule resource.
namespace Name
The name of the ServiceBus Namespace.
queue Name
resource Group Name
The name of the resource group in which the ServiceBus Namespace exists.
topic Id
topic Name
The name of the ServiceBus Topic.
See also
suspend fun getTopicAuthorizationRule(argument: suspend GetTopicAuthorizationRulePlainArgsBuilder.() -> Unit): GetTopicAuthorizationRuleResult
Return
A collection of values returned by getTopicAuthorizationRule.
Parameters
argument
Builder for com.pulumi.azure.servicebus.kotlin.inputs.GetTopicAuthorizationRulePlainArgs.