1. Packages
  2. Azure Native
  3. API Docs
  4. network
  5. DefaultUserRule
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.89.1 published on Sunday, Mar 2, 2025 by Pulumi

azure-native.network.DefaultUserRule

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.89.1 published on Sunday, Mar 2, 2025 by Pulumi

Network security default user rule. Azure REST API version: 2022-04-01-preview. Prior API version in Azure Native 1.x: 2021-02-01-preview.

Example Usage

Create a default user rule

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

return await Deployment.RunAsync(() => 
{
    var defaultUserRule = new AzureNative.Network.DefaultUserRule("defaultUserRule", new()
    {
        ConfigurationName = "myTestSecurityConfig",
        Flag = "AllowVnetInbound",
        Kind = "Default",
        NetworkManagerName = "testNetworkManager",
        ResourceGroupName = "rg1",
        RuleCollectionName = "testRuleCollection",
        RuleName = "SampleDefaultUserRule",
    });

});
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := network.NewDefaultUserRule(ctx, "defaultUserRule", &network.DefaultUserRuleArgs{
			ConfigurationName:  pulumi.String("myTestSecurityConfig"),
			Flag:               pulumi.String("AllowVnetInbound"),
			Kind:               pulumi.String("Default"),
			NetworkManagerName: pulumi.String("testNetworkManager"),
			ResourceGroupName:  pulumi.String("rg1"),
			RuleCollectionName: pulumi.String("testRuleCollection"),
			RuleName:           pulumi.String("SampleDefaultUserRule"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.DefaultUserRule;
import com.pulumi.azurenative.network.DefaultUserRuleArgs;
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 defaultUserRule = new DefaultUserRule("defaultUserRule", DefaultUserRuleArgs.builder()
            .configurationName("myTestSecurityConfig")
            .flag("AllowVnetInbound")
            .kind("Default")
            .networkManagerName("testNetworkManager")
            .resourceGroupName("rg1")
            .ruleCollectionName("testRuleCollection")
            .ruleName("SampleDefaultUserRule")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const defaultUserRule = new azure_native.network.DefaultUserRule("defaultUserRule", {
    configurationName: "myTestSecurityConfig",
    flag: "AllowVnetInbound",
    kind: "Default",
    networkManagerName: "testNetworkManager",
    resourceGroupName: "rg1",
    ruleCollectionName: "testRuleCollection",
    ruleName: "SampleDefaultUserRule",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

default_user_rule = azure_native.network.DefaultUserRule("defaultUserRule",
    configuration_name="myTestSecurityConfig",
    flag="AllowVnetInbound",
    kind="Default",
    network_manager_name="testNetworkManager",
    resource_group_name="rg1",
    rule_collection_name="testRuleCollection",
    rule_name="SampleDefaultUserRule")
Copy
resources:
  defaultUserRule:
    type: azure-native:network:DefaultUserRule
    properties:
      configurationName: myTestSecurityConfig
      flag: AllowVnetInbound
      kind: Default
      networkManagerName: testNetworkManager
      resourceGroupName: rg1
      ruleCollectionName: testRuleCollection
      ruleName: SampleDefaultUserRule
Copy

Create a user rule

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

return await Deployment.RunAsync(() => 
{
    var defaultUserRule = new AzureNative.Network.DefaultUserRule("defaultUserRule", new()
    {
        ConfigurationName = "myTestSecurityConfig",
        NetworkManagerName = "testNetworkManager",
        ResourceGroupName = "rg1",
        RuleCollectionName = "testRuleCollection",
        RuleName = "SampleUserRule",
    });

});
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := network.NewDefaultUserRule(ctx, "defaultUserRule", &network.DefaultUserRuleArgs{
			ConfigurationName:  pulumi.String("myTestSecurityConfig"),
			NetworkManagerName: pulumi.String("testNetworkManager"),
			ResourceGroupName:  pulumi.String("rg1"),
			RuleCollectionName: pulumi.String("testRuleCollection"),
			RuleName:           pulumi.String("SampleUserRule"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.DefaultUserRule;
import com.pulumi.azurenative.network.DefaultUserRuleArgs;
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 defaultUserRule = new DefaultUserRule("defaultUserRule", DefaultUserRuleArgs.builder()
            .configurationName("myTestSecurityConfig")
            .networkManagerName("testNetworkManager")
            .resourceGroupName("rg1")
            .ruleCollectionName("testRuleCollection")
            .ruleName("SampleUserRule")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const defaultUserRule = new azure_native.network.DefaultUserRule("defaultUserRule", {
    configurationName: "myTestSecurityConfig",
    networkManagerName: "testNetworkManager",
    resourceGroupName: "rg1",
    ruleCollectionName: "testRuleCollection",
    ruleName: "SampleUserRule",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

default_user_rule = azure_native.network.DefaultUserRule("defaultUserRule",
    configuration_name="myTestSecurityConfig",
    network_manager_name="testNetworkManager",
    resource_group_name="rg1",
    rule_collection_name="testRuleCollection",
    rule_name="SampleUserRule")
Copy
resources:
  defaultUserRule:
    type: azure-native:network:DefaultUserRule
    properties:
      configurationName: myTestSecurityConfig
      networkManagerName: testNetworkManager
      resourceGroupName: rg1
      ruleCollectionName: testRuleCollection
      ruleName: SampleUserRule
Copy

Create DefaultUserRule Resource

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

Constructor syntax

new DefaultUserRule(name: string, args: DefaultUserRuleArgs, opts?: CustomResourceOptions);
@overload
def DefaultUserRule(resource_name: str,
                    args: DefaultUserRuleArgs,
                    opts: Optional[ResourceOptions] = None)

@overload
def DefaultUserRule(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    configuration_name: Optional[str] = None,
                    network_manager_name: Optional[str] = None,
                    resource_group_name: Optional[str] = None,
                    rule_collection_name: Optional[str] = None,
                    flag: Optional[str] = None,
                    rule_name: Optional[str] = None)
func NewDefaultUserRule(ctx *Context, name string, args DefaultUserRuleArgs, opts ...ResourceOption) (*DefaultUserRule, error)
public DefaultUserRule(string name, DefaultUserRuleArgs args, CustomResourceOptions? opts = null)
public DefaultUserRule(String name, DefaultUserRuleArgs args)
public DefaultUserRule(String name, DefaultUserRuleArgs args, CustomResourceOptions options)
type: azure-native:network:DefaultUserRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DefaultUserRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. DefaultUserRuleArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. DefaultUserRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DefaultUserRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DefaultUserRuleArgs
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 defaultUserRuleResource = new AzureNative.Network.DefaultUserRule("defaultUserRuleResource", new()
{
    ConfigurationName = "string",
    Kind = "string",
    NetworkManagerName = "string",
    ResourceGroupName = "string",
    RuleCollectionName = "string",
    Flag = "string",
    RuleName = "string",
});
Copy
example, err := network.NewDefaultUserRule(ctx, "defaultUserRuleResource", &network.DefaultUserRuleArgs{
	ConfigurationName:  pulumi.String("string"),
	Kind:               pulumi.String("string"),
	NetworkManagerName: pulumi.String("string"),
	ResourceGroupName:  pulumi.String("string"),
	RuleCollectionName: pulumi.String("string"),
	Flag:               pulumi.String("string"),
	RuleName:           pulumi.String("string"),
})
Copy
var defaultUserRuleResource = new DefaultUserRule("defaultUserRuleResource", DefaultUserRuleArgs.builder()
    .configurationName("string")
    .kind("string")
    .networkManagerName("string")
    .resourceGroupName("string")
    .ruleCollectionName("string")
    .flag("string")
    .ruleName("string")
    .build());
Copy
default_user_rule_resource = azure_native.network.DefaultUserRule("defaultUserRuleResource",
    configuration_name="string",
    kind="string",
    network_manager_name="string",
    resource_group_name="string",
    rule_collection_name="string",
    flag="string",
    rule_name="string")
Copy
const defaultUserRuleResource = new azure_native.network.DefaultUserRule("defaultUserRuleResource", {
    configurationName: "string",
    kind: "string",
    networkManagerName: "string",
    resourceGroupName: "string",
    ruleCollectionName: "string",
    flag: "string",
    ruleName: "string",
});
Copy
type: azure-native:network:DefaultUserRule
properties:
    configurationName: string
    flag: string
    kind: string
    networkManagerName: string
    resourceGroupName: string
    ruleCollectionName: string
    ruleName: string
Copy

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

ConfigurationName
This property is required.
Changes to this property will trigger replacement.
string
The name of the network manager Security Configuration.
NetworkManagerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the network manager.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
RuleCollectionName
This property is required.
Changes to this property will trigger replacement.
string
The name of the network manager security Configuration rule collection.
Flag string
Default rule flag.
RuleName Changes to this property will trigger replacement. string
The name of the rule.
ConfigurationName
This property is required.
Changes to this property will trigger replacement.
string
The name of the network manager Security Configuration.
NetworkManagerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the network manager.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
RuleCollectionName
This property is required.
Changes to this property will trigger replacement.
string
The name of the network manager security Configuration rule collection.
Flag string
Default rule flag.
RuleName Changes to this property will trigger replacement. string
The name of the rule.
configurationName
This property is required.
Changes to this property will trigger replacement.
String
The name of the network manager Security Configuration.
networkManagerName
This property is required.
Changes to this property will trigger replacement.
String
The name of the network manager.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
ruleCollectionName
This property is required.
Changes to this property will trigger replacement.
String
The name of the network manager security Configuration rule collection.
flag String
Default rule flag.
ruleName Changes to this property will trigger replacement. String
The name of the rule.
configurationName
This property is required.
Changes to this property will trigger replacement.
string
The name of the network manager Security Configuration.
networkManagerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the network manager.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
ruleCollectionName
This property is required.
Changes to this property will trigger replacement.
string
The name of the network manager security Configuration rule collection.
flag string
Default rule flag.
ruleName Changes to this property will trigger replacement. string
The name of the rule.
configuration_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the network manager Security Configuration.
network_manager_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the network manager.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group.
rule_collection_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the network manager security Configuration rule collection.
flag str
Default rule flag.
rule_name Changes to this property will trigger replacement. str
The name of the rule.
configurationName
This property is required.
Changes to this property will trigger replacement.
String
The name of the network manager Security Configuration.
networkManagerName
This property is required.
Changes to this property will trigger replacement.
String
The name of the network manager.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
ruleCollectionName
This property is required.
Changes to this property will trigger replacement.
String
The name of the network manager security Configuration rule collection.
flag String
Default rule flag.
ruleName Changes to this property will trigger replacement. String
The name of the rule.

Outputs

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

Description string
A description for this rule. Restricted to 140 chars.
DestinationPortRanges List<string>
The destination port ranges.
Destinations List<Pulumi.AzureNative.Network.Outputs.AddressPrefixItemResponse>
The destination address prefixes. CIDR or destination IP ranges.
Direction string
Indicates if the traffic matched against the rule in inbound or outbound.
Etag string
A unique read-only string that changes whenever the resource is updated.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name.
Protocol string
Network protocol this rule applies to.
ProvisioningState string
The provisioning state of the security configuration user rule resource.
SourcePortRanges List<string>
The source port ranges.
Sources List<Pulumi.AzureNative.Network.Outputs.AddressPrefixItemResponse>
The CIDR or source IP ranges.
SystemData Pulumi.AzureNative.Network.Outputs.SystemDataResponse
The system metadata related to this resource.
Type string
Resource type.
Description string
A description for this rule. Restricted to 140 chars.
DestinationPortRanges []string
The destination port ranges.
Destinations []AddressPrefixItemResponse
The destination address prefixes. CIDR or destination IP ranges.
Direction string
Indicates if the traffic matched against the rule in inbound or outbound.
Etag string
A unique read-only string that changes whenever the resource is updated.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name.
Protocol string
Network protocol this rule applies to.
ProvisioningState string
The provisioning state of the security configuration user rule resource.
SourcePortRanges []string
The source port ranges.
Sources []AddressPrefixItemResponse
The CIDR or source IP ranges.
SystemData SystemDataResponse
The system metadata related to this resource.
Type string
Resource type.
description String
A description for this rule. Restricted to 140 chars.
destinationPortRanges List<String>
The destination port ranges.
destinations List<AddressPrefixItemResponse>
The destination address prefixes. CIDR or destination IP ranges.
direction String
Indicates if the traffic matched against the rule in inbound or outbound.
etag String
A unique read-only string that changes whenever the resource is updated.
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name.
protocol String
Network protocol this rule applies to.
provisioningState String
The provisioning state of the security configuration user rule resource.
sourcePortRanges List<String>
The source port ranges.
sources List<AddressPrefixItemResponse>
The CIDR or source IP ranges.
systemData SystemDataResponse
The system metadata related to this resource.
type String
Resource type.
description string
A description for this rule. Restricted to 140 chars.
destinationPortRanges string[]
The destination port ranges.
destinations AddressPrefixItemResponse[]
The destination address prefixes. CIDR or destination IP ranges.
direction string
Indicates if the traffic matched against the rule in inbound or outbound.
etag string
A unique read-only string that changes whenever the resource is updated.
id string
The provider-assigned unique ID for this managed resource.
name string
Resource name.
protocol string
Network protocol this rule applies to.
provisioningState string
The provisioning state of the security configuration user rule resource.
sourcePortRanges string[]
The source port ranges.
sources AddressPrefixItemResponse[]
The CIDR or source IP ranges.
systemData SystemDataResponse
The system metadata related to this resource.
type string
Resource type.
description str
A description for this rule. Restricted to 140 chars.
destination_port_ranges Sequence[str]
The destination port ranges.
destinations Sequence[AddressPrefixItemResponse]
The destination address prefixes. CIDR or destination IP ranges.
direction str
Indicates if the traffic matched against the rule in inbound or outbound.
etag str
A unique read-only string that changes whenever the resource is updated.
id str
The provider-assigned unique ID for this managed resource.
name str
Resource name.
protocol str
Network protocol this rule applies to.
provisioning_state str
The provisioning state of the security configuration user rule resource.
source_port_ranges Sequence[str]
The source port ranges.
sources Sequence[AddressPrefixItemResponse]
The CIDR or source IP ranges.
system_data SystemDataResponse
The system metadata related to this resource.
type str
Resource type.
description String
A description for this rule. Restricted to 140 chars.
destinationPortRanges List<String>
The destination port ranges.
destinations List<Property Map>
The destination address prefixes. CIDR or destination IP ranges.
direction String
Indicates if the traffic matched against the rule in inbound or outbound.
etag String
A unique read-only string that changes whenever the resource is updated.
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name.
protocol String
Network protocol this rule applies to.
provisioningState String
The provisioning state of the security configuration user rule resource.
sourcePortRanges List<String>
The source port ranges.
sources List<Property Map>
The CIDR or source IP ranges.
systemData Property Map
The system metadata related to this resource.
type String
Resource type.

Supporting Types

AddressPrefixItemResponse
, AddressPrefixItemResponseArgs

AddressPrefix string
Address prefix.
AddressPrefixType string
Address prefix type.
AddressPrefix string
Address prefix.
AddressPrefixType string
Address prefix type.
addressPrefix String
Address prefix.
addressPrefixType String
Address prefix type.
addressPrefix string
Address prefix.
addressPrefixType string
Address prefix type.
address_prefix str
Address prefix.
address_prefix_type str
Address prefix type.
addressPrefix String
Address prefix.
addressPrefixType String
Address prefix type.

SystemDataResponse
, SystemDataResponseArgs

CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The type of identity that last modified the resource.
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The type of identity that last modified the resource.
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The type of identity that last modified the resource.
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.
createdAt string
The timestamp of resource creation (UTC).
createdBy string
The identity that created the resource.
createdByType string
The type of identity that created the resource.
lastModifiedAt string
The type of identity that last modified the resource.
lastModifiedBy string
The identity that last modified the resource.
lastModifiedByType string
The type of identity that last modified the resource.
created_at str
The timestamp of resource creation (UTC).
created_by str
The identity that created the resource.
created_by_type str
The type of identity that created the resource.
last_modified_at str
The type of identity that last modified the resource.
last_modified_by str
The identity that last modified the resource.
last_modified_by_type str
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The type of identity that last modified the resource.
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.

Import

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

$ pulumi import azure-native:network:DefaultUserRule SampleUserRule /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.89.1 published on Sunday, Mar 2, 2025 by Pulumi