We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
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/v4/go/azure/servicebus"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := servicebus.LookupNamespaceAuthorizationRule(ctx, &servicebus.LookupNamespaceAuthorizationRuleArgs{
Name: "examplerule",
NamespaceName: pulumi.StringRef("examplenamespace"),
ResourceGroupName: pulumi.StringRef("example-resources"),
}, nil)
if err != nil {
return err
}
ctx.Export("ruleId", example.Id)
return nil
})
}
Example coming soon!
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);
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)
Example coming soon!
Using getNamespaceAuthorizationRule
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getNamespaceAuthorizationRule(args: GetNamespaceAuthorizationRuleArgs, opts?: InvokeOptions): Promise<GetNamespaceAuthorizationRuleResult>
function getNamespaceAuthorizationRuleOutput(args: GetNamespaceAuthorizationRuleOutputArgs, opts?: InvokeOptions): Output<GetNamespaceAuthorizationRuleResult>def get_namespace_authorization_rule(name: Optional[str] = None,
namespace_id: Optional[str] = None,
namespace_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetNamespaceAuthorizationRuleResult
def get_namespace_authorization_rule_output(name: Optional[pulumi.Input[str]] = None,
namespace_id: Optional[pulumi.Input[str]] = None,
namespace_name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNamespaceAuthorizationRuleResult]func LookupNamespaceAuthorizationRule(ctx *Context, args *LookupNamespaceAuthorizationRuleArgs, opts ...InvokeOption) (*LookupNamespaceAuthorizationRuleResult, error)
func LookupNamespaceAuthorizationRuleOutput(ctx *Context, args *LookupNamespaceAuthorizationRuleOutputArgs, opts ...InvokeOption) LookupNamespaceAuthorizationRuleResultOutput> Note: This function is named LookupNamespaceAuthorizationRule in the Go SDK.
public static class GetNamespaceAuthorizationRule
{
public static Task<GetNamespaceAuthorizationRuleResult> InvokeAsync(GetNamespaceAuthorizationRuleArgs args, InvokeOptions? opts = null)
public static Output<GetNamespaceAuthorizationRuleResult> Invoke(GetNamespaceAuthorizationRuleInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetNamespaceAuthorizationRuleResult> getNamespaceAuthorizationRule(GetNamespaceAuthorizationRuleArgs args, InvokeOptions options)
public static Output<GetNamespaceAuthorizationRuleResult> getNamespaceAuthorizationRule(GetNamespaceAuthorizationRuleArgs args, InvokeOptions options)
fn::invoke:
function: azure:servicebus/getNamespaceAuthorizationRule:getNamespaceAuthorizationRule
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- Specifies the name of the ServiceBus Namespace Authorization Rule.
- Namespace
Id string - Namespace
Name string - Specifies the name of the ServiceBus Namespace.
- Resource
Group stringName - Specifies the name of the Resource Group where the ServiceBus Namespace exists.
- Name string
- Specifies the name of the ServiceBus Namespace Authorization Rule.
- Namespace
Id string - Namespace
Name string - Specifies the name of the ServiceBus Namespace.
- Resource
Group stringName - Specifies the name of the Resource Group where the ServiceBus Namespace exists.
- name String
- Specifies the name of the ServiceBus Namespace Authorization Rule.
- namespace
Id String - namespace
Name String - Specifies the name of the ServiceBus Namespace.
- resource
Group StringName - Specifies the name of the Resource Group where the ServiceBus Namespace exists.
- name string
- Specifies the name of the ServiceBus Namespace Authorization Rule.
- namespace
Id string - namespace
Name string - Specifies the name of the ServiceBus Namespace.
- resource
Group stringName - Specifies the name of the Resource Group where the ServiceBus Namespace exists.
- name str
- Specifies the name of the ServiceBus Namespace Authorization Rule.
- namespace_
id str - namespace_
name str - Specifies the name of the ServiceBus Namespace.
- resource_
group_ strname - Specifies the name of the Resource Group where the ServiceBus Namespace exists.
- name String
- Specifies the name of the ServiceBus Namespace Authorization Rule.
- namespace
Id String - namespace
Name String - Specifies the name of the ServiceBus Namespace.
- resource
Group StringName - 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
- Primary
Connection stringString - The primary connection string for the authorization rule.
- Primary
Connection stringString Alias - The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
- Primary
Key string - The primary access key for the authorization rule.
- Secondary
Connection stringString - The secondary connection string for the authorization rule.
- Secondary
Connection stringString Alias - The alias Secondary Connection String for the ServiceBus Namespace
- Secondary
Key string - The secondary access key for the authorization rule.
- Namespace
Id string - Namespace
Name string - Resource
Group stringName
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Primary
Connection stringString - The primary connection string for the authorization rule.
- Primary
Connection stringString Alias - The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
- Primary
Key string - The primary access key for the authorization rule.
- Secondary
Connection stringString - The secondary connection string for the authorization rule.
- Secondary
Connection stringString Alias - The alias Secondary Connection String for the ServiceBus Namespace
- Secondary
Key string - The secondary access key for the authorization rule.
- Namespace
Id string - Namespace
Name string - Resource
Group stringName
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- primary
Connection StringString - The primary connection string for the authorization rule.
- primary
Connection StringString Alias - The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
- primary
Key String - The primary access key for the authorization rule.
- secondary
Connection StringString - The secondary connection string for the authorization rule.
- secondary
Connection StringString Alias - The alias Secondary Connection String for the ServiceBus Namespace
- secondary
Key String - The secondary access key for the authorization rule.
- namespace
Id String - namespace
Name String - resource
Group StringName
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- primary
Connection stringString - The primary connection string for the authorization rule.
- primary
Connection stringString Alias - The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
- primary
Key string - The primary access key for the authorization rule.
- secondary
Connection stringString - The secondary connection string for the authorization rule.
- secondary
Connection stringString Alias - The alias Secondary Connection String for the ServiceBus Namespace
- secondary
Key string - The secondary access key for the authorization rule.
- namespace
Id string - namespace
Name string - resource
Group stringName
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- primary_
connection_ strstring - The primary connection string for the authorization rule.
- primary_
connection_ strstring_ alias - The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
- primary_
key str - The primary access key for the authorization rule.
- secondary_
connection_ strstring - The secondary connection string for the authorization rule.
- secondary_
connection_ strstring_ alias - The alias Secondary Connection String for the ServiceBus Namespace
- secondary_
key str - The secondary access key for the authorization rule.
- namespace_
id str - namespace_
name str - resource_
group_ strname
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- primary
Connection StringString - The primary connection string for the authorization rule.
- primary
Connection StringString Alias - The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
- primary
Key String - The primary access key for the authorization rule.
- secondary
Connection StringString - The secondary connection string for the authorization rule.
- secondary
Connection StringString Alias - The alias Secondary Connection String for the ServiceBus Namespace
- secondary
Key String - The secondary access key for the authorization rule.
- namespace
Id String - namespace
Name String - resource
Group StringName
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
