Skip to content

Commit 7124004

Browse files
LarryZhang19LeiWang3
authored andcommitted
Adding back category level samples (Azure#16389)
* Adding back category level samples Adding back category level samples * Adding reference to newly added sample files Adding reference to newly added sample files * Tries to fix prettier violations * Remove location field for sub/management group level * Tries to fix prettier by converting tab to spaces
1 parent 921f54d commit 7124004

12 files changed

+501
-0
lines changed

specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/diagnosticsSettings_API.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@
7171
"x-ms-examples": {
7272
"Gets the diagnostic setting": {
7373
"$ref": "./examples/getDiagnosticSetting.json"
74+
},
75+
"Gets the diagnostic setting for category": {
76+
"$ref": "./examples/getDiagnosticSettingCategory.json"
7477
}
7578
}
7679
},
@@ -117,6 +120,9 @@
117120
"x-ms-examples": {
118121
"Creates or Updates the diagnostic setting": {
119122
"$ref": "./examples/createOrUpdateDiagnosticSetting.json"
123+
},
124+
"Creates or Updates the diagnostic setting for category": {
125+
"$ref": "./examples/createOrUpdateDiagnosticSettingCategory.json"
120126
}
121127
}
122128
},
@@ -193,6 +199,9 @@
193199
"x-ms-examples": {
194200
"Gets the diagnostic setting": {
195201
"$ref": "./examples/listDiagnosticSettings.json"
202+
},
203+
"Gets the diagnostic setting for category": {
204+
"$ref": "./examples/listDiagnosticSettingsCategory.json"
196205
}
197206
}
198207
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
"parameters": {
3+
"resourceUri": "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6",
4+
"name": "mysetting",
5+
"api-version": "2021-05-01-preview",
6+
"parameters": {
7+
"properties": {
8+
"storageAccountId": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1",
9+
"workspaceId": "",
10+
"eventHubAuthorizationRuleId": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule",
11+
"eventHubName": "myeventhub",
12+
"marketplacePartnerId": "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1",
13+
"metrics": [
14+
{
15+
"category": "WorkflowMetrics",
16+
"enabled": true,
17+
"retentionPolicy": {
18+
"enabled": false,
19+
"days": 0
20+
}
21+
}
22+
],
23+
"logs": [
24+
{
25+
"category": "WorkflowRuntime",
26+
"enabled": true,
27+
"retentionPolicy": {
28+
"enabled": false,
29+
"days": 0
30+
}
31+
}
32+
],
33+
"logAnalyticsDestinationType": "Dedicated"
34+
}
35+
}
36+
},
37+
"responses": {
38+
"200": {
39+
"headers": {},
40+
"body": {
41+
"id": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/mysetting",
42+
"type": "",
43+
"name": "mysetting",
44+
"properties": {
45+
"storageAccountId": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1",
46+
"workspaceId": "",
47+
"eventHubAuthorizationRuleId": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule",
48+
"eventHubName": "myeventhub",
49+
"marketplacePartnerId": "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1",
50+
"metrics": [
51+
{
52+
"category": "WorkflowMetrics",
53+
"enabled": true,
54+
"retentionPolicy": {
55+
"enabled": false,
56+
"days": 0
57+
}
58+
}
59+
],
60+
"logs": [
61+
{
62+
"category": "WorkflowRuntime",
63+
"enabled": true,
64+
"retentionPolicy": {
65+
"enabled": false,
66+
"days": 0
67+
}
68+
}
69+
],
70+
"logAnalyticsDestinationType": "Dedicated"
71+
}
72+
}
73+
}
74+
}
75+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"parameters": {
3+
"managementGroupId": "testChildMG7",
4+
"name": "setting1",
5+
"api-version": "2021-05-01-preview",
6+
"parameters": {
7+
"properties": {
8+
"storageAccountId": "/subscriptions/bfaef57f-297e-4210-bfe5-27c18cc671f7/resourceGroups/FuncAppRunners/providers/Microsoft.Storage/storageAccounts/testpersonalb6a5",
9+
"workspaceId": "/subscriptions/9cf7cc0a-0ba1-4624-bc82-97e1ee25dc45/resourceGroups/mgTest/providers/Microsoft.OperationalInsights/workspaces/mgTestWorkspace",
10+
"eventHubAuthorizationRuleId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule",
11+
"eventHubName": "myeventhub",
12+
"marketplacePartnerId": "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1",
13+
"logs": [
14+
{
15+
"category": "Administrative",
16+
"enabled": true
17+
},
18+
{
19+
"category": "Policy",
20+
"enabled": true
21+
}
22+
]
23+
}
24+
}
25+
},
26+
"responses": {
27+
"200": {
28+
"headers": {},
29+
"body": {
30+
"id": "providers/Microsoft.Management/managementGroups/testChildMG7/providers/microsoft.insights/diagnosticSettings/setting1",
31+
"type": "Microsoft.Insights/diagnosticSettings",
32+
"name": "setting1",
33+
"properties": {
34+
"storageAccountId": "/subscriptions/bfaef57f-297e-4210-bfe5-27c18cc671f7/resourceGroups/FuncAppRunners/providers/Microsoft.Storage/storageAccounts/testpersonalb6a5",
35+
"workspaceId": "/subscriptions/9cf7cc0a-0ba1-4624-bc82-97e1ee25dc45/resourceGroups/mgTest/providers/Microsoft.OperationalInsights/workspaces/mgTestWorkspace",
36+
"eventHubAuthorizationRuleId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule",
37+
"marketplacePartnerId": "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1",
38+
"logs": [
39+
{
40+
"category": "Administrative",
41+
"enabled": true
42+
},
43+
{
44+
"category": "Policy",
45+
"enabled": true
46+
}
47+
]
48+
}
49+
}
50+
}
51+
}
52+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "fb9f25f9-5785-4510-a38f-a62f188eb9f8",
4+
"name": "ds4",
5+
"api-version": "2021-05-01-preview",
6+
"parameters": {
7+
"properties": {
8+
"storageAccountId": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1",
9+
"workspaceId": "",
10+
"eventHubAuthorizationRuleId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule",
11+
"eventHubName": "myeventhub",
12+
"marketplacePartnerId": "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1",
13+
"logs": [
14+
{
15+
"category": "Security",
16+
"enabled": true
17+
}
18+
]
19+
}
20+
}
21+
},
22+
"responses": {
23+
"200": {
24+
"headers": {},
25+
"body": {
26+
"id": "subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/providers/AzureResourceManager/diagnosticSettings/ds4",
27+
"type": null,
28+
"name": "ds4",
29+
"properties": {
30+
"storageAccountId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1",
31+
"workspaceId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/apptest/providers/Microsoft.OperationalInsights/workspaces/test1",
32+
"eventHubAuthorizationRuleId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/apptest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule",
33+
"marketplacePartnerId": "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1",
34+
"logs": [
35+
{
36+
"category": "Security",
37+
"enabled": true
38+
},
39+
{
40+
"category": "Administrative",
41+
"enabled": true
42+
},
43+
{
44+
"category": "ServiceHealth",
45+
"enabled": true
46+
},
47+
{
48+
"category": "Alert",
49+
"enabled": true
50+
},
51+
{
52+
"category": "Recommendation",
53+
"enabled": true
54+
},
55+
{
56+
"category": "Policy",
57+
"enabled": true
58+
},
59+
{
60+
"category": "Autoscale",
61+
"enabled": true
62+
},
63+
{
64+
"category": "ResourceHealth",
65+
"enabled": true
66+
}
67+
]
68+
}
69+
}
70+
}
71+
}
72+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"parameters": {
3+
"resourceUri": "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6",
4+
"name": "mysetting",
5+
"api-version": "2021-05-01-preview"
6+
},
7+
"responses": {
8+
"200": {
9+
"headers": {},
10+
"body": {
11+
"id": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service",
12+
"type": "",
13+
"name": "mysetting",
14+
"properties": {
15+
"storageAccountId": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1",
16+
"workspaceId": "",
17+
"eventHubAuthorizationRuleId": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule",
18+
"marketplacePartnerId": "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1",
19+
"metrics": [
20+
{
21+
"category": "WorkflowMetrics",
22+
"enabled": true,
23+
"retentionPolicy": {
24+
"enabled": false,
25+
"days": 0
26+
}
27+
}
28+
],
29+
"logs": [
30+
{
31+
"category": "WorkflowRuntime",
32+
"enabled": true,
33+
"retentionPolicy": {
34+
"enabled": false,
35+
"days": 0
36+
}
37+
}
38+
]
39+
}
40+
}
41+
}
42+
}
43+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"parameters": {
3+
"managementGroupId": "testChildMG7",
4+
"name": "setting1",
5+
"api-version": "2021-05-01-preview"
6+
},
7+
"responses": {
8+
"200": {
9+
"headers": {},
10+
"body": {
11+
"id": "providers/Microsoft.Management/managementGroups/testChildMG7/providers/microsoft.insights/diagnosticSettings/setting1",
12+
"type": "Microsoft.Insights/diagnosticSettings",
13+
"name": "setting1",
14+
"properties": {
15+
"storageAccountId": "/subscriptions/bfaef57f-297e-4210-bfe5-27c18cc671f7/resourceGroups/FuncAppRunners/providers/Microsoft.Storage/storageAccounts/testpersonalb6a5",
16+
"workspaceId": "/subscriptions/9cf7cc0a-0ba1-4624-bc82-97e1ee25dc45/resourceGroups/mgTest/providers/Microsoft.OperationalInsights/workspaces/mgTestWorkspace",
17+
"eventHubAuthorizationRuleId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule",
18+
"marketplacePartnerId": "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1",
19+
"logs": [
20+
{
21+
"category": "Administrative",
22+
"enabled": true
23+
},
24+
{
25+
"category": "Policy",
26+
"enabled": true
27+
}
28+
]
29+
}
30+
}
31+
}
32+
}
33+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "fb9f25f9-5785-4510-a38f-a62f188eb9f8",
4+
"name": "mysetting",
5+
"api-version": "2021-05-01-preview"
6+
},
7+
"responses": {
8+
"200": {
9+
"headers": {},
10+
"body": {
11+
"id": "subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/providers/AzureResourceManager/diagnosticSettings/ds4",
12+
"type": null,
13+
"name": "ds4",
14+
"properties": {
15+
"storageAccountId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1",
16+
"workspaceId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/apptest/providers/Microsoft.OperationalInsights/workspaces/test1",
17+
"eventHubAuthorizationRuleId": "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/apptest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule",
18+
"marketplacePartnerId": "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1",
19+
"logs": [
20+
{
21+
"category": "Security",
22+
"enabled": true
23+
},
24+
{
25+
"category": "Administrative",
26+
"enabled": true
27+
},
28+
{
29+
"category": "ServiceHealth",
30+
"enabled": true
31+
},
32+
{
33+
"category": "Alert",
34+
"enabled": true
35+
},
36+
{
37+
"category": "Recommendation",
38+
"enabled": true
39+
},
40+
{
41+
"category": "Policy",
42+
"enabled": true
43+
},
44+
{
45+
"category": "Autoscale",
46+
"enabled": true
47+
},
48+
{
49+
"category": "ResourceHealth",
50+
"enabled": true
51+
}
52+
]
53+
}
54+
}
55+
}
56+
}
57+
}

0 commit comments

Comments
 (0)