Share via


Microsoft.ServiceNetworking trafficControllers/securityPolicies

Bicep resource definition

The trafficControllers/securityPolicies 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.ServiceNetworking/trafficControllers/securityPolicies resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.ServiceNetworking/trafficControllers/securityPolicies@2025-03-01-preview' = {
  parent: resourceSymbolicName
  location: 'string'
  name: 'string'
  properties: {
    ipAccessRulesPolicy: {
      rules: [
        {
          action: 'string'
          name: 'string'
          priority: int
          sourceAddressPrefixes: [
            'string'
          ]
        }
      ]
    }
    wafPolicy: {
      id: 'string'
    }
  }
  tags: {
    {customized property}: 'string'
  }
}

Property Values

Microsoft.ServiceNetworking/trafficControllers/securityPolicies

Name Description Value
location The geo-location where the resource lives string (required)
name The resource name string

Constraints:
Pattern = ^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[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: trafficControllers
properties The resource-specific properties for this resource. SecurityPolicyProperties
tags Resource tags Dictionary of tag names and values. See Tags in templates

IpAccessRule

Name Description Value
action Action of the Rule 'allow'
'deny' (required)
name Name of the Ip Access Rule string (required)
priority The priority of the rule. The value can be between 1 and 500. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. int

Constraints:
Min value = 1
Max value = 500 (required)
sourceAddressPrefixes Source Address Prefixed Applied by the Rule. Asterisk '*' can also be used to match all source IPs. string[] (required)

IpAccessRulesPolicy

Name Description Value
rules Ip Access Policy Rules List IpAccessRule[]

SecurityPolicyProperties

Name Description Value
ipAccessRulesPolicy Ip Access Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set. IpAccessRulesPolicy
wafPolicy Web Application Firewall Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set. WafPolicy

TrackedResourceTags

Name Description Value

WafPolicy

Name Description Value
id Resource ID of the WAF string (required)

ARM template resource definition

The trafficControllers/securityPolicies 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.ServiceNetworking/trafficControllers/securityPolicies resource, add the following JSON to your template.

{
  "type": "Microsoft.ServiceNetworking/trafficControllers/securityPolicies",
  "apiVersion": "2025-03-01-preview",
  "name": "string",
  "location": "string",
  "properties": {
    "ipAccessRulesPolicy": {
      "rules": [
        {
          "action": "string",
          "name": "string",
          "priority": "int",
          "sourceAddressPrefixes": [ "string" ]
        }
      ]
    },
    "wafPolicy": {
      "id": "string"
    }
  },
  "tags": {
    "{customized property}": "string"
  }
}

Property Values

Microsoft.ServiceNetworking/trafficControllers/securityPolicies

Name Description Value
apiVersion The api version '2025-03-01-preview'
location The geo-location where the resource lives string (required)
name The resource name string

Constraints:
Pattern = ^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$ (required)
properties The resource-specific properties for this resource. SecurityPolicyProperties
tags Resource tags Dictionary of tag names and values. See Tags in templates
type The resource type 'Microsoft.ServiceNetworking/trafficControllers/securityPolicies'

IpAccessRule

Name Description Value
action Action of the Rule 'allow'
'deny' (required)
name Name of the Ip Access Rule string (required)
priority The priority of the rule. The value can be between 1 and 500. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. int

Constraints:
Min value = 1
Max value = 500 (required)
sourceAddressPrefixes Source Address Prefixed Applied by the Rule. Asterisk '*' can also be used to match all source IPs. string[] (required)

IpAccessRulesPolicy

Name Description Value
rules Ip Access Policy Rules List IpAccessRule[]

SecurityPolicyProperties

Name Description Value
ipAccessRulesPolicy Ip Access Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set. IpAccessRulesPolicy
wafPolicy Web Application Firewall Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set. WafPolicy

TrackedResourceTags

Name Description Value

WafPolicy

Name Description Value
id Resource ID of the WAF string (required)

Usage Examples

Terraform (AzAPI provider) resource definition

The trafficControllers/securityPolicies 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.ServiceNetworking/trafficControllers/securityPolicies resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.ServiceNetworking/trafficControllers/securityPolicies@2025-03-01-preview"
  name = "string"
  parent_id = "string"
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = {
    properties = {
      ipAccessRulesPolicy = {
        rules = [
          {
            action = "string"
            name = "string"
            priority = int
            sourceAddressPrefixes = [
              "string"
            ]
          }
        ]
      }
      wafPolicy = {
        id = "string"
      }
    }
  }
}

Property Values

Microsoft.ServiceNetworking/trafficControllers/securityPolicies

Name Description Value
location The geo-location where the resource lives string (required)
name The resource name string

Constraints:
Pattern = ^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$ (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: trafficControllers
properties The resource-specific properties for this resource. SecurityPolicyProperties
tags Resource tags Dictionary of tag names and values.
type The resource type "Microsoft.ServiceNetworking/trafficControllers/securityPolicies@2025-03-01-preview"

IpAccessRule

Name Description Value
action Action of the Rule 'allow'
'deny' (required)
name Name of the Ip Access Rule string (required)
priority The priority of the rule. The value can be between 1 and 500. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. int

Constraints:
Min value = 1
Max value = 500 (required)
sourceAddressPrefixes Source Address Prefixed Applied by the Rule. Asterisk '*' can also be used to match all source IPs. string[] (required)

IpAccessRulesPolicy

Name Description Value
rules Ip Access Policy Rules List IpAccessRule[]

SecurityPolicyProperties

Name Description Value
ipAccessRulesPolicy Ip Access Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set. IpAccessRulesPolicy
wafPolicy Web Application Firewall Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set. WafPolicy

TrackedResourceTags

Name Description Value

WafPolicy

Name Description Value
id Resource ID of the WAF string (required)