1. Packages
  2. Azure Classic
  3. API Docs
  4. eventhub
  5. EventHubNamespace

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Manages an EventHub Namespace.

    Example Usage

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
            {
                Location = "West Europe",
            });
            var exampleEventHubNamespace = new Azure.EventHub.EventHubNamespace("exampleEventHubNamespace", new Azure.EventHub.EventHubNamespaceArgs
            {
                Location = exampleResourceGroup.Location,
                ResourceGroupName = exampleResourceGroup.Name,
                Sku = "Standard",
                Capacity = 2,
                Tags = 
                {
                    { "environment", "Production" },
                },
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/eventhub"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = eventhub.NewEventHubNamespace(ctx, "exampleEventHubNamespace", &eventhub.EventHubNamespaceArgs{
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    			Sku:               pulumi.String("Standard"),
    			Capacity:          pulumi.Int(2),
    			Tags: pulumi.StringMap{
    				"environment": pulumi.String("Production"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const exampleEventHubNamespace = new azure.eventhub.EventHubNamespace("exampleEventHubNamespace", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        sku: "Standard",
        capacity: 2,
        tags: {
            environment: "Production",
        },
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_event_hub_namespace = azure.eventhub.EventHubNamespace("exampleEventHubNamespace",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        sku="Standard",
        capacity=2,
        tags={
            "environment": "Production",
        })
    

    Example coming soon!

    Create EventHubNamespace Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new EventHubNamespace(name: string, args: EventHubNamespaceArgs, opts?: CustomResourceOptions);
    @overload
    def EventHubNamespace(resource_name: str,
                          args: EventHubNamespaceArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def EventHubNamespace(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          resource_group_name: Optional[str] = None,
                          sku: Optional[str] = None,
                          auto_inflate_enabled: Optional[bool] = None,
                          capacity: Optional[int] = None,
                          dedicated_cluster_id: Optional[str] = None,
                          identity: Optional[EventHubNamespaceIdentityArgs] = None,
                          location: Optional[str] = None,
                          maximum_throughput_units: Optional[int] = None,
                          name: Optional[str] = None,
                          network_rulesets: Optional[EventHubNamespaceNetworkRulesetsArgs] = None,
                          tags: Optional[Mapping[str, str]] = None,
                          zone_redundant: Optional[bool] = None)
    func NewEventHubNamespace(ctx *Context, name string, args EventHubNamespaceArgs, opts ...ResourceOption) (*EventHubNamespace, error)
    public EventHubNamespace(string name, EventHubNamespaceArgs args, CustomResourceOptions? opts = null)
    public EventHubNamespace(String name, EventHubNamespaceArgs args)
    public EventHubNamespace(String name, EventHubNamespaceArgs args, CustomResourceOptions options)
    
    type: azure:eventhub:EventHubNamespace
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args EventHubNamespaceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args EventHubNamespaceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args EventHubNamespaceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EventHubNamespaceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EventHubNamespaceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var eventHubNamespaceResource = new Azure.EventHub.EventHubNamespace("eventHubNamespaceResource", new()
    {
        ResourceGroupName = "string",
        Sku = "string",
        AutoInflateEnabled = false,
        Capacity = 0,
        DedicatedClusterId = "string",
        Identity = new Azure.EventHub.Inputs.EventHubNamespaceIdentityArgs
        {
            Type = "string",
            PrincipalId = "string",
            TenantId = "string",
        },
        Location = "string",
        MaximumThroughputUnits = 0,
        Name = "string",
        NetworkRulesets = new Azure.EventHub.Inputs.EventHubNamespaceNetworkRulesetsArgs
        {
            DefaultAction = "string",
            IpRules = new[]
            {
                new Azure.EventHub.Inputs.EventHubNamespaceNetworkRulesetsIpRuleArgs
                {
                    IpMask = "string",
                    Action = "string",
                },
            },
            TrustedServiceAccessEnabled = false,
            VirtualNetworkRules = new[]
            {
                new Azure.EventHub.Inputs.EventHubNamespaceNetworkRulesetsVirtualNetworkRuleArgs
                {
                    SubnetId = "string",
                    IgnoreMissingVirtualNetworkServiceEndpoint = false,
                },
            },
        },
        Tags = 
        {
            { "string", "string" },
        },
        ZoneRedundant = false,
    });
    
    example, err := eventhub.NewEventHubNamespace(ctx, "eventHubNamespaceResource", &eventhub.EventHubNamespaceArgs{
    	ResourceGroupName:  pulumi.String("string"),
    	Sku:                pulumi.String("string"),
    	AutoInflateEnabled: pulumi.Bool(false),
    	Capacity:           pulumi.Int(0),
    	DedicatedClusterId: pulumi.String("string"),
    	Identity: &eventhub.EventHubNamespaceIdentityArgs{
    		Type:        pulumi.String("string"),
    		PrincipalId: pulumi.String("string"),
    		TenantId:    pulumi.String("string"),
    	},
    	Location:               pulumi.String("string"),
    	MaximumThroughputUnits: pulumi.Int(0),
    	Name:                   pulumi.String("string"),
    	NetworkRulesets: &eventhub.EventHubNamespaceNetworkRulesetsArgs{
    		DefaultAction: pulumi.String("string"),
    		IpRules: eventhub.EventHubNamespaceNetworkRulesetsIpRuleArray{
    			&eventhub.EventHubNamespaceNetworkRulesetsIpRuleArgs{
    				IpMask: pulumi.String("string"),
    				Action: pulumi.String("string"),
    			},
    		},
    		TrustedServiceAccessEnabled: pulumi.Bool(false),
    		VirtualNetworkRules: eventhub.EventHubNamespaceNetworkRulesetsVirtualNetworkRuleArray{
    			&eventhub.EventHubNamespaceNetworkRulesetsVirtualNetworkRuleArgs{
    				SubnetId: pulumi.String("string"),
    				IgnoreMissingVirtualNetworkServiceEndpoint: pulumi.Bool(false),
    			},
    		},
    	},
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	ZoneRedundant: pulumi.Bool(false),
    })
    
    var eventHubNamespaceResource = new EventHubNamespace("eventHubNamespaceResource", EventHubNamespaceArgs.builder()
        .resourceGroupName("string")
        .sku("string")
        .autoInflateEnabled(false)
        .capacity(0)
        .dedicatedClusterId("string")
        .identity(EventHubNamespaceIdentityArgs.builder()
            .type("string")
            .principalId("string")
            .tenantId("string")
            .build())
        .location("string")
        .maximumThroughputUnits(0)
        .name("string")
        .networkRulesets(EventHubNamespaceNetworkRulesetsArgs.builder()
            .defaultAction("string")
            .ipRules(EventHubNamespaceNetworkRulesetsIpRuleArgs.builder()
                .ipMask("string")
                .action("string")
                .build())
            .trustedServiceAccessEnabled(false)
            .virtualNetworkRules(EventHubNamespaceNetworkRulesetsVirtualNetworkRuleArgs.builder()
                .subnetId("string")
                .ignoreMissingVirtualNetworkServiceEndpoint(false)
                .build())
            .build())
        .tags(Map.of("string", "string"))
        .zoneRedundant(false)
        .build());
    
    event_hub_namespace_resource = azure.eventhub.EventHubNamespace("eventHubNamespaceResource",
        resource_group_name="string",
        sku="string",
        auto_inflate_enabled=False,
        capacity=0,
        dedicated_cluster_id="string",
        identity={
            "type": "string",
            "principal_id": "string",
            "tenant_id": "string",
        },
        location="string",
        maximum_throughput_units=0,
        name="string",
        network_rulesets={
            "default_action": "string",
            "ip_rules": [{
                "ip_mask": "string",
                "action": "string",
            }],
            "trusted_service_access_enabled": False,
            "virtual_network_rules": [{
                "subnet_id": "string",
                "ignore_missing_virtual_network_service_endpoint": False,
            }],
        },
        tags={
            "string": "string",
        },
        zone_redundant=False)
    
    const eventHubNamespaceResource = new azure.eventhub.EventHubNamespace("eventHubNamespaceResource", {
        resourceGroupName: "string",
        sku: "string",
        autoInflateEnabled: false,
        capacity: 0,
        dedicatedClusterId: "string",
        identity: {
            type: "string",
            principalId: "string",
            tenantId: "string",
        },
        location: "string",
        maximumThroughputUnits: 0,
        name: "string",
        networkRulesets: {
            defaultAction: "string",
            ipRules: [{
                ipMask: "string",
                action: "string",
            }],
            trustedServiceAccessEnabled: false,
            virtualNetworkRules: [{
                subnetId: "string",
                ignoreMissingVirtualNetworkServiceEndpoint: false,
            }],
        },
        tags: {
            string: "string",
        },
        zoneRedundant: false,
    });
    
    type: azure:eventhub:EventHubNamespace
    properties:
        autoInflateEnabled: false
        capacity: 0
        dedicatedClusterId: string
        identity:
            principalId: string
            tenantId: string
            type: string
        location: string
        maximumThroughputUnits: 0
        name: string
        networkRulesets:
            defaultAction: string
            ipRules:
                - action: string
                  ipMask: string
            trustedServiceAccessEnabled: false
            virtualNetworkRules:
                - ignoreMissingVirtualNetworkServiceEndpoint: false
                  subnetId: string
        resourceGroupName: string
        sku: string
        tags:
            string: string
        zoneRedundant: false
    

    EventHubNamespace Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The EventHubNamespace resource accepts the following input properties:

    ResourceGroupName string
    The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.
    Sku string
    Defines which tier to use. Valid options are Basic, Standard, and Premium. Please not that setting this field to Premium will force the creation of a new resource and also requires setting zone_redundant to true.
    AutoInflateEnabled bool
    Is Auto Inflate enabled for the EventHub Namespace?
    Capacity int
    Specifies the Capacity / Throughput Units for a Standard SKU namespace. Default capacity has a maximum of 2, but can be increased in blocks of 2 on a committed purchase basis.
    DedicatedClusterId string
    Specifies the ID of the EventHub Dedicated Cluster where this Namespace should created. Changing this forces a new resource to be created.
    Identity EventHubNamespaceIdentity
    An identity block as defined below.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    MaximumThroughputUnits int
    Specifies the maximum number of throughput units when Auto Inflate is Enabled. Valid values range from 1 - 20.
    Name string
    Specifies the name of the EventHub Namespace resource. Changing this forces a new resource to be created.
    NetworkRulesets EventHubNamespaceNetworkRulesets
    A network_rulesets block as defined below.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    ZoneRedundant bool
    Specifies if the EventHub Namespace should be Zone Redundant (created across Availability Zones). Changing this forces a new resource to be created. Defaults to false.
    ResourceGroupName string
    The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.
    Sku string
    Defines which tier to use. Valid options are Basic, Standard, and Premium. Please not that setting this field to Premium will force the creation of a new resource and also requires setting zone_redundant to true.
    AutoInflateEnabled bool
    Is Auto Inflate enabled for the EventHub Namespace?
    Capacity int
    Specifies the Capacity / Throughput Units for a Standard SKU namespace. Default capacity has a maximum of 2, but can be increased in blocks of 2 on a committed purchase basis.
    DedicatedClusterId string
    Specifies the ID of the EventHub Dedicated Cluster where this Namespace should created. Changing this forces a new resource to be created.
    Identity EventHubNamespaceIdentityArgs
    An identity block as defined below.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    MaximumThroughputUnits int
    Specifies the maximum number of throughput units when Auto Inflate is Enabled. Valid values range from 1 - 20.
    Name string
    Specifies the name of the EventHub Namespace resource. Changing this forces a new resource to be created.
    NetworkRulesets EventHubNamespaceNetworkRulesetsArgs
    A network_rulesets block as defined below.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    ZoneRedundant bool
    Specifies if the EventHub Namespace should be Zone Redundant (created across Availability Zones). Changing this forces a new resource to be created. Defaults to false.
    resourceGroupName String
    The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.
    sku String
    Defines which tier to use. Valid options are Basic, Standard, and Premium. Please not that setting this field to Premium will force the creation of a new resource and also requires setting zone_redundant to true.
    autoInflateEnabled Boolean
    Is Auto Inflate enabled for the EventHub Namespace?
    capacity Integer
    Specifies the Capacity / Throughput Units for a Standard SKU namespace. Default capacity has a maximum of 2, but can be increased in blocks of 2 on a committed purchase basis.
    dedicatedClusterId String
    Specifies the ID of the EventHub Dedicated Cluster where this Namespace should created. Changing this forces a new resource to be created.
    identity EventHubNamespaceIdentity
    An identity block as defined below.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    maximumThroughputUnits Integer
    Specifies the maximum number of throughput units when Auto Inflate is Enabled. Valid values range from 1 - 20.
    name String
    Specifies the name of the EventHub Namespace resource. Changing this forces a new resource to be created.
    networkRulesets EventHubNamespaceNetworkRulesets
    A network_rulesets block as defined below.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    zoneRedundant Boolean
    Specifies if the EventHub Namespace should be Zone Redundant (created across Availability Zones). Changing this forces a new resource to be created. Defaults to false.
    resourceGroupName string
    The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.
    sku string
    Defines which tier to use. Valid options are Basic, Standard, and Premium. Please not that setting this field to Premium will force the creation of a new resource and also requires setting zone_redundant to true.
    autoInflateEnabled boolean
    Is Auto Inflate enabled for the EventHub Namespace?
    capacity number
    Specifies the Capacity / Throughput Units for a Standard SKU namespace. Default capacity has a maximum of 2, but can be increased in blocks of 2 on a committed purchase basis.
    dedicatedClusterId string
    Specifies the ID of the EventHub Dedicated Cluster where this Namespace should created. Changing this forces a new resource to be created.
    identity EventHubNamespaceIdentity
    An identity block as defined below.
    location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    maximumThroughputUnits number
    Specifies the maximum number of throughput units when Auto Inflate is Enabled. Valid values range from 1 - 20.
    name string
    Specifies the name of the EventHub Namespace resource. Changing this forces a new resource to be created.
    networkRulesets EventHubNamespaceNetworkRulesets
    A network_rulesets block as defined below.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    zoneRedundant boolean
    Specifies if the EventHub Namespace should be Zone Redundant (created across Availability Zones). Changing this forces a new resource to be created. Defaults to false.
    resource_group_name str
    The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.
    sku str
    Defines which tier to use. Valid options are Basic, Standard, and Premium. Please not that setting this field to Premium will force the creation of a new resource and also requires setting zone_redundant to true.
    auto_inflate_enabled bool
    Is Auto Inflate enabled for the EventHub Namespace?
    capacity int
    Specifies the Capacity / Throughput Units for a Standard SKU namespace. Default capacity has a maximum of 2, but can be increased in blocks of 2 on a committed purchase basis.
    dedicated_cluster_id str
    Specifies the ID of the EventHub Dedicated Cluster where this Namespace should created. Changing this forces a new resource to be created.
    identity EventHubNamespaceIdentityArgs
    An identity block as defined below.
    location str
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    maximum_throughput_units int
    Specifies the maximum number of throughput units when Auto Inflate is Enabled. Valid values range from 1 - 20.
    name str
    Specifies the name of the EventHub Namespace resource. Changing this forces a new resource to be created.
    network_rulesets EventHubNamespaceNetworkRulesetsArgs
    A network_rulesets block as defined below.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    zone_redundant bool
    Specifies if the EventHub Namespace should be Zone Redundant (created across Availability Zones). Changing this forces a new resource to be created. Defaults to false.
    resourceGroupName String
    The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.
    sku String
    Defines which tier to use. Valid options are Basic, Standard, and Premium. Please not that setting this field to Premium will force the creation of a new resource and also requires setting zone_redundant to true.
    autoInflateEnabled Boolean
    Is Auto Inflate enabled for the EventHub Namespace?
    capacity Number
    Specifies the Capacity / Throughput Units for a Standard SKU namespace. Default capacity has a maximum of 2, but can be increased in blocks of 2 on a committed purchase basis.
    dedicatedClusterId String
    Specifies the ID of the EventHub Dedicated Cluster where this Namespace should created. Changing this forces a new resource to be created.
    identity Property Map
    An identity block as defined below.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    maximumThroughputUnits Number
    Specifies the maximum number of throughput units when Auto Inflate is Enabled. Valid values range from 1 - 20.
    name String
    Specifies the name of the EventHub Namespace resource. Changing this forces a new resource to be created.
    networkRulesets Property Map
    A network_rulesets block as defined below.
    tags Map<String>
    A mapping of tags to assign to the resource.
    zoneRedundant Boolean
    Specifies if the EventHub Namespace should be Zone Redundant (created across Availability Zones). Changing this forces a new resource to be created. Defaults to false.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the EventHubNamespace resource produces the following output properties:

    DefaultPrimaryConnectionString string
    The primary connection string for the authorization rule RootManageSharedAccessKey.
    DefaultPrimaryConnectionStringAlias string
    The alias of the primary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    DefaultPrimaryKey string
    The primary access key for the authorization rule RootManageSharedAccessKey.
    DefaultSecondaryConnectionString string
    The secondary connection string for the authorization rule RootManageSharedAccessKey.
    DefaultSecondaryConnectionStringAlias string
    The alias of the secondary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    DefaultSecondaryKey string
    The secondary access key for the authorization rule RootManageSharedAccessKey.
    Id string
    The provider-assigned unique ID for this managed resource.
    DefaultPrimaryConnectionString string
    The primary connection string for the authorization rule RootManageSharedAccessKey.
    DefaultPrimaryConnectionStringAlias string
    The alias of the primary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    DefaultPrimaryKey string
    The primary access key for the authorization rule RootManageSharedAccessKey.
    DefaultSecondaryConnectionString string
    The secondary connection string for the authorization rule RootManageSharedAccessKey.
    DefaultSecondaryConnectionStringAlias string
    The alias of the secondary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    DefaultSecondaryKey string
    The secondary access key for the authorization rule RootManageSharedAccessKey.
    Id string
    The provider-assigned unique ID for this managed resource.
    defaultPrimaryConnectionString String
    The primary connection string for the authorization rule RootManageSharedAccessKey.
    defaultPrimaryConnectionStringAlias String
    The alias of the primary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    defaultPrimaryKey String
    The primary access key for the authorization rule RootManageSharedAccessKey.
    defaultSecondaryConnectionString String
    The secondary connection string for the authorization rule RootManageSharedAccessKey.
    defaultSecondaryConnectionStringAlias String
    The alias of the secondary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    defaultSecondaryKey String
    The secondary access key for the authorization rule RootManageSharedAccessKey.
    id String
    The provider-assigned unique ID for this managed resource.
    defaultPrimaryConnectionString string
    The primary connection string for the authorization rule RootManageSharedAccessKey.
    defaultPrimaryConnectionStringAlias string
    The alias of the primary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    defaultPrimaryKey string
    The primary access key for the authorization rule RootManageSharedAccessKey.
    defaultSecondaryConnectionString string
    The secondary connection string for the authorization rule RootManageSharedAccessKey.
    defaultSecondaryConnectionStringAlias string
    The alias of the secondary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    defaultSecondaryKey string
    The secondary access key for the authorization rule RootManageSharedAccessKey.
    id string
    The provider-assigned unique ID for this managed resource.
    default_primary_connection_string str
    The primary connection string for the authorization rule RootManageSharedAccessKey.
    default_primary_connection_string_alias str
    The alias of the primary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    default_primary_key str
    The primary access key for the authorization rule RootManageSharedAccessKey.
    default_secondary_connection_string str
    The secondary connection string for the authorization rule RootManageSharedAccessKey.
    default_secondary_connection_string_alias str
    The alias of the secondary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    default_secondary_key str
    The secondary access key for the authorization rule RootManageSharedAccessKey.
    id str
    The provider-assigned unique ID for this managed resource.
    defaultPrimaryConnectionString String
    The primary connection string for the authorization rule RootManageSharedAccessKey.
    defaultPrimaryConnectionStringAlias String
    The alias of the primary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    defaultPrimaryKey String
    The primary access key for the authorization rule RootManageSharedAccessKey.
    defaultSecondaryConnectionString String
    The secondary connection string for the authorization rule RootManageSharedAccessKey.
    defaultSecondaryConnectionStringAlias String
    The alias of the secondary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    defaultSecondaryKey String
    The secondary access key for the authorization rule RootManageSharedAccessKey.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing EventHubNamespace Resource

    Get an existing EventHubNamespace resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: EventHubNamespaceState, opts?: CustomResourceOptions): EventHubNamespace
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auto_inflate_enabled: Optional[bool] = None,
            capacity: Optional[int] = None,
            dedicated_cluster_id: Optional[str] = None,
            default_primary_connection_string: Optional[str] = None,
            default_primary_connection_string_alias: Optional[str] = None,
            default_primary_key: Optional[str] = None,
            default_secondary_connection_string: Optional[str] = None,
            default_secondary_connection_string_alias: Optional[str] = None,
            default_secondary_key: Optional[str] = None,
            identity: Optional[EventHubNamespaceIdentityArgs] = None,
            location: Optional[str] = None,
            maximum_throughput_units: Optional[int] = None,
            name: Optional[str] = None,
            network_rulesets: Optional[EventHubNamespaceNetworkRulesetsArgs] = None,
            resource_group_name: Optional[str] = None,
            sku: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            zone_redundant: Optional[bool] = None) -> EventHubNamespace
    func GetEventHubNamespace(ctx *Context, name string, id IDInput, state *EventHubNamespaceState, opts ...ResourceOption) (*EventHubNamespace, error)
    public static EventHubNamespace Get(string name, Input<string> id, EventHubNamespaceState? state, CustomResourceOptions? opts = null)
    public static EventHubNamespace get(String name, Output<String> id, EventHubNamespaceState state, CustomResourceOptions options)
    resources:  _:    type: azure:eventhub:EventHubNamespace    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AutoInflateEnabled bool
    Is Auto Inflate enabled for the EventHub Namespace?
    Capacity int
    Specifies the Capacity / Throughput Units for a Standard SKU namespace. Default capacity has a maximum of 2, but can be increased in blocks of 2 on a committed purchase basis.
    DedicatedClusterId string
    Specifies the ID of the EventHub Dedicated Cluster where this Namespace should created. Changing this forces a new resource to be created.
    DefaultPrimaryConnectionString string
    The primary connection string for the authorization rule RootManageSharedAccessKey.
    DefaultPrimaryConnectionStringAlias string
    The alias of the primary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    DefaultPrimaryKey string
    The primary access key for the authorization rule RootManageSharedAccessKey.
    DefaultSecondaryConnectionString string
    The secondary connection string for the authorization rule RootManageSharedAccessKey.
    DefaultSecondaryConnectionStringAlias string
    The alias of the secondary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    DefaultSecondaryKey string
    The secondary access key for the authorization rule RootManageSharedAccessKey.
    Identity EventHubNamespaceIdentity
    An identity block as defined below.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    MaximumThroughputUnits int
    Specifies the maximum number of throughput units when Auto Inflate is Enabled. Valid values range from 1 - 20.
    Name string
    Specifies the name of the EventHub Namespace resource. Changing this forces a new resource to be created.
    NetworkRulesets EventHubNamespaceNetworkRulesets
    A network_rulesets block as defined below.
    ResourceGroupName string
    The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.
    Sku string
    Defines which tier to use. Valid options are Basic, Standard, and Premium. Please not that setting this field to Premium will force the creation of a new resource and also requires setting zone_redundant to true.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    ZoneRedundant bool
    Specifies if the EventHub Namespace should be Zone Redundant (created across Availability Zones). Changing this forces a new resource to be created. Defaults to false.
    AutoInflateEnabled bool
    Is Auto Inflate enabled for the EventHub Namespace?
    Capacity int
    Specifies the Capacity / Throughput Units for a Standard SKU namespace. Default capacity has a maximum of 2, but can be increased in blocks of 2 on a committed purchase basis.
    DedicatedClusterId string
    Specifies the ID of the EventHub Dedicated Cluster where this Namespace should created. Changing this forces a new resource to be created.
    DefaultPrimaryConnectionString string
    The primary connection string for the authorization rule RootManageSharedAccessKey.
    DefaultPrimaryConnectionStringAlias string
    The alias of the primary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    DefaultPrimaryKey string
    The primary access key for the authorization rule RootManageSharedAccessKey.
    DefaultSecondaryConnectionString string
    The secondary connection string for the authorization rule RootManageSharedAccessKey.
    DefaultSecondaryConnectionStringAlias string
    The alias of the secondary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    DefaultSecondaryKey string
    The secondary access key for the authorization rule RootManageSharedAccessKey.
    Identity EventHubNamespaceIdentityArgs
    An identity block as defined below.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    MaximumThroughputUnits int
    Specifies the maximum number of throughput units when Auto Inflate is Enabled. Valid values range from 1 - 20.
    Name string
    Specifies the name of the EventHub Namespace resource. Changing this forces a new resource to be created.
    NetworkRulesets EventHubNamespaceNetworkRulesetsArgs
    A network_rulesets block as defined below.
    ResourceGroupName string
    The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.
    Sku string
    Defines which tier to use. Valid options are Basic, Standard, and Premium. Please not that setting this field to Premium will force the creation of a new resource and also requires setting zone_redundant to true.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    ZoneRedundant bool
    Specifies if the EventHub Namespace should be Zone Redundant (created across Availability Zones). Changing this forces a new resource to be created. Defaults to false.
    autoInflateEnabled Boolean
    Is Auto Inflate enabled for the EventHub Namespace?
    capacity Integer
    Specifies the Capacity / Throughput Units for a Standard SKU namespace. Default capacity has a maximum of 2, but can be increased in blocks of 2 on a committed purchase basis.
    dedicatedClusterId String
    Specifies the ID of the EventHub Dedicated Cluster where this Namespace should created. Changing this forces a new resource to be created.
    defaultPrimaryConnectionString String
    The primary connection string for the authorization rule RootManageSharedAccessKey.
    defaultPrimaryConnectionStringAlias String
    The alias of the primary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    defaultPrimaryKey String
    The primary access key for the authorization rule RootManageSharedAccessKey.
    defaultSecondaryConnectionString String
    The secondary connection string for the authorization rule RootManageSharedAccessKey.
    defaultSecondaryConnectionStringAlias String
    The alias of the secondary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    defaultSecondaryKey String
    The secondary access key for the authorization rule RootManageSharedAccessKey.
    identity EventHubNamespaceIdentity
    An identity block as defined below.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    maximumThroughputUnits Integer
    Specifies the maximum number of throughput units when Auto Inflate is Enabled. Valid values range from 1 - 20.
    name String
    Specifies the name of the EventHub Namespace resource. Changing this forces a new resource to be created.
    networkRulesets EventHubNamespaceNetworkRulesets
    A network_rulesets block as defined below.
    resourceGroupName String
    The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.
    sku String
    Defines which tier to use. Valid options are Basic, Standard, and Premium. Please not that setting this field to Premium will force the creation of a new resource and also requires setting zone_redundant to true.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    zoneRedundant Boolean
    Specifies if the EventHub Namespace should be Zone Redundant (created across Availability Zones). Changing this forces a new resource to be created. Defaults to false.
    autoInflateEnabled boolean
    Is Auto Inflate enabled for the EventHub Namespace?
    capacity number
    Specifies the Capacity / Throughput Units for a Standard SKU namespace. Default capacity has a maximum of 2, but can be increased in blocks of 2 on a committed purchase basis.
    dedicatedClusterId string
    Specifies the ID of the EventHub Dedicated Cluster where this Namespace should created. Changing this forces a new resource to be created.
    defaultPrimaryConnectionString string
    The primary connection string for the authorization rule RootManageSharedAccessKey.
    defaultPrimaryConnectionStringAlias string
    The alias of the primary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    defaultPrimaryKey string
    The primary access key for the authorization rule RootManageSharedAccessKey.
    defaultSecondaryConnectionString string
    The secondary connection string for the authorization rule RootManageSharedAccessKey.
    defaultSecondaryConnectionStringAlias string
    The alias of the secondary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    defaultSecondaryKey string
    The secondary access key for the authorization rule RootManageSharedAccessKey.
    identity EventHubNamespaceIdentity
    An identity block as defined below.
    location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    maximumThroughputUnits number
    Specifies the maximum number of throughput units when Auto Inflate is Enabled. Valid values range from 1 - 20.
    name string
    Specifies the name of the EventHub Namespace resource. Changing this forces a new resource to be created.
    networkRulesets EventHubNamespaceNetworkRulesets
    A network_rulesets block as defined below.
    resourceGroupName string
    The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.
    sku string
    Defines which tier to use. Valid options are Basic, Standard, and Premium. Please not that setting this field to Premium will force the creation of a new resource and also requires setting zone_redundant to true.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    zoneRedundant boolean
    Specifies if the EventHub Namespace should be Zone Redundant (created across Availability Zones). Changing this forces a new resource to be created. Defaults to false.
    auto_inflate_enabled bool
    Is Auto Inflate enabled for the EventHub Namespace?
    capacity int
    Specifies the Capacity / Throughput Units for a Standard SKU namespace. Default capacity has a maximum of 2, but can be increased in blocks of 2 on a committed purchase basis.
    dedicated_cluster_id str
    Specifies the ID of the EventHub Dedicated Cluster where this Namespace should created. Changing this forces a new resource to be created.
    default_primary_connection_string str
    The primary connection string for the authorization rule RootManageSharedAccessKey.
    default_primary_connection_string_alias str
    The alias of the primary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    default_primary_key str
    The primary access key for the authorization rule RootManageSharedAccessKey.
    default_secondary_connection_string str
    The secondary connection string for the authorization rule RootManageSharedAccessKey.
    default_secondary_connection_string_alias str
    The alias of the secondary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    default_secondary_key str
    The secondary access key for the authorization rule RootManageSharedAccessKey.
    identity EventHubNamespaceIdentityArgs
    An identity block as defined below.
    location str
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    maximum_throughput_units int
    Specifies the maximum number of throughput units when Auto Inflate is Enabled. Valid values range from 1 - 20.
    name str
    Specifies the name of the EventHub Namespace resource. Changing this forces a new resource to be created.
    network_rulesets EventHubNamespaceNetworkRulesetsArgs
    A network_rulesets block as defined below.
    resource_group_name str
    The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.
    sku str
    Defines which tier to use. Valid options are Basic, Standard, and Premium. Please not that setting this field to Premium will force the creation of a new resource and also requires setting zone_redundant to true.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    zone_redundant bool
    Specifies if the EventHub Namespace should be Zone Redundant (created across Availability Zones). Changing this forces a new resource to be created. Defaults to false.
    autoInflateEnabled Boolean
    Is Auto Inflate enabled for the EventHub Namespace?
    capacity Number
    Specifies the Capacity / Throughput Units for a Standard SKU namespace. Default capacity has a maximum of 2, but can be increased in blocks of 2 on a committed purchase basis.
    dedicatedClusterId String
    Specifies the ID of the EventHub Dedicated Cluster where this Namespace should created. Changing this forces a new resource to be created.
    defaultPrimaryConnectionString String
    The primary connection string for the authorization rule RootManageSharedAccessKey.
    defaultPrimaryConnectionStringAlias String
    The alias of the primary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    defaultPrimaryKey String
    The primary access key for the authorization rule RootManageSharedAccessKey.
    defaultSecondaryConnectionString String
    The secondary connection string for the authorization rule RootManageSharedAccessKey.
    defaultSecondaryConnectionStringAlias String
    The alias of the secondary connection string for the authorization rule RootManageSharedAccessKey, which is generated when disaster recovery is enabled.
    defaultSecondaryKey String
    The secondary access key for the authorization rule RootManageSharedAccessKey.
    identity Property Map
    An identity block as defined below.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    maximumThroughputUnits Number
    Specifies the maximum number of throughput units when Auto Inflate is Enabled. Valid values range from 1 - 20.
    name String
    Specifies the name of the EventHub Namespace resource. Changing this forces a new resource to be created.
    networkRulesets Property Map
    A network_rulesets block as defined below.
    resourceGroupName String
    The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.
    sku String
    Defines which tier to use. Valid options are Basic, Standard, and Premium. Please not that setting this field to Premium will force the creation of a new resource and also requires setting zone_redundant to true.
    tags Map<String>
    A mapping of tags to assign to the resource.
    zoneRedundant Boolean
    Specifies if the EventHub Namespace should be Zone Redundant (created across Availability Zones). Changing this forces a new resource to be created. Defaults to false.

    Supporting Types

    EventHubNamespaceIdentity, EventHubNamespaceIdentityArgs

    Type string
    The Type of Identity which should be used for this EventHub Namespace. At this time the only possible value is SystemAssigned.
    PrincipalId string
    The Client ID of the Service Principal assigned to this EventHub Namespace.
    TenantId string
    The ID of the Tenant the Service Principal is assigned in.
    Type string
    The Type of Identity which should be used for this EventHub Namespace. At this time the only possible value is SystemAssigned.
    PrincipalId string
    The Client ID of the Service Principal assigned to this EventHub Namespace.
    TenantId string
    The ID of the Tenant the Service Principal is assigned in.
    type String
    The Type of Identity which should be used for this EventHub Namespace. At this time the only possible value is SystemAssigned.
    principalId String
    The Client ID of the Service Principal assigned to this EventHub Namespace.
    tenantId String
    The ID of the Tenant the Service Principal is assigned in.
    type string
    The Type of Identity which should be used for this EventHub Namespace. At this time the only possible value is SystemAssigned.
    principalId string
    The Client ID of the Service Principal assigned to this EventHub Namespace.
    tenantId string
    The ID of the Tenant the Service Principal is assigned in.
    type str
    The Type of Identity which should be used for this EventHub Namespace. At this time the only possible value is SystemAssigned.
    principal_id str
    The Client ID of the Service Principal assigned to this EventHub Namespace.
    tenant_id str
    The ID of the Tenant the Service Principal is assigned in.
    type String
    The Type of Identity which should be used for this EventHub Namespace. At this time the only possible value is SystemAssigned.
    principalId String
    The Client ID of the Service Principal assigned to this EventHub Namespace.
    tenantId String
    The ID of the Tenant the Service Principal is assigned in.

    EventHubNamespaceNetworkRulesets, EventHubNamespaceNetworkRulesetsArgs

    DefaultAction string
    The default action to take when a rule is not matched. Possible values are Allow and Deny. Defaults to Deny.
    IpRules List<EventHubNamespaceNetworkRulesetsIpRule>
    One or more ip_rule blocks as defined below.
    TrustedServiceAccessEnabled bool
    Whether Trusted Microsoft Services are allowed to bypass firewall.
    VirtualNetworkRules List<EventHubNamespaceNetworkRulesetsVirtualNetworkRule>
    One or more virtual_network_rule blocks as defined below.
    DefaultAction string
    The default action to take when a rule is not matched. Possible values are Allow and Deny. Defaults to Deny.
    IpRules []EventHubNamespaceNetworkRulesetsIpRule
    One or more ip_rule blocks as defined below.
    TrustedServiceAccessEnabled bool
    Whether Trusted Microsoft Services are allowed to bypass firewall.
    VirtualNetworkRules []EventHubNamespaceNetworkRulesetsVirtualNetworkRule
    One or more virtual_network_rule blocks as defined below.
    defaultAction String
    The default action to take when a rule is not matched. Possible values are Allow and Deny. Defaults to Deny.
    ipRules List<EventHubNamespaceNetworkRulesetsIpRule>
    One or more ip_rule blocks as defined below.
    trustedServiceAccessEnabled Boolean
    Whether Trusted Microsoft Services are allowed to bypass firewall.
    virtualNetworkRules List<EventHubNamespaceNetworkRulesetsVirtualNetworkRule>
    One or more virtual_network_rule blocks as defined below.
    defaultAction string
    The default action to take when a rule is not matched. Possible values are Allow and Deny. Defaults to Deny.
    ipRules EventHubNamespaceNetworkRulesetsIpRule[]
    One or more ip_rule blocks as defined below.
    trustedServiceAccessEnabled boolean
    Whether Trusted Microsoft Services are allowed to bypass firewall.
    virtualNetworkRules EventHubNamespaceNetworkRulesetsVirtualNetworkRule[]
    One or more virtual_network_rule blocks as defined below.
    default_action str
    The default action to take when a rule is not matched. Possible values are Allow and Deny. Defaults to Deny.
    ip_rules Sequence[EventHubNamespaceNetworkRulesetsIpRule]
    One or more ip_rule blocks as defined below.
    trusted_service_access_enabled bool
    Whether Trusted Microsoft Services are allowed to bypass firewall.
    virtual_network_rules Sequence[EventHubNamespaceNetworkRulesetsVirtualNetworkRule]
    One or more virtual_network_rule blocks as defined below.
    defaultAction String
    The default action to take when a rule is not matched. Possible values are Allow and Deny. Defaults to Deny.
    ipRules List<Property Map>
    One or more ip_rule blocks as defined below.
    trustedServiceAccessEnabled Boolean
    Whether Trusted Microsoft Services are allowed to bypass firewall.
    virtualNetworkRules List<Property Map>
    One or more virtual_network_rule blocks as defined below.

    EventHubNamespaceNetworkRulesetsIpRule, EventHubNamespaceNetworkRulesetsIpRuleArgs

    IpMask string
    The ip mask to match on.
    Action string
    The action to take when the rule is matched. Possible values are Allow.
    IpMask string
    The ip mask to match on.
    Action string
    The action to take when the rule is matched. Possible values are Allow.
    ipMask String
    The ip mask to match on.
    action String
    The action to take when the rule is matched. Possible values are Allow.
    ipMask string
    The ip mask to match on.
    action string
    The action to take when the rule is matched. Possible values are Allow.
    ip_mask str
    The ip mask to match on.
    action str
    The action to take when the rule is matched. Possible values are Allow.
    ipMask String
    The ip mask to match on.
    action String
    The action to take when the rule is matched. Possible values are Allow.

    EventHubNamespaceNetworkRulesetsVirtualNetworkRule, EventHubNamespaceNetworkRulesetsVirtualNetworkRuleArgs

    SubnetId string
    The id of the subnet to match on.
    IgnoreMissingVirtualNetworkServiceEndpoint bool
    Are missing virtual network service endpoints ignored? Defaults to false.
    SubnetId string
    The id of the subnet to match on.
    IgnoreMissingVirtualNetworkServiceEndpoint bool
    Are missing virtual network service endpoints ignored? Defaults to false.
    subnetId String
    The id of the subnet to match on.
    ignoreMissingVirtualNetworkServiceEndpoint Boolean
    Are missing virtual network service endpoints ignored? Defaults to false.
    subnetId string
    The id of the subnet to match on.
    ignoreMissingVirtualNetworkServiceEndpoint boolean
    Are missing virtual network service endpoints ignored? Defaults to false.
    subnet_id str
    The id of the subnet to match on.
    ignore_missing_virtual_network_service_endpoint bool
    Are missing virtual network service endpoints ignored? Defaults to false.
    subnetId String
    The id of the subnet to match on.
    ignoreMissingVirtualNetworkServiceEndpoint Boolean
    Are missing virtual network service endpoints ignored? Defaults to false.

    Import

    EventHub Namespaces can be imported using the resource id, e.g.

     $ pulumi import azure:eventhub/eventHubNamespace:EventHubNamespace namespace1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventHub/namespaces/namespace1
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.