1. Packages
  2. Azure Classic
  3. API Docs
  4. servicebus
  5. NamespaceNetworkRuleSet

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 a ServiceBus Namespace Network Rule Set Set.

    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 exampleNamespace = new Azure.ServiceBus.Namespace("exampleNamespace", new Azure.ServiceBus.NamespaceArgs
            {
                Location = exampleResourceGroup.Location,
                ResourceGroupName = exampleResourceGroup.Name,
                Sku = "Premium",
                Capacity = 1,
            });
            var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("exampleVirtualNetwork", new Azure.Network.VirtualNetworkArgs
            {
                Location = exampleResourceGroup.Location,
                ResourceGroupName = exampleResourceGroup.Name,
                AddressSpaces = 
                {
                    "172.17.0.0/16",
                },
                DnsServers = 
                {
                    "10.0.0.4",
                    "10.0.0.5",
                },
            });
            var exampleSubnet = new Azure.Network.Subnet("exampleSubnet", new Azure.Network.SubnetArgs
            {
                ResourceGroupName = exampleResourceGroup.Name,
                VirtualNetworkName = exampleVirtualNetwork.Name,
                AddressPrefixes = 
                {
                    "172.17.0.0/24",
                },
                ServiceEndpoints = 
                {
                    "Microsoft.ServiceBus",
                },
            });
            var exampleNamespaceNetworkRuleSet = new Azure.ServiceBus.NamespaceNetworkRuleSet("exampleNamespaceNetworkRuleSet", new Azure.ServiceBus.NamespaceNetworkRuleSetArgs
            {
                NamespaceId = exampleNamespace.Id,
                DefaultAction = "Deny",
                PublicNetworkAccessEnabled = true,
                NetworkRules = 
                {
                    new Azure.ServiceBus.Inputs.NamespaceNetworkRuleSetNetworkRuleArgs
                    {
                        SubnetId = exampleSubnet.Id,
                        IgnoreMissingVnetServiceEndpoint = false,
                    },
                },
                IpRules = 
                {
                    "1.1.1.1",
                },
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/network"
    	"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 {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleNamespace, err := servicebus.NewNamespace(ctx, "exampleNamespace", &servicebus.NamespaceArgs{
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    			Sku:               pulumi.String("Premium"),
    			Capacity:          pulumi.Int(1),
    		})
    		if err != nil {
    			return err
    		}
    		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "exampleVirtualNetwork", &network.VirtualNetworkArgs{
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    			AddressSpaces: pulumi.StringArray{
    				pulumi.String("172.17.0.0/16"),
    			},
    			DnsServers: pulumi.StringArray{
    				pulumi.String("10.0.0.4"),
    				pulumi.String("10.0.0.5"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleSubnet, err := network.NewSubnet(ctx, "exampleSubnet", &network.SubnetArgs{
    			ResourceGroupName:  exampleResourceGroup.Name,
    			VirtualNetworkName: exampleVirtualNetwork.Name,
    			AddressPrefixes: pulumi.StringArray{
    				pulumi.String("172.17.0.0/24"),
    			},
    			ServiceEndpoints: pulumi.StringArray{
    				pulumi.String("Microsoft.ServiceBus"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = servicebus.NewNamespaceNetworkRuleSet(ctx, "exampleNamespaceNetworkRuleSet", &servicebus.NamespaceNetworkRuleSetArgs{
    			NamespaceId:                exampleNamespace.ID(),
    			DefaultAction:              pulumi.String("Deny"),
    			PublicNetworkAccessEnabled: pulumi.Bool(true),
    			NetworkRules: servicebus.NamespaceNetworkRuleSetNetworkRuleArray{
    				&servicebus.NamespaceNetworkRuleSetNetworkRuleArgs{
    					SubnetId:                         exampleSubnet.ID(),
    					IgnoreMissingVnetServiceEndpoint: pulumi.Bool(false),
    				},
    			},
    			IpRules: pulumi.StringArray{
    				pulumi.String("1.1.1.1"),
    			},
    		})
    		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 exampleNamespace = new azure.servicebus.Namespace("exampleNamespace", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        sku: "Premium",
        capacity: 1,
    });
    const exampleVirtualNetwork = new azure.network.VirtualNetwork("exampleVirtualNetwork", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        addressSpaces: ["172.17.0.0/16"],
        dnsServers: [
            "10.0.0.4",
            "10.0.0.5",
        ],
    });
    const exampleSubnet = new azure.network.Subnet("exampleSubnet", {
        resourceGroupName: exampleResourceGroup.name,
        virtualNetworkName: exampleVirtualNetwork.name,
        addressPrefixes: ["172.17.0.0/24"],
        serviceEndpoints: ["Microsoft.ServiceBus"],
    });
    const exampleNamespaceNetworkRuleSet = new azure.servicebus.NamespaceNetworkRuleSet("exampleNamespaceNetworkRuleSet", {
        namespaceId: exampleNamespace.id,
        defaultAction: "Deny",
        publicNetworkAccessEnabled: true,
        networkRules: [{
            subnetId: exampleSubnet.id,
            ignoreMissingVnetServiceEndpoint: false,
        }],
        ipRules: ["1.1.1.1"],
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_namespace = azure.servicebus.Namespace("exampleNamespace",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        sku="Premium",
        capacity=1)
    example_virtual_network = azure.network.VirtualNetwork("exampleVirtualNetwork",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        address_spaces=["172.17.0.0/16"],
        dns_servers=[
            "10.0.0.4",
            "10.0.0.5",
        ])
    example_subnet = azure.network.Subnet("exampleSubnet",
        resource_group_name=example_resource_group.name,
        virtual_network_name=example_virtual_network.name,
        address_prefixes=["172.17.0.0/24"],
        service_endpoints=["Microsoft.ServiceBus"])
    example_namespace_network_rule_set = azure.servicebus.NamespaceNetworkRuleSet("exampleNamespaceNetworkRuleSet",
        namespace_id=example_namespace.id,
        default_action="Deny",
        public_network_access_enabled=True,
        network_rules=[azure.servicebus.NamespaceNetworkRuleSetNetworkRuleArgs(
            subnet_id=example_subnet.id,
            ignore_missing_vnet_service_endpoint=False,
        )],
        ip_rules=["1.1.1.1"])
    

    Example coming soon!

    Create NamespaceNetworkRuleSet Resource

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

    Constructor syntax

    new NamespaceNetworkRuleSet(name: string, args?: NamespaceNetworkRuleSetArgs, opts?: CustomResourceOptions);
    @overload
    def NamespaceNetworkRuleSet(resource_name: str,
                                args: Optional[NamespaceNetworkRuleSetArgs] = None,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def NamespaceNetworkRuleSet(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                default_action: Optional[str] = None,
                                ip_rules: Optional[Sequence[str]] = None,
                                namespace_id: Optional[str] = None,
                                namespace_name: Optional[str] = None,
                                network_rules: Optional[Sequence[NamespaceNetworkRuleSetNetworkRuleArgs]] = None,
                                public_network_access_enabled: Optional[bool] = None,
                                resource_group_name: Optional[str] = None,
                                trusted_services_allowed: Optional[bool] = None)
    func NewNamespaceNetworkRuleSet(ctx *Context, name string, args *NamespaceNetworkRuleSetArgs, opts ...ResourceOption) (*NamespaceNetworkRuleSet, error)
    public NamespaceNetworkRuleSet(string name, NamespaceNetworkRuleSetArgs? args = null, CustomResourceOptions? opts = null)
    public NamespaceNetworkRuleSet(String name, NamespaceNetworkRuleSetArgs args)
    public NamespaceNetworkRuleSet(String name, NamespaceNetworkRuleSetArgs args, CustomResourceOptions options)
    
    type: azure:servicebus:NamespaceNetworkRuleSet
    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 NamespaceNetworkRuleSetArgs
    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 NamespaceNetworkRuleSetArgs
    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 NamespaceNetworkRuleSetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NamespaceNetworkRuleSetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NamespaceNetworkRuleSetArgs
    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 namespaceNetworkRuleSetResource = new Azure.ServiceBus.NamespaceNetworkRuleSet("namespaceNetworkRuleSetResource", new()
    {
        DefaultAction = "string",
        IpRules = new[]
        {
            "string",
        },
        NamespaceId = "string",
        NetworkRules = new[]
        {
            new Azure.ServiceBus.Inputs.NamespaceNetworkRuleSetNetworkRuleArgs
            {
                SubnetId = "string",
                IgnoreMissingVnetServiceEndpoint = false,
            },
        },
        PublicNetworkAccessEnabled = false,
        TrustedServicesAllowed = false,
    });
    
    example, err := servicebus.NewNamespaceNetworkRuleSet(ctx, "namespaceNetworkRuleSetResource", &servicebus.NamespaceNetworkRuleSetArgs{
    	DefaultAction: pulumi.String("string"),
    	IpRules: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	NamespaceId: pulumi.String("string"),
    	NetworkRules: servicebus.NamespaceNetworkRuleSetNetworkRuleArray{
    		&servicebus.NamespaceNetworkRuleSetNetworkRuleArgs{
    			SubnetId:                         pulumi.String("string"),
    			IgnoreMissingVnetServiceEndpoint: pulumi.Bool(false),
    		},
    	},
    	PublicNetworkAccessEnabled: pulumi.Bool(false),
    	TrustedServicesAllowed:     pulumi.Bool(false),
    })
    
    var namespaceNetworkRuleSetResource = new NamespaceNetworkRuleSet("namespaceNetworkRuleSetResource", NamespaceNetworkRuleSetArgs.builder()
        .defaultAction("string")
        .ipRules("string")
        .namespaceId("string")
        .networkRules(NamespaceNetworkRuleSetNetworkRuleArgs.builder()
            .subnetId("string")
            .ignoreMissingVnetServiceEndpoint(false)
            .build())
        .publicNetworkAccessEnabled(false)
        .trustedServicesAllowed(false)
        .build());
    
    namespace_network_rule_set_resource = azure.servicebus.NamespaceNetworkRuleSet("namespaceNetworkRuleSetResource",
        default_action="string",
        ip_rules=["string"],
        namespace_id="string",
        network_rules=[{
            "subnet_id": "string",
            "ignore_missing_vnet_service_endpoint": False,
        }],
        public_network_access_enabled=False,
        trusted_services_allowed=False)
    
    const namespaceNetworkRuleSetResource = new azure.servicebus.NamespaceNetworkRuleSet("namespaceNetworkRuleSetResource", {
        defaultAction: "string",
        ipRules: ["string"],
        namespaceId: "string",
        networkRules: [{
            subnetId: "string",
            ignoreMissingVnetServiceEndpoint: false,
        }],
        publicNetworkAccessEnabled: false,
        trustedServicesAllowed: false,
    });
    
    type: azure:servicebus:NamespaceNetworkRuleSet
    properties:
        defaultAction: string
        ipRules:
            - string
        namespaceId: string
        networkRules:
            - ignoreMissingVnetServiceEndpoint: false
              subnetId: string
        publicNetworkAccessEnabled: false
        trustedServicesAllowed: false
    

    NamespaceNetworkRuleSet 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 NamespaceNetworkRuleSet resource accepts the following input properties:

    DefaultAction string
    Specifies the default action for the ServiceBus Namespace Network Rule Set. Possible values are Allow and Deny. Defaults to Deny.
    IpRules List<string>
    One or more IP Addresses, or CIDR Blocks which should be able to access the ServiceBus Namespace.
    NamespaceId string
    Specifies the ServiceBus Namespace ID to which to attach the ServiceBus Namespace Network Rule Set. Changing this forces a new resource to be created.
    NamespaceName string

    Deprecated: Deprecated in favor of "namespace_id"

    NetworkRules List<NamespaceNetworkRuleSetNetworkRule>
    One or more network_rules blocks as defined below.
    PublicNetworkAccessEnabled bool
    Whether to allow traffic over public network. Possible values are true and false. Defaults to true.
    ResourceGroupName string

    Deprecated: Deprecated in favor of "namespace_id"

    TrustedServicesAllowed bool
    If True, then Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration. See Trusted Microsoft Services
    DefaultAction string
    Specifies the default action for the ServiceBus Namespace Network Rule Set. Possible values are Allow and Deny. Defaults to Deny.
    IpRules []string
    One or more IP Addresses, or CIDR Blocks which should be able to access the ServiceBus Namespace.
    NamespaceId string
    Specifies the ServiceBus Namespace ID to which to attach the ServiceBus Namespace Network Rule Set. Changing this forces a new resource to be created.
    NamespaceName string

    Deprecated: Deprecated in favor of "namespace_id"

    NetworkRules []NamespaceNetworkRuleSetNetworkRuleArgs
    One or more network_rules blocks as defined below.
    PublicNetworkAccessEnabled bool
    Whether to allow traffic over public network. Possible values are true and false. Defaults to true.
    ResourceGroupName string

    Deprecated: Deprecated in favor of "namespace_id"

    TrustedServicesAllowed bool
    If True, then Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration. See Trusted Microsoft Services
    defaultAction String
    Specifies the default action for the ServiceBus Namespace Network Rule Set. Possible values are Allow and Deny. Defaults to Deny.
    ipRules List<String>
    One or more IP Addresses, or CIDR Blocks which should be able to access the ServiceBus Namespace.
    namespaceId String
    Specifies the ServiceBus Namespace ID to which to attach the ServiceBus Namespace Network Rule Set. Changing this forces a new resource to be created.
    namespaceName String

    Deprecated: Deprecated in favor of "namespace_id"

    networkRules List<NamespaceNetworkRuleSetNetworkRule>
    One or more network_rules blocks as defined below.
    publicNetworkAccessEnabled Boolean
    Whether to allow traffic over public network. Possible values are true and false. Defaults to true.
    resourceGroupName String

    Deprecated: Deprecated in favor of "namespace_id"

    trustedServicesAllowed Boolean
    If True, then Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration. See Trusted Microsoft Services
    defaultAction string
    Specifies the default action for the ServiceBus Namespace Network Rule Set. Possible values are Allow and Deny. Defaults to Deny.
    ipRules string[]
    One or more IP Addresses, or CIDR Blocks which should be able to access the ServiceBus Namespace.
    namespaceId string
    Specifies the ServiceBus Namespace ID to which to attach the ServiceBus Namespace Network Rule Set. Changing this forces a new resource to be created.
    namespaceName string

    Deprecated: Deprecated in favor of "namespace_id"

    networkRules NamespaceNetworkRuleSetNetworkRule[]
    One or more network_rules blocks as defined below.
    publicNetworkAccessEnabled boolean
    Whether to allow traffic over public network. Possible values are true and false. Defaults to true.
    resourceGroupName string

    Deprecated: Deprecated in favor of "namespace_id"

    trustedServicesAllowed boolean
    If True, then Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration. See Trusted Microsoft Services
    default_action str
    Specifies the default action for the ServiceBus Namespace Network Rule Set. Possible values are Allow and Deny. Defaults to Deny.
    ip_rules Sequence[str]
    One or more IP Addresses, or CIDR Blocks which should be able to access the ServiceBus Namespace.
    namespace_id str
    Specifies the ServiceBus Namespace ID to which to attach the ServiceBus Namespace Network Rule Set. Changing this forces a new resource to be created.
    namespace_name str

    Deprecated: Deprecated in favor of "namespace_id"

    network_rules Sequence[NamespaceNetworkRuleSetNetworkRuleArgs]
    One or more network_rules blocks as defined below.
    public_network_access_enabled bool
    Whether to allow traffic over public network. Possible values are true and false. Defaults to true.
    resource_group_name str

    Deprecated: Deprecated in favor of "namespace_id"

    trusted_services_allowed bool
    If True, then Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration. See Trusted Microsoft Services
    defaultAction String
    Specifies the default action for the ServiceBus Namespace Network Rule Set. Possible values are Allow and Deny. Defaults to Deny.
    ipRules List<String>
    One or more IP Addresses, or CIDR Blocks which should be able to access the ServiceBus Namespace.
    namespaceId String
    Specifies the ServiceBus Namespace ID to which to attach the ServiceBus Namespace Network Rule Set. Changing this forces a new resource to be created.
    namespaceName String

    Deprecated: Deprecated in favor of "namespace_id"

    networkRules List<Property Map>
    One or more network_rules blocks as defined below.
    publicNetworkAccessEnabled Boolean
    Whether to allow traffic over public network. Possible values are true and false. Defaults to true.
    resourceGroupName String

    Deprecated: Deprecated in favor of "namespace_id"

    trustedServicesAllowed Boolean
    If True, then Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration. See Trusted Microsoft Services

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing NamespaceNetworkRuleSet Resource

    Get an existing NamespaceNetworkRuleSet 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?: NamespaceNetworkRuleSetState, opts?: CustomResourceOptions): NamespaceNetworkRuleSet
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            default_action: Optional[str] = None,
            ip_rules: Optional[Sequence[str]] = None,
            namespace_id: Optional[str] = None,
            namespace_name: Optional[str] = None,
            network_rules: Optional[Sequence[NamespaceNetworkRuleSetNetworkRuleArgs]] = None,
            public_network_access_enabled: Optional[bool] = None,
            resource_group_name: Optional[str] = None,
            trusted_services_allowed: Optional[bool] = None) -> NamespaceNetworkRuleSet
    func GetNamespaceNetworkRuleSet(ctx *Context, name string, id IDInput, state *NamespaceNetworkRuleSetState, opts ...ResourceOption) (*NamespaceNetworkRuleSet, error)
    public static NamespaceNetworkRuleSet Get(string name, Input<string> id, NamespaceNetworkRuleSetState? state, CustomResourceOptions? opts = null)
    public static NamespaceNetworkRuleSet get(String name, Output<String> id, NamespaceNetworkRuleSetState state, CustomResourceOptions options)
    resources:  _:    type: azure:servicebus:NamespaceNetworkRuleSet    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:
    DefaultAction string
    Specifies the default action for the ServiceBus Namespace Network Rule Set. Possible values are Allow and Deny. Defaults to Deny.
    IpRules List<string>
    One or more IP Addresses, or CIDR Blocks which should be able to access the ServiceBus Namespace.
    NamespaceId string
    Specifies the ServiceBus Namespace ID to which to attach the ServiceBus Namespace Network Rule Set. Changing this forces a new resource to be created.
    NamespaceName string

    Deprecated: Deprecated in favor of "namespace_id"

    NetworkRules List<NamespaceNetworkRuleSetNetworkRule>
    One or more network_rules blocks as defined below.
    PublicNetworkAccessEnabled bool
    Whether to allow traffic over public network. Possible values are true and false. Defaults to true.
    ResourceGroupName string

    Deprecated: Deprecated in favor of "namespace_id"

    TrustedServicesAllowed bool
    If True, then Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration. See Trusted Microsoft Services
    DefaultAction string
    Specifies the default action for the ServiceBus Namespace Network Rule Set. Possible values are Allow and Deny. Defaults to Deny.
    IpRules []string
    One or more IP Addresses, or CIDR Blocks which should be able to access the ServiceBus Namespace.
    NamespaceId string
    Specifies the ServiceBus Namespace ID to which to attach the ServiceBus Namespace Network Rule Set. Changing this forces a new resource to be created.
    NamespaceName string

    Deprecated: Deprecated in favor of "namespace_id"

    NetworkRules []NamespaceNetworkRuleSetNetworkRuleArgs
    One or more network_rules blocks as defined below.
    PublicNetworkAccessEnabled bool
    Whether to allow traffic over public network. Possible values are true and false. Defaults to true.
    ResourceGroupName string

    Deprecated: Deprecated in favor of "namespace_id"

    TrustedServicesAllowed bool
    If True, then Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration. See Trusted Microsoft Services
    defaultAction String
    Specifies the default action for the ServiceBus Namespace Network Rule Set. Possible values are Allow and Deny. Defaults to Deny.
    ipRules List<String>
    One or more IP Addresses, or CIDR Blocks which should be able to access the ServiceBus Namespace.
    namespaceId String
    Specifies the ServiceBus Namespace ID to which to attach the ServiceBus Namespace Network Rule Set. Changing this forces a new resource to be created.
    namespaceName String

    Deprecated: Deprecated in favor of "namespace_id"

    networkRules List<NamespaceNetworkRuleSetNetworkRule>
    One or more network_rules blocks as defined below.
    publicNetworkAccessEnabled Boolean
    Whether to allow traffic over public network. Possible values are true and false. Defaults to true.
    resourceGroupName String

    Deprecated: Deprecated in favor of "namespace_id"

    trustedServicesAllowed Boolean
    If True, then Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration. See Trusted Microsoft Services
    defaultAction string
    Specifies the default action for the ServiceBus Namespace Network Rule Set. Possible values are Allow and Deny. Defaults to Deny.
    ipRules string[]
    One or more IP Addresses, or CIDR Blocks which should be able to access the ServiceBus Namespace.
    namespaceId string
    Specifies the ServiceBus Namespace ID to which to attach the ServiceBus Namespace Network Rule Set. Changing this forces a new resource to be created.
    namespaceName string

    Deprecated: Deprecated in favor of "namespace_id"

    networkRules NamespaceNetworkRuleSetNetworkRule[]
    One or more network_rules blocks as defined below.
    publicNetworkAccessEnabled boolean
    Whether to allow traffic over public network. Possible values are true and false. Defaults to true.
    resourceGroupName string

    Deprecated: Deprecated in favor of "namespace_id"

    trustedServicesAllowed boolean
    If True, then Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration. See Trusted Microsoft Services
    default_action str
    Specifies the default action for the ServiceBus Namespace Network Rule Set. Possible values are Allow and Deny. Defaults to Deny.
    ip_rules Sequence[str]
    One or more IP Addresses, or CIDR Blocks which should be able to access the ServiceBus Namespace.
    namespace_id str
    Specifies the ServiceBus Namespace ID to which to attach the ServiceBus Namespace Network Rule Set. Changing this forces a new resource to be created.
    namespace_name str

    Deprecated: Deprecated in favor of "namespace_id"

    network_rules Sequence[NamespaceNetworkRuleSetNetworkRuleArgs]
    One or more network_rules blocks as defined below.
    public_network_access_enabled bool
    Whether to allow traffic over public network. Possible values are true and false. Defaults to true.
    resource_group_name str

    Deprecated: Deprecated in favor of "namespace_id"

    trusted_services_allowed bool
    If True, then Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration. See Trusted Microsoft Services
    defaultAction String
    Specifies the default action for the ServiceBus Namespace Network Rule Set. Possible values are Allow and Deny. Defaults to Deny.
    ipRules List<String>
    One or more IP Addresses, or CIDR Blocks which should be able to access the ServiceBus Namespace.
    namespaceId String
    Specifies the ServiceBus Namespace ID to which to attach the ServiceBus Namespace Network Rule Set. Changing this forces a new resource to be created.
    namespaceName String

    Deprecated: Deprecated in favor of "namespace_id"

    networkRules List<Property Map>
    One or more network_rules blocks as defined below.
    publicNetworkAccessEnabled Boolean
    Whether to allow traffic over public network. Possible values are true and false. Defaults to true.
    resourceGroupName String

    Deprecated: Deprecated in favor of "namespace_id"

    trustedServicesAllowed Boolean
    If True, then Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration. See Trusted Microsoft Services

    Supporting Types

    NamespaceNetworkRuleSetNetworkRule, NamespaceNetworkRuleSetNetworkRuleArgs

    SubnetId string
    The Subnet ID which should be able to access this ServiceBus Namespace.
    IgnoreMissingVnetServiceEndpoint bool
    Should the ServiceBus Namespace Network Rule Set ignore missing Virtual Network Service Endpoint option in the Subnet? Defaults to false.
    SubnetId string
    The Subnet ID which should be able to access this ServiceBus Namespace.
    IgnoreMissingVnetServiceEndpoint bool
    Should the ServiceBus Namespace Network Rule Set ignore missing Virtual Network Service Endpoint option in the Subnet? Defaults to false.
    subnetId String
    The Subnet ID which should be able to access this ServiceBus Namespace.
    ignoreMissingVnetServiceEndpoint Boolean
    Should the ServiceBus Namespace Network Rule Set ignore missing Virtual Network Service Endpoint option in the Subnet? Defaults to false.
    subnetId string
    The Subnet ID which should be able to access this ServiceBus Namespace.
    ignoreMissingVnetServiceEndpoint boolean
    Should the ServiceBus Namespace Network Rule Set ignore missing Virtual Network Service Endpoint option in the Subnet? Defaults to false.
    subnet_id str
    The Subnet ID which should be able to access this ServiceBus Namespace.
    ignore_missing_vnet_service_endpoint bool
    Should the ServiceBus Namespace Network Rule Set ignore missing Virtual Network Service Endpoint option in the Subnet? Defaults to false.
    subnetId String
    The Subnet ID which should be able to access this ServiceBus Namespace.
    ignoreMissingVnetServiceEndpoint Boolean
    Should the ServiceBus Namespace Network Rule Set ignore missing Virtual Network Service Endpoint option in the Subnet? Defaults to false.

    Import

    Service Bus Namespace can be imported using the resource id, e.g.

     $ pulumi import azure:servicebus/namespaceNetworkRuleSet:NamespaceNetworkRuleSet example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Servicebus/namespaces/sbns1/networkrulesets/default
    

    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.