You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
Sample Issue Type
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
The text was updated successfully, but these errors were encountered: