1. Packages
  2. Azure Native v1
  3. API Docs
  4. network
  5. AdminRuleCollection
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

azure-native.network.AdminRuleCollection

Explore with Pulumi AI

azure-native-v1 logo
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

    Defines the rule collection. API Version: 2021-02-01-preview.

    Example Usage

    Create or Update an admin rule collection

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var adminRuleCollection = new AzureNative.Network.AdminRuleCollection("adminRuleCollection", 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"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := network.NewAdminRuleCollection(ctx, "adminRuleCollection", &network.AdminRuleCollectionArgs{
    			AppliesToGroups: []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.AdminRuleCollection;
    import com.pulumi.azurenative.network.AdminRuleCollectionArgs;
    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 adminRuleCollection = new AdminRuleCollection("adminRuleCollection", AdminRuleCollectionArgs.builder()        
                .appliesToGroups(Map.of("networkGroupId", "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup"))
                .configurationName("myTestSecurityConfig")
                .description("A sample policy")
                .networkManagerName("testNetworkManager")
                .resourceGroupName("rg1")
                .ruleCollectionName("testRuleCollection")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    admin_rule_collection = azure_native.network.AdminRuleCollection("adminRuleCollection",
        applies_to_groups=[azure_native.network.NetworkManagerSecurityGroupItemArgs(
            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")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const adminRuleCollection = new azure_native.network.AdminRuleCollection("adminRuleCollection", {
        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",
    });
    
    resources:
      adminRuleCollection:
        type: azure-native:network:AdminRuleCollection
        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 AdminRuleCollection Resource

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

    Constructor syntax

    new AdminRuleCollection(name: string, args: AdminRuleCollectionArgs, opts?: CustomResourceOptions);
    @overload
    def AdminRuleCollection(resource_name: str,
                            args: AdminRuleCollectionArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def AdminRuleCollection(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            configuration_name: Optional[str] = None,
                            network_manager_name: Optional[str] = None,
                            resource_group_name: Optional[str] = None,
                            applies_to_groups: Optional[Sequence[NetworkManagerSecurityGroupItemArgs]] = None,
                            description: Optional[str] = None,
                            display_name: Optional[str] = None,
                            rule_collection_name: Optional[str] = None)
    func NewAdminRuleCollection(ctx *Context, name string, args AdminRuleCollectionArgs, opts ...ResourceOption) (*AdminRuleCollection, error)
    public AdminRuleCollection(string name, AdminRuleCollectionArgs args, CustomResourceOptions? opts = null)
    public AdminRuleCollection(String name, AdminRuleCollectionArgs args)
    public AdminRuleCollection(String name, AdminRuleCollectionArgs args, CustomResourceOptions options)
    
    type: azure-native:network:AdminRuleCollection
    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 AdminRuleCollectionArgs
    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 AdminRuleCollectionArgs
    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 AdminRuleCollectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AdminRuleCollectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AdminRuleCollectionArgs
    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 adminRuleCollectionResource = new AzureNative.Network.AdminRuleCollection("adminRuleCollectionResource", new()
    {
        ConfigurationName = "string",
        NetworkManagerName = "string",
        ResourceGroupName = "string",
        AppliesToGroups = new[]
        {
            
            {
                { "networkGroupId", "string" },
            },
        },
        Description = "string",
        DisplayName = "string",
        RuleCollectionName = "string",
    });
    
    example, err := network.NewAdminRuleCollection(ctx, "adminRuleCollectionResource", &network.AdminRuleCollectionArgs{
    	ConfigurationName:  "string",
    	NetworkManagerName: "string",
    	ResourceGroupName:  "string",
    	AppliesToGroups: []map[string]interface{}{
    		map[string]interface{}{
    			"networkGroupId": "string",
    		},
    	},
    	Description:        "string",
    	DisplayName:        "string",
    	RuleCollectionName: "string",
    })
    
    var adminRuleCollectionResource = new AdminRuleCollection("adminRuleCollectionResource", AdminRuleCollectionArgs.builder()
        .configurationName("string")
        .networkManagerName("string")
        .resourceGroupName("string")
        .appliesToGroups(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .description("string")
        .displayName("string")
        .ruleCollectionName("string")
        .build());
    
    admin_rule_collection_resource = azure_native.network.AdminRuleCollection("adminRuleCollectionResource",
        configuration_name=string,
        network_manager_name=string,
        resource_group_name=string,
        applies_to_groups=[{
            networkGroupId: string,
        }],
        description=string,
        display_name=string,
        rule_collection_name=string)
    
    const adminRuleCollectionResource = new azure_native.network.AdminRuleCollection("adminRuleCollectionResource", {
        configurationName: "string",
        networkManagerName: "string",
        resourceGroupName: "string",
        appliesToGroups: [{
            networkGroupId: "string",
        }],
        description: "string",
        displayName: "string",
        ruleCollectionName: "string",
    });
    
    type: azure-native:network:AdminRuleCollection
    properties:
        appliesToGroups:
            - networkGroupId: string
        configurationName: string
        description: string
        displayName: string
        networkManagerName: string
        resourceGroupName: string
        ruleCollectionName: string
    

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

    ConfigurationName string
    The name of the network manager security Configuration.
    NetworkManagerName string
    The name of the network manager.
    ResourceGroupName string
    The name of the resource group.
    AppliesToGroups List<Pulumi.AzureNative.Network.Inputs.NetworkManagerSecurityGroupItem>
    Groups for configuration
    Description string
    A description of the rule collection.
    DisplayName string
    A display name of the rule collection.
    RuleCollectionName string
    The name of the network manager security Configuration rule collection.
    ConfigurationName string
    The name of the network manager security Configuration.
    NetworkManagerName string
    The name of the network manager.
    ResourceGroupName string
    The name of the resource group.
    AppliesToGroups []NetworkManagerSecurityGroupItemArgs
    Groups for configuration
    Description string
    A description of the rule collection.
    DisplayName string
    A display name of the rule collection.
    RuleCollectionName string
    The name of the network manager security Configuration rule collection.
    configurationName String
    The name of the network manager security Configuration.
    networkManagerName String
    The name of the network manager.
    resourceGroupName String
    The name of the resource group.
    appliesToGroups List<NetworkManagerSecurityGroupItem>
    Groups for configuration
    description String
    A description of the rule collection.
    displayName String
    A display name of the rule collection.
    ruleCollectionName String
    The name of the network manager security Configuration rule collection.
    configurationName string
    The name of the network manager security Configuration.
    networkManagerName string
    The name of the network manager.
    resourceGroupName string
    The name of the resource group.
    appliesToGroups NetworkManagerSecurityGroupItem[]
    Groups for configuration
    description string
    A description of the rule collection.
    displayName string
    A display name of the rule collection.
    ruleCollectionName string
    The name of the network manager security Configuration rule collection.
    configuration_name str
    The name of the network manager security Configuration.
    network_manager_name str
    The name of the network manager.
    resource_group_name str
    The name of the resource group.
    applies_to_groups Sequence[NetworkManagerSecurityGroupItemArgs]
    Groups for configuration
    description str
    A description of the rule collection.
    display_name str
    A display name of the rule collection.
    rule_collection_name str
    The name of the network manager security Configuration rule collection.
    configurationName String
    The name of the network manager security Configuration.
    networkManagerName String
    The name of the network manager.
    resourceGroupName String
    The name of the resource group.
    appliesToGroups List<Property Map>
    Groups for configuration
    description String
    A description of the rule collection.
    displayName String
    A display name of the rule collection.
    ruleCollectionName String
    The name of the network manager security Configuration rule collection.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AdminRuleCollection 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.AzureNative.Network.Outputs.SystemDataResponse
    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 SystemDataResponse
    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 SystemDataResponse
    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 SystemDataResponse
    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 SystemDataResponse
    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

    NetworkGroupId string
    Network manager group Id.
    NetworkGroupId string
    Network manager group Id.
    networkGroupId String
    Network manager group Id.
    networkGroupId string
    Network manager group Id.
    network_group_id str
    Network manager group Id.
    networkGroupId String
    Network manager group Id.

    NetworkManagerSecurityGroupItemResponse, NetworkManagerSecurityGroupItemResponseArgs

    NetworkGroupId string
    Network manager group Id.
    NetworkGroupId string
    Network manager group Id.
    networkGroupId String
    Network manager group Id.
    networkGroupId string
    Network manager group Id.
    network_group_id str
    Network manager group Id.
    networkGroupId String
    Network manager group Id.

    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:AdminRuleCollection myTestSecurityConfig /subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkManager/testNetworkManager/securityAdminConfigurations/myTestSecurityConfig/ruleCollections/testRuleCollection 
    

    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
    azure-native-v1 logo
    These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
    Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi