GetNamespaceAuthorizationRule

Use this data source to access information about an existing ServiceBus Namespace Authorization Rule.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.ServiceBus.GetNamespaceAuthorizationRule.InvokeAsync(new Azure.ServiceBus.GetNamespaceAuthorizationRuleArgs
        {
            Name = "examplerule",
            NamespaceName = "examplenamespace",
            ResourceGroupName = "example-resources",
        }));
        this.RuleId = example.Apply(example => example.Id);
    }

    [Output("ruleId")]
    public Output<string> RuleId { get; set; }
}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/servicebus"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        example, err := servicebus.LookupNamespaceAuthorizationRule(ctx, &servicebus.LookupNamespaceAuthorizationRuleArgs{
            Name:              "examplerule",
            NamespaceName:     "examplenamespace",
            ResourceGroupName: "example-resources",
        }, nil)
        if err != nil {
            return err
        }
        ctx.Export("ruleId", example.Id)
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example = azure.servicebus.get_namespace_authorization_rule(name="examplerule",
    namespace_name="examplenamespace",
    resource_group_name="example-resources")
pulumi.export("ruleId", example.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.servicebus.getNamespaceAuthorizationRule({
    name: "examplerule",
    namespaceName: "examplenamespace",
    resourceGroupName: "example-resources",
});
export const ruleId = example.then(example => example.id);

Using GetNamespaceAuthorizationRule

function getNamespaceAuthorizationRule(args: GetNamespaceAuthorizationRuleArgs, opts?: InvokeOptions): Promise<GetNamespaceAuthorizationRuleResult>
function  get_namespace_authorization_rule(name=None, namespace_name=None, resource_group_name=None, opts=None)
func LookupNamespaceAuthorizationRule(ctx *Context, args *LookupNamespaceAuthorizationRuleArgs, opts ...InvokeOption) (*LookupNamespaceAuthorizationRuleResult, error)

Note: This function is named LookupNamespaceAuthorizationRule in the Go SDK.

public static class GetNamespaceAuthorizationRule {
    public static Task<GetNamespaceAuthorizationRuleResult> InvokeAsync(GetNamespaceAuthorizationRuleArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

Specifies the name of the ServiceBus Namespace Authorization Rule.

NamespaceName string

Specifies the name of the ServiceBus Namespace.

ResourceGroupName string

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

Name string

Specifies the name of the ServiceBus Namespace Authorization Rule.

NamespaceName string

Specifies the name of the ServiceBus Namespace.

ResourceGroupName string

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

name string

Specifies the name of the ServiceBus Namespace Authorization Rule.

namespaceName string

Specifies the name of the ServiceBus Namespace.

resourceGroupName string

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

name str

Specifies the name of the ServiceBus Namespace Authorization Rule.

namespace_name str

Specifies the name of the ServiceBus Namespace.

resource_group_name str

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

GetNamespaceAuthorizationRule Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Name string
NamespaceName string
PrimaryConnectionString string

The primary connection string for the authorization rule.

PrimaryKey string

The primary access key for the authorization rule.

ResourceGroupName string
SecondaryConnectionString string

The secondary connection string for the authorization rule.

SecondaryKey string

The secondary access key for the authorization rule.

Id string

The provider-assigned unique ID for this managed resource.

Name string
NamespaceName string
PrimaryConnectionString string

The primary connection string for the authorization rule.

PrimaryKey string

The primary access key for the authorization rule.

ResourceGroupName string
SecondaryConnectionString string

The secondary connection string for the authorization rule.

SecondaryKey string

The secondary access key for the authorization rule.

id string

The provider-assigned unique ID for this managed resource.

name string
namespaceName string
primaryConnectionString string

The primary connection string for the authorization rule.

primaryKey string

The primary access key for the authorization rule.

resourceGroupName string
secondaryConnectionString string

The secondary connection string for the authorization rule.

secondaryKey string

The secondary access key for the authorization rule.

id str

The provider-assigned unique ID for this managed resource.

name str
namespace_name str
primary_connection_string str

The primary connection string for the authorization rule.

primary_key str

The primary access key for the authorization rule.

resource_group_name str
secondary_connection_string str

The secondary connection string for the authorization rule.

secondary_key str

The secondary access key for the authorization rule.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.