Security Policies Interface - Update

Update a SecurityPolicy

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/securityPolicies/{securityPolicyName}?api-version=2026-03-01

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

securityPolicyName
path True

string

pattern: ^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$

SecurityPolicy

subscriptionId
path True

string

minLength: 1

The ID of the target subscription.

trafficControllerName
path True

string

pattern: ^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$

traffic controller name for path

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Body

Name Type Description
properties.ipAccessRulesPolicy

IpAccessRulesPolicy

Ip Access Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set.

properties.wafPolicy

WafPolicyUpdate

Web Application Firewall Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set.

tags

object

Resource tags.

Responses

Name Type Description
200 OK

SecurityPolicy

Azure operation completed successfully.

Other Status Codes

ErrorResponse

An unexpected error response.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Update IpAccessRules SecurityPolicy
Update WAF SecurityPolicy

Update IpAccessRules SecurityPolicy

Sample request

PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/sp1?api-version=2026-03-01

{
  "properties": {
    "ipAccessRulesPolicy": {
      "rules": []
    }
  }
}

Sample response

{
  "name": "ipAccessRules-0",
  "type": "Microsoft.ServiceNetworking/trafficControllers/securityPolicies",
  "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/ipAccessRules-0",
  "location": "NorthCentralUS",
  "properties": {
    "policyType": "ipAccessRules",
    "ipAccessRulesPolicy": {
      "rules": []
    },
    "provisioningState": "Succeeded"
  }
}

Update WAF SecurityPolicy

Sample request

PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/sp1?api-version=2026-03-01

{
  "properties": {
    "wafPolicy": {
      "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/wp-0"
    }
  }
}

Sample response

{
  "name": "waf-0",
  "type": "Microsoft.ServiceNetworking/trafficControllers/securityPolicies",
  "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/waf-0",
  "location": "NorthCentralUS",
  "properties": {
    "policyType": "waf",
    "wafPolicy": {
      "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/wp-0"
    },
    "provisioningState": "Succeeded"
  }
}

Definitions

Name Description
createdByType

The type of identity that created the resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

IpAccessRule

Ip Access Policy Rules

IpAccessRuleAction

Action of Ip Access Rule

IpAccessRulesPolicy

Ip Access Policy

PolicyType

Policy Type of the Security Policy

ProvisioningState

Resource Provisioning State Enum

SecurityPolicy

SecurityPolicy Subresource of Traffic Controller.

SecurityPolicyUpdate

The type used for update operations of the SecurityPolicy.

systemData

Metadata pertaining to creation and last modification of the resource.

WafPolicy

Web Application Firewall Policy

WafPolicyUpdate

Web Application Firewall Policy

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

IpAccessRule

Ip Access Policy Rules

Name Type Description
action

IpAccessRuleAction

Action of the Rule

name

string

Name of the Ip Access Rule

priority

integer (int32)

minimum: 1
maximum: 500

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.

sourceAddressPrefixes

string[]

Source Address Prefixed Applied by the Rule. Asterisk '*' can also be used to match all source IPs.

IpAccessRuleAction

Action of Ip Access Rule

Value Description
allow

Allow Source Ip Prefixes

deny

Deny Source Ip Prefixes

IpAccessRulesPolicy

Ip Access Policy

Name Type Description
rules

IpAccessRule[]

Ip Access Policy Rules List

PolicyType

Policy Type of the Security Policy

Value Description
waf

Policy of Type WAF

ipAccessRules

Policy of Type IpAccessRules

ProvisioningState

Resource Provisioning State Enum

Value Description
Provisioning

Resource in Provisioning State

Updating

Resource in Updating State

Deleting

Resource in Deleting State

Accepted

Resource in Accepted State

Succeeded

Resource in Succeeded State

Failed

Resource in Failed State

Canceled

Resource in Canceled State

SecurityPolicy

SecurityPolicy Subresource of Traffic Controller.

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

location

string

The geo-location where the resource lives

name

string

The name of the resource

properties.ipAccessRulesPolicy

IpAccessRulesPolicy

Ip Access Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set.

properties.policyType

PolicyType

Type of the Traffic Controller Security Policy

properties.provisioningState

ProvisioningState

Provisioning State of Traffic Controller SecurityPolicy Resource

properties.wafPolicy

WafPolicy

Web Application Firewall Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags

object

Resource tags.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

SecurityPolicyUpdate

The type used for update operations of the SecurityPolicy.

Name Type Description
properties.ipAccessRulesPolicy

IpAccessRulesPolicy

Ip Access Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set.

properties.wafPolicy

WafPolicyUpdate

Web Application Firewall Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set.

tags

object

Resource tags.

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

WafPolicy

Web Application Firewall Policy

Name Type Description
id

string

Resource ID of the WAF

WafPolicyUpdate

Web Application Firewall Policy

Name Type Description
id

string

Resource ID of the WAF