NamespaceNetworkRuleSetArgs

data class NamespaceNetworkRuleSetArgs(val defaultAction: Output<Either<String, DefaultAction>>? = null, val ipRules: Output<List<NWRuleSetIpRulesArgs>>? = null, val namespaceName: Output<String>? = null, val publicNetworkAccess: Output<Either<String, PublicNetworkAccessFlag>>? = null, val resourceGroupName: Output<String>? = null, val trustedServiceAccessEnabled: Output<Boolean>? = null, val virtualNetworkRules: Output<List<NWRuleSetVirtualNetworkRulesArgs>>? = null) : ConvertibleToJava<NamespaceNetworkRuleSetArgs>

Description of topic resource. Uses Azure REST API version 2022-10-01-preview. In version 1.x of the Azure Native provider, it used API version 2017-04-01. Other available API versions: 2023-01-01-preview, 2024-01-01, 2024-05-01-preview.

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 = AzureNative.EventHub.DefaultAction.Deny,
IpRules = new[]
{
new AzureNative.EventHub.Inputs.NWRuleSetIpRulesArgs
{
Action = AzureNative.EventHub.NetworkRuleIPAction.Allow,
IpMask = "1.1.1.1",
},
new AzureNative.EventHub.Inputs.NWRuleSetIpRulesArgs
{
Action = AzureNative.EventHub.NetworkRuleIPAction.Allow,
IpMask = "1.1.1.2",
},
new AzureNative.EventHub.Inputs.NWRuleSetIpRulesArgs
{
Action = AzureNative.EventHub.NetworkRuleIPAction.Allow,
IpMask = "1.1.1.3",
},
new AzureNative.EventHub.Inputs.NWRuleSetIpRulesArgs
{
Action = AzureNative.EventHub.NetworkRuleIPAction.Allow,
IpMask = "1.1.1.4",
},
new AzureNative.EventHub.Inputs.NWRuleSetIpRulesArgs
{
Action = AzureNative.EventHub.NetworkRuleIPAction.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/v2"
"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(eventhub.DefaultActionDeny),
IpRules: eventhub.NWRuleSetIpRulesArray{
&eventhub.NWRuleSetIpRulesArgs{
Action: pulumi.String(eventhub.NetworkRuleIPActionAllow),
IpMask: pulumi.String("1.1.1.1"),
},
&eventhub.NWRuleSetIpRulesArgs{
Action: pulumi.String(eventhub.NetworkRuleIPActionAllow),
IpMask: pulumi.String("1.1.1.2"),
},
&eventhub.NWRuleSetIpRulesArgs{
Action: pulumi.String(eventhub.NetworkRuleIPActionAllow),
IpMask: pulumi.String("1.1.1.3"),
},
&eventhub.NWRuleSetIpRulesArgs{
Action: pulumi.String(eventhub.NetworkRuleIPActionAllow),
IpMask: pulumi.String("1.1.1.4"),
},
&eventhub.NWRuleSetIpRulesArgs{
Action: pulumi.String(eventhub.NetworkRuleIPActionAllow),
IpMask: pulumi.String("1.1.1.5"),
},
},
NamespaceName: pulumi.String("sdk-Namespace-6019"),
ResourceGroupName: pulumi.String("ResourceGroup"),
VirtualNetworkRules: eventhub.NWRuleSetVirtualNetworkRulesArray{
&eventhub.NWRuleSetVirtualNetworkRulesArgs{
IgnoreMissingVnetServiceEndpoint: pulumi.Bool(true),
Subnet: &eventhub.SubnetArgs{
Id: pulumi.String("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2"),
},
},
&eventhub.NWRuleSetVirtualNetworkRulesArgs{
IgnoreMissingVnetServiceEndpoint: pulumi.Bool(false),
Subnet: &eventhub.SubnetArgs{
Id: pulumi.String("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3"),
},
},
&eventhub.NWRuleSetVirtualNetworkRulesArgs{
IgnoreMissingVnetServiceEndpoint: pulumi.Bool(false),
Subnet: &eventhub.SubnetArgs{
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 com.pulumi.azurenative.eventhub.inputs.NWRuleSetIpRulesArgs;
import com.pulumi.azurenative.eventhub.inputs.NWRuleSetVirtualNetworkRulesArgs;
import com.pulumi.azurenative.eventhub.inputs.SubnetArgs;
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(
NWRuleSetIpRulesArgs.builder()
.action("Allow")
.ipMask("1.1.1.1")
.build(),
NWRuleSetIpRulesArgs.builder()
.action("Allow")
.ipMask("1.1.1.2")
.build(),
NWRuleSetIpRulesArgs.builder()
.action("Allow")
.ipMask("1.1.1.3")
.build(),
NWRuleSetIpRulesArgs.builder()
.action("Allow")
.ipMask("1.1.1.4")
.build(),
NWRuleSetIpRulesArgs.builder()
.action("Allow")
.ipMask("1.1.1.5")
.build())
.namespaceName("sdk-Namespace-6019")
.resourceGroupName("ResourceGroup")
.virtualNetworkRules(
NWRuleSetVirtualNetworkRulesArgs.builder()
.ignoreMissingVnetServiceEndpoint(true)
.subnet(SubnetArgs.builder()
.id("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2")
.build())
.build(),
NWRuleSetVirtualNetworkRulesArgs.builder()
.ignoreMissingVnetServiceEndpoint(false)
.subnet(SubnetArgs.builder()
.id("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3")
.build())
.build(),
NWRuleSetVirtualNetworkRulesArgs.builder()
.ignoreMissingVnetServiceEndpoint(false)
.subnet(SubnetArgs.builder()
.id("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6")
.build())
.build())
.build());
}
}

Import

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

$ pulumi import azure-native:eventhub:NamespaceNetworkRuleSet default /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default

Constructors

Link copied to clipboard
constructor(defaultAction: Output<Either<String, DefaultAction>>? = null, ipRules: Output<List<NWRuleSetIpRulesArgs>>? = null, namespaceName: Output<String>? = null, publicNetworkAccess: Output<Either<String, PublicNetworkAccessFlag>>? = null, resourceGroupName: Output<String>? = null, trustedServiceAccessEnabled: Output<Boolean>? = null, virtualNetworkRules: Output<List<NWRuleSetVirtualNetworkRulesArgs>>? = null)

Properties

Link copied to clipboard
val defaultAction: Output<Either<String, DefaultAction>>? = null

Default Action for Network Rule Set

Link copied to clipboard
val ipRules: Output<List<NWRuleSetIpRulesArgs>>? = null

List of IpRules

Link copied to clipboard
val namespaceName: Output<String>? = null

The Namespace name

Link copied to clipboard
val publicNetworkAccess: Output<Either<String, PublicNetworkAccessFlag>>? = null

This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

Name of the resource group within the azure subscription.

Link copied to clipboard

Value that indicates whether Trusted Service Access is Enabled or not.

Link copied to clipboard

List VirtualNetwork Rules

Functions

Link copied to clipboard
open override fun toJava(): NamespaceNetworkRuleSetArgs