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 |
|---|---|---|---|---|
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
|
security
|
path | True |
string pattern: ^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$ |
SecurityPolicy |
|
subscription
|
path | True |
string minLength: 1 |
The ID of the target subscription. |
|
traffic
|
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 |
Ip Access Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set. |
|
| properties.wafPolicy |
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 |
Azure operation completed successfully. |
|
| Other Status Codes |
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 Ip |
|
Update WAF Security |
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 |
|---|---|
|
created |
The type of identity that created the resource. |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Ip |
Ip Access Policy Rules |
|
Ip |
Action of Ip Access Rule |
|
Ip |
Ip Access Policy |
|
Policy |
Policy Type of the Security Policy |
|
Provisioning |
Resource Provisioning State Enum |
|
Security |
SecurityPolicy Subresource of Traffic Controller. |
|
Security |
The type used for update operations of the SecurityPolicy. |
|
system |
Metadata pertaining to creation and last modification of the resource. |
|
Waf |
Web Application Firewall Policy |
|
Waf |
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 |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
IpAccessRule
Ip Access Policy Rules
| Name | Type | Description |
|---|---|---|
| action |
Action of the Rule |
|
| name |
string |
Name of the Ip Access Rule |
| priority |
integer (int32) minimum: 1maximum: 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 |
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 |
Ip Access Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set. |
|
| properties.policyType |
Type of the Traffic Controller Security Policy |
|
| properties.provisioningState |
Provisioning State of Traffic Controller SecurityPolicy Resource |
|
| properties.wafPolicy |
Web Application Firewall Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set. |
|
| 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 |
Ip Access Policy of the Traffic Controller Security Policy. Single Security Policy can have only one policy type set. |
|
| properties.wafPolicy |
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 |
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 |
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 |