azure-native.network.UserRuleCollection
Explore with Pulumi AI
Defines the user rule collection. Azure REST API version: 2022-04-01-preview. Prior API version in Azure Native 1.x: 2021-02-01-preview.
Other available API versions: 2021-02-01-preview, 2021-05-01-preview.
Example Usage
Create or Update a User Rule Collection
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() => 
{
    var userRuleCollection = new AzureNative.Network.UserRuleCollection("userRuleCollection", new()
    {
        AppliesToGroups = new[]
        {
            new AzureNative.Network.Inputs.NetworkManagerSecurityGroupItemArgs
            {
                NetworkGroupId = "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup",
            },
        },
        ConfigurationName = "myTestSecurityConfig",
        Description = "A sample policy",
        NetworkManagerName = "testNetworkManager",
        ResourceGroupName = "rg1",
        RuleCollectionName = "testRuleCollection",
    });
});
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.NewUserRuleCollection(ctx, "userRuleCollection", &network.UserRuleCollectionArgs{
			AppliesToGroups: network.NetworkManagerSecurityGroupItemArray{
				&network.NetworkManagerSecurityGroupItemArgs{
					NetworkGroupId: pulumi.String("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup"),
				},
			},
			ConfigurationName:  pulumi.String("myTestSecurityConfig"),
			Description:        pulumi.String("A sample policy"),
			NetworkManagerName: pulumi.String("testNetworkManager"),
			ResourceGroupName:  pulumi.String("rg1"),
			RuleCollectionName: pulumi.String("testRuleCollection"),
		})
		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.network.UserRuleCollection;
import com.pulumi.azurenative.network.UserRuleCollectionArgs;
import com.pulumi.azurenative.network.inputs.NetworkManagerSecurityGroupItemArgs;
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 userRuleCollection = new UserRuleCollection("userRuleCollection", UserRuleCollectionArgs.builder()
            .appliesToGroups(NetworkManagerSecurityGroupItemArgs.builder()
                .networkGroupId("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup")
                .build())
            .configurationName("myTestSecurityConfig")
            .description("A sample policy")
            .networkManagerName("testNetworkManager")
            .resourceGroupName("rg1")
            .ruleCollectionName("testRuleCollection")
            .build());
    }
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const userRuleCollection = new azure_native.network.UserRuleCollection("userRuleCollection", {
    appliesToGroups: [{
        networkGroupId: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup",
    }],
    configurationName: "myTestSecurityConfig",
    description: "A sample policy",
    networkManagerName: "testNetworkManager",
    resourceGroupName: "rg1",
    ruleCollectionName: "testRuleCollection",
});
import pulumi
import pulumi_azure_native as azure_native
user_rule_collection = azure_native.network.UserRuleCollection("userRuleCollection",
    applies_to_groups=[{
        "network_group_id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup",
    }],
    configuration_name="myTestSecurityConfig",
    description="A sample policy",
    network_manager_name="testNetworkManager",
    resource_group_name="rg1",
    rule_collection_name="testRuleCollection")
resources:
  userRuleCollection:
    type: azure-native:network:UserRuleCollection
    properties:
      appliesToGroups:
        - networkGroupId: /subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup
      configurationName: myTestSecurityConfig
      description: A sample policy
      networkManagerName: testNetworkManager
      resourceGroupName: rg1
      ruleCollectionName: testRuleCollection
Create UserRuleCollection Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new UserRuleCollection(name: string, args: UserRuleCollectionArgs, opts?: CustomResourceOptions);@overload
def UserRuleCollection(resource_name: str,
                       args: UserRuleCollectionArgs,
                       opts: Optional[ResourceOptions] = None)
@overload
def UserRuleCollection(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       applies_to_groups: Optional[Sequence[NetworkManagerSecurityGroupItemArgs]] = None,
                       configuration_name: Optional[str] = None,
                       network_manager_name: Optional[str] = None,
                       resource_group_name: Optional[str] = None,
                       description: Optional[str] = None,
                       rule_collection_name: Optional[str] = None)func NewUserRuleCollection(ctx *Context, name string, args UserRuleCollectionArgs, opts ...ResourceOption) (*UserRuleCollection, error)public UserRuleCollection(string name, UserRuleCollectionArgs args, CustomResourceOptions? opts = null)
public UserRuleCollection(String name, UserRuleCollectionArgs args)
public UserRuleCollection(String name, UserRuleCollectionArgs args, CustomResourceOptions options)
type: azure-native:network:UserRuleCollection
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 UserRuleCollectionArgs
- 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 UserRuleCollectionArgs
- 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 UserRuleCollectionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UserRuleCollectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UserRuleCollectionArgs
- 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 userRuleCollectionResource = new AzureNative.Network.UserRuleCollection("userRuleCollectionResource", new()
{
    AppliesToGroups = new[]
    {
        new AzureNative.Network.Inputs.NetworkManagerSecurityGroupItemArgs
        {
            NetworkGroupId = "string",
        },
    },
    ConfigurationName = "string",
    NetworkManagerName = "string",
    ResourceGroupName = "string",
    Description = "string",
    RuleCollectionName = "string",
});
example, err := network.NewUserRuleCollection(ctx, "userRuleCollectionResource", &network.UserRuleCollectionArgs{
	AppliesToGroups: network.NetworkManagerSecurityGroupItemArray{
		&network.NetworkManagerSecurityGroupItemArgs{
			NetworkGroupId: pulumi.String("string"),
		},
	},
	ConfigurationName:  pulumi.String("string"),
	NetworkManagerName: pulumi.String("string"),
	ResourceGroupName:  pulumi.String("string"),
	Description:        pulumi.String("string"),
	RuleCollectionName: pulumi.String("string"),
})
var userRuleCollectionResource = new UserRuleCollection("userRuleCollectionResource", UserRuleCollectionArgs.builder()
    .appliesToGroups(NetworkManagerSecurityGroupItemArgs.builder()
        .networkGroupId("string")
        .build())
    .configurationName("string")
    .networkManagerName("string")
    .resourceGroupName("string")
    .description("string")
    .ruleCollectionName("string")
    .build());
user_rule_collection_resource = azure_native.network.UserRuleCollection("userRuleCollectionResource",
    applies_to_groups=[{
        "network_group_id": "string",
    }],
    configuration_name="string",
    network_manager_name="string",
    resource_group_name="string",
    description="string",
    rule_collection_name="string")
const userRuleCollectionResource = new azure_native.network.UserRuleCollection("userRuleCollectionResource", {
    appliesToGroups: [{
        networkGroupId: "string",
    }],
    configurationName: "string",
    networkManagerName: "string",
    resourceGroupName: "string",
    description: "string",
    ruleCollectionName: "string",
});
type: azure-native:network:UserRuleCollection
properties:
    appliesToGroups:
        - networkGroupId: string
    configurationName: string
    description: string
    networkManagerName: string
    resourceGroupName: string
    ruleCollectionName: string
UserRuleCollection 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 UserRuleCollection resource accepts the following input properties:
- AppliesTo List<Pulumi.Groups Azure Native. Network. Inputs. Network Manager Security Group Item> 
- Groups for configuration
- ConfigurationName string
- The name of the network manager Security Configuration.
- NetworkManager stringName 
- The name of the network manager.
- ResourceGroup stringName 
- The name of the resource group.
- Description string
- A description of the user rule collection.
- RuleCollection stringName 
- The name of the network manager security Configuration rule collection.
- AppliesTo []NetworkGroups Manager Security Group Item Args 
- Groups for configuration
- ConfigurationName string
- The name of the network manager Security Configuration.
- NetworkManager stringName 
- The name of the network manager.
- ResourceGroup stringName 
- The name of the resource group.
- Description string
- A description of the user rule collection.
- RuleCollection stringName 
- The name of the network manager security Configuration rule collection.
- appliesTo List<NetworkGroups Manager Security Group Item> 
- Groups for configuration
- configurationName String
- The name of the network manager Security Configuration.
- networkManager StringName 
- The name of the network manager.
- resourceGroup StringName 
- The name of the resource group.
- description String
- A description of the user rule collection.
- ruleCollection StringName 
- The name of the network manager security Configuration rule collection.
- appliesTo NetworkGroups Manager Security Group Item[] 
- Groups for configuration
- configurationName string
- The name of the network manager Security Configuration.
- networkManager stringName 
- The name of the network manager.
- resourceGroup stringName 
- The name of the resource group.
- description string
- A description of the user rule collection.
- ruleCollection stringName 
- The name of the network manager security Configuration rule collection.
- applies_to_ Sequence[Networkgroups Manager Security Group Item Args] 
- Groups for configuration
- configuration_name str
- The name of the network manager Security Configuration.
- network_manager_ strname 
- The name of the network manager.
- resource_group_ strname 
- The name of the resource group.
- description str
- A description of the user rule collection.
- rule_collection_ strname 
- The name of the network manager security Configuration rule collection.
- appliesTo List<Property Map>Groups 
- Groups for configuration
- configurationName String
- The name of the network manager Security Configuration.
- networkManager StringName 
- The name of the network manager.
- resourceGroup StringName 
- The name of the resource group.
- description String
- A description of the user rule collection.
- ruleCollection StringName 
- The name of the network manager security Configuration rule collection.
Outputs
All input properties are implicitly available as output properties. Additionally, the UserRuleCollection resource produces the following output properties:
- 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.
- ProvisioningState string
- The provisioning state of the resource.
- SystemData Pulumi.Azure Native. Network. Outputs. System Data Response 
- The system metadata related to this resource.
- Type string
- Resource type.
- 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.
- ProvisioningState string
- The provisioning state of the resource.
- SystemData SystemData Response 
- The system metadata related to this resource.
- Type string
- Resource type.
- 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.
- provisioningState String
- The provisioning state of the resource.
- systemData SystemData Response 
- The system metadata related to this resource.
- type String
- Resource type.
- 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.
- provisioningState string
- The provisioning state of the resource.
- systemData SystemData Response 
- The system metadata related to this resource.
- type string
- Resource type.
- 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.
- provisioning_state str
- The provisioning state of the resource.
- system_data SystemData Response 
- The system metadata related to this resource.
- type str
- Resource type.
- 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.
- provisioningState String
- The provisioning state of the resource.
- systemData Property Map
- The system metadata related to this resource.
- type String
- Resource type.
Supporting Types
NetworkManagerSecurityGroupItem, NetworkManagerSecurityGroupItemArgs          
- NetworkGroup stringId 
- Network manager group Id.
- NetworkGroup stringId 
- Network manager group Id.
- networkGroup StringId 
- Network manager group Id.
- networkGroup stringId 
- Network manager group Id.
- network_group_ strid 
- Network manager group Id.
- networkGroup StringId 
- Network manager group Id.
NetworkManagerSecurityGroupItemResponse, NetworkManagerSecurityGroupItemResponseArgs            
- NetworkGroup stringId 
- Network manager group Id.
- NetworkGroup stringId 
- Network manager group Id.
- networkGroup StringId 
- Network manager group Id.
- networkGroup stringId 
- Network manager group Id.
- network_group_ strid 
- Network manager group Id.
- networkGroup StringId 
- Network manager group Id.
SystemDataResponse, SystemDataResponseArgs      
- CreatedAt string
- The timestamp of resource creation (UTC).
- CreatedBy string
- The identity that created the resource.
- CreatedBy stringType 
- The type of identity that created the resource.
- LastModified stringAt 
- The type of identity that last modified the resource.
- LastModified stringBy 
- The identity that last modified the resource.
- LastModified stringBy Type 
- 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.
- CreatedBy stringType 
- The type of identity that created the resource.
- LastModified stringAt 
- The type of identity that last modified the resource.
- LastModified stringBy 
- The identity that last modified the resource.
- LastModified stringBy Type 
- 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.
- createdBy StringType 
- The type of identity that created the resource.
- lastModified StringAt 
- The type of identity that last modified the resource.
- lastModified StringBy 
- The identity that last modified the resource.
- lastModified StringBy Type 
- 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.
- createdBy stringType 
- The type of identity that created the resource.
- lastModified stringAt 
- The type of identity that last modified the resource.
- lastModified stringBy 
- The identity that last modified the resource.
- lastModified stringBy Type 
- 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_ strtype 
- The type of identity that created the resource.
- last_modified_ strat 
- The type of identity that last modified the resource.
- last_modified_ strby 
- The identity that last modified the resource.
- last_modified_ strby_ type 
- 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.
- createdBy StringType 
- The type of identity that created the resource.
- lastModified StringAt 
- The type of identity that last modified the resource.
- lastModified StringBy 
- The identity that last modified the resource.
- lastModified StringBy Type 
- 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:UserRuleCollection myTestSecurityConfig /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName} 
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0