1. Packages
  2. Azure Classic
  3. API Docs
  4. network
  5. NetworkManagerAdminRule

We recommend using Azure Native.

Azure Classic v5.58.0 published on Saturday, Dec 2, 2023 by Pulumi

azure.network.NetworkManagerAdminRule

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.58.0 published on Saturday, Dec 2, 2023 by Pulumi

    Manages a Network Manager Admin Rule.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
        {
            Location = "West Europe",
        });
    
        var current = Azure.Core.GetSubscription.Invoke();
    
        var exampleNetworkManager = new Azure.Network.NetworkManager("exampleNetworkManager", new()
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            Scope = new Azure.Network.Inputs.NetworkManagerScopeArgs
            {
                SubscriptionIds = new[]
                {
                    current.Apply(getSubscriptionResult => getSubscriptionResult.Id),
                },
            },
            ScopeAccesses = new[]
            {
                "Connectivity",
                "SecurityAdmin",
            },
            Description = "example network manager",
        });
    
        var exampleNetworkManagerNetworkGroup = new Azure.Network.NetworkManagerNetworkGroup("exampleNetworkManagerNetworkGroup", new()
        {
            NetworkManagerId = exampleNetworkManager.Id,
        });
    
        var exampleNetworkManagerSecurityAdminConfiguration = new Azure.Network.NetworkManagerSecurityAdminConfiguration("exampleNetworkManagerSecurityAdminConfiguration", new()
        {
            NetworkManagerId = exampleNetworkManager.Id,
        });
    
        var exampleNetworkManagerAdminRuleCollection = new Azure.Network.NetworkManagerAdminRuleCollection("exampleNetworkManagerAdminRuleCollection", new()
        {
            SecurityAdminConfigurationId = exampleNetworkManagerSecurityAdminConfiguration.Id,
            NetworkGroupIds = new[]
            {
                exampleNetworkManagerNetworkGroup.Id,
            },
        });
    
        var exampleNetworkManagerAdminRule = new Azure.Network.NetworkManagerAdminRule("exampleNetworkManagerAdminRule", new()
        {
            AdminRuleCollectionId = exampleNetworkManagerAdminRuleCollection.Id,
            Action = "Deny",
            Direction = "Outbound",
            Priority = 1,
            Protocol = "Tcp",
            SourcePortRanges = new[]
            {
                "80",
                "1024-65535",
            },
            DestinationPortRanges = new[]
            {
                "80",
            },
            Sources = new[]
            {
                new Azure.Network.Inputs.NetworkManagerAdminRuleSourceArgs
                {
                    AddressPrefixType = "ServiceTag",
                    AddressPrefix = "Internet",
                },
            },
            Destinations = new[]
            {
                new Azure.Network.Inputs.NetworkManagerAdminRuleDestinationArgs
                {
                    AddressPrefixType = "IPPrefix",
                    AddressPrefix = "10.1.0.1",
                },
                new Azure.Network.Inputs.NetworkManagerAdminRuleDestinationArgs
                {
                    AddressPrefixType = "IPPrefix",
                    AddressPrefix = "10.0.0.0/24",
                },
            },
            Description = "example admin rule",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		current, err := core.LookupSubscription(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		exampleNetworkManager, err := network.NewNetworkManager(ctx, "exampleNetworkManager", &network.NetworkManagerArgs{
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    			Scope: &network.NetworkManagerScopeArgs{
    				SubscriptionIds: pulumi.StringArray{
    					*pulumi.String(current.Id),
    				},
    			},
    			ScopeAccesses: pulumi.StringArray{
    				pulumi.String("Connectivity"),
    				pulumi.String("SecurityAdmin"),
    			},
    			Description: pulumi.String("example network manager"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleNetworkManagerNetworkGroup, err := network.NewNetworkManagerNetworkGroup(ctx, "exampleNetworkManagerNetworkGroup", &network.NetworkManagerNetworkGroupArgs{
    			NetworkManagerId: exampleNetworkManager.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		exampleNetworkManagerSecurityAdminConfiguration, err := network.NewNetworkManagerSecurityAdminConfiguration(ctx, "exampleNetworkManagerSecurityAdminConfiguration", &network.NetworkManagerSecurityAdminConfigurationArgs{
    			NetworkManagerId: exampleNetworkManager.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		exampleNetworkManagerAdminRuleCollection, err := network.NewNetworkManagerAdminRuleCollection(ctx, "exampleNetworkManagerAdminRuleCollection", &network.NetworkManagerAdminRuleCollectionArgs{
    			SecurityAdminConfigurationId: exampleNetworkManagerSecurityAdminConfiguration.ID(),
    			NetworkGroupIds: pulumi.StringArray{
    				exampleNetworkManagerNetworkGroup.ID(),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = network.NewNetworkManagerAdminRule(ctx, "exampleNetworkManagerAdminRule", &network.NetworkManagerAdminRuleArgs{
    			AdminRuleCollectionId: exampleNetworkManagerAdminRuleCollection.ID(),
    			Action:                pulumi.String("Deny"),
    			Direction:             pulumi.String("Outbound"),
    			Priority:              pulumi.Int(1),
    			Protocol:              pulumi.String("Tcp"),
    			SourcePortRanges: pulumi.StringArray{
    				pulumi.String("80"),
    				pulumi.String("1024-65535"),
    			},
    			DestinationPortRanges: pulumi.StringArray{
    				pulumi.String("80"),
    			},
    			Sources: network.NetworkManagerAdminRuleSourceArray{
    				&network.NetworkManagerAdminRuleSourceArgs{
    					AddressPrefixType: pulumi.String("ServiceTag"),
    					AddressPrefix:     pulumi.String("Internet"),
    				},
    			},
    			Destinations: network.NetworkManagerAdminRuleDestinationArray{
    				&network.NetworkManagerAdminRuleDestinationArgs{
    					AddressPrefixType: pulumi.String("IPPrefix"),
    					AddressPrefix:     pulumi.String("10.1.0.1"),
    				},
    				&network.NetworkManagerAdminRuleDestinationArgs{
    					AddressPrefixType: pulumi.String("IPPrefix"),
    					AddressPrefix:     pulumi.String("10.0.0.0/24"),
    				},
    			},
    			Description: pulumi.String("example admin rule"),
    		})
    		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.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.core.CoreFunctions;
    import com.pulumi.azure.core.inputs.GetSubscriptionArgs;
    import com.pulumi.azure.network.NetworkManager;
    import com.pulumi.azure.network.NetworkManagerArgs;
    import com.pulumi.azure.network.inputs.NetworkManagerScopeArgs;
    import com.pulumi.azure.network.NetworkManagerNetworkGroup;
    import com.pulumi.azure.network.NetworkManagerNetworkGroupArgs;
    import com.pulumi.azure.network.NetworkManagerSecurityAdminConfiguration;
    import com.pulumi.azure.network.NetworkManagerSecurityAdminConfigurationArgs;
    import com.pulumi.azure.network.NetworkManagerAdminRuleCollection;
    import com.pulumi.azure.network.NetworkManagerAdminRuleCollectionArgs;
    import com.pulumi.azure.network.NetworkManagerAdminRule;
    import com.pulumi.azure.network.NetworkManagerAdminRuleArgs;
    import com.pulumi.azure.network.inputs.NetworkManagerAdminRuleSourceArgs;
    import com.pulumi.azure.network.inputs.NetworkManagerAdminRuleDestinationArgs;
    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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
                .location("West Europe")
                .build());
    
            final var current = CoreFunctions.getSubscription();
    
            var exampleNetworkManager = new NetworkManager("exampleNetworkManager", NetworkManagerArgs.builder()        
                .location(exampleResourceGroup.location())
                .resourceGroupName(exampleResourceGroup.name())
                .scope(NetworkManagerScopeArgs.builder()
                    .subscriptionIds(current.applyValue(getSubscriptionResult -> getSubscriptionResult.id()))
                    .build())
                .scopeAccesses(            
                    "Connectivity",
                    "SecurityAdmin")
                .description("example network manager")
                .build());
    
            var exampleNetworkManagerNetworkGroup = new NetworkManagerNetworkGroup("exampleNetworkManagerNetworkGroup", NetworkManagerNetworkGroupArgs.builder()        
                .networkManagerId(exampleNetworkManager.id())
                .build());
    
            var exampleNetworkManagerSecurityAdminConfiguration = new NetworkManagerSecurityAdminConfiguration("exampleNetworkManagerSecurityAdminConfiguration", NetworkManagerSecurityAdminConfigurationArgs.builder()        
                .networkManagerId(exampleNetworkManager.id())
                .build());
    
            var exampleNetworkManagerAdminRuleCollection = new NetworkManagerAdminRuleCollection("exampleNetworkManagerAdminRuleCollection", NetworkManagerAdminRuleCollectionArgs.builder()        
                .securityAdminConfigurationId(exampleNetworkManagerSecurityAdminConfiguration.id())
                .networkGroupIds(exampleNetworkManagerNetworkGroup.id())
                .build());
    
            var exampleNetworkManagerAdminRule = new NetworkManagerAdminRule("exampleNetworkManagerAdminRule", NetworkManagerAdminRuleArgs.builder()        
                .adminRuleCollectionId(exampleNetworkManagerAdminRuleCollection.id())
                .action("Deny")
                .direction("Outbound")
                .priority(1)
                .protocol("Tcp")
                .sourcePortRanges(            
                    "80",
                    "1024-65535")
                .destinationPortRanges("80")
                .sources(NetworkManagerAdminRuleSourceArgs.builder()
                    .addressPrefixType("ServiceTag")
                    .addressPrefix("Internet")
                    .build())
                .destinations(            
                    NetworkManagerAdminRuleDestinationArgs.builder()
                        .addressPrefixType("IPPrefix")
                        .addressPrefix("10.1.0.1")
                        .build(),
                    NetworkManagerAdminRuleDestinationArgs.builder()
                        .addressPrefixType("IPPrefix")
                        .addressPrefix("10.0.0.0/24")
                        .build())
                .description("example admin rule")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    current = azure.core.get_subscription()
    example_network_manager = azure.network.NetworkManager("exampleNetworkManager",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        scope=azure.network.NetworkManagerScopeArgs(
            subscription_ids=[current.id],
        ),
        scope_accesses=[
            "Connectivity",
            "SecurityAdmin",
        ],
        description="example network manager")
    example_network_manager_network_group = azure.network.NetworkManagerNetworkGroup("exampleNetworkManagerNetworkGroup", network_manager_id=example_network_manager.id)
    example_network_manager_security_admin_configuration = azure.network.NetworkManagerSecurityAdminConfiguration("exampleNetworkManagerSecurityAdminConfiguration", network_manager_id=example_network_manager.id)
    example_network_manager_admin_rule_collection = azure.network.NetworkManagerAdminRuleCollection("exampleNetworkManagerAdminRuleCollection",
        security_admin_configuration_id=example_network_manager_security_admin_configuration.id,
        network_group_ids=[example_network_manager_network_group.id])
    example_network_manager_admin_rule = azure.network.NetworkManagerAdminRule("exampleNetworkManagerAdminRule",
        admin_rule_collection_id=example_network_manager_admin_rule_collection.id,
        action="Deny",
        direction="Outbound",
        priority=1,
        protocol="Tcp",
        source_port_ranges=[
            "80",
            "1024-65535",
        ],
        destination_port_ranges=["80"],
        sources=[azure.network.NetworkManagerAdminRuleSourceArgs(
            address_prefix_type="ServiceTag",
            address_prefix="Internet",
        )],
        destinations=[
            azure.network.NetworkManagerAdminRuleDestinationArgs(
                address_prefix_type="IPPrefix",
                address_prefix="10.1.0.1",
            ),
            azure.network.NetworkManagerAdminRuleDestinationArgs(
                address_prefix_type="IPPrefix",
                address_prefix="10.0.0.0/24",
            ),
        ],
        description="example admin rule")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const current = azure.core.getSubscription({});
    const exampleNetworkManager = new azure.network.NetworkManager("exampleNetworkManager", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        scope: {
            subscriptionIds: [current.then(current => current.id)],
        },
        scopeAccesses: [
            "Connectivity",
            "SecurityAdmin",
        ],
        description: "example network manager",
    });
    const exampleNetworkManagerNetworkGroup = new azure.network.NetworkManagerNetworkGroup("exampleNetworkManagerNetworkGroup", {networkManagerId: exampleNetworkManager.id});
    const exampleNetworkManagerSecurityAdminConfiguration = new azure.network.NetworkManagerSecurityAdminConfiguration("exampleNetworkManagerSecurityAdminConfiguration", {networkManagerId: exampleNetworkManager.id});
    const exampleNetworkManagerAdminRuleCollection = new azure.network.NetworkManagerAdminRuleCollection("exampleNetworkManagerAdminRuleCollection", {
        securityAdminConfigurationId: exampleNetworkManagerSecurityAdminConfiguration.id,
        networkGroupIds: [exampleNetworkManagerNetworkGroup.id],
    });
    const exampleNetworkManagerAdminRule = new azure.network.NetworkManagerAdminRule("exampleNetworkManagerAdminRule", {
        adminRuleCollectionId: exampleNetworkManagerAdminRuleCollection.id,
        action: "Deny",
        direction: "Outbound",
        priority: 1,
        protocol: "Tcp",
        sourcePortRanges: [
            "80",
            "1024-65535",
        ],
        destinationPortRanges: ["80"],
        sources: [{
            addressPrefixType: "ServiceTag",
            addressPrefix: "Internet",
        }],
        destinations: [
            {
                addressPrefixType: "IPPrefix",
                addressPrefix: "10.1.0.1",
            },
            {
                addressPrefixType: "IPPrefix",
                addressPrefix: "10.0.0.0/24",
            },
        ],
        description: "example admin rule",
    });
    
    resources:
      exampleResourceGroup:
        type: azure:core:ResourceGroup
        properties:
          location: West Europe
      exampleNetworkManager:
        type: azure:network:NetworkManager
        properties:
          location: ${exampleResourceGroup.location}
          resourceGroupName: ${exampleResourceGroup.name}
          scope:
            subscriptionIds:
              - ${current.id}
          scopeAccesses:
            - Connectivity
            - SecurityAdmin
          description: example network manager
      exampleNetworkManagerNetworkGroup:
        type: azure:network:NetworkManagerNetworkGroup
        properties:
          networkManagerId: ${exampleNetworkManager.id}
      exampleNetworkManagerSecurityAdminConfiguration:
        type: azure:network:NetworkManagerSecurityAdminConfiguration
        properties:
          networkManagerId: ${exampleNetworkManager.id}
      exampleNetworkManagerAdminRuleCollection:
        type: azure:network:NetworkManagerAdminRuleCollection
        properties:
          securityAdminConfigurationId: ${exampleNetworkManagerSecurityAdminConfiguration.id}
          networkGroupIds:
            - ${exampleNetworkManagerNetworkGroup.id}
      exampleNetworkManagerAdminRule:
        type: azure:network:NetworkManagerAdminRule
        properties:
          adminRuleCollectionId: ${exampleNetworkManagerAdminRuleCollection.id}
          action: Deny
          direction: Outbound
          priority: 1
          protocol: Tcp
          sourcePortRanges:
            - '80'
            - 1024-65535
          destinationPortRanges:
            - '80'
          sources:
            - addressPrefixType: ServiceTag
              addressPrefix: Internet
          destinations:
            - addressPrefixType: IPPrefix
              addressPrefix: 10.1.0.1
            - addressPrefixType: IPPrefix
              addressPrefix: 10.0.0.0/24
          description: example admin rule
    variables:
      current:
        fn::invoke:
          Function: azure:core:getSubscription
          Arguments: {}
    

    Create NetworkManagerAdminRule Resource

    new NetworkManagerAdminRule(name: string, args: NetworkManagerAdminRuleArgs, opts?: CustomResourceOptions);
    @overload
    def NetworkManagerAdminRule(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                action: Optional[str] = None,
                                admin_rule_collection_id: Optional[str] = None,
                                description: Optional[str] = None,
                                destination_port_ranges: Optional[Sequence[str]] = None,
                                destinations: Optional[Sequence[NetworkManagerAdminRuleDestinationArgs]] = None,
                                direction: Optional[str] = None,
                                name: Optional[str] = None,
                                priority: Optional[int] = None,
                                protocol: Optional[str] = None,
                                source_port_ranges: Optional[Sequence[str]] = None,
                                sources: Optional[Sequence[NetworkManagerAdminRuleSourceArgs]] = None)
    @overload
    def NetworkManagerAdminRule(resource_name: str,
                                args: NetworkManagerAdminRuleArgs,
                                opts: Optional[ResourceOptions] = None)
    func NewNetworkManagerAdminRule(ctx *Context, name string, args NetworkManagerAdminRuleArgs, opts ...ResourceOption) (*NetworkManagerAdminRule, error)
    public NetworkManagerAdminRule(string name, NetworkManagerAdminRuleArgs args, CustomResourceOptions? opts = null)
    public NetworkManagerAdminRule(String name, NetworkManagerAdminRuleArgs args)
    public NetworkManagerAdminRule(String name, NetworkManagerAdminRuleArgs args, CustomResourceOptions options)
    
    type: azure:network:NetworkManagerAdminRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args NetworkManagerAdminRuleArgs
    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 NetworkManagerAdminRuleArgs
    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 NetworkManagerAdminRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NetworkManagerAdminRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NetworkManagerAdminRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Action string

    Specifies the action allowed for this Network Manager Admin Rule. Possible values are Allow, AlwaysAllow, and Deny.

    AdminRuleCollectionId string

    Specifies the ID of the Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule to be created.

    Direction string

    Indicates if the traffic matched against the rule in inbound or outbound. Possible values are Inbound and Outbound.

    Priority int

    The priority of the rule. Possible values are integers between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.

    Protocol string

    Specifies which network protocol this Network Manager Admin Rule applies to. Possible values are Ah, Any, Esp, Icmp, Tcp, and Udp.

    Description string

    A description of the Network Manager Admin Rule.

    DestinationPortRanges List<string>

    A list of string specifies the destination port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    Destinations List<NetworkManagerAdminRuleDestination>

    One or more destination blocks as defined below.

    Name string

    Specifies the name which should be used for this Network Manager Admin Rule. Changing this forces a new Network Manager Admin Rule to be created.

    SourcePortRanges List<string>

    A list of string specifies the source port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    Sources List<NetworkManagerAdminRuleSource>

    One or more source blocks as defined below.

    Action string

    Specifies the action allowed for this Network Manager Admin Rule. Possible values are Allow, AlwaysAllow, and Deny.

    AdminRuleCollectionId string

    Specifies the ID of the Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule to be created.

    Direction string

    Indicates if the traffic matched against the rule in inbound or outbound. Possible values are Inbound and Outbound.

    Priority int

    The priority of the rule. Possible values are integers between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.

    Protocol string

    Specifies which network protocol this Network Manager Admin Rule applies to. Possible values are Ah, Any, Esp, Icmp, Tcp, and Udp.

    Description string

    A description of the Network Manager Admin Rule.

    DestinationPortRanges []string

    A list of string specifies the destination port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    Destinations []NetworkManagerAdminRuleDestinationArgs

    One or more destination blocks as defined below.

    Name string

    Specifies the name which should be used for this Network Manager Admin Rule. Changing this forces a new Network Manager Admin Rule to be created.

    SourcePortRanges []string

    A list of string specifies the source port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    Sources []NetworkManagerAdminRuleSourceArgs

    One or more source blocks as defined below.

    action String

    Specifies the action allowed for this Network Manager Admin Rule. Possible values are Allow, AlwaysAllow, and Deny.

    adminRuleCollectionId String

    Specifies the ID of the Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule to be created.

    direction String

    Indicates if the traffic matched against the rule in inbound or outbound. Possible values are Inbound and Outbound.

    priority Integer

    The priority of the rule. Possible values are integers between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.

    protocol String

    Specifies which network protocol this Network Manager Admin Rule applies to. Possible values are Ah, Any, Esp, Icmp, Tcp, and Udp.

    description String

    A description of the Network Manager Admin Rule.

    destinationPortRanges List<String>

    A list of string specifies the destination port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    destinations List<NetworkManagerAdminRuleDestination>

    One or more destination blocks as defined below.

    name String

    Specifies the name which should be used for this Network Manager Admin Rule. Changing this forces a new Network Manager Admin Rule to be created.

    sourcePortRanges List<String>

    A list of string specifies the source port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    sources List<NetworkManagerAdminRuleSource>

    One or more source blocks as defined below.

    action string

    Specifies the action allowed for this Network Manager Admin Rule. Possible values are Allow, AlwaysAllow, and Deny.

    adminRuleCollectionId string

    Specifies the ID of the Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule to be created.

    direction string

    Indicates if the traffic matched against the rule in inbound or outbound. Possible values are Inbound and Outbound.

    priority number

    The priority of the rule. Possible values are integers between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.

    protocol string

    Specifies which network protocol this Network Manager Admin Rule applies to. Possible values are Ah, Any, Esp, Icmp, Tcp, and Udp.

    description string

    A description of the Network Manager Admin Rule.

    destinationPortRanges string[]

    A list of string specifies the destination port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    destinations NetworkManagerAdminRuleDestination[]

    One or more destination blocks as defined below.

    name string

    Specifies the name which should be used for this Network Manager Admin Rule. Changing this forces a new Network Manager Admin Rule to be created.

    sourcePortRanges string[]

    A list of string specifies the source port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    sources NetworkManagerAdminRuleSource[]

    One or more source blocks as defined below.

    action str

    Specifies the action allowed for this Network Manager Admin Rule. Possible values are Allow, AlwaysAllow, and Deny.

    admin_rule_collection_id str

    Specifies the ID of the Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule to be created.

    direction str

    Indicates if the traffic matched against the rule in inbound or outbound. Possible values are Inbound and Outbound.

    priority int

    The priority of the rule. Possible values are integers between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.

    protocol str

    Specifies which network protocol this Network Manager Admin Rule applies to. Possible values are Ah, Any, Esp, Icmp, Tcp, and Udp.

    description str

    A description of the Network Manager Admin Rule.

    destination_port_ranges Sequence[str]

    A list of string specifies the destination port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    destinations Sequence[NetworkManagerAdminRuleDestinationArgs]

    One or more destination blocks as defined below.

    name str

    Specifies the name which should be used for this Network Manager Admin Rule. Changing this forces a new Network Manager Admin Rule to be created.

    source_port_ranges Sequence[str]

    A list of string specifies the source port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    sources Sequence[NetworkManagerAdminRuleSourceArgs]

    One or more source blocks as defined below.

    action String

    Specifies the action allowed for this Network Manager Admin Rule. Possible values are Allow, AlwaysAllow, and Deny.

    adminRuleCollectionId String

    Specifies the ID of the Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule to be created.

    direction String

    Indicates if the traffic matched against the rule in inbound or outbound. Possible values are Inbound and Outbound.

    priority Number

    The priority of the rule. Possible values are integers between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.

    protocol String

    Specifies which network protocol this Network Manager Admin Rule applies to. Possible values are Ah, Any, Esp, Icmp, Tcp, and Udp.

    description String

    A description of the Network Manager Admin Rule.

    destinationPortRanges List<String>

    A list of string specifies the destination port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    destinations List<Property Map>

    One or more destination blocks as defined below.

    name String

    Specifies the name which should be used for this Network Manager Admin Rule. Changing this forces a new Network Manager Admin Rule to be created.

    sourcePortRanges List<String>

    A list of string specifies the source port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    sources List<Property Map>

    One or more source blocks as defined below.

    Outputs

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

    Id string

    The provider-assigned unique ID for this managed resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    id string

    The provider-assigned unique ID for this managed resource.

    id str

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing NetworkManagerAdminRule Resource

    Get an existing NetworkManagerAdminRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: NetworkManagerAdminRuleState, opts?: CustomResourceOptions): NetworkManagerAdminRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action: Optional[str] = None,
            admin_rule_collection_id: Optional[str] = None,
            description: Optional[str] = None,
            destination_port_ranges: Optional[Sequence[str]] = None,
            destinations: Optional[Sequence[NetworkManagerAdminRuleDestinationArgs]] = None,
            direction: Optional[str] = None,
            name: Optional[str] = None,
            priority: Optional[int] = None,
            protocol: Optional[str] = None,
            source_port_ranges: Optional[Sequence[str]] = None,
            sources: Optional[Sequence[NetworkManagerAdminRuleSourceArgs]] = None) -> NetworkManagerAdminRule
    func GetNetworkManagerAdminRule(ctx *Context, name string, id IDInput, state *NetworkManagerAdminRuleState, opts ...ResourceOption) (*NetworkManagerAdminRule, error)
    public static NetworkManagerAdminRule Get(string name, Input<string> id, NetworkManagerAdminRuleState? state, CustomResourceOptions? opts = null)
    public static NetworkManagerAdminRule get(String name, Output<String> id, NetworkManagerAdminRuleState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Action string

    Specifies the action allowed for this Network Manager Admin Rule. Possible values are Allow, AlwaysAllow, and Deny.

    AdminRuleCollectionId string

    Specifies the ID of the Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule to be created.

    Description string

    A description of the Network Manager Admin Rule.

    DestinationPortRanges List<string>

    A list of string specifies the destination port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    Destinations List<NetworkManagerAdminRuleDestination>

    One or more destination blocks as defined below.

    Direction string

    Indicates if the traffic matched against the rule in inbound or outbound. Possible values are Inbound and Outbound.

    Name string

    Specifies the name which should be used for this Network Manager Admin Rule. Changing this forces a new Network Manager Admin Rule to be created.

    Priority int

    The priority of the rule. Possible values are integers between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.

    Protocol string

    Specifies which network protocol this Network Manager Admin Rule applies to. Possible values are Ah, Any, Esp, Icmp, Tcp, and Udp.

    SourcePortRanges List<string>

    A list of string specifies the source port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    Sources List<NetworkManagerAdminRuleSource>

    One or more source blocks as defined below.

    Action string

    Specifies the action allowed for this Network Manager Admin Rule. Possible values are Allow, AlwaysAllow, and Deny.

    AdminRuleCollectionId string

    Specifies the ID of the Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule to be created.

    Description string

    A description of the Network Manager Admin Rule.

    DestinationPortRanges []string

    A list of string specifies the destination port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    Destinations []NetworkManagerAdminRuleDestinationArgs

    One or more destination blocks as defined below.

    Direction string

    Indicates if the traffic matched against the rule in inbound or outbound. Possible values are Inbound and Outbound.

    Name string

    Specifies the name which should be used for this Network Manager Admin Rule. Changing this forces a new Network Manager Admin Rule to be created.

    Priority int

    The priority of the rule. Possible values are integers between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.

    Protocol string

    Specifies which network protocol this Network Manager Admin Rule applies to. Possible values are Ah, Any, Esp, Icmp, Tcp, and Udp.

    SourcePortRanges []string

    A list of string specifies the source port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    Sources []NetworkManagerAdminRuleSourceArgs

    One or more source blocks as defined below.

    action String

    Specifies the action allowed for this Network Manager Admin Rule. Possible values are Allow, AlwaysAllow, and Deny.

    adminRuleCollectionId String

    Specifies the ID of the Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule to be created.

    description String

    A description of the Network Manager Admin Rule.

    destinationPortRanges List<String>

    A list of string specifies the destination port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    destinations List<NetworkManagerAdminRuleDestination>

    One or more destination blocks as defined below.

    direction String

    Indicates if the traffic matched against the rule in inbound or outbound. Possible values are Inbound and Outbound.

    name String

    Specifies the name which should be used for this Network Manager Admin Rule. Changing this forces a new Network Manager Admin Rule to be created.

    priority Integer

    The priority of the rule. Possible values are integers between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.

    protocol String

    Specifies which network protocol this Network Manager Admin Rule applies to. Possible values are Ah, Any, Esp, Icmp, Tcp, and Udp.

    sourcePortRanges List<String>

    A list of string specifies the source port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    sources List<NetworkManagerAdminRuleSource>

    One or more source blocks as defined below.

    action string

    Specifies the action allowed for this Network Manager Admin Rule. Possible values are Allow, AlwaysAllow, and Deny.

    adminRuleCollectionId string

    Specifies the ID of the Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule to be created.

    description string

    A description of the Network Manager Admin Rule.

    destinationPortRanges string[]

    A list of string specifies the destination port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    destinations NetworkManagerAdminRuleDestination[]

    One or more destination blocks as defined below.

    direction string

    Indicates if the traffic matched against the rule in inbound or outbound. Possible values are Inbound and Outbound.

    name string

    Specifies the name which should be used for this Network Manager Admin Rule. Changing this forces a new Network Manager Admin Rule to be created.

    priority number

    The priority of the rule. Possible values are integers between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.

    protocol string

    Specifies which network protocol this Network Manager Admin Rule applies to. Possible values are Ah, Any, Esp, Icmp, Tcp, and Udp.

    sourcePortRanges string[]

    A list of string specifies the source port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    sources NetworkManagerAdminRuleSource[]

    One or more source blocks as defined below.

    action str

    Specifies the action allowed for this Network Manager Admin Rule. Possible values are Allow, AlwaysAllow, and Deny.

    admin_rule_collection_id str

    Specifies the ID of the Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule to be created.

    description str

    A description of the Network Manager Admin Rule.

    destination_port_ranges Sequence[str]

    A list of string specifies the destination port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    destinations Sequence[NetworkManagerAdminRuleDestinationArgs]

    One or more destination blocks as defined below.

    direction str

    Indicates if the traffic matched against the rule in inbound or outbound. Possible values are Inbound and Outbound.

    name str

    Specifies the name which should be used for this Network Manager Admin Rule. Changing this forces a new Network Manager Admin Rule to be created.

    priority int

    The priority of the rule. Possible values are integers between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.

    protocol str

    Specifies which network protocol this Network Manager Admin Rule applies to. Possible values are Ah, Any, Esp, Icmp, Tcp, and Udp.

    source_port_ranges Sequence[str]

    A list of string specifies the source port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    sources Sequence[NetworkManagerAdminRuleSourceArgs]

    One or more source blocks as defined below.

    action String

    Specifies the action allowed for this Network Manager Admin Rule. Possible values are Allow, AlwaysAllow, and Deny.

    adminRuleCollectionId String

    Specifies the ID of the Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule to be created.

    description String

    A description of the Network Manager Admin Rule.

    destinationPortRanges List<String>

    A list of string specifies the destination port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    destinations List<Property Map>

    One or more destination blocks as defined below.

    direction String

    Indicates if the traffic matched against the rule in inbound or outbound. Possible values are Inbound and Outbound.

    name String

    Specifies the name which should be used for this Network Manager Admin Rule. Changing this forces a new Network Manager Admin Rule to be created.

    priority Number

    The priority of the rule. Possible values are integers between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.

    protocol String

    Specifies which network protocol this Network Manager Admin Rule applies to. Possible values are Ah, Any, Esp, Icmp, Tcp, and Udp.

    sourcePortRanges List<String>

    A list of string specifies the source port ranges. Specify one or more single port number or port ranges such as 1024-65535. Use * to specify any port.

    sources List<Property Map>

    One or more source blocks as defined below.

    Supporting Types

    NetworkManagerAdminRuleDestination, NetworkManagerAdminRuleDestinationArgs

    AddressPrefix string

    Specifies the address prefix.

    AddressPrefixType string

    Specifies the address prefix type. Possible values are IPPrefix and ServiceTag. For more information, please see this document.

    AddressPrefix string

    Specifies the address prefix.

    AddressPrefixType string

    Specifies the address prefix type. Possible values are IPPrefix and ServiceTag. For more information, please see this document.

    addressPrefix String

    Specifies the address prefix.

    addressPrefixType String

    Specifies the address prefix type. Possible values are IPPrefix and ServiceTag. For more information, please see this document.

    addressPrefix string

    Specifies the address prefix.

    addressPrefixType string

    Specifies the address prefix type. Possible values are IPPrefix and ServiceTag. For more information, please see this document.

    address_prefix str

    Specifies the address prefix.

    address_prefix_type str

    Specifies the address prefix type. Possible values are IPPrefix and ServiceTag. For more information, please see this document.

    addressPrefix String

    Specifies the address prefix.

    addressPrefixType String

    Specifies the address prefix type. Possible values are IPPrefix and ServiceTag. For more information, please see this document.

    NetworkManagerAdminRuleSource, NetworkManagerAdminRuleSourceArgs

    AddressPrefix string

    Specifies the address prefix.

    AddressPrefixType string

    Specifies the address prefix type. Possible values are IPPrefix and ServiceTag. For more information, please see this document.

    AddressPrefix string

    Specifies the address prefix.

    AddressPrefixType string

    Specifies the address prefix type. Possible values are IPPrefix and ServiceTag. For more information, please see this document.

    addressPrefix String

    Specifies the address prefix.

    addressPrefixType String

    Specifies the address prefix type. Possible values are IPPrefix and ServiceTag. For more information, please see this document.

    addressPrefix string

    Specifies the address prefix.

    addressPrefixType string

    Specifies the address prefix type. Possible values are IPPrefix and ServiceTag. For more information, please see this document.

    address_prefix str

    Specifies the address prefix.

    address_prefix_type str

    Specifies the address prefix type. Possible values are IPPrefix and ServiceTag. For more information, please see this document.

    addressPrefix String

    Specifies the address prefix.

    addressPrefixType String

    Specifies the address prefix type. Possible values are IPPrefix and ServiceTag. For more information, please see this document.

    Import

    Network Manager Admin Rule can be imported using the resource id, e.g.

     $ pulumi import azure:network/networkManagerAdminRule:NetworkManagerAdminRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/networkManagers/networkManager1/securityAdminConfigurations/configuration1/ruleCollections/ruleCollection1/rules/rule1
    

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the azurerm Terraform Provider.

    azure logo

    We recommend using Azure Native.

    Azure Classic v5.58.0 published on Saturday, Dec 2, 2023 by Pulumi