We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.eventhub.getNamespace
Explore with Pulumi AI
Use this data source to access information about an existing EventHub Namespace.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.eventhub.getNamespace({
    name: "search-eventhubns",
    resourceGroupName: "search-service",
});
export const eventhubNamespaceId = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.eventhub.get_namespace(name="search-eventhubns",
    resource_group_name="search-service")
pulumi.export("eventhubNamespaceId", example.id)
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventhub"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := eventhub.LookupNamespace(ctx, &eventhub.LookupNamespaceArgs{
			Name:              "search-eventhubns",
			ResourceGroupName: "search-service",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("eventhubNamespaceId", example.Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = Azure.EventHub.GetNamespace.Invoke(new()
    {
        Name = "search-eventhubns",
        ResourceGroupName = "search-service",
    });
    return new Dictionary<string, object?>
    {
        ["eventhubNamespaceId"] = example.Apply(getNamespaceResult => getNamespaceResult.Id),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.eventhub.EventhubFunctions;
import com.pulumi.azure.eventhub.inputs.GetNamespaceArgs;
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 = EventhubFunctions.getNamespace(GetNamespaceArgs.builder()
            .name("search-eventhubns")
            .resourceGroupName("search-service")
            .build());
        ctx.export("eventhubNamespaceId", example.applyValue(getNamespaceResult -> getNamespaceResult.id()));
    }
}
variables:
  example:
    fn::invoke:
      function: azure:eventhub:getNamespace
      arguments:
        name: search-eventhubns
        resourceGroupName: search-service
outputs:
  eventhubNamespaceId: ${example.id}
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:eventhub/getNamespace:getNamespace
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- The name of the EventHub Namespace.
- ResourceGroup stringName 
- The Name of the Resource Group where the EventHub Namespace exists.
- Name string
- The name of the EventHub Namespace.
- ResourceGroup stringName 
- The Name of the Resource Group where the EventHub Namespace exists.
- name String
- The name of the EventHub Namespace.
- resourceGroup StringName 
- The Name of the Resource Group where the EventHub Namespace exists.
- name string
- The name of the EventHub Namespace.
- resourceGroup stringName 
- The Name of the Resource Group where the EventHub Namespace exists.
- name str
- The name of the EventHub Namespace.
- resource_group_ strname 
- The Name of the Resource Group where the EventHub Namespace exists.
- name String
- The name of the EventHub Namespace.
- resourceGroup StringName 
- The Name of the Resource Group where the EventHub Namespace exists.
getNamespace Result
The following output properties are available:
- AutoInflate boolEnabled 
- Is Auto Inflate enabled for the EventHub Namespace?
- Capacity int
- The Capacity / Throughput Units for a StandardSKU namespace.
- DedicatedCluster stringId 
- The ID of the EventHub Dedicated Cluster where this Namespace exists.
- DefaultPrimary stringConnection String 
- The primary connection string for the authorization
rule RootManageSharedAccessKey.
- DefaultPrimary stringConnection String Alias 
- The alias of the primary connection string for the authorization
rule RootManageSharedAccessKey.
- DefaultPrimary stringKey 
- The primary access key for the authorization rule RootManageSharedAccessKey.
- DefaultSecondary stringConnection String 
- The secondary connection string for the
authorization rule RootManageSharedAccessKey.
- DefaultSecondary stringConnection String Alias 
- The alias of the secondary connection string for the
authorization rule RootManageSharedAccessKey.
- DefaultSecondary stringKey 
- The secondary access key for the authorization rule RootManageSharedAccessKey.
- Id string
- The provider-assigned unique ID for this managed resource.
- KafkaEnabled bool
- Location string
- The Azure location where the EventHub Namespace exists
- MaximumThroughput intUnits 
- Specifies the maximum number of throughput units when Auto Inflate is Enabled.
- Name string
- ResourceGroup stringName 
- Sku string
- Defines which tier to use.
- Dictionary<string, string>
- A mapping of tags to assign to the EventHub Namespace.
- AutoInflate boolEnabled 
- Is Auto Inflate enabled for the EventHub Namespace?
- Capacity int
- The Capacity / Throughput Units for a StandardSKU namespace.
- DedicatedCluster stringId 
- The ID of the EventHub Dedicated Cluster where this Namespace exists.
- DefaultPrimary stringConnection String 
- The primary connection string for the authorization
rule RootManageSharedAccessKey.
- DefaultPrimary stringConnection String Alias 
- The alias of the primary connection string for the authorization
rule RootManageSharedAccessKey.
- DefaultPrimary stringKey 
- The primary access key for the authorization rule RootManageSharedAccessKey.
- DefaultSecondary stringConnection String 
- The secondary connection string for the
authorization rule RootManageSharedAccessKey.
- DefaultSecondary stringConnection String Alias 
- The alias of the secondary connection string for the
authorization rule RootManageSharedAccessKey.
- DefaultSecondary stringKey 
- The secondary access key for the authorization rule RootManageSharedAccessKey.
- Id string
- The provider-assigned unique ID for this managed resource.
- KafkaEnabled bool
- Location string
- The Azure location where the EventHub Namespace exists
- MaximumThroughput intUnits 
- Specifies the maximum number of throughput units when Auto Inflate is Enabled.
- Name string
- ResourceGroup stringName 
- Sku string
- Defines which tier to use.
- map[string]string
- A mapping of tags to assign to the EventHub Namespace.
- autoInflate BooleanEnabled 
- Is Auto Inflate enabled for the EventHub Namespace?
- capacity Integer
- The Capacity / Throughput Units for a StandardSKU namespace.
- dedicatedCluster StringId 
- The ID of the EventHub Dedicated Cluster where this Namespace exists.
- defaultPrimary StringConnection String 
- The primary connection string for the authorization
rule RootManageSharedAccessKey.
- defaultPrimary StringConnection String Alias 
- The alias of the primary connection string for the authorization
rule RootManageSharedAccessKey.
- defaultPrimary StringKey 
- The primary access key for the authorization rule RootManageSharedAccessKey.
- defaultSecondary StringConnection String 
- The secondary connection string for the
authorization rule RootManageSharedAccessKey.
- defaultSecondary StringConnection String Alias 
- The alias of the secondary connection string for the
authorization rule RootManageSharedAccessKey.
- defaultSecondary StringKey 
- The secondary access key for the authorization rule RootManageSharedAccessKey.
- id String
- The provider-assigned unique ID for this managed resource.
- kafkaEnabled Boolean
- location String
- The Azure location where the EventHub Namespace exists
- maximumThroughput IntegerUnits 
- Specifies the maximum number of throughput units when Auto Inflate is Enabled.
- name String
- resourceGroup StringName 
- sku String
- Defines which tier to use.
- Map<String,String>
- A mapping of tags to assign to the EventHub Namespace.
- autoInflate booleanEnabled 
- Is Auto Inflate enabled for the EventHub Namespace?
- capacity number
- The Capacity / Throughput Units for a StandardSKU namespace.
- dedicatedCluster stringId 
- The ID of the EventHub Dedicated Cluster where this Namespace exists.
- defaultPrimary stringConnection String 
- The primary connection string for the authorization
rule RootManageSharedAccessKey.
- defaultPrimary stringConnection String Alias 
- The alias of the primary connection string for the authorization
rule RootManageSharedAccessKey.
- defaultPrimary stringKey 
- The primary access key for the authorization rule RootManageSharedAccessKey.
- defaultSecondary stringConnection String 
- The secondary connection string for the
authorization rule RootManageSharedAccessKey.
- defaultSecondary stringConnection String Alias 
- The alias of the secondary connection string for the
authorization rule RootManageSharedAccessKey.
- defaultSecondary stringKey 
- The secondary access key for the authorization rule RootManageSharedAccessKey.
- id string
- The provider-assigned unique ID for this managed resource.
- kafkaEnabled boolean
- location string
- The Azure location where the EventHub Namespace exists
- maximumThroughput numberUnits 
- Specifies the maximum number of throughput units when Auto Inflate is Enabled.
- name string
- resourceGroup stringName 
- sku string
- Defines which tier to use.
- {[key: string]: string}
- A mapping of tags to assign to the EventHub Namespace.
- auto_inflate_ boolenabled 
- Is Auto Inflate enabled for the EventHub Namespace?
- capacity int
- The Capacity / Throughput Units for a StandardSKU namespace.
- dedicated_cluster_ strid 
- The ID of the EventHub Dedicated Cluster where this Namespace exists.
- default_primary_ strconnection_ string 
- The primary connection string for the authorization
rule RootManageSharedAccessKey.
- default_primary_ strconnection_ string_ alias 
- The alias of 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_ strconnection_ string_ alias 
- The alias of 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.
- kafka_enabled bool
- location str
- The Azure location where the EventHub Namespace exists
- maximum_throughput_ intunits 
- Specifies the maximum number of throughput units when Auto Inflate is Enabled.
- name str
- resource_group_ strname 
- sku str
- Defines which tier to use.
- Mapping[str, str]
- A mapping of tags to assign to the EventHub Namespace.
- autoInflate BooleanEnabled 
- Is Auto Inflate enabled for the EventHub Namespace?
- capacity Number
- The Capacity / Throughput Units for a StandardSKU namespace.
- dedicatedCluster StringId 
- The ID of the EventHub Dedicated Cluster where this Namespace exists.
- defaultPrimary StringConnection String 
- The primary connection string for the authorization
rule RootManageSharedAccessKey.
- defaultPrimary StringConnection String Alias 
- The alias of the primary connection string for the authorization
rule RootManageSharedAccessKey.
- defaultPrimary StringKey 
- The primary access key for the authorization rule RootManageSharedAccessKey.
- defaultSecondary StringConnection String 
- The secondary connection string for the
authorization rule RootManageSharedAccessKey.
- defaultSecondary StringConnection String Alias 
- The alias of the secondary connection string for the
authorization rule RootManageSharedAccessKey.
- defaultSecondary StringKey 
- The secondary access key for the authorization rule RootManageSharedAccessKey.
- id String
- The provider-assigned unique ID for this managed resource.
- kafkaEnabled Boolean
- location String
- The Azure location where the EventHub Namespace exists
- maximumThroughput NumberUnits 
- Specifies the maximum number of throughput units when Auto Inflate is Enabled.
- name String
- resourceGroup StringName 
- sku String
- Defines which tier to use.
- Map<String>
- A mapping of tags to assign to the EventHub Namespace.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.