Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"title": "Patch Network Security Perimeter",
"parameters": {
"api-version": "2021-02-01-preview",
"subscriptionId": "subId",
"resourceGroupName": "rg1",
"networkSecurityPerimeterName": "nsp1",
"parameters": {
"tags": {
"description": "nsp1"
}
}
},
"responses": {
"200": {
"body": {
"name": "TestNetworkSecurityPerimeter",
"id": "/subscriptions/subId/resourceGroup/rg1/providers/Microsoft.Network/networkSecurityPerimeters/TestNetworkSecurityPerimeter",
"type": "Microsoft.Network/networkSecurityPerimeters",
"tags": {
"description": "nsp1"
},
"location": "East US 2 EUAP",
"properties": {
"perimeterGuid": "guid",
"provisioningState": "Succeeded"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"resourceGroupName": "rg1",
"networkSecurityPerimeterName": "nsp1",
"profileName": "profile1",
"accessRuleName": "accessRule1",
"accessRuleName": "accessRuleName1",
"parameters": {
"properties": {}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,43 @@
"$ref": "./examples/NetworkSecurityPerimeterDelete.json"
}
}
},
"patch": {
"tags": [
"NetworkSecurityPerimeters"
],
"operationId": "NetworkSecurityPerimeters_Patch",
"description": "Patch Tags for a Network Security Perimeter.",
"parameters": [
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateTagsRequest"
},
"description": "Parameter supplied to the network security perimeter."
}
],
"responses": {
"200": {
"description": "Request is successful. Returns the resulting network security perimeter resource.",
"schema": {
"$ref": "#/definitions/NetworkSecurityPerimeter"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./network.json#/definitions/CloudError"
}
}
},
"x-ms-examples": {
"Patch Network Security Perimeter": {
"$ref": "./examples/NetworkSecurityPerimeterPatch.json"
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityPerimeters": {
Expand Down Expand Up @@ -1369,6 +1406,24 @@
},
"description": "Properties of network security perimeter."
},
"UpdateTagsRequest": {
"type": "object",
"properties": {
"id": {
Copy link
Member

@mentat9 mentat9 Sep 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id

Resource id can't be updated by patch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field is a readonly field. We use content in the URL to set this field in the controller and pass it to the operations layer. It is not being used to update the Id. Similar to put nsp profile

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if the client sets this field, it will be reset with the content in the URL, passed to the operation layer to do a get on the resource and update the tags. Internally, we only use it to perform a get.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically this is not required, as you can access the URL/referrer anyways.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thats correct but the object is needed in the operations layer to access the NSP with the specified id

"readOnly": true,
"type": "string",
"description": "Network security perimeter identifier."
},
"tags": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "List of tags for Network Security Perimeter"
}
},
"description": "Update tags request."
},
"NspProfile": {
"type": "object",
"properties": {
Expand Down