Azure / Azure/azure-rest-api-specs

[ARM Tags] incorrect status code 202 at /{scope}/providers/Microsoft.Resources/tags/default

Open
#20,267 7 comments 0 reactions 0 assignees View on GitHub
ARM - Tags customer-response-expected Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

PATCH /{scope}/providers/Microsoft.Resources/tags/default on CRP Disk fails with status code 202
(tried with api-version 2021-04-01 and 2021-01-01, same response)

Same call on virtual machine scope and network interface scope is both good.

swagger (it only allow 200)
https://github.com/Azure/azure-rest-api-specs/blob/3ef4bf9/specification/resources/resource-manager/Microsoft.Resources/stable/2021-04-01/resources.json#L4376-L4413

Disk ID: `/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rg-weidxu1/providers/Microsoft.Compute/disks/vm1weidxu_OsDisk_1_fb00d73bec2642cdbe361cea58cb1a8c`

request
```
PATCH https://management.azure.com//subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rg-weidxu1/providers/Microsoft.Compute/disks/vm1weidxu_OsDisk_1_fb00d73bec2642cdbe361cea58cb1a8c/providers/Microsoft.Resources/tags/default?api-version=2021-04-01
Try count: 1
Date:Wed, 17 Aug 2022 02:05:33 GMT
Authorization:REDACTED
Content-Length:63
x-ms-return-client-request-id:true
Content-Type:application/json
x-ms-client-request-id:dbb5edf2-04b3-4a32-abfb-76e5b33ab6e5
Accept:application/json
User-Agent:azsdk-java-com.azure.resourcemanager.resources/2.18.0-beta.1 (17.0.1; Windows 11; 10.0)
63-byte body:
{
"operation" : "Replace",
"properties" : {
"tags" : {
"key1" : "value1"
}
}
}
```

response (the response looks like an LRO)
```
202 https://management.azure.com//subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rg-weidxu1/providers/Microsoft.Compute/disks/vm1weidxu_OsDisk_1_fb00d73bec2642cdbe361cea58cb1a8c/providers/Microsoft.Resources/tags/default?api-version=2021-04-01 (2678 ms, 0-byte body)
Cache-Control:no-cache
Pragma:no-cache
Expires:-1
Location:https://management.azure.com/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/providers/Microsoft.Compute/locations/westus3/DiskOperations/b8e53ae7-41a5-48c3-adee-d6c2d10bd877?p=ddefb9cd-2984-4659-bea2-89a23e6a6130&monitor=true&api-version=2021-08-01
x-ms-ratelimit-remaining-subscription-writes:1196
x-ms-request-id:23295eb7-60b7-44db-b682-b6bda94f0155
x-ms-correlation-request-id:23295eb7-60b7-44db-b682-b6bda94f0155
x-ms-routing-request-id:SOUTHEASTASIA:20220817T020543Z:23295eb7-60b7-44db-b682-b6bda94f0155
Strict-Transport-Security:max-age=31536000; includeSubDomains
X-Content-Type-Options:nosniff
Date:Wed, 17 Aug 2022 02:05:42 GMT
content-length:0
```

Contributor guide

Open the contributing guide

Research direction

Start at resources.json lines 4376-4413 and compare the documented PATCH responses with the captured disk-scope response. Verify the behavior against the 2021-04-01 and 2021-01-01 API versions; done means the specification accurately represents the observed status and response handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.