azure-native.network.NspAccessRule

Explore with Pulumi AI

The NSP access rule resource API Version: 2021-02-01-preview.

Example Usage

NspAccessRulePut

using System.Collections.Generic;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var nspAccessRule = new AzureNative.Network.NspAccessRule("nspAccessRule", new()
    {
        AccessRuleName = "accessRule1",
        AddressPrefixes = new[]
        {
            "10.11.0.0/16",
            "10.10.1.0/24",
        },
        Direction = "Inbound",
        NetworkSecurityPerimeterName = "nsp1",
        ProfileName = "profile1",
        ResourceGroupName = "rg1",
    });

});
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.NewNspAccessRule(ctx, "nspAccessRule", &network.NspAccessRuleArgs{
			AccessRuleName: pulumi.String("accessRule1"),
			AddressPrefixes: pulumi.StringArray{
				pulumi.String("10.11.0.0/16"),
				pulumi.String("10.10.1.0/24"),
			},
			Direction:                    pulumi.String("Inbound"),
			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.NspAccessRule;
import com.pulumi.azurenative.network.NspAccessRuleArgs;
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 nspAccessRule = new NspAccessRule("nspAccessRule", NspAccessRuleArgs.builder()        
            .accessRuleName("accessRule1")
            .addressPrefixes(            
                "10.11.0.0/16",
                "10.10.1.0/24")
            .direction("Inbound")
            .networkSecurityPerimeterName("nsp1")
            .profileName("profile1")
            .resourceGroupName("rg1")
            .build());

    }
}
import pulumi
import pulumi_azure_native as azure_native

nsp_access_rule = azure_native.network.NspAccessRule("nspAccessRule",
    access_rule_name="accessRule1",
    address_prefixes=[
        "10.11.0.0/16",
        "10.10.1.0/24",
    ],
    direction="Inbound",
    network_security_perimeter_name="nsp1",
    profile_name="profile1",
    resource_group_name="rg1")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const nspAccessRule = new azure_native.network.NspAccessRule("nspAccessRule", {
    accessRuleName: "accessRule1",
    addressPrefixes: [
        "10.11.0.0/16",
        "10.10.1.0/24",
    ],
    direction: "Inbound",
    networkSecurityPerimeterName: "nsp1",
    profileName: "profile1",
    resourceGroupName: "rg1",
});
resources:
  nspAccessRule:
    type: azure-native:network:NspAccessRule
    properties:
      accessRuleName: accessRule1
      addressPrefixes:
        - 10.11.0.0/16
        - 10.10.1.0/24
      direction: Inbound
      networkSecurityPerimeterName: nsp1
      profileName: profile1
      resourceGroupName: rg1

Create NspAccessRule Resource

new NspAccessRule(name: string, args: NspAccessRuleArgs, opts?: CustomResourceOptions);
@overload
def NspAccessRule(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  access_rule_name: Optional[str] = None,
                  address_prefixes: Optional[Sequence[str]] = None,
                  direction: Optional[Union[str, AccessRuleDirection]] = None,
                  email_addresses: Optional[Sequence[str]] = None,
                  fully_qualified_domain_names: Optional[Sequence[str]] = None,
                  id: Optional[str] = None,
                  location: Optional[str] = None,
                  name: Optional[str] = None,
                  network_security_perimeter_name: Optional[str] = None,
                  network_security_perimeters: Optional[Sequence[PerimeterBasedAccessRuleArgs]] = None,
                  phone_numbers: Optional[Sequence[str]] = None,
                  profile_name: Optional[str] = None,
                  resource_group_name: Optional[str] = None,
                  subscriptions: Optional[Sequence[SubscriptionIdArgs]] = None,
                  tags: Optional[Mapping[str, str]] = None)
@overload
def NspAccessRule(resource_name: str,
                  args: NspAccessRuleArgs,
                  opts: Optional[ResourceOptions] = None)
func NewNspAccessRule(ctx *Context, name string, args NspAccessRuleArgs, opts ...ResourceOption) (*NspAccessRule, error)
public NspAccessRule(string name, NspAccessRuleArgs args, CustomResourceOptions? opts = null)
public NspAccessRule(String name, NspAccessRuleArgs args)
public NspAccessRule(String name, NspAccessRuleArgs args, CustomResourceOptions options)
type: azure-native:network:NspAccessRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

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

NetworkSecurityPerimeterName string

The name of the network security perimeter.

ProfileName string

The name of the NSP profile.

ResourceGroupName string

The name of the resource group.

AccessRuleName string

The name of the NSP access rule.

AddressPrefixes List<string>

Inbound address prefixes (IPv4/IPv6)

Direction string | Pulumi.AzureNative.Network.AccessRuleDirection

Direction that specifies whether the access rules is inbound/outbound.

EmailAddresses List<string>

Outbound rules email address format.

FullyQualifiedDomainNames List<string>

Outbound rules fully qualified domain name format.

Id string

Resource ID.

Location string

Resource location.

Name string

The name of the access rule that is unique within a profile. This name can be used to access the resource.

NetworkSecurityPerimeters List<Pulumi.AzureNative.Network.Inputs.PerimeterBasedAccessRuleArgs>

Inbound rule specified by the perimeter id.

PhoneNumbers List<string>

Outbound rules phone number format.

Subscriptions List<Pulumi.AzureNative.Network.Inputs.SubscriptionIdArgs>

List of subscription ids

Tags Dictionary<string, string>

Resource tags.

NetworkSecurityPerimeterName string

The name of the network security perimeter.

ProfileName string

The name of the NSP profile.

ResourceGroupName string

The name of the resource group.

AccessRuleName string

The name of the NSP access rule.

AddressPrefixes []string

Inbound address prefixes (IPv4/IPv6)

Direction string | AccessRuleDirection

Direction that specifies whether the access rules is inbound/outbound.

EmailAddresses []string

Outbound rules email address format.

FullyQualifiedDomainNames []string

Outbound rules fully qualified domain name format.

Id string

Resource ID.

Location string

Resource location.

Name string

The name of the access rule that is unique within a profile. This name can be used to access the resource.

NetworkSecurityPerimeters []PerimeterBasedAccessRuleArgs

Inbound rule specified by the perimeter id.

PhoneNumbers []string

Outbound rules phone number format.

Subscriptions []SubscriptionIdArgs

List of subscription ids

Tags map[string]string

Resource tags.

networkSecurityPerimeterName String

The name of the network security perimeter.

profileName String

The name of the NSP profile.

resourceGroupName String

The name of the resource group.

accessRuleName String

The name of the NSP access rule.

addressPrefixes List<String>

Inbound address prefixes (IPv4/IPv6)

direction String | AccessRuleDirection

Direction that specifies whether the access rules is inbound/outbound.

emailAddresses List<String>

Outbound rules email address format.

fullyQualifiedDomainNames List<String>

Outbound rules fully qualified domain name format.

id String

Resource ID.

location String

Resource location.

name String

The name of the access rule that is unique within a profile. This name can be used to access the resource.

networkSecurityPerimeters List<PerimeterBasedAccessRuleArgs>

Inbound rule specified by the perimeter id.

phoneNumbers List<String>

Outbound rules phone number format.

subscriptions List<SubscriptionIdArgs>

List of subscription ids

tags Map<String,String>

Resource tags.

networkSecurityPerimeterName string

The name of the network security perimeter.

profileName string

The name of the NSP profile.

resourceGroupName string

The name of the resource group.

accessRuleName string

The name of the NSP access rule.

addressPrefixes string[]

Inbound address prefixes (IPv4/IPv6)

direction string | AccessRuleDirection

Direction that specifies whether the access rules is inbound/outbound.

emailAddresses string[]

Outbound rules email address format.

fullyQualifiedDomainNames string[]

Outbound rules fully qualified domain name format.

id string

Resource ID.

location string

Resource location.

name string

The name of the access rule that is unique within a profile. This name can be used to access the resource.

networkSecurityPerimeters PerimeterBasedAccessRuleArgs[]

Inbound rule specified by the perimeter id.

phoneNumbers string[]

Outbound rules phone number format.

subscriptions SubscriptionIdArgs[]

List of subscription ids

tags {[key: string]: string}

Resource tags.

network_security_perimeter_name str

The name of the network security perimeter.

profile_name str

The name of the NSP profile.

resource_group_name str

The name of the resource group.

access_rule_name str

The name of the NSP access rule.

address_prefixes Sequence[str]

Inbound address prefixes (IPv4/IPv6)

direction str | AccessRuleDirection

Direction that specifies whether the access rules is inbound/outbound.

email_addresses Sequence[str]

Outbound rules email address format.

fully_qualified_domain_names Sequence[str]

Outbound rules fully qualified domain name format.

id str

Resource ID.

location str

Resource location.

name str

The name of the access rule that is unique within a profile. This name can be used to access the resource.

network_security_perimeters Sequence[PerimeterBasedAccessRuleArgs]

Inbound rule specified by the perimeter id.

phone_numbers Sequence[str]

Outbound rules phone number format.

subscriptions Sequence[SubscriptionIdArgs]

List of subscription ids

tags Mapping[str, str]

Resource tags.

networkSecurityPerimeterName String

The name of the network security perimeter.

profileName String

The name of the NSP profile.

resourceGroupName String

The name of the resource group.

accessRuleName String

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.

fullyQualifiedDomainNames List<String>

Outbound rules fully qualified domain name format.

id String

Resource ID.

location String

Resource location.

name String

The name of the access rule that is unique within a profile. This name can be used to access the resource.

networkSecurityPerimeters List<Property Map>

Inbound rule specified by the perimeter id.

phoneNumbers List<String>

Outbound rules phone number format.

subscriptions List<Property Map>

List of subscription ids

tags Map<String>

Resource tags.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

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.

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.

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.

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.

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.

provisioningState String

The provisioning state of the scope assignment resource.

type String

Resource type.

Supporting Types

AccessRuleDirection

Inbound
Inbound
Outbound
Outbound
AccessRuleDirectionInbound
Inbound
AccessRuleDirectionOutbound
Outbound
Inbound
Inbound
Outbound
Outbound
Inbound
Inbound
Outbound
Outbound
INBOUND
Inbound
OUTBOUND
Outbound
"Inbound"
Inbound
"Outbound"
Outbound

PerimeterBasedAccessRule

Id string

NSP id in the ARM id format.

Id string

NSP id in the ARM id format.

id String

NSP id in the ARM id format.

id string

NSP id in the ARM id format.

id str

NSP id in the ARM id format.

id String

NSP id in the ARM id format.

PerimeterBasedAccessRuleResponse

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 string

NSP id in the ARM id format.

location str

Location of the NSP supplied.

perimeter_guid str

Resource guid of the NSP supplied.

id str

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.

SubscriptionId

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

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:NspAccessRule accessRule1 /subscriptions/subId/resourceGroup/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/profile1/accessRules/accessRule1 

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0