Azure / Azure/azure-rest-api-specs
`Microsoft.CostManagement/exports@2021-10-01` - All control plane APIs must flow through ARM
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
`Microsoft.CostManagement/exports@2021-10-01` - All control plane APIs must flow through ARM
### Description
In the PUT response header, the location's value does not pass ARM. I mean it should use the public cloud domain (management.azure.com) instead of `costmanagement.trafficmanager.net`.
```
location: https://costmanagement.trafficmanager.net/subscriptions/{subscription_id}/resourceGroups/acctestRG-cm-henglu/providers/Microsoft.CostManagement/exports/firsthenglu2?api-version=2022-10-01
```
```
PUT https://management.azure.com/subscriptions/{subscription_id}/resourceGroups/acctestRG-cm-henglu/providers/Microsoft.CostManagement/exports/firsthenglu2?api-version=2022-10-01 HTTP/2.0
content-type: application/json
user-agent: HashiCorp Terraform/1.5.2 (+https://www.terraform.io) Terraform Plugin SDK/2.8.0 terraform-provider-azapi/dev pid-222c6c49-1b0a-5959-a213-6608f9eb8820
x-ms-correlation-request-id: 544dc2a9-82b5-c46c-3c98-12310ed7d9bc
authorization: Bearer
accept: application/json
content-length: 478
accept-encoding: gzip
{"name":"firsthenglu2","properties":{"definition":{"timeframe":"TheLastMonth","type":"Usage"},"deliveryInfo":{"destination":{"container":"acctestcontainerhenglu","resourceId":"/subscriptions/{subscription_id}/resourceGroups/acctestRG-cm-henglu/providers/Microsoft.Storage/storageAccounts/unlikeaccthenglu"}},"format":"Csv","schedule":{"recurrence":"Monthly","recurrencePeriod":{"from":"2023-12-29T00:00:00Z","to":"2023-12-30T00:00:00Z"},"status":"Inactive"}}}
HTTP/2.0 201
cache-control: no-cache
pragma: no-cache
content-length: 720
content-type: application/json; charset=utf-8
expires: -1
location: https://costmanagement.trafficmanager.net/subscriptions/{subscription_id}/resourceGroups/acctestRG-cm-henglu/providers/Microsoft.CostManagement/exports/firsthenglu2?api-version=2022-10-01
x-ms-ratelimit-remaining-subscription-reads: 11997
session-id: 7d4f06f7-5401-4fb7-9bbc-f908d0da9ceb
x-ms-request-id: 3bb2d72e-8391-4974-b215-de72f2152391
x-ms-correlation-request-id: 544dc2a9-82b5-c46c-3c98-12310ed7d9bc
x-ms-client-request-id: 1c64991d-d572-4fc5-84e5-139ed91f5711
x-powered-by: ASP.NET
x-ms-routing-request-id: SOUTHEASTASIA:20230817T024356Z:e3a77b12-28fe-43c1-b031-0b75982803df
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
date: Thu, 17 Aug 2023 02:43:56 GMT
{"id":"subscriptions/{subscription_id}/resourceGroups/acctestRG-cm-henglu/providers/Microsoft.CostManagement/exports/firsthenglu2","name":"firsthenglu2","type":"Microsoft.CostManagement/exports","eTag":"\"1d9d0b4aa9f206d\"","properties":{"schedule":{"status":"Inactive","recurrence":"Monthly","recurrencePeriod":{"from":"2023-12-29T00:00:00Z","to":"2023-12-30T00:00:00Z"}},"format":"Csv","deliveryInfo":{"destination":{"resourceId":"/subscriptions/{subscription_id}/resourceGroups/acctestRG-cm-henglu/providers/Microsoft.Storage/storageAccounts/unlikeaccthenglu","container":"acctestcontainerhenglu","rootFolderPath":null}},"definition":{"type":"Usage","timeframe":"TheLastMonth"}}}
```
### Details
1. ARM Fully-Qualified Resource Type
```
Microsoft.CostManagement/exports
```
2. API Version
```
2021-10-01
```
### Links
1. [Semantic and Model Violations Reference](https://github.com/Azure/azure-rest-api-specs/blob/main/documentation/Semantic-and-Model-Violations-Reference.md)
2. [S360 action item generator for Swagger issues](https://aka.ms/swaggers360)
Contributor guide
Research direction
Start with the Microsoft.CostManagement exports specification for resource type Microsoft.CostManagement/exports and API version 2021-10-01. Check the Semantic and Model Violations Reference and the linked S360 Swagger issue guidance before tracing the PUT response definition. Done means the Location header uses the public ARM domain, management.azure.com, rather than costmanagement.trafficmanager.net.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100