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 System.Linq;
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/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
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NspAccessRule(name: string, args: NspAccessRuleArgs, opts?: CustomResourceOptions);
@overload
def NspAccessRule(resource_name: str,
args: NspAccessRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NspAccessRule(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,
location: Optional[str] = None,
fully_qualified_domain_names: Optional[Sequence[str]] = None,
id: Optional[str] = None,
access_rule_name: Optional[str] = None,
name: Optional[str] = None,
email_addresses: Optional[Sequence[str]] = None,
network_security_perimeters: Optional[Sequence[PerimeterBasedAccessRuleArgs]] = None,
phone_numbers: Optional[Sequence[str]] = None,
direction: Optional[Union[str, AccessRuleDirection]] = None,
address_prefixes: Optional[Sequence[str]] = None,
subscriptions: Optional[Sequence[SubscriptionIdArgs]] = None,
tags: Optional[Mapping[str, str]] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var nspAccessRuleResource = new AzureNative.Network.NspAccessRule("nspAccessRuleResource", new()
{
NetworkSecurityPerimeterName = "string",
ResourceGroupName = "string",
ProfileName = "string",
Location = "string",
FullyQualifiedDomainNames = new[]
{
"string",
},
Id = "string",
AccessRuleName = "string",
Name = "string",
EmailAddresses = new[]
{
"string",
},
NetworkSecurityPerimeters = new[]
{
{
{ "id", "string" },
},
},
PhoneNumbers = new[]
{
"string",
},
Direction = "string",
AddressPrefixes = new[]
{
"string",
},
Subscriptions = new[]
{
{
{ "id", "string" },
},
},
Tags =
{
{ "string", "string" },
},
});
example, err := network.NewNspAccessRule(ctx, "nspAccessRuleResource", &network.NspAccessRuleArgs{
NetworkSecurityPerimeterName: "string",
ResourceGroupName: "string",
ProfileName: "string",
Location: "string",
FullyQualifiedDomainNames: []string{
"string",
},
Id: "string",
AccessRuleName: "string",
Name: "string",
EmailAddresses: []string{
"string",
},
NetworkSecurityPerimeters: []map[string]interface{}{
map[string]interface{}{
"id": "string",
},
},
PhoneNumbers: []string{
"string",
},
Direction: "string",
AddressPrefixes: []string{
"string",
},
Subscriptions: []map[string]interface{}{
map[string]interface{}{
"id": "string",
},
},
Tags: map[string]interface{}{
"string": "string",
},
})
var nspAccessRuleResource = new NspAccessRule("nspAccessRuleResource", NspAccessRuleArgs.builder()
.networkSecurityPerimeterName("string")
.resourceGroupName("string")
.profileName("string")
.location("string")
.fullyQualifiedDomainNames("string")
.id("string")
.accessRuleName("string")
.name("string")
.emailAddresses("string")
.networkSecurityPerimeters(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.phoneNumbers("string")
.direction("string")
.addressPrefixes("string")
.subscriptions(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build());
nsp_access_rule_resource = azure_native.network.NspAccessRule("nspAccessRuleResource",
network_security_perimeter_name=string,
resource_group_name=string,
profile_name=string,
location=string,
fully_qualified_domain_names=[string],
id=string,
access_rule_name=string,
name=string,
email_addresses=[string],
network_security_perimeters=[{
id: string,
}],
phone_numbers=[string],
direction=string,
address_prefixes=[string],
subscriptions=[{
id: string,
}],
tags={
string: string,
})
const nspAccessRuleResource = new azure_native.network.NspAccessRule("nspAccessRuleResource", {
networkSecurityPerimeterName: "string",
resourceGroupName: "string",
profileName: "string",
location: "string",
fullyQualifiedDomainNames: ["string"],
id: "string",
accessRuleName: "string",
name: "string",
emailAddresses: ["string"],
networkSecurityPerimeters: [{
id: "string",
}],
phoneNumbers: ["string"],
direction: "string",
addressPrefixes: ["string"],
subscriptions: [{
id: "string",
}],
tags: {
string: "string",
},
});
type: azure-native:network:NspAccessRule
properties:
accessRuleName: string
addressPrefixes:
- string
direction: string
emailAddresses:
- string
fullyQualifiedDomainNames:
- string
id: string
location: string
name: string
networkSecurityPerimeterName: string
networkSecurityPerimeters:
- id: string
phoneNumbers:
- string
profileName: string
resourceGroupName: string
subscriptions:
- id: string
tags:
string: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The NspAccessRule resource accepts the following input properties:
- Network
Security stringPerimeter Name - The name of the network security perimeter.
- Profile
Name string - The name of the NSP profile.
- Resource
Group stringName - The name of the resource group.
- Access
Rule stringName - The name of the NSP access rule.
- Address
Prefixes 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.
- Email
Addresses List<string> - Outbound rules email address format.
- Fully
Qualified List<string>Domain Names - 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.
- Network
Security List<Pulumi.Perimeters Azure Native. Network. Inputs. Perimeter Based Access Rule> - Inbound rule specified by the perimeter id.
- Phone
Numbers List<string> - Outbound rules phone number format.
- Subscriptions
List<Pulumi.
Azure Native. Network. Inputs. Subscription Id> - List of subscription ids
- Dictionary<string, string>
- Resource tags.
- Network
Security stringPerimeter Name - The name of the network security perimeter.
- Profile
Name string - The name of the NSP profile.
- Resource
Group stringName - The name of the resource group.
- Access
Rule stringName - The name of the NSP access rule.
- Address
Prefixes []string - Inbound address prefixes (IPv4/IPv6)
- Direction
string | Access
Rule Direction - Direction that specifies whether the access rules is inbound/outbound.
- Email
Addresses []string - Outbound rules email address format.
- Fully
Qualified []stringDomain Names - 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.
- Network
Security []PerimeterPerimeters Based Access Rule Args - Inbound rule specified by the perimeter id.
- Phone
Numbers []string - Outbound rules phone number format.
- Subscriptions
[]Subscription
Id Args - List of subscription ids
- map[string]string
- Resource tags.
- network
Security StringPerimeter Name - The name of the network security perimeter.
- profile
Name String - The name of the NSP profile.
- resource
Group StringName - The name of the resource group.
- access
Rule StringName - The name of the NSP access rule.
- address
Prefixes List<String> - Inbound address prefixes (IPv4/IPv6)
- direction
String | Access
Rule Direction - Direction that specifies whether the access rules is inbound/outbound.
- email
Addresses List<String> - Outbound rules email address format.
- fully
Qualified List<String>Domain Names - 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.
- network
Security List<PerimeterPerimeters Based Access Rule> - Inbound rule specified by the perimeter id.
- phone
Numbers List<String> - Outbound rules phone number format.
- subscriptions
List<Subscription
Id> - List of subscription ids
- Map<String,String>
- Resource tags.
- network
Security stringPerimeter Name - The name of the network security perimeter.
- profile
Name string - The name of the NSP profile.
- resource
Group stringName - The name of the resource group.
- access
Rule stringName - The name of the NSP access rule.
- address
Prefixes string[] - Inbound address prefixes (IPv4/IPv6)
- direction
string | Access
Rule Direction - Direction that specifies whether the access rules is inbound/outbound.
- email
Addresses string[] - Outbound rules email address format.
- fully
Qualified string[]Domain Names - 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.
- network
Security PerimeterPerimeters Based Access Rule[] - Inbound rule specified by the perimeter id.
- phone
Numbers string[] - Outbound rules phone number format.
- subscriptions
Subscription
Id[] - 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 | Access
Rule 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.
- 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_ Sequence[Perimeterperimeters Based Access Rule Args] - Inbound rule specified by the perimeter id.
- phone_
numbers Sequence[str] - Outbound rules phone number format.
- subscriptions
Sequence[Subscription
Id Args] - List of subscription ids
- Mapping[str, str]
- Resource tags.
- network
Security StringPerimeter Name - The name of the network security perimeter.
- profile
Name String - The name of the NSP profile.
- resource
Group StringName - The name of the resource group.
- access
Rule StringName - The name of the NSP access rule.
- address
Prefixes List<String> - Inbound address prefixes (IPv4/IPv6)
- direction String | "Inbound" | "Outbound"
- Direction that specifies whether the access rules is inbound/outbound.
- email
Addresses List<String> - Outbound rules email address format.
- fully
Qualified List<String>Domain Names - 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.
- network
Security List<Property Map>Perimeters - Inbound rule specified by the perimeter id.
- phone
Numbers List<String> - Outbound rules phone number format.
- subscriptions List<Property Map>
- List of subscription ids
- 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.
- Provisioning
State string - The provisioning state of the scope assignment resource.
- Type string
- Resource type.
- Id string
- The provider-assigned unique ID for this managed resource.
- Provisioning
State string - The provisioning state of the scope assignment resource.
- Type string
- Resource type.
- id String
- The provider-assigned unique ID for this managed resource.
- provisioning
State String - The provisioning state of the scope assignment resource.
- type String
- Resource type.
- id string
- The provider-assigned unique ID for this managed resource.
- provisioning
State 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.
- provisioning
State String - The provisioning state of the scope assignment resource.
- type String
- Resource type.
Supporting Types
AccessRuleDirection, AccessRuleDirectionArgs
- Inbound
- Inbound
- Outbound
- Outbound
- Access
Rule Direction Inbound - Inbound
- Access
Rule Direction Outbound - Outbound
- Inbound
- Inbound
- Outbound
- Outbound
- Inbound
- Inbound
- Outbound
- Outbound
- INBOUND
- Inbound
- OUTBOUND
- Outbound
- "Inbound"
- Inbound
- "Outbound"
- Outbound
PerimeterBasedAccessRule, PerimeterBasedAccessRuleArgs
- 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, PerimeterBasedAccessRuleResponseArgs
- Location string
- Location of the NSP supplied.
- Perimeter
Guid string - Resource guid of the NSP supplied.
- Id string
- NSP id in the ARM id format.
- Location string
- Location of the NSP supplied.
- Perimeter
Guid string - Resource guid of the NSP supplied.
- Id string
- NSP id in the ARM id format.
- location String
- Location of the NSP supplied.
- perimeter
Guid String - Resource guid of the NSP supplied.
- id String
- NSP id in the ARM id format.
- location string
- Location of the NSP supplied.
- perimeter
Guid 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.
- perimeter
Guid String - Resource guid of the NSP supplied.
- id String
- NSP id in the ARM id format.
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:NspAccessRule accessRule1 /subscriptions/subId/resourceGroup/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/profile1/accessRules/accessRule1
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