Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
MIT License
2.67k stars 5.1k forks source link

[BUG] `Microsoft.Maps` @ `2023-06-01` - `PUT` and `DELETE` operations for Accounts should be marked as LRO #29501

Open stephybun opened 4 months ago

stephybun commented 4 months ago

API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/89fc547a195b7202ac9731b6dc17596776b12185/specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/maps-management.json#L81-L93

API Spec version

2023-06-01

Describe the bug

The PUT and DELETE methods in the spec for Maps are not marked as Long Running Operations

However creating a Maps Account returns a provisioningState of Updating

...
"properties": {
    "uniqueId": "36b85746-cbda-45e5-8f60-7090a13ccc3c",
    "provisioningState": "Updating",
...

And attempting to delete results in the following error:

unexpected status 409 (409 Conflict) with error: InvalidProvisoningState: The current provisioningState must transition to a terminal state before the resource can be updated.

I believe these operations should be Long Running operations and return an async URL in the header that we can poll on to know when a Maps Account resource is ready to be updated or deleted.

Expected behavior

When creating a Maps Account I should receive an async operation URL in the header that will allow me to poll the provisioning status of the resource.

Actual behavior

Creating a Maps Account returns a 201 with no async operation operation URL in the header for us to poll on. Issuing an update to the account or a delete right after results in a 409 error.

Reproduction Steps

Create a Map Account then issue an update or a delete immediately afterwards.

Environment

No response

v-jiaodi commented 4 months ago

@gigigoo0 Can you help take a look?

gigigoo0 commented 4 months ago

Will take a look.