azure-native.network.NetworkSecurityPerimeterAccessRule
Explore with Pulumi AI
The NSP access rule resource Azure REST API version: 2024-06-01-preview.
Example Usage
NspAccessRulePut
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() => 
{
    var networkSecurityPerimeterAccessRule = new AzureNative.Network.NetworkSecurityPerimeterAccessRule("networkSecurityPerimeterAccessRule", new()
    {
        AccessRuleName = "accessRule1",
        AddressPrefixes = new[]
        {
            "10.11.0.0/16",
            "10.10.1.0/24",
        },
        Direction = AzureNative.Network.AccessRuleDirection.Inbound,
        NetworkSecurityPerimeterName = "nsp1",
        ProfileName = "profile1",
        ResourceGroupName = "rg1",
    });
});
package main
import (
	network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := network.NewNetworkSecurityPerimeterAccessRule(ctx, "networkSecurityPerimeterAccessRule", &network.NetworkSecurityPerimeterAccessRuleArgs{
			AccessRuleName: pulumi.String("accessRule1"),
			AddressPrefixes: pulumi.StringArray{
				pulumi.String("10.11.0.0/16"),
				pulumi.String("10.10.1.0/24"),
			},
			Direction:                    pulumi.String(network.AccessRuleDirectionInbound),
			NetworkSecurityPerimeterName: pulumi.String("nsp1"),
			ProfileName:                  pulumi.String("profile1"),
			ResourceGroupName:            pulumi.String("rg1"),
		})
		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.NetworkSecurityPerimeterAccessRule;
import com.pulumi.azurenative.network.NetworkSecurityPerimeterAccessRuleArgs;
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 networkSecurityPerimeterAccessRule = new NetworkSecurityPerimeterAccessRule("networkSecurityPerimeterAccessRule", NetworkSecurityPerimeterAccessRuleArgs.builder()
            .accessRuleName("accessRule1")
            .addressPrefixes(            
                "10.11.0.0/16",
                "10.10.1.0/24")
            .direction("Inbound")
            .networkSecurityPerimeterName("nsp1")
            .profileName("profile1")
            .resourceGroupName("rg1")
            .build());
    }
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const networkSecurityPerimeterAccessRule = new azure_native.network.NetworkSecurityPerimeterAccessRule("networkSecurityPerimeterAccessRule", {
    accessRuleName: "accessRule1",
    addressPrefixes: [
        "10.11.0.0/16",
        "10.10.1.0/24",
    ],
    direction: azure_native.network.AccessRuleDirection.Inbound,
    networkSecurityPerimeterName: "nsp1",
    profileName: "profile1",
    resourceGroupName: "rg1",
});
import pulumi
import pulumi_azure_native as azure_native
network_security_perimeter_access_rule = azure_native.network.NetworkSecurityPerimeterAccessRule("networkSecurityPerimeterAccessRule",
    access_rule_name="accessRule1",
    address_prefixes=[
        "10.11.0.0/16",
        "10.10.1.0/24",
    ],
    direction=azure_native.network.AccessRuleDirection.INBOUND,
    network_security_perimeter_name="nsp1",
    profile_name="profile1",
    resource_group_name="rg1")
resources:
  networkSecurityPerimeterAccessRule:
    type: azure-native:network:NetworkSecurityPerimeterAccessRule
    properties:
      accessRuleName: accessRule1
      addressPrefixes:
        - 10.11.0.0/16
        - 10.10.1.0/24
      direction: Inbound
      networkSecurityPerimeterName: nsp1
      profileName: profile1
      resourceGroupName: rg1
Create NetworkSecurityPerimeterAccessRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NetworkSecurityPerimeterAccessRule(name: string, args: NetworkSecurityPerimeterAccessRuleArgs, opts?: CustomResourceOptions);@overload
def NetworkSecurityPerimeterAccessRule(resource_name: str,
                                       args: NetworkSecurityPerimeterAccessRuleArgs,
                                       opts: Optional[ResourceOptions] = None)
@overload
def NetworkSecurityPerimeterAccessRule(resource_name: str,
                                       opts: Optional[ResourceOptions] = None,
                                       network_security_perimeter_name: Optional[str] = None,
                                       resource_group_name: Optional[str] = None,
                                       profile_name: Optional[str] = None,
                                       email_addresses: Optional[Sequence[str]] = None,
                                       fully_qualified_domain_names: Optional[Sequence[str]] = None,
                                       id: Optional[str] = None,
                                       location: Optional[str] = None,
                                       access_rule_name: Optional[str] = None,
                                       phone_numbers: Optional[Sequence[str]] = None,
                                       direction: Optional[Union[str, AccessRuleDirection]] = None,
                                       address_prefixes: Optional[Sequence[str]] = None,
                                       service_tags: Optional[Sequence[str]] = None,
                                       subscriptions: Optional[Sequence[SubscriptionIdArgs]] = None,
                                       tags: Optional[Mapping[str, str]] = None)func NewNetworkSecurityPerimeterAccessRule(ctx *Context, name string, args NetworkSecurityPerimeterAccessRuleArgs, opts ...ResourceOption) (*NetworkSecurityPerimeterAccessRule, error)public NetworkSecurityPerimeterAccessRule(string name, NetworkSecurityPerimeterAccessRuleArgs args, CustomResourceOptions? opts = null)
public NetworkSecurityPerimeterAccessRule(String name, NetworkSecurityPerimeterAccessRuleArgs args)
public NetworkSecurityPerimeterAccessRule(String name, NetworkSecurityPerimeterAccessRuleArgs args, CustomResourceOptions options)
type: azure-native:network:NetworkSecurityPerimeterAccessRule
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 NetworkSecurityPerimeterAccessRuleArgs
- 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 NetworkSecurityPerimeterAccessRuleArgs
- 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 NetworkSecurityPerimeterAccessRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkSecurityPerimeterAccessRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkSecurityPerimeterAccessRuleArgs
- 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 networkSecurityPerimeterAccessRuleResource = new AzureNative.Network.NetworkSecurityPerimeterAccessRule("networkSecurityPerimeterAccessRuleResource", new()
{
    NetworkSecurityPerimeterName = "string",
    ResourceGroupName = "string",
    ProfileName = "string",
    EmailAddresses = new[]
    {
        "string",
    },
    FullyQualifiedDomainNames = new[]
    {
        "string",
    },
    Id = "string",
    Location = "string",
    AccessRuleName = "string",
    PhoneNumbers = new[]
    {
        "string",
    },
    Direction = "string",
    AddressPrefixes = new[]
    {
        "string",
    },
    ServiceTags = new[]
    {
        "string",
    },
    Subscriptions = new[]
    {
        new AzureNative.Network.Inputs.SubscriptionIdArgs
        {
            Id = "string",
        },
    },
    Tags = 
    {
        { "string", "string" },
    },
});
example, err := network.NewNetworkSecurityPerimeterAccessRule(ctx, "networkSecurityPerimeterAccessRuleResource", &network.NetworkSecurityPerimeterAccessRuleArgs{
	NetworkSecurityPerimeterName: pulumi.String("string"),
	ResourceGroupName:            pulumi.String("string"),
	ProfileName:                  pulumi.String("string"),
	EmailAddresses: pulumi.StringArray{
		pulumi.String("string"),
	},
	FullyQualifiedDomainNames: pulumi.StringArray{
		pulumi.String("string"),
	},
	Id:             pulumi.String("string"),
	Location:       pulumi.String("string"),
	AccessRuleName: pulumi.String("string"),
	PhoneNumbers: pulumi.StringArray{
		pulumi.String("string"),
	},
	Direction: pulumi.String("string"),
	AddressPrefixes: pulumi.StringArray{
		pulumi.String("string"),
	},
	ServiceTags: pulumi.StringArray{
		pulumi.String("string"),
	},
	Subscriptions: network.SubscriptionIdArray{
		&network.SubscriptionIdArgs{
			Id: pulumi.String("string"),
		},
	},
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
var networkSecurityPerimeterAccessRuleResource = new NetworkSecurityPerimeterAccessRule("networkSecurityPerimeterAccessRuleResource", NetworkSecurityPerimeterAccessRuleArgs.builder()
    .networkSecurityPerimeterName("string")
    .resourceGroupName("string")
    .profileName("string")
    .emailAddresses("string")
    .fullyQualifiedDomainNames("string")
    .id("string")
    .location("string")
    .accessRuleName("string")
    .phoneNumbers("string")
    .direction("string")
    .addressPrefixes("string")
    .serviceTags("string")
    .subscriptions(SubscriptionIdArgs.builder()
        .id("string")
        .build())
    .tags(Map.of("string", "string"))
    .build());
network_security_perimeter_access_rule_resource = azure_native.network.NetworkSecurityPerimeterAccessRule("networkSecurityPerimeterAccessRuleResource",
    network_security_perimeter_name="string",
    resource_group_name="string",
    profile_name="string",
    email_addresses=["string"],
    fully_qualified_domain_names=["string"],
    id="string",
    location="string",
    access_rule_name="string",
    phone_numbers=["string"],
    direction="string",
    address_prefixes=["string"],
    service_tags=["string"],
    subscriptions=[{
        "id": "string",
    }],
    tags={
        "string": "string",
    })
const networkSecurityPerimeterAccessRuleResource = new azure_native.network.NetworkSecurityPerimeterAccessRule("networkSecurityPerimeterAccessRuleResource", {
    networkSecurityPerimeterName: "string",
    resourceGroupName: "string",
    profileName: "string",
    emailAddresses: ["string"],
    fullyQualifiedDomainNames: ["string"],
    id: "string",
    location: "string",
    accessRuleName: "string",
    phoneNumbers: ["string"],
    direction: "string",
    addressPrefixes: ["string"],
    serviceTags: ["string"],
    subscriptions: [{
        id: "string",
    }],
    tags: {
        string: "string",
    },
});
type: azure-native:network:NetworkSecurityPerimeterAccessRule
properties:
    accessRuleName: string
    addressPrefixes:
        - string
    direction: string
    emailAddresses:
        - string
    fullyQualifiedDomainNames:
        - string
    id: string
    location: string
    networkSecurityPerimeterName: string
    phoneNumbers:
        - string
    profileName: string
    resourceGroupName: string
    serviceTags:
        - string
    subscriptions:
        - id: string
    tags:
        string: string
NetworkSecurityPerimeterAccessRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The NetworkSecurityPerimeterAccessRule resource accepts the following input properties:
- NetworkSecurity stringPerimeter Name 
- The name of the network security perimeter.
- ProfileName string
- The name of the NSP profile.
- ResourceGroup stringName 
- The name of the resource group.
- AccessRule stringName 
- The name of the NSP access rule.
- AddressPrefixes List<string>
- Inbound address prefixes (IPv4/IPv6)
- Direction
string | Pulumi.Azure Native. Network. Access Rule Direction 
- Direction that specifies whether the access rules is inbound/outbound.
- EmailAddresses List<string>
- Outbound rules email address format.
- FullyQualified List<string>Domain Names 
- Outbound rules fully qualified domain name format.
- Id string
- Resource ID.
- Location string
- Resource location.
- PhoneNumbers List<string>
- Outbound rules phone number format.
- List<string>
- Inbound rules service tag names.
- Subscriptions
List<Pulumi.Azure Native. Network. Inputs. Subscription Id> 
- List of subscription ids
- Dictionary<string, string>
- Resource tags.
- NetworkSecurity stringPerimeter Name 
- The name of the network security perimeter.
- ProfileName string
- The name of the NSP profile.
- ResourceGroup stringName 
- The name of the resource group.
- AccessRule stringName 
- The name of the NSP access rule.
- AddressPrefixes []string
- Inbound address prefixes (IPv4/IPv6)
- Direction
string | AccessRule Direction 
- Direction that specifies whether the access rules is inbound/outbound.
- EmailAddresses []string
- Outbound rules email address format.
- FullyQualified []stringDomain Names 
- Outbound rules fully qualified domain name format.
- Id string
- Resource ID.
- Location string
- Resource location.
- PhoneNumbers []string
- Outbound rules phone number format.
- []string
- Inbound rules service tag names.
- Subscriptions
[]SubscriptionId Args 
- List of subscription ids
- map[string]string
- Resource tags.
- networkSecurity StringPerimeter Name 
- The name of the network security perimeter.
- profileName String
- The name of the NSP profile.
- resourceGroup StringName 
- The name of the resource group.
- accessRule StringName 
- The name of the NSP access rule.
- addressPrefixes List<String>
- Inbound address prefixes (IPv4/IPv6)
- direction
String | AccessRule Direction 
- Direction that specifies whether the access rules is inbound/outbound.
- emailAddresses List<String>
- Outbound rules email address format.
- fullyQualified List<String>Domain Names 
- Outbound rules fully qualified domain name format.
- id String
- Resource ID.
- location String
- Resource location.
- phoneNumbers List<String>
- Outbound rules phone number format.
- List<String>
- Inbound rules service tag names.
- subscriptions
List<SubscriptionId> 
- List of subscription ids
- Map<String,String>
- Resource tags.
- networkSecurity stringPerimeter Name 
- The name of the network security perimeter.
- profileName string
- The name of the NSP profile.
- resourceGroup stringName 
- The name of the resource group.
- accessRule stringName 
- The name of the NSP access rule.
- addressPrefixes string[]
- Inbound address prefixes (IPv4/IPv6)
- direction
string | AccessRule Direction 
- Direction that specifies whether the access rules is inbound/outbound.
- emailAddresses string[]
- Outbound rules email address format.
- fullyQualified string[]Domain Names 
- Outbound rules fully qualified domain name format.
- id string
- Resource ID.
- location string
- Resource location.
- phoneNumbers string[]
- Outbound rules phone number format.
- string[]
- Inbound rules service tag names.
- subscriptions
SubscriptionId[] 
- List of subscription ids
- {[key: string]: string}
- Resource tags.
- network_security_ strperimeter_ name 
- The name of the network security perimeter.
- profile_name str
- The name of the NSP profile.
- resource_group_ strname 
- The name of the resource group.
- access_rule_ strname 
- The name of the NSP access rule.
- address_prefixes Sequence[str]
- Inbound address prefixes (IPv4/IPv6)
- direction
str | AccessRule Direction 
- Direction that specifies whether the access rules is inbound/outbound.
- email_addresses Sequence[str]
- Outbound rules email address format.
- fully_qualified_ Sequence[str]domain_ names 
- Outbound rules fully qualified domain name format.
- id str
- Resource ID.
- location str
- Resource location.
- phone_numbers Sequence[str]
- Outbound rules phone number format.
- Sequence[str]
- Inbound rules service tag names.
- subscriptions
Sequence[SubscriptionId Args] 
- List of subscription ids
- Mapping[str, str]
- Resource tags.
- networkSecurity StringPerimeter Name 
- The name of the network security perimeter.
- profileName String
- The name of the NSP profile.
- resourceGroup StringName 
- The name of the resource group.
- accessRule StringName 
- The name of the NSP access rule.
- addressPrefixes List<String>
- Inbound address prefixes (IPv4/IPv6)
- direction String | "Inbound" | "Outbound"
- Direction that specifies whether the access rules is inbound/outbound.
- emailAddresses List<String>
- Outbound rules email address format.
- fullyQualified List<String>Domain Names 
- Outbound rules fully qualified domain name format.
- id String
- Resource ID.
- location String
- Resource location.
- phoneNumbers List<String>
- Outbound rules phone number format.
- List<String>
- Inbound rules service tag names.
- subscriptions List<Property Map>
- List of subscription ids
- Map<String>
- Resource tags.
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkSecurityPerimeterAccessRule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource name.
- NetworkSecurity List<Pulumi.Perimeters Azure Native. Network. Outputs. Perimeter Based Access Rule Response> 
- Rule specified by the perimeter id.
- ProvisioningState string
- The provisioning state of the scope assignment resource.
- Type string
- Resource type.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource name.
- NetworkSecurity []PerimeterPerimeters Based Access Rule Response 
- Rule specified by the perimeter id.
- ProvisioningState string
- The provisioning state of the scope assignment resource.
- Type string
- Resource type.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Resource name.
- networkSecurity List<PerimeterPerimeters Based Access Rule Response> 
- Rule specified by the perimeter id.
- provisioningState String
- The provisioning state of the scope assignment resource.
- type String
- Resource type.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Resource name.
- networkSecurity PerimeterPerimeters Based Access Rule Response[] 
- Rule specified by the perimeter id.
- provisioningState string
- The provisioning state of the scope assignment resource.
- type string
- Resource type.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Resource name.
- network_security_ Sequence[Perimeterperimeters Based Access Rule Response] 
- Rule specified by the perimeter id.
- provisioning_state str
- The provisioning state of the scope assignment resource.
- type str
- Resource type.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Resource name.
- networkSecurity List<Property Map>Perimeters 
- Rule specified by the perimeter id.
- provisioningState String
- The provisioning state of the scope assignment resource.
- type String
- Resource type.
Supporting Types
AccessRuleDirection, AccessRuleDirectionArgs      
- Inbound
- Inbound
- Outbound
- Outbound
- AccessRule Direction Inbound 
- Inbound
- AccessRule Direction Outbound 
- Outbound
- Inbound
- Inbound
- Outbound
- Outbound
- Inbound
- Inbound
- Outbound
- Outbound
- INBOUND
- Inbound
- OUTBOUND
- Outbound
- "Inbound"
- Inbound
- "Outbound"
- Outbound
PerimeterBasedAccessRuleResponse, PerimeterBasedAccessRuleResponseArgs          
- Id string
- NSP id in the ARM id format.
- Location string
- Location of the NSP supplied.
- PerimeterGuid string
- Resource guid of the NSP supplied.
- Id string
- NSP id in the ARM id format.
- Location string
- Location of the NSP supplied.
- PerimeterGuid string
- Resource guid of the NSP supplied.
- id String
- NSP id in the ARM id format.
- location String
- Location of the NSP supplied.
- perimeterGuid String
- Resource guid of the NSP supplied.
- id string
- NSP id in the ARM id format.
- location string
- Location of the NSP supplied.
- perimeterGuid string
- Resource guid of the NSP supplied.
- id str
- NSP id in the ARM id format.
- location str
- Location of the NSP supplied.
- perimeter_guid str
- Resource guid of the NSP supplied.
- id String
- NSP id in the ARM id format.
- location String
- Location of the NSP supplied.
- perimeterGuid String
- Resource guid of the NSP supplied.
SubscriptionId, SubscriptionIdArgs    
- Id string
- Subscription id in the ARM id format.
- Id string
- Subscription id in the ARM id format.
- id String
- Subscription id in the ARM id format.
- id string
- Subscription id in the ARM id format.
- id str
- Subscription id in the ARM id format.
- id String
- Subscription id in the ARM id format.
SubscriptionIdResponse, SubscriptionIdResponseArgs      
- Id string
- Subscription id in the ARM id format.
- Id string
- Subscription id in the ARM id format.
- id String
- Subscription id in the ARM id format.
- id string
- Subscription id in the ARM id format.
- id str
- Subscription id in the ARM id format.
- id String
- Subscription id in the ARM id format.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:network:NetworkSecurityPerimeterAccessRule accessRule1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/profiles/{profileName}/accessRules/{accessRuleName} 
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0