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.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.ServiceBus.GetNamespace.InvokeAsync(new Azure.ServiceBus.GetNamespaceArgs
{
Name = "examplenamespace",
ResourceGroupName = "example-resources",
}));
this.Location = example.Apply(example => example.Location);
}
[Output("location")]
public Output<string> Location { 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.LookupNamespace(ctx, &servicebus.LookupNamespaceArgs{
Name: "examplenamespace",
ResourceGroupName: "example-resources",
}, nil)
if err != nil {
return err
}
ctx.Export("location", example.Location)
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.servicebus.getNamespace({
name: "examplenamespace",
resourceGroupName: "example-resources",
});
export const location = example.then(example => example.location);
import pulumi
import pulumi_azure as azure
example = azure.servicebus.get_namespace(name="examplenamespace",
resource_group_name="example-resources")
pulumi.export("location", example.location)
Example coming soon!
Using getNamespace
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 getNamespace(args: GetNamespaceArgs, opts?: InvokeOptions): Promise<GetNamespaceResult>
function getNamespaceOutput(args: GetNamespaceOutputArgs, opts?: InvokeOptions): Output<GetNamespaceResult>def get_namespace(name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetNamespaceResult
def get_namespace_output(name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNamespaceResult]func LookupNamespace(ctx *Context, args *LookupNamespaceArgs, opts ...InvokeOption) (*LookupNamespaceResult, error)
func LookupNamespaceOutput(ctx *Context, args *LookupNamespaceOutputArgs, opts ...InvokeOption) LookupNamespaceResultOutput> Note: This function is named LookupNamespace in the Go SDK.
public static class GetNamespace
{
public static Task<GetNamespaceResult> InvokeAsync(GetNamespaceArgs args, InvokeOptions? opts = null)
public static Output<GetNamespaceResult> Invoke(GetNamespaceInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetNamespaceResult> getNamespace(GetNamespaceArgs args, InvokeOptions options)
public static Output<GetNamespaceResult> getNamespace(GetNamespaceArgs args, InvokeOptions options)
fn::invoke:
function: azure:servicebus/getNamespace:getNamespace
arguments:
# arguments dictionaryThe following arguments are supported:
- 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.
- Resource
Group stringName - Specifies the name of the Resource Group where the ServiceBus Namespace exists.
- 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.
- resource
Group stringName - Specifies the name of the Resource Group where the ServiceBus Namespace exists.
- 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.
- resource
Group StringName - Specifies the name of the Resource Group where the ServiceBus Namespace exists.
getNamespace Result
The following output properties are available:
- Capacity int
- The capacity of the ServiceBus Namespace.
- Default
Primary stringConnection String - The primary connection string for the authorization
rule
RootManageSharedAccessKey. - Default
Primary stringKey - The primary access key for the authorization rule
RootManageSharedAccessKey. - Default
Secondary stringConnection String - The secondary connection string for the
authorization rule
RootManageSharedAccessKey. - Default
Secondary stringKey - The secondary access key for the authorization rule
RootManageSharedAccessKey. - Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- The location of the Resource Group in which the ServiceBus Namespace exists.
- Name string
- Resource
Group stringName - Sku string
- The Tier used for the ServiceBus Namespace.
- Dictionary<string, string>
- A mapping of tags assigned to the resource.
- Zone
Redundant bool - Whether or not this ServiceBus Namespace is zone redundant.
- Capacity int
- The capacity of the ServiceBus Namespace.
- Default
Primary stringConnection String - The primary connection string for the authorization
rule
RootManageSharedAccessKey. - Default
Primary stringKey - The primary access key for the authorization rule
RootManageSharedAccessKey. - Default
Secondary stringConnection String - The secondary connection string for the
authorization rule
RootManageSharedAccessKey. - Default
Secondary stringKey - The secondary access key for the authorization rule
RootManageSharedAccessKey. - Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- The location of the Resource Group in which the ServiceBus Namespace exists.
- Name string
- Resource
Group stringName - Sku string
- The Tier used for the ServiceBus Namespace.
- map[string]string
- A mapping of tags assigned to the resource.
- Zone
Redundant bool - Whether or not this ServiceBus Namespace is zone redundant.
- capacity Integer
- The capacity of the ServiceBus Namespace.
- default
Primary StringConnection String - The primary connection string for the authorization
rule
RootManageSharedAccessKey. - default
Primary StringKey - The primary access key for the authorization rule
RootManageSharedAccessKey. - default
Secondary StringConnection String - The secondary connection string for the
authorization rule
RootManageSharedAccessKey. - default
Secondary StringKey - The secondary access key for the authorization rule
RootManageSharedAccessKey. - id String
- The provider-assigned unique ID for this managed resource.
- location String
- The location of the Resource Group in which the ServiceBus Namespace exists.
- name String
- resource
Group StringName - sku String
- The Tier used for the ServiceBus Namespace.
- Map<String,String>
- A mapping of tags assigned to the resource.
- zone
Redundant Boolean - Whether or not this ServiceBus Namespace is zone redundant.
- capacity number
- The capacity of the ServiceBus Namespace.
- default
Primary stringConnection String - The primary connection string for the authorization
rule
RootManageSharedAccessKey. - default
Primary stringKey - The primary access key for the authorization rule
RootManageSharedAccessKey. - default
Secondary stringConnection String - The secondary connection string for the
authorization rule
RootManageSharedAccessKey. - default
Secondary stringKey - The secondary access key for the authorization rule
RootManageSharedAccessKey. - id string
- The provider-assigned unique ID for this managed resource.
- location string
- The location of the Resource Group in which the ServiceBus Namespace exists.
- name string
- resource
Group stringName - sku string
- The Tier used for the ServiceBus Namespace.
- {[key: string]: string}
- A mapping of tags assigned to the resource.
- zone
Redundant boolean - Whether or not this ServiceBus Namespace is zone redundant.
- capacity int
- The capacity of the ServiceBus Namespace.
- default_
primary_ strconnection_ string - The primary connection string for the authorization
rule
RootManageSharedAccessKey. - default_
primary_ strkey - The primary access key for the authorization rule
RootManageSharedAccessKey. - default_
secondary_ strconnection_ string - The secondary connection string for the
authorization rule
RootManageSharedAccessKey. - default_
secondary_ strkey - The secondary access key for the authorization rule
RootManageSharedAccessKey. - id str
- The provider-assigned unique ID for this managed resource.
- location str
- The location of the Resource Group in which the ServiceBus Namespace exists.
- name str
- resource_
group_ strname - sku str
- The Tier used for the ServiceBus Namespace.
- Mapping[str, str]
- A mapping of tags assigned to the resource.
- zone_
redundant bool - Whether or not this ServiceBus Namespace is zone redundant.
- capacity Number
- The capacity of the ServiceBus Namespace.
- default
Primary StringConnection String - The primary connection string for the authorization
rule
RootManageSharedAccessKey. - default
Primary StringKey - The primary access key for the authorization rule
RootManageSharedAccessKey. - default
Secondary StringConnection String - The secondary connection string for the
authorization rule
RootManageSharedAccessKey. - default
Secondary StringKey - The secondary access key for the authorization rule
RootManageSharedAccessKey. - id String
- The provider-assigned unique ID for this managed resource.
- location String
- The location of the Resource Group in which the ServiceBus Namespace exists.
- name String
- resource
Group StringName - sku String
- The Tier used for the ServiceBus Namespace.
- Map<String>
- A mapping of tags assigned to the resource.
- zone
Redundant Boolean - Whether or not this ServiceBus Namespace is zone redundant.
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
