Azure Native

Pulumi Official
Package maintained by Pulumi
v1.64.1 published on Wednesday, May 18, 2022 by Pulumi

AdminRule

Deprecated:

Please use one of the variants: AdminRule, DefaultAdminRule.

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

Example Usage

Create a default admin rule

using Pulumi;
using AzureNative = Pulumi.AzureNative;

class MyStack : Stack
{
    public MyStack()
    {
        var adminRule = new AzureNative.Network.AdminRule("adminRule", new AzureNative.Network.AdminRuleArgs
        {
            ConfigurationName = "myTestSecurityConfig",
            Kind = "Default",
            NetworkManagerName = "testNetworkManager",
            ResourceGroupName = "rg1",
            RuleCollectionName = "testRuleCollection",
            RuleName = "SampleDefaultAdminRule",
        });
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := network.NewAdminRule(ctx, "adminRule", &network.AdminRuleArgs{
			ConfigurationName:  pulumi.String("myTestSecurityConfig"),
			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 java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var adminRule = new AdminRule("adminRule", AdminRuleArgs.builder()        
            .configurationName("myTestSecurityConfig")
            .kind("Default")
            .networkManagerName("testNetworkManager")
            .resourceGroupName("rg1")
            .ruleCollectionName("testRuleCollection")
            .ruleName("SampleDefaultAdminRule")
            .build());

        }
}
import pulumi
import pulumi_azure_native as azure_native

admin_rule = azure_native.network.AdminRule("adminRule",
    configuration_name="myTestSecurityConfig",
    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 adminRule = new azure_native.network.AdminRule("adminRule", {
    configurationName: "myTestSecurityConfig",
    kind: "Default",
    networkManagerName: "testNetworkManager",
    resourceGroupName: "rg1",
    ruleCollectionName: "testRuleCollection",
    ruleName: "SampleDefaultAdminRule",
});
resources:
  adminRule:
    type: azure-native:network:AdminRule
    properties:
      configurationName: myTestSecurityConfig
      kind: Default
      networkManagerName: testNetworkManager
      resourceGroupName: rg1
      ruleCollectionName: testRuleCollection
      ruleName: SampleDefaultAdminRule

Create an admin rule

using Pulumi;
using AzureNative = Pulumi.AzureNative;

class MyStack : Stack
{
    public MyStack()
    {
        var adminRule = new AzureNative.Network.AdminRule("adminRule", new AzureNative.Network.AdminRuleArgs
        {
            ConfigurationName = "myTestSecurityConfig",
            Kind = "Custom",
            NetworkManagerName = "testNetworkManager",
            ResourceGroupName = "rg1",
            RuleCollectionName = "testRuleCollection",
            RuleName = "SampleAdminRule",
        });
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := network.NewAdminRule(ctx, "adminRule", &network.AdminRuleArgs{
			ConfigurationName:  pulumi.String("myTestSecurityConfig"),
			Kind:               pulumi.String("Custom"),
			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 java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var adminRule = new AdminRule("adminRule", AdminRuleArgs.builder()        
            .configurationName("myTestSecurityConfig")
            .kind("Custom")
            .networkManagerName("testNetworkManager")
            .resourceGroupName("rg1")
            .ruleCollectionName("testRuleCollection")
            .ruleName("SampleAdminRule")
            .build());

        }
}
import pulumi
import pulumi_azure_native as azure_native

admin_rule = azure_native.network.AdminRule("adminRule",
    configuration_name="myTestSecurityConfig",
    kind="Custom",
    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 adminRule = new azure_native.network.AdminRule("adminRule", {
    configurationName: "myTestSecurityConfig",
    kind: "Custom",
    networkManagerName: "testNetworkManager",
    resourceGroupName: "rg1",
    ruleCollectionName: "testRuleCollection",
    ruleName: "SampleAdminRule",
});
resources:
  adminRule:
    type: azure-native:network:AdminRule
    properties:
      configurationName: myTestSecurityConfig
      kind: Custom
      networkManagerName: testNetworkManager
      resourceGroupName: rg1
      ruleCollectionName: testRuleCollection
      ruleName: SampleAdminRule

Create a AdminRule Resource

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

name string
The unique name of the resource.
args AdminRuleArgs
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 AdminRuleArgs
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 AdminRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AdminRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AdminRuleArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

ConfigurationName string

The name of the network manager security Configuration.

Kind string | Pulumi.AzureNative.Network.AdminRuleKind

Whether the rule is custom or default.

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.

RuleName string

The name of the rule.

ConfigurationName string

The name of the network manager security Configuration.

Kind string | AdminRuleKind

Whether the rule is custom or default.

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.

RuleName string

The name of the rule.

configurationName String

The name of the network manager security Configuration.

kind String | AdminRuleKind

Whether the rule is custom or default.

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.

ruleName String

The name of the rule.

configurationName string

The name of the network manager security Configuration.

kind string | AdminRuleKind

Whether the rule is custom or default.

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.

ruleName string

The name of the rule.

configuration_name str

The name of the network manager security Configuration.

kind str | AdminRuleKind

Whether the rule is custom or default.

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.

rule_name str

The name of the rule.

configurationName String

The name of the network manager security Configuration.

kind String | "Custom" | "Default"

Whether the rule is custom or default.

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.

ruleName String

The name of the rule.

Outputs

All input properties are implicitly available as output properties. Additionally, the AdminRule 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.

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.

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.

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.

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.

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.

systemData Property Map

The system metadata related to this resource.

type String

Resource type.

Supporting Types

AdminRuleKind

Custom
Custom
Default
Default
AdminRuleKindCustom
Custom
AdminRuleKindDefault
Default
Custom
Custom
Default
Default
Custom
Custom
Default
Default
CUSTOM
Custom
DEFAULT
Default
"Custom"
Custom
"Default"
Default

SystemDataResponse

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:AdminRule SampleAdminRule /subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/securityAdminConfigurations/myTestSecurityConfig/ruleCollections/rules/SampleAdminRule 

Package Details

Repository
https://github.com/pulumi/pulumi-azure-native
License
Apache-2.0