Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
MIT License
2.69k stars 5.12k forks source link

[BUG] Azure Log Analytics - Operations Management - SolutionGet : creationTime, lastModifiedTime #31186

Open dj-r1 opened 1 month ago

dj-r1 commented 1 month ago

API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/operationsmanagement/resource-manager/Microsoft.OperationsManagement/preview/2015-11-01-preview/OperationsManagement.json

API Spec version

2015-11-01-preview

Describe the bug

As example SolutionGet.json response describing a resource should be without properties.creationTime and properties.lastModifiedTime.

I found it with ARM template resource definition Microsoft.OperationsManagement/solutions and What-If operation.

It's valid to (Log Analytics) Operations Management solutions like: AzureActivity, Containers, SecurityCenterFree, SQLAdvancedThreatProtection, SQLVulnerabilityAssessment.

Expected behavior

{
  "id": "/subscriptions/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb/resourceGroups/my-rg/providers/Microsoft.OperationsManagement/solutions/Containers(my-log-analytics-workspace)",
  "location": "europe",
  "name": "Containers(my-log-analytics-workspace)",
  "plan": {
    "name": "Containers(my-log-analytics-workspace)",
    "product": "OMSGallery/Containers",
    "promotionCode": "",
    "publisher": "Microsoft"
  },
  "properties": {
    "containedResources": [
      "/subscriptions/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb/resourceGroups/my-rg/providers/Microsoft.OperationalInsights/workspaces/my-log-analytics-workspace/views/Containers(my-log-analytics-workspace)"
    ],
    "provisioningState": "Succeeded",
    "workspaceResourceId": "/subscriptions/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb/resourceGroups/my-rg/providers/Microsoft.OperationalInsights/workspaces/my-log-analytics-workspace"
  },
  "tags": {},
  "type": "Microsoft.OperationsManagement/solutions"
}

Actual behavior

{
  "id": "/subscriptions/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb/resourceGroups/my-rg/providers/Microsoft.OperationsManagement/solutions/Containers(my-log-analytics-workspace)",
  "location": "europe",
  "name": "Containers(my-log-analytics-workspace)",
  "plan": {
    "name": "Containers(my-log-analytics-workspace)",
    "product": "OMSGallery/Containers",
    "promotionCode": "",
    "publisher": "Microsoft"
  },
  "properties": {
    "containedResources": [
      "/subscriptions/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb/resourceGroups/my-rg/providers/Microsoft.OperationalInsights/workspaces/my-log-analytics-workspace/views/Containers(my-log-analytics-workspace)"
    ],
    "creationTime": "Fri, 14 Jul 2023 10:47:14 GMT",
    "lastModifiedTime": "Mon, 21 Oct 2024 07:11:23 GMT",
    "provisioningState": "Succeeded",
    "workspaceResourceId": "/subscriptions/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb/resourceGroups/my-rg/providers/Microsoft.OperationalInsights/workspaces/my-log-analytics-workspace"
  },
  "tags": {},
  "type": "Microsoft.OperationsManagement/solutions"
}

Reproduction Steps

az rest --method get --header "Accept=application/json" --url 'https://management.azure.com/subscriptions/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb/resourceGroups/my-rg/providers/Microsoft.OperationsManagement/solutions/Containers%28my-log-analytics-workspace%29?api-version=2015-11-01-preview' I had to change brackets in ( and ) in url due to ASCII encoding to %28, %29 || GET https://management.azure.com/subscriptions/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb/resourceGroups/my-rg/providers/Microsoft.OperationsManagement/solutions/Containers(my-log-analytics-workspace)?api-version=2015-11-01-preview

In az monitor log-analytics solution show --name Containers(my-log-analytics-workspace) --resource-group my-rg I couldn't clarify a name parameter even though using it after az monitor log-analytics solution list --resource-group my-rg. I couldn't find it in Azure REST API specification.

Environment

No response

v-jiaodi commented 4 weeks ago

@marstr Please help take a look, thanks.

marstr commented 4 weeks ago

Hi @v-jiaodi,

You are likely seeing my name associated with this file because nearly 7 years ago I did a refactor that touched every file in this repository. I have no domain knowledge or assigned accountability in this space.

Please unassign me and find a more appropriate owner.