Skip to content

Commit

Permalink
Ability to update tags on firewall policies (#18322)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
thebenwaters authored Mar 25, 2022
1 parent 885cc77 commit 79faf77
Show file tree
Hide file tree
Showing 2 changed files with 185 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
{
"parameters": {
"firewallPolicyName": "firewallPolicy",
"resourceGroupName": "myResourceGroup",
"api-version": "2021-08-01",
"subscriptionId": "subId",
"parameters": {
"tags": {
"key1": "value1",
"key2": "value2"
}
}
},
"responses": {
"200": {
"body": {
"name": "firewallPolicy",
"id": "/subscriptions/subId/resourceGroups/myResourceGroup/providers/Microsoft.Network/firewallPolicies/firewallPolicy",
"type": "Microsoft.Network/firewallPolicies",
"etag": "w/\\00000000-0000-0000-0000-000000000000\\",
"location": "West US",
"tags": {
"key1": "value1",
"key2": "value2"
},
"properties": {
"provisioningState": "Succeeded",
"threatIntelMode": "Alert",
"threatIntelWhitelist": {
"ipAddresses": [
"20.3.4.5"
],
"fqdns": [
"*.microsoft.com"
]
},
"ruleCollectionGroups": [
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/firewallPolicy/ruleCollectionGroups/ruleCollectionGroup1"
}
],
"insights": {
"isEnabled": true,
"retentionDays": 100,
"logAnalyticsResources": {
"workspaces": [
{
"region": "westus",
"workspaceId": {
"id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1"
}
},
{
"region": "eastus",
"workspaceId": {
"id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2"
}
}
],
"defaultWorkspaceId": {
"id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/defaultWorkspace"
}
}
},
"firewalls": [],
"snat": {
"privateRanges": [
"IANAPrivateRanges"
]
},
"sql": {
"allowSqlRedirect": true
},
"dnsSettings": {
"servers": [
"30.3.4.5"
],
"enableProxy": true,
"requireProxyForNetworkRules": false
},
"explicitProxySettings": {
"enableExplicitProxy": true,
"httpPort": 8087,
"httpsPort": 8087,
"pacFilePort": 8087,
"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"
},
"sku": {
"tier": "Premium"
},
"intrusionDetection": {
"mode": "Alert",
"configuration": {
"signatureOverrides": [
{
"id": "2525004",
"mode": "Deny"
}
],
"bypassTrafficSettings": [
{
"name": "bypassRule1",
"description": "Rule 1",
"protocol": "TCP",
"sourceAddresses": [
"1.2.3.4"
],
"destinationAddresses": [
"5.6.7.8"
],
"destinationPorts": [
"*"
]
}
]
}
},
"transportSecurity": {
"certificateAuthority": {
"name": "clientcert",
"keyVaultSecretId": "https://kv/secret"
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,63 @@
"x-ms-long-running-operation-options": {
"final-state-via": "azure-async-operation"
}
},
"patch": {
"tags": [
"FirewallPolicies"
],
"operationId": "FirewallPolicies_UpdateTags",
"description": "Updates tags of a Azure Firewall Policy resource.",
"parameters": [
{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group."
},
{
"name": "firewallPolicyName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the Firewall Policy."
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "./network.json#/definitions/TagsObject"
},
"description": "Parameters supplied to update Azure Firewall Policy tags."
},
{
"$ref": "./network.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./network.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Request successful. The operation returns the resulting FirewallPolicy resource.",
"schema": {
"$ref": "#/definitions/FirewallPolicy"
}
},
"default": {
"description": "Unexpected error.",
"schema": {
"$ref": "./network.json#/definitions/CloudError"
}
}
},
"x-ms-examples": {
"Update FirewallPolicy Tags": {
"$ref": "./examples/FirewallPolicyPatch.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies": {
Expand Down

0 comments on commit 79faf77

Please sign in to comment.