Azure / Azure/azure-rest-api-specs
LogAnalytics Microsoft.OperationalInsights/LinkedStorageAccounts@2020-08-01 PUT response.properties.dataSourceType case sensitivity differs with locations
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
## Description
The swagger is [link](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/LinkedStorageAccounts.json#L36-L51)
I try to PUT LinkedStorageAccounts , but the response's datatype case sensitivity differs with locations. The result doesn't change if I use `customlogs` or `CustomLogs` in request. This means sending either `customlogs` or `CustomLogs` to Central US will get `CustomLogs` in response, but `customlogs` for East US.
Below are the payloads
## Request
```
https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/wt-test-app_ins/providers/Microsoft.OperationalInsights/workspaces/exampleworkspace/linkedStorageAccounts/CustomLogs?api-version=2020-08-01
{
"properties": {
"dataSourceType": "CustomLogs",
"storageAccountIds": [
"/subscriptions/{{subscriptionId}}/resourceGroups/wt-test-app_ins/providers/Microsoft.Storage/storageAccounts/wantatexamplesa"
]
}
}
```
## Response of dataSourceType is in Camel Case :
### Central US
```
{
"properties": {
"dataSourceType": "CustomLogs",
"storageAccountIds": [
"/subscriptions/{{subscriptionId}}/resourceGroups/wt-test-app_ins/providers/Microsoft.Storage/storageAccounts/wantatexamplesa"
]
},
"location": "centralus",
"id": "/subscriptions/{{subscriptionId}}/resourceGroups/wt-test-app_ins/providers/Microsoft.OperationalInsights/workspaces/exampleworkspace/linkedstorageaccounts/CustomLogs",
"name": "CustomLogs",
"type": "Microsoft.OperationalInsights/workspaces/linkedstorageaccounts"
}
```
x-ms-request-id: 46407c42-861e-438f-9c49-12725480ca6f
x-ms-correlation-request-id: 46407c42-861e-438f-9c49-12725480ca6f
### SouthEast Asis
```
{
"properties": {
"dataSourceType": "CustomLogs",
"storageAccountIds": [
"/subscriptions/{{subscriptionId}}/resourceGroups/wt-test-app_ins/providers/Microsoft.Storage/storageAccounts/wantatexamplesa"
]
},
"location": "southeastasia",
"id": "/subscriptions/{{subscriptionId}}/resourceGroups/wt-test-app_ins/providers/Microsoft.OperationalInsights/workspaces/exampleworkspace/linkedstorageaccounts/CustomLogs",
"name": "CustomLogs",
"type": "Microsoft.OperationalInsights/workspaces/linkedstorageaccounts"
}
```
x-ms-request-id: 556f0686-acf1-464d-9146-64d2c2b386ad
x-ms-correlation-request-id: 556f0686-acf1-464d-9146-64d2c2b386ad
## Response of dataSourceType is all lower case:
### West Europe
```
{
"properties": {
"dataSourceType": "customlogs",
"storageAccountIds": [
"/subscriptions/{{subscriptionId}}/resourceGroups/wt-test-app_ins/providers/Microsoft.Storage/storageAccounts/wantatexamplesa"
]
},
"id": "/subscriptions/{{subscriptionId}}/resourceGroups/wt-test-app_ins/providers/Microsoft.OperationalInsights/workspaces/exampleworkspace/linkedStorageAccounts/CustomLogs",
"name": "customlogs",
"type": "Microsoft.OperationalInsights/workspaces/linkedStorageAccounts"
}
```
x-ms-request-id: 9c9f0741-f8e8-4fee-9350-c71d39894a35
x-ms-correlation-request-id: aced01f9-926f-403e-ae0b-da6b7c48a538
### East US
```
{
"properties": {
"dataSourceType": "customlogs",
"storageAccountIds": [
"/subscriptions/{{subscriptionId}}/resourceGroups/wt-test-app_ins/providers/Microsoft.Storage/storageAccounts/wantatexamplesa"
]
},
"id": "/subscriptions/{{subscriptionId}}/resourceGroups/wt-test-app_ins/providers/Microsoft.OperationalInsights/workspaces/exampleworkspace/linkedStorageAccounts/CustomLogs",
"name": "customlogs",
"type": "Microsoft.OperationalInsights/workspaces/linkedStorageAccounts"
}
```
x-ms-request-id: b71810b6-4b13-4af4-ae1b-268c85662105
x-ms-correlation-request-id: b09a877e-dd9e-4a47-8996-1bed7ae365eb
Contributor guide
Research direction
Start with specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/LinkedStorageAccounts.json, especially lines 36-51, and compare its schema with the Central US, Southeast Asia, West Europe, and East US payloads in the issue. Determine whether the specification captures the observed casing contract; done should mean the regional discrepancy is resolved or the contract is explicitly represented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100