Skip to content

Commit

Permalink
Added PATCH flowLog API and example (#9960)
Browse files Browse the repository at this point in the history
* Added PATCH flowLog API and example

* Fixed example

* Added property to TCPConfiguration

* Fixed prettier warning

* Fixes based on CR
  • Loading branch information
irrogozh authored Jul 2, 2020
1 parent 77ef503 commit d1e0da4
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"parameters": {
"api-version": "2020-06-01",
"subscriptionId": "subid",
"resourceGroupName": "rg1",
"networkWatcherName": "nw",
"flowLogName": "fl",
"parameters": {
"tags": {
"tag1": "value1",
"tag2": "value2"
}
}
},
"responses": {
"200": {
"body": {
"name": "Microsoft.Networkdesmond-rgdesmondcentral-nsg",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchers/nw/FlowLogs/fl",
"etag": "W/\"00000000-0000-0000-0000-000000000000\"",
"properties": {
"provisioningState": "Succeeded",
"targetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/desmondcentral-nsg",
"targetResourceGuid": "00000000-0000-0000-0000-000000000000",
"storageId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/nwtest1mgvbfmqsigdxe",
"enabled": true,
"flowAnalyticsConfiguration": {},
"retentionPolicy": {
"days": 0,
"enabled": false
},
"format": {
"type": "JSON",
"version": 1
}
},
"tags": {
"tag1": "value1",
"tag2": "value2"
},
"type": "Microsoft.Network/networkWatchers/FlowLogs",
"location": "centralus"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2100,6 +2100,70 @@
"final-state-via": "azure-async-operation"
}
},
"patch": {
"tags": [
"FlowLogs"
],
"operationId": "FlowLogs_UpdateTags",
"description": "Update tags of the specified flow log.",
"parameters": [
{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group."
},
{
"name": "networkWatcherName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the network watcher."
},
{
"name": "flowLogName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the flow log."
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "./network.json#/definitions/TagsObject"
},
"description": "Parameters supplied to update flow log tags."
},
{
"$ref": "./network.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./network.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Request successful. The operation returns updated flow log.",
"schema": {
"$ref": "#/definitions/FlowLog"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./networkWatcher.json#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Update flow log tags": {
"$ref": "./examples/NetworkWatcherFlowLogUpdateTags.json"
}
}
},
"get": {
"tags": [
"FlowLogs"
Expand Down Expand Up @@ -4288,6 +4352,18 @@
"disableTraceRoute": {
"type": "boolean",
"description": "Value indicating whether path evaluation with trace route should be disabled."
},
"destinationPortBehavior": {
"type": "string",
"description": "Destination port behavior.",
"enum": [
"None",
"ListenIfAvailable"
],
"x-ms-enum": {
"name": "DestinationPortBehavior",
"modelAsString": true
}
}
},
"description": "Describes the TCP configuration."
Expand Down

0 comments on commit d1e0da4

Please sign in to comment.