Share via


Microsoft.Network networkSecurityPerimeters/profiles/accessRules

Bicep resource definition

The networkSecurityPerimeters/profiles/accessRules resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Network/networkSecurityPerimeters/profiles/accessRules resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Network/networkSecurityPerimeters/profiles/accessRules@2025-05-01' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    addressPrefixes: [
      'string'
    ]
    direction: 'string'
    emailAddresses: [
      'string'
    ]
    fullyQualifiedDomainNames: [
      'string'
    ]
    phoneNumbers: [
      'string'
    ]
    serviceTags: [
      'string'
    ]
    subscriptions: [
      {
        id: 'string'
      }
    ]
  }
}

Property Values

Microsoft.Network/networkSecurityPerimeters/profiles/accessRules

Name Description Value
name The resource name string

Constraints:
Max length = 80
Pattern = (^[a-zA-Z0-9]+[a-zA-Z0-9_.-]*[a-zA-Z0-9_]+$)|(^[a-zA-Z0-9]$) (required)
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: networkSecurityPerimeters/profiles
properties Properties of the NSP access rule. NspAccessRuleProperties

NspAccessRuleProperties

Name Description Value
addressPrefixes Inbound address prefixes (IPv4/IPv6) string[]
direction Direction that specifies whether the access rules is inbound/outbound. 'Inbound'
'Outbound'
emailAddresses Outbound rules in email address format. This access rule type is currently unavailable for use. string[]
fullyQualifiedDomainNames Outbound rules in fully qualified domain name format. string[]
phoneNumbers Outbound rules in phone number format. This access rule type is currently unavailable for use. string[]
serviceTags Inbound rules of type service tag. This access rule type is currently unavailable for use. string[]
subscriptions List of subscription ids SubscriptionId[]

SubscriptionId

Name Description Value
id Subscription id in the ARM id format. string

Usage Examples

Azure Quickstart Samples

The following Azure Quickstart templates contain Bicep samples for deploying this resource type.

Bicep File Description
Create a network security perimeter This template creates a network security perimeter and it's associated resource for protecting an Azure key vault.

ARM template resource definition

The networkSecurityPerimeters/profiles/accessRules resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Network/networkSecurityPerimeters/profiles/accessRules resource, add the following JSON to your template.

{
  "type": "Microsoft.Network/networkSecurityPerimeters/profiles/accessRules",
  "apiVersion": "2025-05-01",
  "name": "string",
  "properties": {
    "addressPrefixes": [ "string" ],
    "direction": "string",
    "emailAddresses": [ "string" ],
    "fullyQualifiedDomainNames": [ "string" ],
    "phoneNumbers": [ "string" ],
    "serviceTags": [ "string" ],
    "subscriptions": [
      {
        "id": "string"
      }
    ]
  }
}

Property Values

Microsoft.Network/networkSecurityPerimeters/profiles/accessRules

Name Description Value
apiVersion The api version '2025-05-01'
name The resource name string

Constraints:
Max length = 80
Pattern = (^[a-zA-Z0-9]+[a-zA-Z0-9_.-]*[a-zA-Z0-9_]+$)|(^[a-zA-Z0-9]$) (required)
properties Properties of the NSP access rule. NspAccessRuleProperties
type The resource type 'Microsoft.Network/networkSecurityPerimeters/profiles/accessRules'

NspAccessRuleProperties

Name Description Value
addressPrefixes Inbound address prefixes (IPv4/IPv6) string[]
direction Direction that specifies whether the access rules is inbound/outbound. 'Inbound'
'Outbound'
emailAddresses Outbound rules in email address format. This access rule type is currently unavailable for use. string[]
fullyQualifiedDomainNames Outbound rules in fully qualified domain name format. string[]
phoneNumbers Outbound rules in phone number format. This access rule type is currently unavailable for use. string[]
serviceTags Inbound rules of type service tag. This access rule type is currently unavailable for use. string[]
subscriptions List of subscription ids SubscriptionId[]

SubscriptionId

Name Description Value
id Subscription id in the ARM id format. string

Usage Examples

Azure Quickstart Templates

The following Azure Quickstart templates deploy this resource type.

Template Description
Create a network security perimeter

Deploy to Azure
This template creates a network security perimeter and it's associated resource for protecting an Azure key vault.

Terraform (AzAPI provider) resource definition

The networkSecurityPerimeters/profiles/accessRules resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Network/networkSecurityPerimeters/profiles/accessRules resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Network/networkSecurityPerimeters/profiles/accessRules@2025-05-01"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      addressPrefixes = [
        "string"
      ]
      direction = "string"
      emailAddresses = [
        "string"
      ]
      fullyQualifiedDomainNames = [
        "string"
      ]
      phoneNumbers = [
        "string"
      ]
      serviceTags = [
        "string"
      ]
      subscriptions = [
        {
          id = "string"
        }
      ]
    }
  }
}

Property Values

Microsoft.Network/networkSecurityPerimeters/profiles/accessRules

Name Description Value
name The resource name string

Constraints:
Max length = 80
Pattern = (^[a-zA-Z0-9]+[a-zA-Z0-9_.-]*[a-zA-Z0-9_]+$)|(^[a-zA-Z0-9]$) (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: networkSecurityPerimeters/profiles
properties Properties of the NSP access rule. NspAccessRuleProperties
type The resource type "Microsoft.Network/networkSecurityPerimeters/profiles/accessRules@2025-05-01"

NspAccessRuleProperties

Name Description Value
addressPrefixes Inbound address prefixes (IPv4/IPv6) string[]
direction Direction that specifies whether the access rules is inbound/outbound. 'Inbound'
'Outbound'
emailAddresses Outbound rules in email address format. This access rule type is currently unavailable for use. string[]
fullyQualifiedDomainNames Outbound rules in fully qualified domain name format. string[]
phoneNumbers Outbound rules in phone number format. This access rule type is currently unavailable for use. string[]
serviceTags Inbound rules of type service tag. This access rule type is currently unavailable for use. string[]
subscriptions List of subscription ids SubscriptionId[]

SubscriptionId

Name Description Value
id Subscription id in the ARM id format. string