azure-native.eventhub.NamespaceNetworkRuleSet

Explore with Pulumi AI

Description of NetworkRuleSet resource. API Version: 2017-04-01.

Example Usage

NameSpaceNetworkRuleSetCreate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var namespaceNetworkRuleSet = new AzureNative.EventHub.NamespaceNetworkRuleSet("namespaceNetworkRuleSet", new()
    {
        DefaultAction = "Deny",
        IpRules = new[]
        {
            new AzureNative.EventHub.Inputs.NWRuleSetIpRulesArgs
            {
                Action = "Allow",
                IpMask = "1.1.1.1",
            },
            new AzureNative.EventHub.Inputs.NWRuleSetIpRulesArgs
            {
                Action = "Allow",
                IpMask = "1.1.1.2",
            },
            new AzureNative.EventHub.Inputs.NWRuleSetIpRulesArgs
            {
                Action = "Allow",
                IpMask = "1.1.1.3",
            },
            new AzureNative.EventHub.Inputs.NWRuleSetIpRulesArgs
            {
                Action = "Allow",
                IpMask = "1.1.1.4",
            },
            new AzureNative.EventHub.Inputs.NWRuleSetIpRulesArgs
            {
                Action = "Allow",
                IpMask = "1.1.1.5",
            },
        },
        NamespaceName = "sdk-Namespace-6019",
        ResourceGroupName = "ResourceGroup",
        VirtualNetworkRules = new[]
        {
            new AzureNative.EventHub.Inputs.NWRuleSetVirtualNetworkRulesArgs
            {
                IgnoreMissingVnetServiceEndpoint = true,
                Subnet = new AzureNative.EventHub.Inputs.SubnetArgs
                {
                    Id = "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2",
                },
            },
            new AzureNative.EventHub.Inputs.NWRuleSetVirtualNetworkRulesArgs
            {
                IgnoreMissingVnetServiceEndpoint = false,
                Subnet = new AzureNative.EventHub.Inputs.SubnetArgs
                {
                    Id = "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3",
                },
            },
            new AzureNative.EventHub.Inputs.NWRuleSetVirtualNetworkRulesArgs
            {
                IgnoreMissingVnetServiceEndpoint = false,
                Subnet = new AzureNative.EventHub.Inputs.SubnetArgs
                {
                    Id = "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6",
                },
            },
        },
    });

});
package main

import (
	eventhub "github.com/pulumi/pulumi-azure-native-sdk/eventhub"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := eventhub.NewNamespaceNetworkRuleSet(ctx, "namespaceNetworkRuleSet", &eventhub.NamespaceNetworkRuleSetArgs{
			DefaultAction: pulumi.String("Deny"),
			IpRules: []eventhub.NWRuleSetIpRulesArgs{
				{
					Action: pulumi.String("Allow"),
					IpMask: pulumi.String("1.1.1.1"),
				},
				{
					Action: pulumi.String("Allow"),
					IpMask: pulumi.String("1.1.1.2"),
				},
				{
					Action: pulumi.String("Allow"),
					IpMask: pulumi.String("1.1.1.3"),
				},
				{
					Action: pulumi.String("Allow"),
					IpMask: pulumi.String("1.1.1.4"),
				},
				{
					Action: pulumi.String("Allow"),
					IpMask: pulumi.String("1.1.1.5"),
				},
			},
			NamespaceName:     pulumi.String("sdk-Namespace-6019"),
			ResourceGroupName: pulumi.String("ResourceGroup"),
			VirtualNetworkRules: []eventhub.NWRuleSetVirtualNetworkRulesArgs{
				{
					IgnoreMissingVnetServiceEndpoint: pulumi.Bool(true),
					Subnet: {
						Id: pulumi.String("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2"),
					},
				},
				{
					IgnoreMissingVnetServiceEndpoint: pulumi.Bool(false),
					Subnet: {
						Id: pulumi.String("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3"),
					},
				},
				{
					IgnoreMissingVnetServiceEndpoint: pulumi.Bool(false),
					Subnet: {
						Id: pulumi.String("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.eventhub.NamespaceNetworkRuleSet;
import com.pulumi.azurenative.eventhub.NamespaceNetworkRuleSetArgs;
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) {
        var namespaceNetworkRuleSet = new NamespaceNetworkRuleSet("namespaceNetworkRuleSet", NamespaceNetworkRuleSetArgs.builder()        
            .defaultAction("Deny")
            .ipRules(            
                Map.ofEntries(
                    Map.entry("action", "Allow"),
                    Map.entry("ipMask", "1.1.1.1")
                ),
                Map.ofEntries(
                    Map.entry("action", "Allow"),
                    Map.entry("ipMask", "1.1.1.2")
                ),
                Map.ofEntries(
                    Map.entry("action", "Allow"),
                    Map.entry("ipMask", "1.1.1.3")
                ),
                Map.ofEntries(
                    Map.entry("action", "Allow"),
                    Map.entry("ipMask", "1.1.1.4")
                ),
                Map.ofEntries(
                    Map.entry("action", "Allow"),
                    Map.entry("ipMask", "1.1.1.5")
                ))
            .namespaceName("sdk-Namespace-6019")
            .resourceGroupName("ResourceGroup")
            .virtualNetworkRules(            
                Map.ofEntries(
                    Map.entry("ignoreMissingVnetServiceEndpoint", true),
                    Map.entry("subnet", Map.of("id", "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2"))
                ),
                Map.ofEntries(
                    Map.entry("ignoreMissingVnetServiceEndpoint", false),
                    Map.entry("subnet", Map.of("id", "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3"))
                ),
                Map.ofEntries(
                    Map.entry("ignoreMissingVnetServiceEndpoint", false),
                    Map.entry("subnet", Map.of("id", "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6"))
                ))
            .build());

    }
}
import pulumi
import pulumi_azure_native as azure_native

namespace_network_rule_set = azure_native.eventhub.NamespaceNetworkRuleSet("namespaceNetworkRuleSet",
    default_action="Deny",
    ip_rules=[
        azure_native.eventhub.NWRuleSetIpRulesArgs(
            action="Allow",
            ip_mask="1.1.1.1",
        ),
        azure_native.eventhub.NWRuleSetIpRulesArgs(
            action="Allow",
            ip_mask="1.1.1.2",
        ),
        azure_native.eventhub.NWRuleSetIpRulesArgs(
            action="Allow",
            ip_mask="1.1.1.3",
        ),
        azure_native.eventhub.NWRuleSetIpRulesArgs(
            action="Allow",
            ip_mask="1.1.1.4",
        ),
        azure_native.eventhub.NWRuleSetIpRulesArgs(
            action="Allow",
            ip_mask="1.1.1.5",
        ),
    ],
    namespace_name="sdk-Namespace-6019",
    resource_group_name="ResourceGroup",
    virtual_network_rules=[
        {
            "ignoreMissingVnetServiceEndpoint": True,
            "subnet": azure_native.eventhub.SubnetArgs(
                id="/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2",
            ),
        },
        {
            "ignoreMissingVnetServiceEndpoint": False,
            "subnet": azure_native.eventhub.SubnetArgs(
                id="/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3",
            ),
        },
        {
            "ignoreMissingVnetServiceEndpoint": False,
            "subnet": azure_native.eventhub.SubnetArgs(
                id="/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6",
            ),
        },
    ])
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const namespaceNetworkRuleSet = new azure_native.eventhub.NamespaceNetworkRuleSet("namespaceNetworkRuleSet", {
    defaultAction: "Deny",
    ipRules: [
        {
            action: "Allow",
            ipMask: "1.1.1.1",
        },
        {
            action: "Allow",
            ipMask: "1.1.1.2",
        },
        {
            action: "Allow",
            ipMask: "1.1.1.3",
        },
        {
            action: "Allow",
            ipMask: "1.1.1.4",
        },
        {
            action: "Allow",
            ipMask: "1.1.1.5",
        },
    ],
    namespaceName: "sdk-Namespace-6019",
    resourceGroupName: "ResourceGroup",
    virtualNetworkRules: [
        {
            ignoreMissingVnetServiceEndpoint: true,
            subnet: {
                id: "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2",
            },
        },
        {
            ignoreMissingVnetServiceEndpoint: false,
            subnet: {
                id: "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3",
            },
        },
        {
            ignoreMissingVnetServiceEndpoint: false,
            subnet: {
                id: "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6",
            },
        },
    ],
});
resources:
  namespaceNetworkRuleSet:
    type: azure-native:eventhub:NamespaceNetworkRuleSet
    properties:
      defaultAction: Deny
      ipRules:
        - action: Allow
          ipMask: 1.1.1.1
        - action: Allow
          ipMask: 1.1.1.2
        - action: Allow
          ipMask: 1.1.1.3
        - action: Allow
          ipMask: 1.1.1.4
        - action: Allow
          ipMask: 1.1.1.5
      namespaceName: sdk-Namespace-6019
      resourceGroupName: ResourceGroup
      virtualNetworkRules:
        - ignoreMissingVnetServiceEndpoint: true
          subnet:
            id: /subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2
        - ignoreMissingVnetServiceEndpoint: false
          subnet:
            id: /subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3
        - ignoreMissingVnetServiceEndpoint: false
          subnet:
            id: /subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6

Create NamespaceNetworkRuleSet Resource

new NamespaceNetworkRuleSet(name: string, args: NamespaceNetworkRuleSetArgs, opts?: CustomResourceOptions);
@overload
def NamespaceNetworkRuleSet(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            default_action: Optional[Union[str, DefaultAction]] = None,
                            ip_rules: Optional[Sequence[NWRuleSetIpRulesArgs]] = None,
                            namespace_name: Optional[str] = None,
                            resource_group_name: Optional[str] = None,
                            virtual_network_rules: Optional[Sequence[NWRuleSetVirtualNetworkRulesArgs]] = None)
@overload
def NamespaceNetworkRuleSet(resource_name: str,
                            args: NamespaceNetworkRuleSetArgs,
                            opts: Optional[ResourceOptions] = None)
func NewNamespaceNetworkRuleSet(ctx *Context, name string, args NamespaceNetworkRuleSetArgs, opts ...ResourceOption) (*NamespaceNetworkRuleSet, error)
public NamespaceNetworkRuleSet(string name, NamespaceNetworkRuleSetArgs args, CustomResourceOptions? opts = null)
public NamespaceNetworkRuleSet(String name, NamespaceNetworkRuleSetArgs args)
public NamespaceNetworkRuleSet(String name, NamespaceNetworkRuleSetArgs args, CustomResourceOptions options)
type: azure-native:eventhub:NamespaceNetworkRuleSet
properties: # The arguments to resource properties.
options: # 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.
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.

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

The NamespaceNetworkRuleSet resource accepts the following input properties:

NamespaceName string

The Namespace name

ResourceGroupName string

Name of the resource group within the azure subscription.

DefaultAction string | Pulumi.AzureNative.EventHub.DefaultAction

Default Action for Network Rule Set

IpRules List<Pulumi.AzureNative.EventHub.Inputs.NWRuleSetIpRulesArgs>

List of IpRules

VirtualNetworkRules List<Pulumi.AzureNative.EventHub.Inputs.NWRuleSetVirtualNetworkRulesArgs>

List VirtualNetwork Rules

NamespaceName string

The Namespace name

ResourceGroupName string

Name of the resource group within the azure subscription.

DefaultAction string | DefaultAction

Default Action for Network Rule Set

IpRules []NWRuleSetIpRulesArgs

List of IpRules

VirtualNetworkRules []NWRuleSetVirtualNetworkRulesArgs

List VirtualNetwork Rules

namespaceName String

The Namespace name

resourceGroupName String

Name of the resource group within the azure subscription.

defaultAction String | DefaultAction

Default Action for Network Rule Set

ipRules List<NWRuleSetIpRulesArgs>

List of IpRules

virtualNetworkRules List<NWRuleSetVirtualNetworkRulesArgs>

List VirtualNetwork Rules

namespaceName string

The Namespace name

resourceGroupName string

Name of the resource group within the azure subscription.

defaultAction string | DefaultAction

Default Action for Network Rule Set

ipRules NWRuleSetIpRulesArgs[]

List of IpRules

virtualNetworkRules NWRuleSetVirtualNetworkRulesArgs[]

List VirtualNetwork Rules

namespace_name str

The Namespace name

resource_group_name str

Name of the resource group within the azure subscription.

default_action str | DefaultAction

Default Action for Network Rule Set

ip_rules Sequence[NWRuleSetIpRulesArgs]

List of IpRules

virtual_network_rules Sequence[NWRuleSetVirtualNetworkRulesArgs]

List VirtualNetwork Rules

namespaceName String

The Namespace name

resourceGroupName String

Name of the resource group within the azure subscription.

defaultAction String | "Allow" | "Deny"

Default Action for Network Rule Set

ipRules List<Property Map>

List of IpRules

virtualNetworkRules List<Property Map>

List VirtualNetwork Rules

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.

Name string

The name of the resource

Type string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the resource

Type string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

id String

The provider-assigned unique ID for this managed resource.

name String

The name of the resource

type String

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

id string

The provider-assigned unique ID for this managed resource.

name string

The name of the resource

type string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

id str

The provider-assigned unique ID for this managed resource.

name str

The name of the resource

type str

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

id String

The provider-assigned unique ID for this managed resource.

name String

The name of the resource

type String

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Supporting Types

DefaultAction

Allow
Allow
Deny
Deny
DefaultActionAllow
Allow
DefaultActionDeny
Deny
Allow
Allow
Deny
Deny
Allow
Allow
Deny
Deny
ALLOW
Allow
DENY
Deny
"Allow"
Allow
"Deny"
Deny

NWRuleSetIpRules

Action string | Pulumi.AzureNative.EventHub.NetworkRuleIPAction

The IP Filter Action

IpMask string

IP Mask

Action string | NetworkRuleIPAction

The IP Filter Action

IpMask string

IP Mask

action String | NetworkRuleIPAction

The IP Filter Action

ipMask String

IP Mask

action string | NetworkRuleIPAction

The IP Filter Action

ipMask string

IP Mask

action str | NetworkRuleIPAction

The IP Filter Action

ip_mask str

IP Mask

action String | "Allow"

The IP Filter Action

ipMask String

IP Mask

NWRuleSetIpRulesResponse

Action string

The IP Filter Action

IpMask string

IP Mask

Action string

The IP Filter Action

IpMask string

IP Mask

action String

The IP Filter Action

ipMask String

IP Mask

action string

The IP Filter Action

ipMask string

IP Mask

action str

The IP Filter Action

ip_mask str

IP Mask

action String

The IP Filter Action

ipMask String

IP Mask

NWRuleSetVirtualNetworkRules

IgnoreMissingVnetServiceEndpoint bool

Value that indicates whether to ignore missing VNet Service Endpoint

Subnet Pulumi.AzureNative.EventHub.Inputs.Subnet

Subnet properties

IgnoreMissingVnetServiceEndpoint bool

Value that indicates whether to ignore missing VNet Service Endpoint

Subnet Subnet

Subnet properties

ignoreMissingVnetServiceEndpoint Boolean

Value that indicates whether to ignore missing VNet Service Endpoint

subnet Subnet

Subnet properties

ignoreMissingVnetServiceEndpoint boolean

Value that indicates whether to ignore missing VNet Service Endpoint

subnet Subnet

Subnet properties

ignore_missing_vnet_service_endpoint bool

Value that indicates whether to ignore missing VNet Service Endpoint

subnet Subnet

Subnet properties

ignoreMissingVnetServiceEndpoint Boolean

Value that indicates whether to ignore missing VNet Service Endpoint

subnet Property Map

Subnet properties

NWRuleSetVirtualNetworkRulesResponse

IgnoreMissingVnetServiceEndpoint bool

Value that indicates whether to ignore missing VNet Service Endpoint

Subnet Pulumi.AzureNative.EventHub.Inputs.SubnetResponse

Subnet properties

IgnoreMissingVnetServiceEndpoint bool

Value that indicates whether to ignore missing VNet Service Endpoint

Subnet SubnetResponse

Subnet properties

ignoreMissingVnetServiceEndpoint Boolean

Value that indicates whether to ignore missing VNet Service Endpoint

subnet SubnetResponse

Subnet properties

ignoreMissingVnetServiceEndpoint boolean

Value that indicates whether to ignore missing VNet Service Endpoint

subnet SubnetResponse

Subnet properties

ignore_missing_vnet_service_endpoint bool

Value that indicates whether to ignore missing VNet Service Endpoint

subnet SubnetResponse

Subnet properties

ignoreMissingVnetServiceEndpoint Boolean

Value that indicates whether to ignore missing VNet Service Endpoint

subnet Property Map

Subnet properties

NetworkRuleIPAction

Allow
Allow
NetworkRuleIPActionAllow
Allow
Allow
Allow
Allow
Allow
ALLOW
Allow
"Allow"
Allow

Subnet

Id string

Resource ID of Virtual Network Subnet

Id string

Resource ID of Virtual Network Subnet

id String

Resource ID of Virtual Network Subnet

id string

Resource ID of Virtual Network Subnet

id str

Resource ID of Virtual Network Subnet

id String

Resource ID of Virtual Network Subnet

SubnetResponse

Id string

Resource ID of Virtual Network Subnet

Id string

Resource ID of Virtual Network Subnet

id String

Resource ID of Virtual Network Subnet

id string

Resource ID of Virtual Network Subnet

id str

Resource ID of Virtual Network Subnet

id String

Resource ID of Virtual Network Subnet

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:eventhub:NamespaceNetworkRuleSet default /subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourceGroups/resourcegroupid/providers/Microsoft.EventHub/namespaces/sdk-Namespace-9659/networkrulesets/default 

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0