azure-native.servicebus.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.ServiceBus.NamespaceNetworkRuleSet("namespaceNetworkRuleSet", new()
{
DefaultAction = "Deny",
IpRules = new[]
{
new AzureNative.ServiceBus.Inputs.NWRuleSetIpRulesArgs
{
Action = "Allow",
IpMask = "1.1.1.1",
},
new AzureNative.ServiceBus.Inputs.NWRuleSetIpRulesArgs
{
Action = "Allow",
IpMask = "1.1.1.2",
},
new AzureNative.ServiceBus.Inputs.NWRuleSetIpRulesArgs
{
Action = "Allow",
IpMask = "1.1.1.3",
},
new AzureNative.ServiceBus.Inputs.NWRuleSetIpRulesArgs
{
Action = "Allow",
IpMask = "1.1.1.4",
},
new AzureNative.ServiceBus.Inputs.NWRuleSetIpRulesArgs
{
Action = "Allow",
IpMask = "1.1.1.5",
},
},
NamespaceName = "sdk-Namespace-6019",
ResourceGroupName = "ResourceGroup",
VirtualNetworkRules = new[]
{
new AzureNative.ServiceBus.Inputs.NWRuleSetVirtualNetworkRulesArgs
{
IgnoreMissingVnetServiceEndpoint = true,
Subnet = new AzureNative.ServiceBus.Inputs.SubnetArgs
{
Id = "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2",
},
},
new AzureNative.ServiceBus.Inputs.NWRuleSetVirtualNetworkRulesArgs
{
IgnoreMissingVnetServiceEndpoint = false,
Subnet = new AzureNative.ServiceBus.Inputs.SubnetArgs
{
Id = "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3",
},
},
new AzureNative.ServiceBus.Inputs.NWRuleSetVirtualNetworkRulesArgs
{
IgnoreMissingVnetServiceEndpoint = false,
Subnet = new AzureNative.ServiceBus.Inputs.SubnetArgs
{
Id = "/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6",
},
},
},
});
});
package main
import (
servicebus "github.com/pulumi/pulumi-azure-native-sdk/servicebus"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := servicebus.NewNamespaceNetworkRuleSet(ctx, "namespaceNetworkRuleSet", &servicebus.NamespaceNetworkRuleSetArgs{
DefaultAction: pulumi.String("Deny"),
IpRules: []servicebus.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: []servicebus.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.servicebus.NamespaceNetworkRuleSet;
import com.pulumi.azurenative.servicebus.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.servicebus.NamespaceNetworkRuleSet("namespaceNetworkRuleSet",
default_action="Deny",
ip_rules=[
azure_native.servicebus.NWRuleSetIpRulesArgs(
action="Allow",
ip_mask="1.1.1.1",
),
azure_native.servicebus.NWRuleSetIpRulesArgs(
action="Allow",
ip_mask="1.1.1.2",
),
azure_native.servicebus.NWRuleSetIpRulesArgs(
action="Allow",
ip_mask="1.1.1.3",
),
azure_native.servicebus.NWRuleSetIpRulesArgs(
action="Allow",
ip_mask="1.1.1.4",
),
azure_native.servicebus.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.servicebus.SubnetArgs(
id="/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2",
),
},
{
"ignoreMissingVnetServiceEndpoint": False,
"subnet": azure_native.servicebus.SubnetArgs(
id="/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3",
),
},
{
"ignoreMissingVnetServiceEndpoint": False,
"subnet": azure_native.servicebus.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.servicebus.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:servicebus: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
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: NamespaceNetworkRuleSetArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NamespaceNetworkRuleSet(resource_name: str,
opts: Optional[ResourceOptions] = None,
namespace_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
default_action: Optional[Union[str, DefaultAction]] = None,
ip_rules: Optional[Sequence[NWRuleSetIpRulesArgs]] = None,
virtual_network_rules: Optional[Sequence[NWRuleSetVirtualNetworkRulesArgs]] = 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: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 azure_nativeNamespaceNetworkRuleSetResource = new AzureNative.Servicebus.NamespaceNetworkRuleSet("azure-nativeNamespaceNetworkRuleSetResource", new()
{
NamespaceName = "string",
ResourceGroupName = "string",
DefaultAction = "string",
IpRules = new[]
{
{
{ "action", "string" },
{ "ipMask", "string" },
},
},
VirtualNetworkRules = new[]
{
{
{ "ignoreMissingVnetServiceEndpoint", false },
{ "subnet",
{
{ "id", "string" },
} },
},
},
});
example, err := servicebus.NewNamespaceNetworkRuleSet(ctx, "azure-nativeNamespaceNetworkRuleSetResource", &servicebus.NamespaceNetworkRuleSetArgs{
NamespaceName: "string",
ResourceGroupName: "string",
DefaultAction: "string",
IpRules: []map[string]interface{}{
map[string]interface{}{
"action": "string",
"ipMask": "string",
},
},
VirtualNetworkRules: []map[string]interface{}{
map[string]interface{}{
"ignoreMissingVnetServiceEndpoint": false,
"subnet": map[string]interface{}{
"id": "string",
},
},
},
})
var azure_nativeNamespaceNetworkRuleSetResource = new NamespaceNetworkRuleSet("azure-nativeNamespaceNetworkRuleSetResource", NamespaceNetworkRuleSetArgs.builder()
.namespaceName("string")
.resourceGroupName("string")
.defaultAction("string")
.ipRules(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.virtualNetworkRules(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build());
azure_native_namespace_network_rule_set_resource = azure_native.servicebus.NamespaceNetworkRuleSet("azure-nativeNamespaceNetworkRuleSetResource",
namespace_name=string,
resource_group_name=string,
default_action=string,
ip_rules=[{
action: string,
ipMask: string,
}],
virtual_network_rules=[{
ignoreMissingVnetServiceEndpoint: False,
subnet: {
id: string,
},
}])
const azure_nativeNamespaceNetworkRuleSetResource = new azure_native.servicebus.NamespaceNetworkRuleSet("azure-nativeNamespaceNetworkRuleSetResource", {
namespaceName: "string",
resourceGroupName: "string",
defaultAction: "string",
ipRules: [{
action: "string",
ipMask: "string",
}],
virtualNetworkRules: [{
ignoreMissingVnetServiceEndpoint: false,
subnet: {
id: "string",
},
}],
});
type: azure-native:servicebus:NamespaceNetworkRuleSet
properties:
defaultAction: string
ipRules:
- action: string
ipMask: string
namespaceName: string
resourceGroupName: string
virtualNetworkRules:
- ignoreMissingVnetServiceEndpoint: false
subnet:
id: string
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:
- Namespace
Name string - The namespace name
- Resource
Group stringName - Name of the Resource group within the Azure subscription.
- Default
Action string | Pulumi.Azure Native. Service Bus. Default Action - Default Action for Network Rule Set
- Ip
Rules List<Pulumi.Azure Native. Service Bus. Inputs. NWRule Set Ip Rules> - List of IpRules
- Virtual
Network List<Pulumi.Rules Azure Native. Service Bus. Inputs. NWRule Set Virtual Network Rules> - List VirtualNetwork Rules
- Namespace
Name string - The namespace name
- Resource
Group stringName - Name of the Resource group within the Azure subscription.
- Default
Action string | DefaultAction - Default Action for Network Rule Set
- Ip
Rules []NWRuleSet Ip Rules Args - List of IpRules
- Virtual
Network []NWRuleRules Set Virtual Network Rules Args - List VirtualNetwork Rules
- namespace
Name String - The namespace name
- resource
Group StringName - Name of the Resource group within the Azure subscription.
- default
Action String | DefaultAction - Default Action for Network Rule Set
- ip
Rules List<NWRuleSet Ip Rules> - List of IpRules
- virtual
Network List<NWRuleRules Set Virtual Network Rules> - List VirtualNetwork Rules
- namespace
Name string - The namespace name
- resource
Group stringName - Name of the Resource group within the Azure subscription.
- default
Action string | DefaultAction - Default Action for Network Rule Set
- ip
Rules NWRuleSet Ip Rules[] - List of IpRules
- virtual
Network NWRuleRules Set Virtual Network Rules[] - List VirtualNetwork Rules
- namespace_
name str - The namespace name
- resource_
group_ strname - Name of the Resource group within the Azure subscription.
- default_
action str | DefaultAction - Default Action for Network Rule Set
- ip_
rules Sequence[NWRuleSet Ip Rules Args] - List of IpRules
- virtual_
network_ Sequence[NWRulerules Set Virtual Network Rules Args] - List VirtualNetwork Rules
- namespace
Name String - The namespace name
- resource
Group StringName - Name of the Resource group within the Azure subscription.
- default
Action String | "Allow" | "Deny" - Default Action for Network Rule Set
- ip
Rules List<Property Map> - List of IpRules
- virtual
Network List<Property Map>Rules - List VirtualNetwork Rules
Outputs
All input properties are implicitly available as output properties. Additionally, the NamespaceNetworkRuleSet resource produces the following output properties:
Supporting Types
DefaultAction, DefaultActionArgs
- Allow
- Allow
- Deny
- Deny
- Default
Action Allow - Allow
- Default
Action Deny - Deny
- Allow
- Allow
- Deny
- Deny
- Allow
- Allow
- Deny
- Deny
- ALLOW
- Allow
- DENY
- Deny
- "Allow"
- Allow
- "Deny"
- Deny
NWRuleSetIpRules, NWRuleSetIpRulesArgs
- Action
string | Pulumi.
Azure Native. Service Bus. Network Rule IPAction - The IP Filter Action
- Ip
Mask string - IP Mask
- Action
string | Network
Rule IPAction - The IP Filter Action
- Ip
Mask string - IP Mask
- action
String | Network
Rule IPAction - The IP Filter Action
- ip
Mask String - IP Mask
- action
string | Network
Rule IPAction - The IP Filter Action
- ip
Mask string - IP Mask
- action
str | Network
Rule IPAction - The IP Filter Action
- ip_
mask str - IP Mask
NWRuleSetIpRulesResponse, NWRuleSetIpRulesResponseArgs
NWRuleSetVirtualNetworkRules, NWRuleSetVirtualNetworkRulesArgs
- Ignore
Missing boolVnet Service Endpoint - Value that indicates whether to ignore missing VNet Service Endpoint
- Subnet
Pulumi.
Azure Native. Service Bus. Inputs. Subnet - Subnet properties
- Ignore
Missing boolVnet Service Endpoint - Value that indicates whether to ignore missing VNet Service Endpoint
- Subnet Subnet
- Subnet properties
- ignore
Missing BooleanVnet Service Endpoint - Value that indicates whether to ignore missing VNet Service Endpoint
- subnet Subnet
- Subnet properties
- ignore
Missing booleanVnet Service Endpoint - Value that indicates whether to ignore missing VNet Service Endpoint
- subnet Subnet
- Subnet properties
- ignore_
missing_ boolvnet_ service_ endpoint - Value that indicates whether to ignore missing VNet Service Endpoint
- subnet Subnet
- Subnet properties
- ignore
Missing BooleanVnet Service Endpoint - Value that indicates whether to ignore missing VNet Service Endpoint
- subnet Property Map
- Subnet properties
NWRuleSetVirtualNetworkRulesResponse, NWRuleSetVirtualNetworkRulesResponseArgs
- Ignore
Missing boolVnet Service Endpoint - Value that indicates whether to ignore missing VNet Service Endpoint
- Subnet
Pulumi.
Azure Native. Service Bus. Inputs. Subnet Response - Subnet properties
- Ignore
Missing boolVnet Service Endpoint - Value that indicates whether to ignore missing VNet Service Endpoint
- Subnet
Subnet
Response - Subnet properties
- ignore
Missing BooleanVnet Service Endpoint - Value that indicates whether to ignore missing VNet Service Endpoint
- subnet
Subnet
Response - Subnet properties
- ignore
Missing booleanVnet Service Endpoint - Value that indicates whether to ignore missing VNet Service Endpoint
- subnet
Subnet
Response - Subnet properties
- ignore_
missing_ boolvnet_ service_ endpoint - Value that indicates whether to ignore missing VNet Service Endpoint
- subnet
Subnet
Response - Subnet properties
- ignore
Missing BooleanVnet Service Endpoint - Value that indicates whether to ignore missing VNet Service Endpoint
- subnet Property Map
- Subnet properties
NetworkRuleIPAction, NetworkRuleIPActionArgs
- Allow
- Allow
- Network
Rule IPAction Allow - Allow
- Allow
- Allow
- Allow
- Allow
- ALLOW
- Allow
- "Allow"
- Allow
Subnet, SubnetArgs
- 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, SubnetResponseArgs
- 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:servicebus:NamespaceNetworkRuleSet default /subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourceGroups/resourcegroupid/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-9659/networkrulesets/default
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0