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

Swagger specs for all existing versions of Microsoft.PolicyInsights #2523

Merged
merged 9 commits into from
Feb 27, 2018
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"parameters": {
"policyEventsResource": "default",
"subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852",
"api-version": "2017-08-09-preview",
"$from": "2018-02-05T18:00:00Z",
"$filter": "PolicyDefinitionAction eq 'deny'",
"$apply": "aggregate($count as NumDenyEvents)"
},
"responses": {
"200": {
"body": {
"value": [
{
"metadata": {
"generatedQuery": ""
},
"columns": {
"NumDenyEvents": {
"ordinal": 1,
"name": "NumDenyEvents",
"dataType": "Numeric"
}
},
"rows": [
[
40
]
]
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"parameters": {
"policyEventsResource": "default",
"subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852",
"api-version": "2017-08-09-preview",
"$from": "2018-02-05T18:00:00Z",
"$filter": "PolicyDefinitionAction eq 'audit' or PolicyDefinitionAction eq 'deny'",
"$apply": "groupby((PolicyAssignmentId, PolicyDefinitionId, PolicyDefinitionAction, ResourceId), aggregate($count as NumEvents))",
"$top": 2
},
"responses": {
"200": {
"body": {
"value": [
{
"metadata": {
"generatedQuery": ""
},
"columns": {
"PolicyAssignmentId": {
"ordinal": 1,
"name": "PolicyAssignmentId",
"dataType": "String"
},
"PolicyDefinitionId": {
"ordinal": 2,
"name": "PolicyDefinitionId",
"dataType": "String"
},
"PolicyDefinitionAction": {
"ordinal": 3,
"name": "PolicyDefinitionAction",
"dataType": "String"
},
"ResourceId": {
"ordinal": 4,
"name": "ResourceId",
"dataType": "String"
},
"NumEvents": {
"ordinal": 5,
"name": "NumEvents",
"dataType": "Numeric"
}
},
"rows": [
[
"/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29",
"/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1",
"audit",
"/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/resourcescachemonitor/services/myService",
1
],
[
"/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d6be6bb37e5f4333baa95c2a",
"/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/5948d091-78b7-4d3b-a404-cc6a0329b0c6",
"audit",
"/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/resourcescachemonitor/services/myService",
1
]
]
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"parameters": {
"policyEventsResource": "default",
"subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852",
"api-version": "2017-08-09-preview",
"$from": "2018-01-05T18:00:00Z",
"$filter": "PolicyDefinitionAction ne 'audit' and PolicyDefinitionAction ne 'append'",
"$apply": "groupby((PolicyAssignmentId, PolicyDefinitionId, PolicyDefinitionAction, ResourceId))",
"$top": 2
},
"responses": {
"200": {
"body": {
"value": [
{
"metadata": {
"generatedQuery": ""
},
"columns": {
"PolicyAssignmentId": {
"ordinal": 1,
"name": "PolicyAssignmentId",
"dataType": "String"
},
"PolicyDefinitionId": {
"ordinal": 2,
"name": "PolicyDefinitionId",
"dataType": "String"
},
"PolicyDefinitionAction": {
"ordinal": 3,
"name": "PolicyDefinitionAction",
"dataType": "String"
},
"ResourceId": {
"ordinal": 4,
"name": "ResourceId",
"dataType": "String"
}
},
"rows": [
[
"/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.authorization/policyassignments/storageaccountsku",
"/providers/microsoft.authorization/policydefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1",
"deny",
"/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/mysa1"
],
[
"/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup2/providers/microsoft.authorization/policyassignments/da43b50031bf4bce84584faa",
"/providers/microsoft.authorization/policydefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62",
"deny",
"/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup2/providers/microsoft.storage/storageaccounts/mysa2"
]
]
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"parameters": {
"policyEventsResource": "default",
"subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852",
"api-version": "2017-08-09-preview",
"$from": "2018-01-01T00:00:00Z",
"$filter": "PolicyDefinitionAction eq 'deny'",
"$apply": "groupby((PolicyAssignmentId, PolicyDefinitionId, ResourceId))/groupby((PolicyAssignmentId, PolicyDefinitionId), aggregate($count as NumDeniedResources))",
"$orderby": "NumDeniedResources desc",
"$top": 10
},
"responses": {
"200": {
"body": {
"value": [
{
"metadata": {
"generatedQuery": ""
},
"columns": {
"PolicyAssignmentId": {
"ordinal": 1,
"name": "PolicyAssignmentId",
"dataType": "String"
},
"PolicyDefinitionId": {
"ordinal": 2,
"name": "PolicyDefinitionId",
"dataType": "String"
},
"NumDeniedResources": {
"ordinal": 3,
"name": "NumDeniedResources",
"dataType": "Numeric"
}
},
"rows": [
[
"/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/0591f497c35344fcbaf7a393",
"/providers/microsoft.authorization/policydefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c",
3
],
[
"/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/mypolicyassignment2",
"/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mypolicydefinition2",
2
],
[
"/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/mypolicyassignment2",
"/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mypolicydefinition3",
2
],
[
"/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/5bc427ca-0089-4d0d-85bd-e98d1e40b3bf/providers/microsoft.authorization/policyassignments/mypolicyassignment3",
"/providers/microsoft.authorization/policydefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1",
1
],
[
"/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup2/providers/microsoft.authorization/policyassignments/da43b50031bf4bce84584faa",
"/providers/microsoft.authorization/policydefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62",
1
],
[
"/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup2/providers/microsoft.authorization/policyassignments/mypolicyassignment1",
"/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mypolicydefinition1",
1
]
]
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"parameters": {
"api-version": "2017-08-09-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "default/queryResults/action",
"display": {
"provider": "Microsoft Policy Insights",
"resource": "Policy Events",
"operation": "Query Policy Events",
"description": "Query information about policy events."
}
},
{
"name": "default/queryResults/action",
"display": {
"provider": "Microsoft Policy Insights",
"resource": "Policy States",
"operation": "Query Policy States",
"description": "Query information about policy states."
}
},
{
"name": "latest/queryResults/action",
"display": {
"provider": "Microsoft Policy Insights",
"resource": "Policy Latest States",
"operation": "Query Policy Latest States",
"description": "Query information about policy latest states."
}
}
]
}
}
}
}
Loading