NamespaceNetworkRuleSet

class NamespaceNetworkRuleSet : KotlinCustomResource

Description of topic resource. Uses Azure REST API version 2024-01-01. In version 2.x of the Azure Native provider, it used API version 2022-10-01-preview. Other available API versions: 2018-01-01-preview, 2021-01-01-preview, 2021-06-01-preview, 2021-11-01, 2022-01-01-preview, 2022-10-01-preview, 2023-01-01-preview, 2024-05-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native eventhub [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

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/v3"
"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

Properties

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

Link copied to clipboard
val defaultAction: Output<String>?

Default Action for Network Rule Set

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

List of IpRules

Link copied to clipboard
val location: Output<String>

The geo-location where the resource lives

Link copied to clipboard
val name: Output<String>

The name of the resource

Link copied to clipboard

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 pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The system meta data relating to this resource.

Link copied to clipboard

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

Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

List VirtualNetwork Rules