Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to update multiple diagnostic setting categories #2869

Open
2 of 9 tasks
jmusunuru opened this issue May 26, 2023 · 0 comments
Open
2 of 9 tasks

Unable to update multiple diagnostic setting categories #2869

jmusunuru opened this issue May 26, 2023 · 0 comments
Assignees
Labels
customer-reported needs-triage question Further information is requested

Comments

@jmusunuru
Copy link

Link to sample

https://learn.microsoft.com/en-us/rest/api/monitor/diagnostic-settings/create-or-update?tabs=dotnet

Library name and version

Azure.ResourceManager.Monitor

Language of the Sample

  • C#/.NET
  • Java
  • JavaScript/TypedScript
  • Python
  • Golang
  • Other - Please specify in Issue details field

Sample Issue Type

  • Sample not working
  • Sample missing
  • Do not understand sample

Issue details

I want to update multiple diagnostic setting categories using DiagnosticSettingData class. Right now it is only possible to update one category at a time whereas using the Management API (Microsoft.Insights/diagnosticSettings/{name}) I can update multiple categories at a time.

"logs": [
{
"category": "StorageRead",
"enabled": true,
"retentionPolicy": {
"enabled": false,
"days": 0
}
},
{
"category": "StorageWrite",
"enabled": true,
"retentionPolicy": {
"enabled": false,
"days": 0
}
}
] - This is possible through API

Logs =
{
new LogSettings(true)
{
CategoryGroup = "allLogs",
RetentionPolicy = new RetentionPolicy(false,0),
}
} - Through SDK I can only set one category

Did anyone in the community come across the same issue and has a solution?

Expected behavior

No response

Actual behavior

No response

Reproduction Steps

No response

Environment

No response

@ghost ghost added needs-triage question Further information is requested customer-reported labels May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported needs-triage question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants