Microsoft.Insights/diagnosticSettings@2021-05-01-preview
- logAnalyticsDestinationType
break PUT-GET consistency
#22400
Labels
Background
Under some situation when set
logAnalyticsDestinationType
asDedicated
, the API returnsnull
, and when setlogAnalyticsDestinationType
asnull
(or not set), the API returnsAzureDiagnostics
. This breaks PUT-GET consistency, see roundtrip_inconsistent_property. The diagnostic setting can be used for many target resource, it is hard to fully test all the situation. Below shows two cases:AzureDiagnostics
orDedicated
, GETnull
null
, GETAzureDiagnostics
. But PUTAzureDiagnostics
orDedicated
can work well.swagger:
azure-rest-api-specs/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/diagnosticsSettings_API.json
Lines 323 to 327 in e0a8a42
API flow 1, target KeyVault, PUT
AzureDiagnostics
orDedicated
, GETnull
PUT https://management.azure.com/subscriptions/XXXX/resourceGroups/wt-diagnostic-resources/providers/Microsoft.KeyVault/vaults/wtexpkeyvault/providers/microsoft.insights/diagnosticSettings/exp?api-version=2021-05-01-preview
x-ms-request-id: 34a48570-6b21-49fd-af95-f611c88ec97f
x-ms-correlation-request-id: 04fe903c-847d-427c-b23b-9ed8c53966b9
payload
200 OK
GET https://management.azure.com/subscriptions/XXXX/resourceGroups/wt-diagnostic-resources/providers/Microsoft.KeyVault/vaults/wtexpkeyvault/providers/microsoft.insights/diagnosticSettings/exp?api-version=2021-05-01-preview
x-ms-request-id: 1cb12d3e-463e-4a4d-9a8c-d1c963a2c4e3
x-ms-correlation-request-id: f430d3e4-c539-4cc5-b4be-78d3585e7322
200 OK
payload
API flow 2, target DataFactory (V2), PUT
null
, GETAzureDiagnostics
. But PUTAzureDiagnostics
orDedicated
can work wellPUT https://management.azure.com/subscriptions/XXXX/resourceGroups/wt-diagnostic-resources/providers/Microsoft.DataFactory/factories/wt-acctest/providers/microsoft.insights/diagnosticSettings/wt-datafac-DS?api-version=2021-05-01-preview
x-ms-request-id: d738f84e-cf08-449a-a370-7b328ed7e3bd
x-ms-correlation-request-id: f65996b6-3bf5-492f-bf1c-b6a7734d8bdd
payload
200 OK
GET https://management.azure.com/subscriptions/XXXX/resourceGroups/wt-diagnostic-resources/providers/Microsoft.DataFactory/factories/wt-acctest/providers/microsoft.insights/diagnosticSettings/wt-datafac-DS?api-version=2021-05-01-preview
x-ms-request-id: f667dc88-c6e5-4eb1-ab12-e4685b271b42
x-ms-correlation-request-id: b438f808-33c0-4d7e-b93a-d1d82b4581a2
200 OK
payload
The text was updated successfully, but these errors were encountered: