1. Packages
  2. Azure Native v1
  3. API Docs
  4. network
  5. DefaultAdminRule
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.DefaultAdminRule

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

    Network default admin rule. API Version: 2021-02-01-preview.

    Example Usage

    Create a default admin rule

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var defaultAdminRule = new AzureNative.Network.DefaultAdminRule("defaultAdminRule", new()
        {
            ConfigurationName = "myTestSecurityConfig",
            Flag = "AllowVnetInbound",
            Kind = "Default",
            NetworkManagerName = "testNetworkManager",
            ResourceGroupName = "rg1",
            RuleCollectionName = "testRuleCollection",
            RuleName = "SampleDefaultAdminRule",
        });
    
    });
    
    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.NewDefaultAdminRule(ctx, "defaultAdminRule", &network.DefaultAdminRuleArgs{
    			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("SampleDefaultAdminRule"),
    		})
    		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.DefaultAdminRule;
    import com.pulumi.azurenative.network.DefaultAdminRuleArgs;
    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 defaultAdminRule = new DefaultAdminRule("defaultAdminRule", DefaultAdminRuleArgs.builder()        
                .configurationName("myTestSecurityConfig")
                .flag("AllowVnetInbound")
                .kind("Default")
                .networkManagerName("testNetworkManager")
                .resourceGroupName("rg1")
                .ruleCollectionName("testRuleCollection")
                .ruleName("SampleDefaultAdminRule")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    default_admin_rule = azure_native.network.DefaultAdminRule("defaultAdminRule",
        configuration_name="myTestSecurityConfig",
        flag="AllowVnetInbound",
        kind="Default",
        network_manager_name="testNetworkManager",
        resource_group_name="rg1",
        rule_collection_name="testRuleCollection",
        rule_name="SampleDefaultAdminRule")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const defaultAdminRule = new azure_native.network.DefaultAdminRule("defaultAdminRule", {
        configurationName: "myTestSecurityConfig",
        flag: "AllowVnetInbound",
        kind: "Default",
        networkManagerName: "testNetworkManager",
        resourceGroupName: "rg1",
        ruleCollectionName: "testRuleCollection",
        ruleName: "SampleDefaultAdminRule",
    });
    
    resources:
      defaultAdminRule:
        type: azure-native:network:DefaultAdminRule
        properties:
          configurationName: myTestSecurityConfig
          flag: AllowVnetInbound
          kind: Default
          networkManagerName: testNetworkManager
          resourceGroupName: rg1
          ruleCollectionName: testRuleCollection
          ruleName: SampleDefaultAdminRule
    

    Create an admin rule

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var defaultAdminRule = new AzureNative.Network.DefaultAdminRule("defaultAdminRule", new()
        {
            ConfigurationName = "myTestSecurityConfig",
            NetworkManagerName = "testNetworkManager",
            ResourceGroupName = "rg1",
            RuleCollectionName = "testRuleCollection",
            RuleName = "SampleAdminRule",
        });
    
    });
    
    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.NewDefaultAdminRule(ctx, "defaultAdminRule", &network.DefaultAdminRuleArgs{
    			ConfigurationName:  pulumi.String("myTestSecurityConfig"),
    			NetworkManagerName: pulumi.String("testNetworkManager"),
    			ResourceGroupName:  pulumi.String("rg1"),
    			RuleCollectionName: pulumi.String("testRuleCollection"),
    			RuleName:           pulumi.String("SampleAdminRule"),
    		})
    		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.DefaultAdminRule;
    import com.pulumi.azurenative.network.DefaultAdminRuleArgs;
    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 defaultAdminRule = new DefaultAdminRule("defaultAdminRule", DefaultAdminRuleArgs.builder()        
                .configurationName("myTestSecurityConfig")
                .networkManagerName("testNetworkManager")
                .resourceGroupName("rg1")
                .ruleCollectionName("testRuleCollection")
                .ruleName("SampleAdminRule")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    default_admin_rule = azure_native.network.DefaultAdminRule("defaultAdminRule",
        configuration_name="myTestSecurityConfig",
        network_manager_name="testNetworkManager",
        resource_group_name="rg1",
        rule_collection_name="testRuleCollection",
        rule_name="SampleAdminRule")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const defaultAdminRule = new azure_native.network.DefaultAdminRule("defaultAdminRule", {
        configurationName: "myTestSecurityConfig",
        networkManagerName: "testNetworkManager",
        resourceGroupName: "rg1",
        ruleCollectionName: "testRuleCollection",
        ruleName: "SampleAdminRule",
    });
    
    resources:
      defaultAdminRule:
        type: azure-native:network:DefaultAdminRule
        properties:
          configurationName: myTestSecurityConfig
          networkManagerName: testNetworkManager
          resourceGroupName: rg1
          ruleCollectionName: testRuleCollection
          ruleName: SampleAdminRule
    

    Create DefaultAdminRule Resource

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

    Constructor syntax

    new DefaultAdminRule(name: string, args: DefaultAdminRuleArgs, opts?: CustomResourceOptions);
    @overload
    def DefaultAdminRule(resource_name: str,
                         args: DefaultAdminRuleArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def DefaultAdminRule(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 NewDefaultAdminRule(ctx *Context, name string, args DefaultAdminRuleArgs, opts ...ResourceOption) (*DefaultAdminRule, error)
    public DefaultAdminRule(string name, DefaultAdminRuleArgs args, CustomResourceOptions? opts = null)
    public DefaultAdminRule(String name, DefaultAdminRuleArgs args)
    public DefaultAdminRule(String name, DefaultAdminRuleArgs args, CustomResourceOptions options)
    
    type: azure-native:network:DefaultAdminRule
    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 DefaultAdminRuleArgs
    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 DefaultAdminRuleArgs
    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 DefaultAdminRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DefaultAdminRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DefaultAdminRuleArgs
    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 defaultAdminRuleResource = new AzureNative.Network.DefaultAdminRule("defaultAdminRuleResource", new()
    {
        ConfigurationName = "string",
        Kind = "string",
        NetworkManagerName = "string",
        ResourceGroupName = "string",
        RuleCollectionName = "string",
        Flag = "string",
        RuleName = "string",
    });
    
    example, err := network.NewDefaultAdminRule(ctx, "defaultAdminRuleResource", &network.DefaultAdminRuleArgs{
    	ConfigurationName:  "string",
    	Kind:               "string",
    	NetworkManagerName: "string",
    	ResourceGroupName:  "string",
    	RuleCollectionName: "string",
    	Flag:               "string",
    	RuleName:           "string",
    })
    
    var defaultAdminRuleResource = new DefaultAdminRule("defaultAdminRuleResource", DefaultAdminRuleArgs.builder()
        .configurationName("string")
        .kind("string")
        .networkManagerName("string")
        .resourceGroupName("string")
        .ruleCollectionName("string")
        .flag("string")
        .ruleName("string")
        .build());
    
    default_admin_rule_resource = azure_native.network.DefaultAdminRule("defaultAdminRuleResource",
        configuration_name=string,
        kind=string,
        network_manager_name=string,
        resource_group_name=string,
        rule_collection_name=string,
        flag=string,
        rule_name=string)
    
    const defaultAdminRuleResource = new azure_native.network.DefaultAdminRule("defaultAdminRuleResource", {
        configurationName: "string",
        kind: "string",
        networkManagerName: "string",
        resourceGroupName: "string",
        ruleCollectionName: "string",
        flag: "string",
        ruleName: "string",
    });
    
    type: azure-native:network:DefaultAdminRule
    properties:
        configurationName: string
        flag: string
        kind: string
        networkManagerName: string
        resourceGroupName: string
        ruleCollectionName: string
        ruleName: string
    

    DefaultAdminRule 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 DefaultAdminRule 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.
    RuleCollectionName string
    The name of the network manager security Configuration rule collection.
    Flag string
    Default rule flag.
    RuleName string
    The name of the rule.
    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.
    RuleCollectionName string
    The name of the network manager security Configuration rule collection.
    Flag string
    Default rule flag.
    RuleName string
    The name of the rule.
    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.
    ruleCollectionName String
    The name of the network manager security Configuration rule collection.
    flag String
    Default rule flag.
    ruleName String
    The name of the rule.
    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.
    ruleCollectionName string
    The name of the network manager security Configuration rule collection.
    flag string
    Default rule flag.
    ruleName string
    The name of the rule.
    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.
    rule_collection_name str
    The name of the network manager security Configuration rule collection.
    flag str
    Default rule flag.
    rule_name str
    The name of the rule.
    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.
    ruleCollectionName String
    The name of the network manager security Configuration rule collection.
    flag String
    Default rule flag.
    ruleName String
    The name of the rule.

    Outputs

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

    Access string
    Indicates the access allowed for this particular rule
    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.
    DisplayName string
    A friendly name for the rule.
    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.
    Priority int
    The priority of the rule. The value can be 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
    Network protocol this rule applies to.
    ProvisioningState string
    The provisioning state of the 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.
    Access string
    Indicates the access allowed for this particular rule
    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.
    DisplayName string
    A friendly name for the rule.
    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.
    Priority int
    The priority of the rule. The value can be 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
    Network protocol this rule applies to.
    ProvisioningState string
    The provisioning state of the 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.
    access String
    Indicates the access allowed for this particular rule
    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.
    displayName String
    A friendly name for the rule.
    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.
    priority Integer
    The priority of the rule. The value can be 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
    Network protocol this rule applies to.
    provisioningState String
    The provisioning state of the 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.
    access string
    Indicates the access allowed for this particular rule
    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.
    displayName string
    A friendly name for the rule.
    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.
    priority number
    The priority of the rule. The value can be 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
    Network protocol this rule applies to.
    provisioningState string
    The provisioning state of the 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.
    access str
    Indicates the access allowed for this particular rule
    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.
    display_name str
    A friendly name for the rule.
    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.
    priority int
    The priority of the rule. The value can be 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
    Network protocol this rule applies to.
    provisioning_state str
    The provisioning state of the 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.
    access String
    Indicates the access allowed for this particular rule
    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.
    displayName String
    A friendly name for the rule.
    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.
    priority Number
    The priority of the rule. The value can be 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
    Network protocol this rule applies to.
    provisioningState String
    The provisioning state of the 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:DefaultAdminRule SampleAdminRule /subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/securityAdminConfigurations/myTestSecurityConfig/ruleCollections/testRuleCollection/rules/SampleAdminRule 
    

    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