Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
MIT License
2.68k stars 5.11k forks source link

[BUG] PUT operation for privateendpoint connection approval is not idempotent #30308

Open krupakar1329 opened 2 months ago

krupakar1329 commented 2 months ago

API Spec link

https://learn.microsoft.com/en-us/rest/api/storagerp/private-endpoint-connections/put?view=rest-storagerp-2023-05-01&tabs=HTTP

API Spec version

2023-05-01

Describe the bug

Trying to approve the private endpoint connection , which is in Approved state shouldnt throw error for idempotent operations. But getting

│ {
│   "error": {
│     "code": "InvalidValuesForRequestParameters",
│     "message": "Values for request parameters are invalid: privateLinkServiceConnectionState.status."
│   }

Expected behavior

Api can be hit any number of times for PUT operation

Actual behavior

│ {
│   "error": {
│     "code": "InvalidValuesForRequestParameters",
│     "message": "Values for request parameters are invalid: privateLinkServiceConnectionState.status."
│   }

Reproduction Steps

1) Create a manual approval private endpoint 2) Use https://learn.microsoft.com/en-us/rest/api/storagerp/private-endpoint-connections/put?view=rest-storagerp-2023-05-01&tabs=HTTP to approve private endpoint 3) Run step2 again , it shouldn't throw error. but it giving error

Environment

No response

v-jiaodi commented 2 months ago

@golddove Please help take a look, thanks.

v-jiaodi commented 1 week ago

@triciarosario Please help take a look, thanks.