Skip to content

Commit 79faf77

Browse files
authored
Ability to update tags on firewall policies (#18322)
* Support updating of Azure Firewall Policy Tags. Includes HTTP Patch example * Use common-types ErrorDetail * Ability to update tags for Firewall Policies * spell check fix for firewallpolicy * Use future release api-version for example
1 parent 885cc77 commit 79faf77

File tree

2 files changed

+185
-0
lines changed

2 files changed

+185
-0
lines changed
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
{
2+
"parameters": {
3+
"firewallPolicyName": "firewallPolicy",
4+
"resourceGroupName": "myResourceGroup",
5+
"api-version": "2021-08-01",
6+
"subscriptionId": "subId",
7+
"parameters": {
8+
"tags": {
9+
"key1": "value1",
10+
"key2": "value2"
11+
}
12+
}
13+
},
14+
"responses": {
15+
"200": {
16+
"body": {
17+
"name": "firewallPolicy",
18+
"id": "/subscriptions/subId/resourceGroups/myResourceGroup/providers/Microsoft.Network/firewallPolicies/firewallPolicy",
19+
"type": "Microsoft.Network/firewallPolicies",
20+
"etag": "w/\\00000000-0000-0000-0000-000000000000\\",
21+
"location": "West US",
22+
"tags": {
23+
"key1": "value1",
24+
"key2": "value2"
25+
},
26+
"properties": {
27+
"provisioningState": "Succeeded",
28+
"threatIntelMode": "Alert",
29+
"threatIntelWhitelist": {
30+
"ipAddresses": [
31+
"20.3.4.5"
32+
],
33+
"fqdns": [
34+
"*.microsoft.com"
35+
]
36+
},
37+
"ruleCollectionGroups": [
38+
{
39+
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/firewallPolicy/ruleCollectionGroups/ruleCollectionGroup1"
40+
}
41+
],
42+
"insights": {
43+
"isEnabled": true,
44+
"retentionDays": 100,
45+
"logAnalyticsResources": {
46+
"workspaces": [
47+
{
48+
"region": "westus",
49+
"workspaceId": {
50+
"id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1"
51+
}
52+
},
53+
{
54+
"region": "eastus",
55+
"workspaceId": {
56+
"id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2"
57+
}
58+
}
59+
],
60+
"defaultWorkspaceId": {
61+
"id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/defaultWorkspace"
62+
}
63+
}
64+
},
65+
"firewalls": [],
66+
"snat": {
67+
"privateRanges": [
68+
"IANAPrivateRanges"
69+
]
70+
},
71+
"sql": {
72+
"allowSqlRedirect": true
73+
},
74+
"dnsSettings": {
75+
"servers": [
76+
"30.3.4.5"
77+
],
78+
"enableProxy": true,
79+
"requireProxyForNetworkRules": false
80+
},
81+
"explicitProxySettings": {
82+
"enableExplicitProxy": true,
83+
"httpPort": 8087,
84+
"httpsPort": 8087,
85+
"pacFilePort": 8087,
86+
"pacFile": "https://tinawstorage.file.core.windows.net/?sv=2020-02-10&ss=bfqt&srt=sco&sp=rwdlacuptfx&se=2021-06-04T07:01:12Z&st=2021-06-03T23:01:12Z&sip=68.65.171.11&spr=https&sig=Plsa0RRVpGbY0IETZZOT6znOHcSro71LLTTbzquYPgs%3D"
87+
},
88+
"sku": {
89+
"tier": "Premium"
90+
},
91+
"intrusionDetection": {
92+
"mode": "Alert",
93+
"configuration": {
94+
"signatureOverrides": [
95+
{
96+
"id": "2525004",
97+
"mode": "Deny"
98+
}
99+
],
100+
"bypassTrafficSettings": [
101+
{
102+
"name": "bypassRule1",
103+
"description": "Rule 1",
104+
"protocol": "TCP",
105+
"sourceAddresses": [
106+
"1.2.3.4"
107+
],
108+
"destinationAddresses": [
109+
"5.6.7.8"
110+
],
111+
"destinationPorts": [
112+
"*"
113+
]
114+
}
115+
]
116+
}
117+
},
118+
"transportSecurity": {
119+
"certificateAuthority": {
120+
"name": "clientcert",
121+
"keyVaultSecretId": "https://kv/secret"
122+
}
123+
}
124+
}
125+
}
126+
}
127+
}
128+
}

specification/network/resource-manager/Microsoft.Network/stable/2021-08-01/firewallPolicy.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,63 @@
211211
"x-ms-long-running-operation-options": {
212212
"final-state-via": "azure-async-operation"
213213
}
214+
},
215+
"patch": {
216+
"tags": [
217+
"FirewallPolicies"
218+
],
219+
"operationId": "FirewallPolicies_UpdateTags",
220+
"description": "Updates tags of a Azure Firewall Policy resource.",
221+
"parameters": [
222+
{
223+
"name": "resourceGroupName",
224+
"in": "path",
225+
"required": true,
226+
"type": "string",
227+
"description": "The name of the resource group."
228+
},
229+
{
230+
"name": "firewallPolicyName",
231+
"in": "path",
232+
"required": true,
233+
"type": "string",
234+
"description": "The name of the Firewall Policy."
235+
},
236+
{
237+
"name": "parameters",
238+
"in": "body",
239+
"required": true,
240+
"schema": {
241+
"$ref": "./network.json#/definitions/TagsObject"
242+
},
243+
"description": "Parameters supplied to update Azure Firewall Policy tags."
244+
},
245+
{
246+
"$ref": "./network.json#/parameters/ApiVersionParameter"
247+
},
248+
{
249+
"$ref": "./network.json#/parameters/SubscriptionIdParameter"
250+
}
251+
],
252+
"responses": {
253+
"200": {
254+
"description": "Request successful. The operation returns the resulting FirewallPolicy resource.",
255+
"schema": {
256+
"$ref": "#/definitions/FirewallPolicy"
257+
}
258+
},
259+
"default": {
260+
"description": "Unexpected error.",
261+
"schema": {
262+
"$ref": "./network.json#/definitions/CloudError"
263+
}
264+
}
265+
},
266+
"x-ms-examples": {
267+
"Update FirewallPolicy Tags": {
268+
"$ref": "./examples/FirewallPolicyPatch.json"
269+
}
270+
}
214271
}
215272
},
216273
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies": {

0 commit comments

Comments
 (0)