From 1a6e1a0fe97a248cfea4062bc096bcdadc6d23fc Mon Sep 17 00:00:00 2001 From: Bulent Elmaci Date: Wed, 21 Feb 2018 12:11:48 -0800 Subject: [PATCH 01/13] Swagger specs for all existing versions of Microsoft.PolicyInsights --- .../examples/FilterAndAggregateOnly.json | 35 + .../FilterAndGroupByWithAggregate.json | 67 + .../FilterAndGroupByWithoutAggregate.json | 60 + .../examples/FilterAndMultipleGroups.json | 74 + .../examples/ListOperations.json | 40 + .../examples/QueryManagementGroupScope.json | 217 +++ .../examples/QueryNestedResourceScope.json | 217 +++ .../examples/QueryResourceGroupScope.json | 218 +++ .../examples/QueryResourceScope.json | 217 +++ ...ySubscriptionLevelNestedResourceScope.json | 217 +++ .../QuerySubscriptionLevelResourceScope.json | 217 +++ .../examples/QuerySubscriptionScope.json | 217 +++ .../examples/TimeRangeSortSelectTop.json | 75 + .../2017-08-09-preview/policyEvents.json | 665 +++++++++ .../examples/FilterAndAggregateOnly.json | 25 + .../FilterAndGroupByWithAggregate.json | 39 + .../FilterAndGroupByWithoutAggregate.json | 37 + .../examples/FilterAndMultipleGroups.json | 64 + .../examples/GetMetadata.json | 95 ++ .../examples/ListOperations.json | 41 + .../examples/QueryManagementGroupScope.json | 79 + .../examples/QueryNestedResourceScope.json | 79 + .../examples/QueryResourceGroupScope.json | 80 + .../examples/QueryResourceScope.json | 79 + ...ySubscriptionLevelNestedResourceScope.json | 79 + .../QuerySubscriptionLevelResourceScope.json | 79 + .../examples/QuerySubscriptionScope.json | 79 + .../examples/TimeRangeSortSelectTop.json | 42 + .../2017-10-17-preview/policyEvents.json | 689 +++++++++ .../examples/FilterAndAggregateOnly.json | 25 + .../FilterAndGroupByWithAggregate.json | 39 + .../FilterAndGroupByWithoutAggregate.json | 37 + .../examples/FilterAndMultipleGroups.json | 64 + .../examples/GetMetadata.json | 95 ++ .../examples/ListOperations.json | 50 + .../examples/QueryManagementGroupScope.json | 79 + .../examples/QueryNestedResourceScope.json | 79 + ...sourceGroupLevelPolicyAssignmentScope.json | 79 + .../examples/QueryResourceGroupScope.json | 80 + .../examples/QueryResourceScope.json | 79 + ...ySubscriptionLevelNestedResourceScope.json | 79 + ...ubscriptionLevelPolicyAssignmentScope.json | 79 + ...ubscriptionLevelPolicyDefinitionScope.json | 79 + ...criptionLevelPolicySetDefinitionScope.json | 79 + .../QuerySubscriptionLevelResourceScope.json | 79 + .../examples/QuerySubscriptionScope.json | 79 + .../examples/TimeRangeSortSelectTop.json | 42 + .../2017-12-12-preview/policyEvents.json | 882 +++++++++++ .../examples/FilterAndAggregateOnly.json | 35 + .../FilterAndGroupByWithAggregate.json | 68 + .../FilterAndGroupByWithoutAggregate.json | 60 + .../examples/FilterAndMultipleGroups.json | 123 ++ .../examples/ListOperations.json | 40 + .../examples/QueryManagementGroupScope.json | 203 +++ .../examples/QueryNestedResourceScope.json | 203 +++ .../examples/QueryResourceGroupScope.json | 204 +++ .../examples/QueryResourceScope.json | 203 +++ ...ySubscriptionLevelNestedResourceScope.json | 203 +++ .../QuerySubscriptionLevelResourceScope.json | 203 +++ .../examples/QuerySubscriptionScope.json | 203 +++ .../examples/TimeRangeSortSelectTop.json | 75 + .../2017-08-09-preview/policyStates.json | 662 +++++++++ .../examples/FilterAndAggregateOnly.json | 25 + .../FilterAndGroupByWithAggregate.json | 40 + .../FilterAndGroupByWithoutAggregate.json | 37 + .../examples/FilterAndMultipleGroups.json | 111 ++ .../examples/GetMetadata.json | 120 ++ .../examples/ListOperations.json | 41 + .../examples/QueryManagementGroupScope.json | 75 + .../examples/QueryNestedResourceScope.json | 75 + .../examples/QueryResourceGroupScope.json | 76 + .../examples/QueryResourceScope.json | 75 + ...ySubscriptionLevelNestedResourceScope.json | 75 + .../QuerySubscriptionLevelResourceScope.json | 75 + .../examples/QuerySubscriptionScope.json | 75 + .../examples/TimeRangeSortSelectTop.json | 42 + .../2017-10-17-preview/policyStates.json | 686 +++++++++ .../examples/FilterAndAggregateOnly.json | 25 + .../FilterAndGroupByWithAggregate.json | 40 + .../FilterAndGroupByWithoutAggregate.json | 37 + .../examples/FilterAndMultipleGroups.json | 111 ++ .../examples/GetMetadata.json | 167 +++ .../examples/ListOperations.json | 50 + .../examples/QueryManagementGroupScope.json | 75 + .../examples/QueryNestedResourceScope.json | 75 + ...sourceGroupLevelPolicyAssignmentScope.json | 75 + .../examples/QueryResourceGroupScope.json | 76 + .../examples/QueryResourceScope.json | 75 + ...ySubscriptionLevelNestedResourceScope.json | 75 + ...ubscriptionLevelPolicyAssignmentScope.json | 75 + ...ubscriptionLevelPolicyDefinitionScope.json | 75 + ...criptionLevelPolicySetDefinitionScope.json | 75 + .../QuerySubscriptionLevelResourceScope.json | 75 + .../examples/QuerySubscriptionScope.json | 75 + .../SummarizeManagementGroupScope.json | 31 + .../SummarizePolicyAssignmentScope.json | 71 + .../SummarizePolicyDefinitionScope.json | 104 ++ .../SummarizePolicySetDefinitionScope.json | 31 + .../examples/SummarizeResourceGroupScope.json | 67 + .../examples/SummarizeResourceScope.json | 334 +++++ .../examples/SummarizeSubscriptionScope.json | 140 ++ .../examples/TimeRangeSortSelectTop.json | 42 + .../2017-12-12-preview/policyStates.json | 1324 +++++++++++++++++ .../policyinsights/resource-manager/readme.md | 205 +++ 104 files changed, 13944 insertions(+) create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndAggregateOnly.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndGroupByWithAggregate.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndGroupByWithoutAggregate.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndMultipleGroups.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/ListOperations.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryManagementGroupScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryNestedResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryResourceGroupScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QuerySubscriptionLevelNestedResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QuerySubscriptionLevelResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QuerySubscriptionScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/TimeRangeSortSelectTop.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/policyEvents.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndAggregateOnly.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndGroupByWithAggregate.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndGroupByWithoutAggregate.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndMultipleGroups.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/GetMetadata.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/ListOperations.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryNestedResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryResourceGroupScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionLevelNestedResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionLevelResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/TimeRangeSortSelectTop.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/policyEvents.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndAggregateOnly.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndGroupByWithAggregate.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndGroupByWithoutAggregate.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndMultipleGroups.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/GetMetadata.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/ListOperations.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryNestedResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelNestedResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/TimeRangeSortSelectTop.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/policyEvents.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndAggregateOnly.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndGroupByWithAggregate.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndGroupByWithoutAggregate.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndMultipleGroups.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/ListOperations.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryManagementGroupScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryNestedResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryResourceGroupScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QuerySubscriptionLevelNestedResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QuerySubscriptionLevelResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QuerySubscriptionScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/TimeRangeSortSelectTop.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/policyStates.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndAggregateOnly.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndGroupByWithAggregate.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndGroupByWithoutAggregate.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndMultipleGroups.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/GetMetadata.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/ListOperations.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryNestedResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryResourceGroupScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionLevelNestedResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionLevelResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/TimeRangeSortSelectTop.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/policyStates.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndAggregateOnly.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndGroupByWithAggregate.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndGroupByWithoutAggregate.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndMultipleGroups.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/GetMetadata.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/ListOperations.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryNestedResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelNestedResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeManagementGroupScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicyAssignmentScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicyDefinitionScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicySetDefinitionScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceGroupScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionScope.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/TimeRangeSortSelectTop.json create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/policyStates.json create mode 100644 specification/policyinsights/resource-manager/readme.md diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndAggregateOnly.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndAggregateOnly.json new file mode 100644 index 000000000000..19fdfe3892a1 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndAggregateOnly.json @@ -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 + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndGroupByWithAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndGroupByWithAggregate.json new file mode 100644 index 000000000000..0f6f72e9a190 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndGroupByWithAggregate.json @@ -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 + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndGroupByWithoutAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndGroupByWithoutAggregate.json new file mode 100644 index 000000000000..b26724d30dde --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndGroupByWithoutAggregate.json @@ -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" + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndMultipleGroups.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndMultipleGroups.json new file mode 100644 index 000000000000..0c5811bc5d1f --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndMultipleGroups.json @@ -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 + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/ListOperations.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/ListOperations.json new file mode 100644 index 000000000000..d5a2b53cb332 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/ListOperations.json @@ -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." + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryManagementGroupScope.json new file mode 100644 index 000000000000..574fe6fb143f --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryManagementGroupScope.json @@ -0,0 +1,217 @@ +{ + "parameters": { + "policyEventsResource": "default", + "managementGroupId": "providers/Microsoft.Management/managementGroups/myManagementGroup", + "api-version": "2017-08-09-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "metadata": { + "generatedQuery": "" + }, + "columns": { + "Timestamp": { + "ordinal": 1, + "name": "Timestamp", + "dataType": "DateTime" + }, + "ResourceId": { + "ordinal": 2, + "name": "ResourceId", + "dataType": "String" + }, + "PolicyAssignmentId": { + "ordinal": 3, + "name": "PolicyAssignmentId", + "dataType": "String" + }, + "PolicyDefinitionId": { + "ordinal": 4, + "name": "PolicyDefinitionId", + "dataType": "String" + }, + "EffectiveParameters": { + "ordinal": 5, + "name": "EffectiveParameters", + "dataType": "String" + }, + "IsCompliant": { + "ordinal": 6, + "name": "IsCompliant", + "dataType": "Boolean" + }, + "SubscriptionId": { + "ordinal": 7, + "name": "SubscriptionId", + "dataType": "String" + }, + "ResourceType": { + "ordinal": 8, + "name": "ResourceType", + "dataType": "String" + }, + "ResourceLocation": { + "ordinal": 9, + "name": "ResourceLocation", + "dataType": "String" + }, + "ResourceGroup": { + "ordinal": 10, + "name": "ResourceGroup", + "dataType": "String" + }, + "ResourceTags": { + "ordinal": 11, + "name": "ResourceTags", + "dataType": "String" + }, + "PolicyAssignmentName": { + "ordinal": 12, + "name": "PolicyAssignmentName", + "dataType": "String" + }, + "PolicyAssignmentOwner": { + "ordinal": 13, + "name": "PolicyAssignmentOwner", + "dataType": "String" + }, + "PolicyAssignmentParameters": { + "ordinal": 14, + "name": "PolicyAssignmentParameters", + "dataType": "String" + }, + "PolicyAssignmentScope": { + "ordinal": 15, + "name": "PolicyAssignmentScope", + "dataType": "String" + }, + "PolicyDefinitionName": { + "ordinal": 16, + "name": "PolicyDefinitionName", + "dataType": "String" + }, + "PolicyDefinitionAction": { + "ordinal": 17, + "name": "PolicyDefinitionAction", + "dataType": "String" + }, + "PolicyDefinitionCategory": { + "ordinal": 18, + "name": "PolicyDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionId": { + "ordinal": 19, + "name": "PolicySetDefinitionId", + "dataType": "String" + }, + "PolicySetDefinitionName": { + "ordinal": 20, + "name": "PolicySetDefinitionName", + "dataType": "String" + }, + "PolicySetDefinitionOwner": { + "ordinal": 21, + "name": "PolicySetDefinitionOwner", + "dataType": "String" + }, + "PolicySetDefinitionCategory": { + "ordinal": 22, + "name": "PolicySetDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionParameters": { + "ordinal": 23, + "name": "PolicySetDefinitionParameters", + "dataType": "String" + }, + "ManagementGroupIds": { + "ordinal": 24, + "name": "ManagementGroupIds", + "dataType": "String" + }, + "PolicyDefinitionReferenceId": { + "ordinal": 25, + "name": "PolicyDefinitionReferenceId", + "dataType": "String" + }, + "TenantId": { + "ordinal": 26, + "name": "TenantId", + "dataType": "String" + }, + "PrincipalOid": { + "ordinal": 27, + "name": "PrincipalOid", + "dataType": "String" + } + }, + "rows": [ + [ + "2018-02-05T22:54:39.8128521Z", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.OperationalInsights/workspaces/myWorkspace", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/fff5d536aec743a0aa801c1a", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/fffd9357-fff0-fff7-fff4-fff30ce4c32d", + null, + false, + "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "/Microsoft.OperationalInsights/workspaces", + "canadacentral", + "myResourceGroup", + "tbd", + "fff5d536aec743a0aa801c1a", + "tbd", + "{}", + "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "fffd9357-fff0-fff7-fff4-fff30ce4c32d", + "audit", + "tbd", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/fffcefd2-fff6-ffff-fff4-fffa170eb1d5", + "fffcefd2-fff6-ffff-fff4-fffa170eb1d5", + null, + null, + null, + "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "fff21232277412542086", + "fff988bf-fff1-ffff-fffb-fffcd011db47", + "ffffb743-fff5-fff7-fffe-fffc2444f333" + ], + [ + "2018-02-05T22:54:39.8128521Z", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.OperationalInsights/workspaces/myWorkspace", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/fff16fce53454b15a7ed803d", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/fff0414b-fff4-fffd-fff5-fff79a89232c", + null, + false, + "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "/Microsoft.OperationalInsights/workspaces", + "canadacentral", + "myResourceGroup", + "tbd", + "fff16fce53454b15a7ed803d", + "tbd", + "{\"allowedLocations\":{\"value\":[\"eastus\"]}}", + "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "fff0414b-fff4-fffd-fff5-fff79a89232c", + "audit", + "tbd", + "", + "", + null, + null, + null, + "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "", + "fff988bf-fff1-ffff-fffb-fffcd011db47", + "ffffb743-fff5-fff7-fffe-fffc2444f333" + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryNestedResourceScope.json new file mode 100644 index 000000000000..108398679652 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryNestedResourceScope.json @@ -0,0 +1,217 @@ +{ + "parameters": { + "policyEventsResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "api-version": "2017-08-09-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "metadata": { + "generatedQuery": "" + }, + "columns": { + "Timestamp": { + "ordinal": 1, + "name": "Timestamp", + "dataType": "DateTime" + }, + "ResourceId": { + "ordinal": 2, + "name": "ResourceId", + "dataType": "String" + }, + "PolicyAssignmentId": { + "ordinal": 3, + "name": "PolicyAssignmentId", + "dataType": "String" + }, + "PolicyDefinitionId": { + "ordinal": 4, + "name": "PolicyDefinitionId", + "dataType": "String" + }, + "EffectiveParameters": { + "ordinal": 5, + "name": "EffectiveParameters", + "dataType": "String" + }, + "IsCompliant": { + "ordinal": 6, + "name": "IsCompliant", + "dataType": "Boolean" + }, + "SubscriptionId": { + "ordinal": 7, + "name": "SubscriptionId", + "dataType": "String" + }, + "ResourceType": { + "ordinal": 8, + "name": "ResourceType", + "dataType": "String" + }, + "ResourceLocation": { + "ordinal": 9, + "name": "ResourceLocation", + "dataType": "String" + }, + "ResourceGroup": { + "ordinal": 10, + "name": "ResourceGroup", + "dataType": "String" + }, + "ResourceTags": { + "ordinal": 11, + "name": "ResourceTags", + "dataType": "String" + }, + "PolicyAssignmentName": { + "ordinal": 12, + "name": "PolicyAssignmentName", + "dataType": "String" + }, + "PolicyAssignmentOwner": { + "ordinal": 13, + "name": "PolicyAssignmentOwner", + "dataType": "String" + }, + "PolicyAssignmentParameters": { + "ordinal": 14, + "name": "PolicyAssignmentParameters", + "dataType": "String" + }, + "PolicyAssignmentScope": { + "ordinal": 15, + "name": "PolicyAssignmentScope", + "dataType": "String" + }, + "PolicyDefinitionName": { + "ordinal": 16, + "name": "PolicyDefinitionName", + "dataType": "String" + }, + "PolicyDefinitionAction": { + "ordinal": 17, + "name": "PolicyDefinitionAction", + "dataType": "String" + }, + "PolicyDefinitionCategory": { + "ordinal": 18, + "name": "PolicyDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionId": { + "ordinal": 19, + "name": "PolicySetDefinitionId", + "dataType": "String" + }, + "PolicySetDefinitionName": { + "ordinal": 20, + "name": "PolicySetDefinitionName", + "dataType": "String" + }, + "PolicySetDefinitionOwner": { + "ordinal": 21, + "name": "PolicySetDefinitionOwner", + "dataType": "String" + }, + "PolicySetDefinitionCategory": { + "ordinal": 22, + "name": "PolicySetDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionParameters": { + "ordinal": 23, + "name": "PolicySetDefinitionParameters", + "dataType": "String" + }, + "ManagementGroupIds": { + "ordinal": 24, + "name": "ManagementGroupIds", + "dataType": "String" + }, + "PolicyDefinitionReferenceId": { + "ordinal": 25, + "name": "PolicyDefinitionReferenceId", + "dataType": "String" + }, + "TenantId": { + "ordinal": 26, + "name": "TenantId", + "dataType": "String" + }, + "PrincipalOid": { + "ordinal": 27, + "name": "PrincipalOid", + "dataType": "String" + } + }, + "rows": [ + [ + "2018-02-05T23:24:28.4444412Z", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/fffc58b7db524a9799381531", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/fff79b49-fff9-fff5-fffe-fff49ab8b474", + null, + false, + "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "/Microsoft.ServiceFabric/clusters/applications", + "eastus", + "myResourceGroup", + "tbd", + "fffc58b7db524a9799381531", + "tbd", + "{\"TAGNAME_1\":{\"value\":\"NA\"}}", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "fff79b49-fff9-fff5-fffe-fff49ab8b474", + "audit", + "tbd", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policySetDefinitions/fff58873-fff8-fff5-fffc-fffbe7c9d697", + "fff58873-fff8-fff5-fffc-fffbe7c9d697", + null, + null, + null, + "", + "2124621540977569058", + "fff988bf-fff1-ffff-fffb-fffcd011db47", + "fff3809a-fffc-fffe-fff1-fffe57573195" + ], + [ + "2018-02-05T23:24:28.4444412Z", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/fff044306c044a1d8c0ff76c", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/fffd9357-fff0-fff7-fff4-fff30ce4c32d", + null, + false, + "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "/Microsoft.ServiceFabric/clusters/applications", + "eastus", + "myResourceGroup", + "tbd", + "fff044306c044a1d8c0ff76c", + "tbd", + "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "fffd9357-fff0-fff7-fff4-fff30ce4c32d", + "audit", + "tbd", + "", + "", + null, + null, + null, + "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "", + "fff988bf-fff1-ffff-fffb-fffcd011db47", + "fff3809a-fffc-fffe-fff1-fffe57573195" + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryResourceGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryResourceGroupScope.json new file mode 100644 index 000000000000..de3ef8f85c41 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryResourceGroupScope.json @@ -0,0 +1,218 @@ +{ + "parameters": { + "policyEventsResource": "default", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceGroupName": "myResourceGroup", + "api-version": "2017-08-09-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "metadata": { + "generatedQuery": "" + }, + "columns": { + "Timestamp": { + "ordinal": 1, + "name": "Timestamp", + "dataType": "DateTime" + }, + "ResourceId": { + "ordinal": 2, + "name": "ResourceId", + "dataType": "String" + }, + "PolicyAssignmentId": { + "ordinal": 3, + "name": "PolicyAssignmentId", + "dataType": "String" + }, + "PolicyDefinitionId": { + "ordinal": 4, + "name": "PolicyDefinitionId", + "dataType": "String" + }, + "EffectiveParameters": { + "ordinal": 5, + "name": "EffectiveParameters", + "dataType": "String" + }, + "IsCompliant": { + "ordinal": 6, + "name": "IsCompliant", + "dataType": "Boolean" + }, + "SubscriptionId": { + "ordinal": 7, + "name": "SubscriptionId", + "dataType": "String" + }, + "ResourceType": { + "ordinal": 8, + "name": "ResourceType", + "dataType": "String" + }, + "ResourceLocation": { + "ordinal": 9, + "name": "ResourceLocation", + "dataType": "String" + }, + "ResourceGroup": { + "ordinal": 10, + "name": "ResourceGroup", + "dataType": "String" + }, + "ResourceTags": { + "ordinal": 11, + "name": "ResourceTags", + "dataType": "String" + }, + "PolicyAssignmentName": { + "ordinal": 12, + "name": "PolicyAssignmentName", + "dataType": "String" + }, + "PolicyAssignmentOwner": { + "ordinal": 13, + "name": "PolicyAssignmentOwner", + "dataType": "String" + }, + "PolicyAssignmentParameters": { + "ordinal": 14, + "name": "PolicyAssignmentParameters", + "dataType": "String" + }, + "PolicyAssignmentScope": { + "ordinal": 15, + "name": "PolicyAssignmentScope", + "dataType": "String" + }, + "PolicyDefinitionName": { + "ordinal": 16, + "name": "PolicyDefinitionName", + "dataType": "String" + }, + "PolicyDefinitionAction": { + "ordinal": 17, + "name": "PolicyDefinitionAction", + "dataType": "String" + }, + "PolicyDefinitionCategory": { + "ordinal": 18, + "name": "PolicyDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionId": { + "ordinal": 19, + "name": "PolicySetDefinitionId", + "dataType": "String" + }, + "PolicySetDefinitionName": { + "ordinal": 20, + "name": "PolicySetDefinitionName", + "dataType": "String" + }, + "PolicySetDefinitionOwner": { + "ordinal": 21, + "name": "PolicySetDefinitionOwner", + "dataType": "String" + }, + "PolicySetDefinitionCategory": { + "ordinal": 22, + "name": "PolicySetDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionParameters": { + "ordinal": 23, + "name": "PolicySetDefinitionParameters", + "dataType": "String" + }, + "ManagementGroupIds": { + "ordinal": 24, + "name": "ManagementGroupIds", + "dataType": "String" + }, + "PolicyDefinitionReferenceId": { + "ordinal": 25, + "name": "PolicyDefinitionReferenceId", + "dataType": "String" + }, + "TenantId": { + "ordinal": 26, + "name": "TenantId", + "dataType": "String" + }, + "PrincipalOid": { + "ordinal": 27, + "name": "PrincipalOid", + "dataType": "String" + } + }, + "rows": [ + [ + "2018-02-05T22:54:39.8128521Z", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.OperationalInsights/workspaces/myWorkspace", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/fff5d536aec743a0aa801c1a", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/fffd9357-fff0-fff7-fff4-fff30ce4c32d", + null, + false, + "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "/Microsoft.OperationalInsights/workspaces", + "canadacentral", + "myResourceGroup", + "tbd", + "fff5d536aec743a0aa801c1a", + "tbd", + "{}", + "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "fffd9357-fff0-fff7-fff4-fff30ce4c32d", + "audit", + "tbd", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/fffcefd2-fff6-ffff-fff4-fffa170eb1d5", + "fffcefd2-fff6-ffff-fff4-fffa170eb1d5", + null, + null, + null, + "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "fff21232277412542086", + "fff988bf-fff1-ffff-fffb-fffcd011db47", + "ffffb743-fff5-fff7-fffe-fffc2444f333" + ], + [ + "2018-02-05T22:54:39.8128521Z", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.OperationalInsights/workspaces/myWorkspace", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/fff16fce53454b15a7ed803d", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/fff0414b-fff4-fffd-fff5-fff79a89232c", + null, + false, + "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "/Microsoft.OperationalInsights/workspaces", + "canadacentral", + "myResourceGroup", + "tbd", + "fff16fce53454b15a7ed803d", + "tbd", + "{\"allowedLocations\":{\"value\":[\"eastus\"]}}", + "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "fff0414b-fff4-fffd-fff5-fff79a89232c", + "audit", + "tbd", + "", + "", + null, + null, + null, + "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "", + "fff988bf-fff1-ffff-fffb-fffcd011db47", + "ffffb743-fff5-fff7-fffe-fffc2444f333" + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryResourceScope.json new file mode 100644 index 000000000000..4b2a308e07fc --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryResourceScope.json @@ -0,0 +1,217 @@ +{ + "parameters": { + "policyEventsResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "api-version": "2017-08-09-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "metadata": { + "generatedQuery": "" + }, + "columns": { + "Timestamp": { + "ordinal": 1, + "name": "Timestamp", + "dataType": "DateTime" + }, + "ResourceId": { + "ordinal": 2, + "name": "ResourceId", + "dataType": "String" + }, + "PolicyAssignmentId": { + "ordinal": 3, + "name": "PolicyAssignmentId", + "dataType": "String" + }, + "PolicyDefinitionId": { + "ordinal": 4, + "name": "PolicyDefinitionId", + "dataType": "String" + }, + "EffectiveParameters": { + "ordinal": 5, + "name": "EffectiveParameters", + "dataType": "String" + }, + "IsCompliant": { + "ordinal": 6, + "name": "IsCompliant", + "dataType": "Boolean" + }, + "SubscriptionId": { + "ordinal": 7, + "name": "SubscriptionId", + "dataType": "String" + }, + "ResourceType": { + "ordinal": 8, + "name": "ResourceType", + "dataType": "String" + }, + "ResourceLocation": { + "ordinal": 9, + "name": "ResourceLocation", + "dataType": "String" + }, + "ResourceGroup": { + "ordinal": 10, + "name": "ResourceGroup", + "dataType": "String" + }, + "ResourceTags": { + "ordinal": 11, + "name": "ResourceTags", + "dataType": "String" + }, + "PolicyAssignmentName": { + "ordinal": 12, + "name": "PolicyAssignmentName", + "dataType": "String" + }, + "PolicyAssignmentOwner": { + "ordinal": 13, + "name": "PolicyAssignmentOwner", + "dataType": "String" + }, + "PolicyAssignmentParameters": { + "ordinal": 14, + "name": "PolicyAssignmentParameters", + "dataType": "String" + }, + "PolicyAssignmentScope": { + "ordinal": 15, + "name": "PolicyAssignmentScope", + "dataType": "String" + }, + "PolicyDefinitionName": { + "ordinal": 16, + "name": "PolicyDefinitionName", + "dataType": "String" + }, + "PolicyDefinitionAction": { + "ordinal": 17, + "name": "PolicyDefinitionAction", + "dataType": "String" + }, + "PolicyDefinitionCategory": { + "ordinal": 18, + "name": "PolicyDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionId": { + "ordinal": 19, + "name": "PolicySetDefinitionId", + "dataType": "String" + }, + "PolicySetDefinitionName": { + "ordinal": 20, + "name": "PolicySetDefinitionName", + "dataType": "String" + }, + "PolicySetDefinitionOwner": { + "ordinal": 21, + "name": "PolicySetDefinitionOwner", + "dataType": "String" + }, + "PolicySetDefinitionCategory": { + "ordinal": 22, + "name": "PolicySetDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionParameters": { + "ordinal": 23, + "name": "PolicySetDefinitionParameters", + "dataType": "String" + }, + "ManagementGroupIds": { + "ordinal": 24, + "name": "ManagementGroupIds", + "dataType": "String" + }, + "PolicyDefinitionReferenceId": { + "ordinal": 25, + "name": "PolicyDefinitionReferenceId", + "dataType": "String" + }, + "TenantId": { + "ordinal": 26, + "name": "TenantId", + "dataType": "String" + }, + "PrincipalOid": { + "ordinal": 27, + "name": "PrincipalOid", + "dataType": "String" + } + }, + "rows": [ + [ + "2018-02-05T22:34:02.3475017Z", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/fff27f38-fff4-fff8-fff1-fffc84b8c017", + "/providers/Microsoft.Authorization/policyDefinitions/fffea587-fff0-fff3-ffff-fff0ae01cfd6", + null, + false, + "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "/Microsoft.ClassicCompute/domainNames", + "eastus", + "myResourceGroup", + "tbd", + "fff27f38-fff4-fff8-fff1-fffc84b8c017", + "tbd", + "{}", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "fffea587-fff0-fff3-ffff-fff0ae01cfd6", + "audit", + "tbd", + "/providers/Microsoft.Authorization/policySetDefinitions/fffafdf9-fff9-fffd-ffff-fffa613e70a8", + "fffafdf9-fff9-fffd-ffff-fffa613e70a8", + null, + null, + null, + "", + null, + "fff988bf-fff1-ffff-fffb-fffcd011db47", + "fff890fa-fff0-fff3-fff9-fffd7653f078" + ], + [ + "2018-02-05T22:34:01.6135357Z", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/Enable Monitoring in Azure Security Center", + "/providers/Microsoft.Authorization/policyDefinitions/fffea587-fff0-fff3-ffff-fff0ae01cfd6", + null, + false, + "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "/Microsoft.ClassicCompute/domainNames", + "eastus", + "myResourceGroup", + "tbd", + "Enable Monitoring in Azure Security Center", + "tbd", + "{}", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "fffea587-fff0-fff3-ffff-fff0ae01cfd6", + "audit", + "tbd", + "/providers/Microsoft.Authorization/policySetDefinitions/fffafdf9-fff9-fffd-ffff-fffa613e70a8", + "fffafdf9-fff9-fffd-ffff-fffa613e70a8", + null, + null, + null, + "", + null, + "fff988bf-fff1-ffff-fffb-fffcd011db47", + "fff890fa-fff0-fff3-fff9-fffd7653f078" + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QuerySubscriptionLevelNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QuerySubscriptionLevelNestedResourceScope.json new file mode 100644 index 000000000000..2afdac243708 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QuerySubscriptionLevelNestedResourceScope.json @@ -0,0 +1,217 @@ +{ + "parameters": { + "policyEventsResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "api-version": "2017-08-09-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "metadata": { + "generatedQuery": "" + }, + "columns": { + "Timestamp": { + "ordinal": 1, + "name": "Timestamp", + "dataType": "DateTime" + }, + "ResourceId": { + "ordinal": 2, + "name": "ResourceId", + "dataType": "String" + }, + "PolicyAssignmentId": { + "ordinal": 3, + "name": "PolicyAssignmentId", + "dataType": "String" + }, + "PolicyDefinitionId": { + "ordinal": 4, + "name": "PolicyDefinitionId", + "dataType": "String" + }, + "EffectiveParameters": { + "ordinal": 5, + "name": "EffectiveParameters", + "dataType": "String" + }, + "IsCompliant": { + "ordinal": 6, + "name": "IsCompliant", + "dataType": "Boolean" + }, + "SubscriptionId": { + "ordinal": 7, + "name": "SubscriptionId", + "dataType": "String" + }, + "ResourceType": { + "ordinal": 8, + "name": "ResourceType", + "dataType": "String" + }, + "ResourceLocation": { + "ordinal": 9, + "name": "ResourceLocation", + "dataType": "String" + }, + "ResourceGroup": { + "ordinal": 10, + "name": "ResourceGroup", + "dataType": "String" + }, + "ResourceTags": { + "ordinal": 11, + "name": "ResourceTags", + "dataType": "String" + }, + "PolicyAssignmentName": { + "ordinal": 12, + "name": "PolicyAssignmentName", + "dataType": "String" + }, + "PolicyAssignmentOwner": { + "ordinal": 13, + "name": "PolicyAssignmentOwner", + "dataType": "String" + }, + "PolicyAssignmentParameters": { + "ordinal": 14, + "name": "PolicyAssignmentParameters", + "dataType": "String" + }, + "PolicyAssignmentScope": { + "ordinal": 15, + "name": "PolicyAssignmentScope", + "dataType": "String" + }, + "PolicyDefinitionName": { + "ordinal": 16, + "name": "PolicyDefinitionName", + "dataType": "String" + }, + "PolicyDefinitionAction": { + "ordinal": 17, + "name": "PolicyDefinitionAction", + "dataType": "String" + }, + "PolicyDefinitionCategory": { + "ordinal": 18, + "name": "PolicyDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionId": { + "ordinal": 19, + "name": "PolicySetDefinitionId", + "dataType": "String" + }, + "PolicySetDefinitionName": { + "ordinal": 20, + "name": "PolicySetDefinitionName", + "dataType": "String" + }, + "PolicySetDefinitionOwner": { + "ordinal": 21, + "name": "PolicySetDefinitionOwner", + "dataType": "String" + }, + "PolicySetDefinitionCategory": { + "ordinal": 22, + "name": "PolicySetDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionParameters": { + "ordinal": 23, + "name": "PolicySetDefinitionParameters", + "dataType": "String" + }, + "ManagementGroupIds": { + "ordinal": 24, + "name": "ManagementGroupIds", + "dataType": "String" + }, + "PolicyDefinitionReferenceId": { + "ordinal": 25, + "name": "PolicyDefinitionReferenceId", + "dataType": "String" + }, + "TenantId": { + "ordinal": 26, + "name": "TenantId", + "dataType": "String" + }, + "PrincipalOid": { + "ordinal": 27, + "name": "PrincipalOid", + "dataType": "String" + } + }, + "rows": [ + [ + "2018-02-05T23:24:28.4444412Z", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/fffc58b7db524a9799381531", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/fff79b49-fff9-fff5-fffe-fff49ab8b474", + null, + false, + "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", + "eastus", + "", + "tbd", + "fffc58b7db524a9799381531", + "tbd", + "{\"TAGNAME_1\":{\"value\":\"NA\"}}", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "fff79b49-fff9-fff5-fffe-fff49ab8b474", + "audit", + "tbd", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policySetDefinitions/fff58873-fff8-fff5-fffc-fffbe7c9d697", + "fff58873-fff8-fff5-fffc-fffbe7c9d697", + null, + null, + null, + "", + "2124621540977569058", + "fff988bf-fff1-ffff-fffb-fffcd011db47", + "fff3809a-fffc-fffe-fff1-fffe57573195" + ], + [ + "2018-02-05T23:24:28.4444412Z", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/fff044306c044a1d8c0ff76c", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/fffd9357-fff0-fff7-fff4-fff30ce4c32d", + null, + false, + "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", + "eastus", + "", + "tbd", + "fff044306c044a1d8c0ff76c", + "tbd", + "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "fffd9357-fff0-fff7-fff4-fff30ce4c32d", + "audit", + "tbd", + "", + "", + null, + null, + null, + "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "", + "fff988bf-fff1-ffff-fffb-fffcd011db47", + "fff3809a-fffc-fffe-fff1-fffe57573195" + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QuerySubscriptionLevelResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QuerySubscriptionLevelResourceScope.json new file mode 100644 index 000000000000..db6d9b7e4766 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QuerySubscriptionLevelResourceScope.json @@ -0,0 +1,217 @@ +{ + "parameters": { + "policyEventsResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "api-version": "2017-08-09-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "metadata": { + "generatedQuery": "" + }, + "columns": { + "Timestamp": { + "ordinal": 1, + "name": "Timestamp", + "dataType": "DateTime" + }, + "ResourceId": { + "ordinal": 2, + "name": "ResourceId", + "dataType": "String" + }, + "PolicyAssignmentId": { + "ordinal": 3, + "name": "PolicyAssignmentId", + "dataType": "String" + }, + "PolicyDefinitionId": { + "ordinal": 4, + "name": "PolicyDefinitionId", + "dataType": "String" + }, + "EffectiveParameters": { + "ordinal": 5, + "name": "EffectiveParameters", + "dataType": "String" + }, + "IsCompliant": { + "ordinal": 6, + "name": "IsCompliant", + "dataType": "Boolean" + }, + "SubscriptionId": { + "ordinal": 7, + "name": "SubscriptionId", + "dataType": "String" + }, + "ResourceType": { + "ordinal": 8, + "name": "ResourceType", + "dataType": "String" + }, + "ResourceLocation": { + "ordinal": 9, + "name": "ResourceLocation", + "dataType": "String" + }, + "ResourceGroup": { + "ordinal": 10, + "name": "ResourceGroup", + "dataType": "String" + }, + "ResourceTags": { + "ordinal": 11, + "name": "ResourceTags", + "dataType": "String" + }, + "PolicyAssignmentName": { + "ordinal": 12, + "name": "PolicyAssignmentName", + "dataType": "String" + }, + "PolicyAssignmentOwner": { + "ordinal": 13, + "name": "PolicyAssignmentOwner", + "dataType": "String" + }, + "PolicyAssignmentParameters": { + "ordinal": 14, + "name": "PolicyAssignmentParameters", + "dataType": "String" + }, + "PolicyAssignmentScope": { + "ordinal": 15, + "name": "PolicyAssignmentScope", + "dataType": "String" + }, + "PolicyDefinitionName": { + "ordinal": 16, + "name": "PolicyDefinitionName", + "dataType": "String" + }, + "PolicyDefinitionAction": { + "ordinal": 17, + "name": "PolicyDefinitionAction", + "dataType": "String" + }, + "PolicyDefinitionCategory": { + "ordinal": 18, + "name": "PolicyDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionId": { + "ordinal": 19, + "name": "PolicySetDefinitionId", + "dataType": "String" + }, + "PolicySetDefinitionName": { + "ordinal": 20, + "name": "PolicySetDefinitionName", + "dataType": "String" + }, + "PolicySetDefinitionOwner": { + "ordinal": 21, + "name": "PolicySetDefinitionOwner", + "dataType": "String" + }, + "PolicySetDefinitionCategory": { + "ordinal": 22, + "name": "PolicySetDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionParameters": { + "ordinal": 23, + "name": "PolicySetDefinitionParameters", + "dataType": "String" + }, + "ManagementGroupIds": { + "ordinal": 24, + "name": "ManagementGroupIds", + "dataType": "String" + }, + "PolicyDefinitionReferenceId": { + "ordinal": 25, + "name": "PolicyDefinitionReferenceId", + "dataType": "String" + }, + "TenantId": { + "ordinal": 26, + "name": "TenantId", + "dataType": "String" + }, + "PrincipalOid": { + "ordinal": 27, + "name": "PrincipalOid", + "dataType": "String" + } + }, + "rows": [ + [ + "2018-02-05T22:34:02.3475017Z", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/fff27f38-fff4-fff8-fff1-fffc84b8c017", + "/providers/Microsoft.Authorization/policyDefinitions/fffea587-fff0-fff3-ffff-fff0ae01cfd6", + null, + false, + "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "/Microsoft.SomeNamespace/someResourceType", + "eastus", + "", + "tbd", + "fff27f38-fff4-fff8-fff1-fffc84b8c017", + "tbd", + "{}", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "fffea587-fff0-fff3-ffff-fff0ae01cfd6", + "audit", + "tbd", + "/providers/Microsoft.Authorization/policySetDefinitions/fffafdf9-fff9-fffd-ffff-fffa613e70a8", + "fffafdf9-fff9-fffd-ffff-fffa613e70a8", + null, + null, + null, + "", + null, + "fff988bf-fff1-ffff-fffb-fffcd011db47", + "fff890fa-fff0-fff3-fff9-fffd7653f078" + ], + [ + "2018-02-05T22:34:01.6135357Z", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/Enable Monitoring in Azure Security Center", + "/providers/Microsoft.Authorization/policyDefinitions/fffea587-fff0-fff3-ffff-fff0ae01cfd6", + null, + false, + "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "/Microsoft.SomeNamespace/someResourceType", + "eastus", + "", + "tbd", + "Enable Monitoring in Azure Security Center", + "tbd", + "{}", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "fffea587-fff0-fff3-ffff-fff0ae01cfd6", + "audit", + "tbd", + "/providers/Microsoft.Authorization/policySetDefinitions/fffafdf9-fff9-fffd-ffff-fffa613e70a8", + "fffafdf9-fff9-fffd-ffff-fffa613e70a8", + null, + null, + null, + "", + null, + "fff988bf-fff1-ffff-fffb-fffcd011db47", + "fff890fa-fff0-fff3-fff9-fffd7653f078" + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QuerySubscriptionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QuerySubscriptionScope.json new file mode 100644 index 000000000000..1391d87459ed --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QuerySubscriptionScope.json @@ -0,0 +1,217 @@ +{ + "parameters": { + "policyEventsResource": "default", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-08-09-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "metadata": { + "generatedQuery": "" + }, + "columns": { + "Timestamp": { + "ordinal": 1, + "name": "Timestamp", + "dataType": "DateTime" + }, + "ResourceId": { + "ordinal": 2, + "name": "ResourceId", + "dataType": "String" + }, + "PolicyAssignmentId": { + "ordinal": 3, + "name": "PolicyAssignmentId", + "dataType": "String" + }, + "PolicyDefinitionId": { + "ordinal": 4, + "name": "PolicyDefinitionId", + "dataType": "String" + }, + "EffectiveParameters": { + "ordinal": 5, + "name": "EffectiveParameters", + "dataType": "String" + }, + "IsCompliant": { + "ordinal": 6, + "name": "IsCompliant", + "dataType": "Boolean" + }, + "SubscriptionId": { + "ordinal": 7, + "name": "SubscriptionId", + "dataType": "String" + }, + "ResourceType": { + "ordinal": 8, + "name": "ResourceType", + "dataType": "String" + }, + "ResourceLocation": { + "ordinal": 9, + "name": "ResourceLocation", + "dataType": "String" + }, + "ResourceGroup": { + "ordinal": 10, + "name": "ResourceGroup", + "dataType": "String" + }, + "ResourceTags": { + "ordinal": 11, + "name": "ResourceTags", + "dataType": "String" + }, + "PolicyAssignmentName": { + "ordinal": 12, + "name": "PolicyAssignmentName", + "dataType": "String" + }, + "PolicyAssignmentOwner": { + "ordinal": 13, + "name": "PolicyAssignmentOwner", + "dataType": "String" + }, + "PolicyAssignmentParameters": { + "ordinal": 14, + "name": "PolicyAssignmentParameters", + "dataType": "String" + }, + "PolicyAssignmentScope": { + "ordinal": 15, + "name": "PolicyAssignmentScope", + "dataType": "String" + }, + "PolicyDefinitionName": { + "ordinal": 16, + "name": "PolicyDefinitionName", + "dataType": "String" + }, + "PolicyDefinitionAction": { + "ordinal": 17, + "name": "PolicyDefinitionAction", + "dataType": "String" + }, + "PolicyDefinitionCategory": { + "ordinal": 18, + "name": "PolicyDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionId": { + "ordinal": 19, + "name": "PolicySetDefinitionId", + "dataType": "String" + }, + "PolicySetDefinitionName": { + "ordinal": 20, + "name": "PolicySetDefinitionName", + "dataType": "String" + }, + "PolicySetDefinitionOwner": { + "ordinal": 21, + "name": "PolicySetDefinitionOwner", + "dataType": "String" + }, + "PolicySetDefinitionCategory": { + "ordinal": 22, + "name": "PolicySetDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionParameters": { + "ordinal": 23, + "name": "PolicySetDefinitionParameters", + "dataType": "String" + }, + "ManagementGroupIds": { + "ordinal": 24, + "name": "ManagementGroupIds", + "dataType": "String" + }, + "PolicyDefinitionReferenceId": { + "ordinal": 25, + "name": "PolicyDefinitionReferenceId", + "dataType": "String" + }, + "TenantId": { + "ordinal": 26, + "name": "TenantId", + "dataType": "String" + }, + "PrincipalOid": { + "ordinal": 27, + "name": "PrincipalOid", + "dataType": "String" + } + }, + "rows": [ + [ + "2018-02-05T22:54:39.8128521Z", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.OperationalInsights/workspaces/myWorkspace", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/fff5d536aec743a0aa801c1a", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/fffd9357-fff0-fff7-fff4-fff30ce4c32d", + null, + false, + "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "/Microsoft.OperationalInsights/workspaces", + "canadacentral", + "myResourceGroup", + "tbd", + "fff5d536aec743a0aa801c1a", + "tbd", + "{}", + "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "fffd9357-fff0-fff7-fff4-fff30ce4c32d", + "audit", + "tbd", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/fffcefd2-fff6-ffff-fff4-fffa170eb1d5", + "fffcefd2-fff6-ffff-fff4-fffa170eb1d5", + null, + null, + null, + "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "fff21232277412542086", + "fff988bf-fff1-ffff-fffb-fffcd011db47", + "ffffb743-fff5-fff7-fffe-fffc2444f333" + ], + [ + "2018-02-05T22:54:39.8128521Z", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.OperationalInsights/workspaces/myWorkspace", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/fff16fce53454b15a7ed803d", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/fff0414b-fff4-fffd-fff5-fff79a89232c", + null, + false, + "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "/Microsoft.OperationalInsights/workspaces", + "canadacentral", + "myResourceGroup", + "tbd", + "fff16fce53454b15a7ed803d", + "tbd", + "{\"allowedLocations\":{\"value\":[\"eastus\"]}}", + "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "fff0414b-fff4-fffd-fff5-fff79a89232c", + "audit", + "tbd", + "", + "", + null, + null, + null, + "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "", + "fff988bf-fff1-ffff-fffb-fffcd011db47", + "ffffb743-fff5-fff7-fffe-fffc2444f333" + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/TimeRangeSortSelectTop.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/TimeRangeSortSelectTop.json new file mode 100644 index 000000000000..a92381298268 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/TimeRangeSortSelectTop.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "policyEventsResource": "default", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-08-09-preview", + "$from": "2018-02-05T18:00:00Z", + "$to": "2018-02-06T18:00:00Z", + "$orderby": "Timestamp desc, PolicyAssignmentId asc, SubscriptionId asc, ResourceGroup asc, ResourceId", + "$select": "Timestamp, PolicyAssignmentId, PolicyDefinitionId, SubscriptionId, ResourceGroup, ResourceId", + "$top": 2 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "metadata": { + "generatedQuery": "" + }, + "columns": { + "Timestamp": { + "ordinal": 1, + "name": "Timestamp", + "dataType": "DateTime" + }, + "PolicyAssignmentId": { + "ordinal": 2, + "name": "PolicyAssignmentId", + "dataType": "String" + }, + "PolicyDefinitionId": { + "ordinal": 3, + "name": "PolicyDefinitionId", + "dataType": "String" + }, + "SubscriptionId": { + "ordinal": 4, + "name": "SubscriptionId", + "dataType": "String" + }, + "ResourceGroup": { + "ordinal": 5, + "name": "ResourceGroup", + "dataType": "String" + }, + "ResourceId": { + "ordinal": 6, + "name": "ResourceId", + "dataType": "String" + } + }, + "rows": [ + [ + "2018-02-05T22:34:02.3475017Z", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/fff27f38-fff4-fff8-fff1-fffc84b8c017", + "/providers/Microsoft.Authorization/policyDefinitions/fffea587-fff0-fff3-ffff-fff0ae01cfd6", + "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "myResourceGroup", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName" + ], + [ + "2018-02-05T22:34:01.6135357Z", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/Enable Monitoring in Azure Security Center", + "/providers/Microsoft.Authorization/policyDefinitions/fffea587-fff0-fff3-ffff-fff0ae01cfd6", + "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "myResourceGroup", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName" + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/policyEvents.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/policyEvents.json new file mode 100644 index 000000000000..29da1012fbc6 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/policyEvents.json @@ -0,0 +1,665 @@ +{ + "swagger": "2.0", + "info": { + "title": "PolicyEventsClient", + "version": "2017-08-09-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/{managementGroupId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { + "post": { + "operationId": "PolicyEvents_ListQueryResultsForManagementGroup", + "description": "Queries policy events for the resources under the management group.", + "parameters": [ + { + "$ref": "#/parameters/policyEventsResourceParameter" + }, + { + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyEventsQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query at management group scope": { "$ref": "./examples/QueryManagementGroupScope.json" } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { + "post": { + "operationId": "PolicyEvents_ListQueryResultsForSubscription", + "description": "Queries policy events for the resources under the subscription.", + "parameters": [ + { + "$ref": "#/parameters/policyEventsResourceParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyEventsQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query at subscription scope": { "$ref": "./examples/QuerySubscriptionScope.json" }, + "Time range; sort, select and limit": { "$ref": "./examples/TimeRangeSortSelectTop.json" }, + "Filter and group with aggregate": { "$ref": "./examples/FilterAndGroupByWithAggregate.json" }, + "Filter and group without aggregate": { "$ref": "./examples/FilterAndGroupByWithoutAggregate.json" }, + "Filter and aggregate only": { "$ref": "./examples/FilterAndAggregateOnly.json" }, + "Filter and multiple groups": { "$ref": "./examples/FilterAndMultipleGroups.json" } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { + "post": { + "operationId": "PolicyEvents_ListQueryResultsForResourceGroup", + "description": "Queries policy events for the resources under the resource group.", + "parameters": [ + { + "$ref": "#/parameters/policyEventsResourceParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyEventsQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query at resource group scope": { "$ref": "./examples/QueryResourceGroupScope.json" } + } + } + }, + "/{resourceId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { + "post": { + "operationId": "PolicyEvents_ListQueryResultsForResource", + "description": "Queries policy events for the resource.", + "parameters": [ + { + "$ref": "#/parameters/policyEventsResourceParameter" + }, + { + "$ref": "#/parameters/resourceIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyEventsQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query at resource scope": { "$ref": "./examples/QueryResourceScope.json" }, + "Query at subscription level resource scope": { "$ref": "./examples/QuerySubscriptionLevelResourceScope.json" }, + "Query at nested resource scope": { "$ref": "./examples/QueryNestedResourceScope.json" }, + "Query at subscription level nested resource scope": { "$ref": "./examples/QuerySubscriptionLevelNestedResourceScope.json" } + } + } + }, + "/providers/Microsoft.PolicyInsights/operations": { + "get": { + "operationId": "PolicyInsights_ListOperations", + "description": "Lists available operations.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "List of available operations.", + "schema": { + "$ref": "#/definitions/Operations" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "List operations": { "$ref": "./examples/ListOperations.json" } + } + } + } + }, + "definitions": { + "PolicyEventsQueryResults": { + "description": "Query results.", + "properties": { + "value": { + "description": "Query results.", + "type": "array", + "items": { + "$ref": "#/definitions/PolicyEventsQueryResultsTable" + } + } + } + }, + "PolicyEventsQueryResultsTable": { + "description": "Query results table.", + "properties": { + "metadata": { + "description": "Metadata about the query results.", + "properties": { + "generatedQuery": { + "description": "Internal query generated. Used for diagnostics purposes.", + "type": "string" + } + } + }, + "columns": { + "description": "List of columns included in query results.", + "properties": { + "Timestamp": { + "description": "Timestamp for the policy event record.", + "$ref": "#/definitions/Column" + }, + "ResourceId": { + "description": "Resource ID.", + "$ref": "#/definitions/Column" + }, + "PolicyAssignmentId": { + "description": "Policy assignment ID.", + "$ref": "#/definitions/Column" + }, + "PolicyDefinitionId": { + "description": "Policy definition ID.", + "$ref": "#/definitions/Column" + }, + "EffectiveParameters": { + "description": "Effective parameters for the policy assignment.", + "$ref": "#/definitions/Column" + }, + "IsCompliant": { + "description": "Flag which states whether the resource is compliant against the policy assignment it was evaluated against.", + "$ref": "#/definitions/Column" + }, + "SubscriptionId": { + "description": "Subscription ID.", + "$ref": "#/definitions/Column" + }, + "ResourceType": { + "description": "Resource type.", + "$ref": "#/definitions/Column" + }, + "ResourceLocation": { + "description": "Resource location.", + "$ref": "#/definitions/Column" + }, + "ResourceGroup": { + "description": "Resource group name.", + "$ref": "#/definitions/Column" + }, + "ResourceTags": { + "description": "List of resource tags.", + "$ref": "#/definitions/Column" + }, + "PolicyAssignmentName": { + "description": "Policy assignment name.", + "$ref": "#/definitions/Column" + }, + "PolicyAssignmentOwner": { + "description": "Policy assignment owner.", + "$ref": "#/definitions/Column" + }, + "PolicyAssignmentParameters": { + "description": "Policy assignment parameters.", + "$ref": "#/definitions/Column" + }, + "PolicyAssignmentScope": { + "description": "Policy assignment scope.", + "$ref": "#/definitions/Column" + }, + "PolicyDefinitionName": { + "description": "Policy definition name.", + "$ref": "#/definitions/Column" + }, + "PolicyDefinitionAction": { + "description": "Policy definition action, i.e. effect.", + "$ref": "#/definitions/Column" + }, + "PolicyDefinitionCategory": { + "description": "Policy definition category.", + "$ref": "#/definitions/Column" + }, + "PolicySetDefinitionId": { + "description": "Policy set definition ID, if the policy assignment is for a policy set.", + "$ref": "#/definitions/Column" + }, + "PolicySetDefinitionName": { + "description": "Policy set definition name, if the policy assignment is for a policy set.", + "$ref": "#/definitions/Column" + }, + "PolicySetDefinitionOwner": { + "description": "Policy set definition owner, if the policy assignment is for a policy set.", + "$ref": "#/definitions/Column" + }, + "PolicySetDefinitionCategory": { + "description": "Policy set definition category, if the policy assignment is for a policy set.", + "$ref": "#/definitions/Column" + }, + "PolicySetDefinitionParameters": { + "description": "Policy set definition parameters, if the policy assignment is for a policy set.", + "$ref": "#/definitions/Column" + }, + "ManagementGroupIds": { + "description": "Comma seperated list of management group IDs, which represent the hierarchy of the management groups the resource is under.", + "$ref": "#/definitions/Column" + }, + "PolicyDefinitionReferenceId": { + "description": "Reference ID for the policy definition inside the policy set, if the policy assignment is for a policy set.", + "$ref": "#/definitions/Column" + }, + "TenantId": { + "description": "Tenant ID for the policy event record.", + "$ref": "#/definitions/Column" + }, + "PrincipalOid": { + "description": "Principal object ID for the user who initiated the resource operation that triggered the policy event.", + "$ref": "#/definitions/Column" + } + } + }, + "rows": { + "description": "Query result rows, each representing a policy event record.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object" + } + } + } + } + }, + "Column": { + "description": "Column definition.", + "properties": { + "ordinal": { + "description": "Ordinal value of the column in a record.", + "type": "integer", + "format": "int32" + }, + "name": { + "description": "Name of the column.", + "type": "string" + }, + "dataType": { + "description": "Data type of the column.", + "type": "string" + } + } + }, + "QueryFailure": { + "description": "Error response.", + "properties": { + "error": { + "description": "Error definition.", + "properties": { + "code": { + "description": "Service specific error code which serves as the substatus for the HTTP error code.", + "type": "string" + }, + "message": { + "description": "Description of the error.", + "type": "string" + } + } + } + } + }, + "Operations": { + "description": "List of available operations.", + "properties": { + "value": { + "description": "List of available operations.", + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + } + } + } + }, + "Operation": { + "description": "Operation definition.", + "properties": { + "name": { + "description": "Operation name.", + "type": "string" + }, + "display": { + "description": "Display metadata associated with the operation.", + "properties": { + "provider": { + "description": "Resource provider name.", + "type": "string" + }, + "resource": { + "description": "Resource name on which the operation is performed.", + "type": "string" + }, + "operation": { + "description": "Operation name.", + "type": "string" + }, + "description": { + "description": "Operation description.", + "type": "string" + } + } + } + } + } + }, + "parameters": { + "policyEventsResourceParameter": { + "name": "policyEventsResource", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "description": "The name of the virtual resource under PolicyEvents resource type; only \"default\" is allowed.", + "x-ms-parameter-location": "method" + }, + "managementGroupIdParameter": { + "name": "managementGroupId", + "in": "path", + "required": true, + "type": "string", + "description": "Management group ID, e.g. /providers/Microsoft.Management/managementGroups/{name}.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "subscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "Microsoft Azure subscription ID.", + "x-ms-parameter-location": "method" + }, + "resourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Resource group name.", + "x-ms-parameter-location": "method" + }, + "resourceIdParameter": { + "name": "resourceId", + "in": "path", + "required": true, + "type": "string", + "description": "Resource ID.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "API version to use with the client requests.", + "x-ms-parameter-location": "client" + }, + "topParameter": { + "name": "$top", + "in": "query", + "required": false, + "type": "integer", + "format": "int32", + "minimum": 0, + "description": "Maximum number of records to return.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Top" + }, + "orderByParameter": { + "name": "$orderby", + "in": "query", + "required": false, + "type": "string", + "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "OrderBy" + }, + "selectParameter": { + "name": "$select", + "in": "query", + "required": false, + "type": "string", + "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Select" + }, + "fromParameter": { + "name": "$from", + "in": "query", + "required": false, + "type": "string", + "format": "date-time", + "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "From" + }, + "toParameter": { + "name": "$to", + "in": "query", + "required": false, + "type": "string", + "format": "date-time", + "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "To" + }, + "filterParameter": { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "OData filter expression.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Filter" + }, + "applyParameter": { + "name": "$apply", + "in": "query", + "required": false, + "type": "string", + "description": "OData apply expression for aggregations.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Apply" + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndAggregateOnly.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndAggregateOnly.json new file mode 100644 index 000000000000..0ca1a4b02617 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndAggregateOnly.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "policyEventsResource": "default", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-10-17-preview", + "$from": "2018-02-05T18:00:00Z", + "$filter": "PolicyDefinitionAction eq 'deny'", + "$apply": "aggregate($count as NumDenyEvents)" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 1, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "NumDenyEvents": 40 + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndGroupByWithAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndGroupByWithAggregate.json new file mode 100644 index 000000000000..611086bb9fc9 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndGroupByWithAggregate.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "policyEventsResource": "default", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-10-17-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": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionAction": "audit", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/resourcescachemonitor/services/myService", + "NumEvents": 1 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d6be6bb37e5f4333baa95c2a", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/5948d091-78b7-4d3b-a404-cc6a0329b0c6", + "PolicyDefinitionAction": "audit", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/resourcescachemonitor/services/myService", + "NumEvents": 1 + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndGroupByWithoutAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndGroupByWithoutAggregate.json new file mode 100644 index 000000000000..14ce278a3b69 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndGroupByWithoutAggregate.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "policyEventsResource": "default", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-10-17-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": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/5bc427ca-0089-4d0d-85bd-e98d1e40b3bf/providers/microsoft.authorization/policyassignments/storageaccountsku", + "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1", + "PolicyDefinitionAction": "deny", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/5bc427ca-0089-4d0d-85bd-e98d1e40b3bf/providers/microsoft.storage/storageaccounts/7d528d3a" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.authorization/policyassignments/da43b50031bf4bce84584faa", + "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62", + "PolicyDefinitionAction": "deny", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/mysa1" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndMultipleGroups.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndMultipleGroups.json new file mode 100644 index 000000000000..f5e1a2a61c4b --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndMultipleGroups.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "policyEventsResource": "default", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-10-17-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": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 6, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/0591f497c35344fcbaf7a393", + "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c", + "NumDeniedResources": 3 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/myassignment1", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mydefinition1", + "NumDeniedResources": 2 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/myassignment1", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mydefinition2", + "NumDeniedResources": 2 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/5bc427ca-0089-4d0d-85bd-e98d1e40b3bf/providers/microsoft.authorization/policyassignments/storageaccountsku", + "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1", + "NumDeniedResources": 1 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup2/providers/microsoft.authorization/policyassignments/da43b50031bf4bce84584faa", + "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62", + "NumDeniedResources": 1 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup2/providers/microsoft.authorization/policyassignments/myassignment2", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mydefinition3", + "NumDeniedResources": 1 + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/GetMetadata.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/GetMetadata.json new file mode 100644 index 000000000000..80442e83a0f1 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/GetMetadata.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "scope": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-10-17-preview" + }, + "responses": { + "200": { + "body": [ + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " Org.OData.Capabilities.V1.ConformanceLevelType/Minimal", + " ", + " ", + " ", + " application/json;odata.metadata=minimal;IEEE754Compatible=false;odata.streaming=true", + " application/json;odata.metadata=none;IEEE754Compatible=false;odata.streaming=true", + " ", + " ", + " ", + " ", + " ", + " ", + "" + ] + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/ListOperations.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/ListOperations.json new file mode 100644 index 000000000000..7dfa6867003f --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/ListOperations.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2017-10-17-preview" + }, + "responses": { + "200": { + "body": { + "@odata.count": 3, + "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." + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json new file mode 100644 index 000000000000..c74d179a46e0 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "policyEventsResource": "default", + "managementGroupId": "providers/Microsoft.Management/managementGroups/myManagementGroup", + "api-version": "2017-10-17-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T22:19:18.8896095Z", + "ResourceId": "/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myrg/providers/Microsoft.Compute/virtualMachines/myvm1/extensions/DAExtension", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/1ef5d536aec743a0aa801c1a", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef", + "ResourceType": "/Microsoft.Compute/virtualMachines/extensions", + "ResourceLocation": "westeurope", + "ResourceGroup": "myrg", + "ResourceTags": "tbd", + "PolicyAssignmentName": "1ef5d536aec743a0aa801c1a", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/335cefd2-ab16-430f-b364-974a170eb1d5", + "PolicySetDefinitionName": "335cefd2-ab16-430f-b364-974a170eb1d5", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "15521232277412542086", + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fff3e452-fff2-fff1-fff8-fff12618f1b8" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T22:19:18.8896095Z", + "ResourceId": "/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myrg/providers/Microsoft.Compute/virtualMachines/myvm1/extensions/DAExtension", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/95816fce53454b15a7ed803d", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/a2c0414b-82e4-459d-97d5-94c79a89232c", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef", + "ResourceType": "/Microsoft.Compute/virtualMachines/extensions", + "ResourceLocation": "westeurope", + "ResourceGroup": "myrg", + "ResourceTags": "tbd", + "PolicyAssignmentName": "95816fce53454b15a7ed803d", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"eastus\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "a2c0414b-82e4-459d-97d5-94c79a89232c", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "", + "PolicySetDefinitionName": "", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "", + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fff3e452-fff2-fff1-fff8-fff12618f1b8" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryNestedResourceScope.json new file mode 100644 index 000000000000..3edaea730e80 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryNestedResourceScope.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "policyEventsResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "api-version": "2017-10-17-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T20:43:04.6971328Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "181565554491747128", + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T20:43:04.6971328Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "624540685646900425", + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryResourceGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryResourceGroupScope.json new file mode 100644 index 000000000000..02a4b0544731 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryResourceGroupScope.json @@ -0,0 +1,80 @@ +{ + "parameters": { + "policyEventsResource": "default", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceGroupName": "myResourceGroup", + "api-version": "2017-10-17-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T20:43:04.6971328Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "181565554491747128", + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T20:43:04.6971328Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "624540685646900425", + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryResourceScope.json new file mode 100644 index 000000000000..deba87d17758 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryResourceScope.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "policyEventsResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "api-version": "2017-10-17-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T15:14:39.8473851Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ClassicCompute/domainNames", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "PolicyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null, + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T15:14:39.5842458Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/d15545b8-ff50-409a-a6e3-5bd5cc954003", + "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ClassicCompute/domainNames", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "d15545b8-ff50-409a-a6e3-5bd5cc954003", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "PolicyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null, + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionLevelNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionLevelNestedResourceScope.json new file mode 100644 index 000000000000..41a583aad565 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionLevelNestedResourceScope.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "policyEventsResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "api-version": "2017-10-17-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T20:43:04.6971328Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", + "ResourceLocation": "eastus", + "ResourceGroup": "", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "181565554491747128", + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T20:43:04.6971328Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", + "ResourceLocation": "eastus", + "ResourceGroup": "", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "624540685646900425", + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionLevelResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionLevelResourceScope.json new file mode 100644 index 000000000000..df1664fcee6f --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionLevelResourceScope.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "policyEventsResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "api-version": "2017-10-17-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T15:14:39.8473851Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.SomeNamespace/someResourceType", + "ResourceLocation": "eastus", + "ResourceGroup": "", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "PolicyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null, + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T15:14:39.5842458Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/d15545b8-ff50-409a-a6e3-5bd5cc954003", + "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.SomeNamespace/someResourceType", + "ResourceLocation": "eastus", + "ResourceGroup": "", + "ResourceTags": "tbd", + "PolicyAssignmentName": "d15545b8-ff50-409a-a6e3-5bd5cc954003", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "PolicyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null, + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionScope.json new file mode 100644 index 000000000000..4e9ab06a2a37 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionScope.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "policyEventsResource": "default", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-10-17-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T20:43:04.6971328Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "181565554491747128", + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T20:43:04.6971328Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "624540685646900425", + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/TimeRangeSortSelectTop.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/TimeRangeSortSelectTop.json new file mode 100644 index 000000000000..00b3541594a1 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/TimeRangeSortSelectTop.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "policyEventsResource": "default", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-10-17-preview", + "$from": "2018-02-05T18:00:00Z", + "$to": "2018-02-06T18:00:00Z", + "$orderby": "Timestamp desc, PolicyAssignmentId asc, SubscriptionId asc, ResourceGroup asc, ResourceId", + "$select": "Timestamp, PolicyAssignmentId, PolicyDefinitionId, SubscriptionId, ResourceGroup, ResourceId", + "$top": 2 + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-05T22:34:02.3475017Z", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/89b27f38-e9e4-4468-ab81-801c84b8c017", + "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceGroup": "myResourceGroup", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomain" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-05T22:34:01.6135357Z", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/Enable Monitoring in Azure Security Center", + "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceGroup": "myResourceGroup", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomain" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/policyEvents.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/policyEvents.json new file mode 100644 index 000000000000..806ee9df79f4 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/policyEvents.json @@ -0,0 +1,689 @@ +{ + "swagger": "2.0", + "info": { + "title": "PolicyEventsClient", + "version": "2017-10-17-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/{managementGroupId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { + "post": { + "operationId": "PolicyEvents_ListQueryResultsForManagementGroup", + "description": "Queries policy events for the resources under the management group.", + "parameters": [ + { + "$ref": "#/parameters/policyEventsResourceParameter" + }, + { + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyEventsQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query at management group scope": { "$ref": "./examples/QueryManagementGroupScope.json" } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { + "post": { + "operationId": "PolicyEvents_ListQueryResultsForSubscription", + "description": "Queries policy events for the resources under the subscription.", + "parameters": [ + { + "$ref": "#/parameters/policyEventsResourceParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyEventsQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query at subscription scope": { "$ref": "./examples/QuerySubscriptionScope.json" }, + "Time range; sort, select and limit": { "$ref": "./examples/TimeRangeSortSelectTop.json" }, + "Filter and group with aggregate": { "$ref": "./examples/FilterAndGroupByWithAggregate.json" }, + "Filter and group without aggregate": { "$ref": "./examples/FilterAndGroupByWithoutAggregate.json" }, + "Filter and aggregate only": { "$ref": "./examples/FilterAndAggregateOnly.json" }, + "Filter and multiple groups": { "$ref": "./examples/FilterAndMultipleGroups.json" } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { + "post": { + "operationId": "PolicyEvents_ListQueryResultsForResourceGroup", + "description": "Queries policy events for the resources under the resource group.", + "parameters": [ + { + "$ref": "#/parameters/policyEventsResourceParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyEventsQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query at resource group scope": { "$ref": "./examples/QueryResourceGroupScope.json" } + } + } + }, + "/{resourceId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { + "post": { + "operationId": "PolicyEvents_ListQueryResultsForResource", + "description": "Queries policy events for the resource.", + "parameters": [ + { + "$ref": "#/parameters/policyEventsResourceParameter" + }, + { + "$ref": "#/parameters/resourceIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyEventsQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query at resource scope": { "$ref": "./examples/QueryResourceScope.json" }, + "Query at subscription level resource scope": { "$ref": "./examples/QuerySubscriptionLevelResourceScope.json" }, + "Query at nested resource scope": { "$ref": "./examples/QueryNestedResourceScope.json" }, + "Query at subscription level nested resource scope": { "$ref": "./examples/QuerySubscriptionLevelNestedResourceScope.json" } + } + } + }, + "/providers/Microsoft.PolicyInsights/operations": { + "get": { + "operationId": "PolicyInsights_ListOperations", + "description": "Lists available operations.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "List of available operations.", + "schema": { + "$ref": "#/definitions/Operations" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "List operations": { "$ref": "./examples/ListOperations.json" } + } + } + }, + "/{scope}/providers/Microsoft.PolicyInsights/policyEvents/$metadata": { + "get": { + "operationId": "PolicyEvents_GetMetadata", + "description": "Gets OData metadata XML document.", + "produces": [ + "application/xml" + ], + "parameters": [ + { + "$ref": "#/parameters/scopeParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OData metadata XML document.", + "schema": { + "$ref": "#/definitions/MetadataDocument" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Get metadata": { "$ref": "./examples/GetMetadata.json" } + } + } + } + }, + "definitions": { + "PolicyEventsQueryResults": { + "description": "Query results.", + "properties": { + "@odata.context": { + "description": "OData context string; used by OData clients to resolve type information based on metadata.", + "type": "string" + }, + "@odata.count": { + "description": "OData entity count; represents the number of policy event records returned.", + "type": "integer", + "format": "int32", + "minimum": 0 + }, + "value": { + "description": "Query results.", + "type": "array", + "items": { + "$ref": "#/definitions/PolicyEvent" + } + } + } + }, + "PolicyEvent": { + "description": "Policy event record.", + "properties": { + "@odata.id": { + "description": "OData entity ID; always set to null since policy event records do not have an entity ID.", + "type": "string" + }, + "@odata.context": { + "description": "OData context string; used by OData clients to resolve type information based on metadata.", + "type": "string" + }, + "timestamp": { + "description": "Timestamp for the policy event record.", + "type": "string", + "format": "date-time" + }, + "resourceId": { + "description": "Resource ID.", + "type": "string" + }, + "policyAssignmentId": { + "description": "Policy assignment ID.", + "type": "string" + }, + "policyDefinitionId": { + "description": "Policy definition ID.", + "type": "string" + }, + "effectiveParameters": { + "description": "Effective parameters for the policy assignment.", + "type": "string" + }, + "isCompliant": { + "description": "Flag which states whether the resource is compliant against the policy assignment it was evaluated against.", + "type": "boolean" + }, + "subscriptionId": { + "description": "Subscription ID.", + "type": "string" + }, + "resourceType": { + "description": "Resource type.", + "type": "string" + }, + "resourceLocation": { + "description": "Resource location.", + "type": "string" + }, + "resourceGroup": { + "description": "Resource group name.", + "type": "string" + }, + "resourceTags": { + "description": "List of resource tags.", + "type": "string" + }, + "policyAssignmentName": { + "description": "Policy assignment name.", + "type": "string" + }, + "policyAssignmentOwner": { + "description": "Policy assignment owner.", + "type": "string" + }, + "policyAssignmentParameters": { + "description": "Policy assignment parameters.", + "type": "string" + }, + "policyAssignmentScope": { + "description": "Policy assignment scope.", + "type": "string" + }, + "policyDefinitionName": { + "description": "Policy definition name.", + "type": "string" + }, + "policyDefinitionAction": { + "description": "Policy definition action, i.e. effect.", + "type": "string" + }, + "policyDefinitionCategory": { + "description": "Policy definition category.", + "type": "string" + }, + "policySetDefinitionId": { + "description": "Policy set definition ID, if the policy assignment is for a policy set.", + "type": "string" + }, + "policySetDefinitionName": { + "description": "Policy set definition name, if the policy assignment is for a policy set.", + "type": "string" + }, + "policySetDefinitionOwner": { + "description": "Policy set definition owner, if the policy assignment is for a policy set.", + "type": "string" + }, + "policySetDefinitionCategory": { + "description": "Policy set definition category, if the policy assignment is for a policy set.", + "type": "string" + }, + "policySetDefinitionParameters": { + "description": "Policy set definition parameters, if the policy assignment is for a policy set.", + "type": "string" + }, + "managementGroupIds": { + "description": "Comma seperated list of management group IDs, which represent the hierarchy of the management groups the resource is under.", + "type": "string" + }, + "policyDefinitionReferenceId": { + "description": "Reference ID for the policy definition inside the policy set, if the policy assignment is for a policy set.", + "type": "string" + }, + "tenantId": { + "description": "Tenant ID for the policy event record.", + "type": "string" + }, + "principalOid": { + "description": "Principal object ID for the user who initiated the resource operation that triggered the policy event.", + "type": "string" + } + } + }, + "QueryFailure": { + "description": "Error response.", + "properties": { + "error": { + "description": "Error definition.", + "properties": { + "code": { + "description": "Service specific error code which serves as the substatus for the HTTP error code.", + "type": "string" + }, + "message": { + "description": "Description of the error.", + "type": "string" + } + } + } + } + }, + "Operations": { + "description": "List of available operations.", + "properties": { + "value": { + "description": "List of available operations.", + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + } + } + } + }, + "Operation": { + "description": "Operation definition.", + "properties": { + "name": { + "description": "Operation name.", + "type": "string" + }, + "display": { + "description": "Display metadata associated with the operation.", + "properties": { + "provider": { + "description": "Resource provider name.", + "type": "string" + }, + "resource": { + "description": "Resource name on which the operation is performed.", + "type": "string" + }, + "operation": { + "description": "Operation name.", + "type": "string" + }, + "description": { + "description": "Operation description.", + "type": "string" + } + } + } + } + }, + "MetadataDocument": { + "description": "Metadata XML document.", + "type": "string" + } + }, + "parameters": { + "policyEventsResourceParameter": { + "name": "policyEventsResource", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "description": "The name of the virtual resource under PolicyEvents resource type; only \"default\" is allowed.", + "x-ms-parameter-location": "method" + }, + "managementGroupIdParameter": { + "name": "managementGroupId", + "in": "path", + "required": true, + "type": "string", + "description": "Management group ID, e.g. /providers/Microsoft.Management/managementGroups/{name}.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "subscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "Microsoft Azure subscription ID.", + "x-ms-parameter-location": "method" + }, + "resourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Resource group name.", + "x-ms-parameter-location": "method" + }, + "resourceIdParameter": { + "name": "resourceId", + "in": "path", + "required": true, + "type": "string", + "description": "Resource ID.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "scopeParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "A valid scope, i.e. management group, subscription, resource group, or resource ID. Scope used has no effect on metadata returned.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "API version to use with the client requests.", + "x-ms-parameter-location": "client" + }, + "topParameter": { + "name": "$top", + "in": "query", + "required": false, + "type": "integer", + "format": "int32", + "minimum": 0, + "description": "Maximum number of records to return.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Top" + }, + "orderByParameter": { + "name": "$orderby", + "in": "query", + "required": false, + "type": "string", + "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "OrderBy" + }, + "selectParameter": { + "name": "$select", + "in": "query", + "required": false, + "type": "string", + "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Select" + }, + "fromParameter": { + "name": "$from", + "in": "query", + "required": false, + "type": "string", + "format": "date-time", + "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "From" + }, + "toParameter": { + "name": "$to", + "in": "query", + "required": false, + "type": "string", + "format": "date-time", + "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "To" + }, + "filterParameter": { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "OData filter expression.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Filter" + }, + "applyParameter": { + "name": "$apply", + "in": "query", + "required": false, + "type": "string", + "description": "OData apply expression for aggregations.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Apply" + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndAggregateOnly.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndAggregateOnly.json new file mode 100644 index 000000000000..a3062e9db16e --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndAggregateOnly.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "policyEventsResource": "default", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-12-12-preview", + "$from": "2018-02-05T18:00:00Z", + "$filter": "PolicyDefinitionAction eq 'deny'", + "$apply": "aggregate($count as NumDenyEvents)" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 1, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "NumDenyEvents": 40 + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndGroupByWithAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndGroupByWithAggregate.json new file mode 100644 index 000000000000..cb83c5e4f923 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndGroupByWithAggregate.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "policyEventsResource": "default", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-12-12-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": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionAction": "audit", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/resourcescachemonitor/services/myService", + "NumEvents": 1 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d6be6bb37e5f4333baa95c2a", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/5948d091-78b7-4d3b-a404-cc6a0329b0c6", + "PolicyDefinitionAction": "audit", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/resourcescachemonitor/services/myService", + "NumEvents": 1 + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndGroupByWithoutAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndGroupByWithoutAggregate.json new file mode 100644 index 000000000000..4c7d33e22edf --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndGroupByWithoutAggregate.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "policyEventsResource": "default", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-12-12-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": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/5bc427ca-0089-4d0d-85bd-e98d1e40b3bf/providers/microsoft.authorization/policyassignments/storageaccountsku", + "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1", + "PolicyDefinitionAction": "deny", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/5bc427ca-0089-4d0d-85bd-e98d1e40b3bf/providers/microsoft.storage/storageaccounts/7d528d3a" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.authorization/policyassignments/da43b50031bf4bce84584faa", + "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62", + "PolicyDefinitionAction": "deny", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/mysa1" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndMultipleGroups.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndMultipleGroups.json new file mode 100644 index 000000000000..14a68067c720 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndMultipleGroups.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "policyEventsResource": "default", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-12-12-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": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 6, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/0591f497c35344fcbaf7a393", + "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c", + "NumDeniedResources": 3 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/myassignment1", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mydefinition1", + "NumDeniedResources": 2 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/myassignment1", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mydefinition2", + "NumDeniedResources": 2 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/5bc427ca-0089-4d0d-85bd-e98d1e40b3bf/providers/microsoft.authorization/policyassignments/storageaccountsku", + "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1", + "NumDeniedResources": 1 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup2/providers/microsoft.authorization/policyassignments/da43b50031bf4bce84584faa", + "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62", + "NumDeniedResources": 1 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup2/providers/microsoft.authorization/policyassignments/myassignment2", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mydefinition3", + "NumDeniedResources": 1 + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/GetMetadata.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/GetMetadata.json new file mode 100644 index 000000000000..d745d0ab979e --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/GetMetadata.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "scope": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": [ + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " Org.OData.Capabilities.V1.ConformanceLevelType/Minimal", + " ", + " ", + " ", + " application/json;odata.metadata=minimal;IEEE754Compatible=false;odata.streaming=true", + " application/json;odata.metadata=none;IEEE754Compatible=false;odata.streaming=true", + " ", + " ", + " ", + " ", + " ", + " ", + "" + ] + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/ListOperations.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/ListOperations.json new file mode 100644 index 000000000000..3de5d287b34c --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/ListOperations.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.count": 4, + "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." + } + }, + { + "name": "latest/summarize/action", + "display": { + "provider": "Microsoft Policy Insights", + "resource": "Policy Latest States", + "operation": "Query Policy Latest States Summary", + "description": "Query summary information about policy latest states." + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json new file mode 100644 index 000000000000..f30d8cef0d80 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "policyEventsResource": "default", + "managementGroupId": "providers/Microsoft.Management/managementGroups/myManagementGroup", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T22:19:18.8896095Z", + "ResourceId": "/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myrg/providers/Microsoft.Compute/virtualMachines/myvm1/extensions/DAExtension", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/1ef5d536aec743a0aa801c1a", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef", + "ResourceType": "/Microsoft.Compute/virtualMachines/extensions", + "ResourceLocation": "westeurope", + "ResourceGroup": "myrg", + "ResourceTags": "tbd", + "PolicyAssignmentName": "1ef5d536aec743a0aa801c1a", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/335cefd2-ab16-430f-b364-974a170eb1d5", + "PolicySetDefinitionName": "335cefd2-ab16-430f-b364-974a170eb1d5", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "15521232277412542086", + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fff3e452-fff2-fff1-fff8-fff12618f1b8" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T22:19:18.8896095Z", + "ResourceId": "/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myrg/providers/Microsoft.Compute/virtualMachines/myvm1/extensions/DAExtension", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/95816fce53454b15a7ed803d", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/a2c0414b-82e4-459d-97d5-94c79a89232c", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef", + "ResourceType": "/Microsoft.Compute/virtualMachines/extensions", + "ResourceLocation": "westeurope", + "ResourceGroup": "myrg", + "ResourceTags": "tbd", + "PolicyAssignmentName": "95816fce53454b15a7ed803d", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"eastus\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "a2c0414b-82e4-459d-97d5-94c79a89232c", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "", + "PolicySetDefinitionName": "", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "", + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fff3e452-fff2-fff1-fff8-fff12618f1b8" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryNestedResourceScope.json new file mode 100644 index 000000000000..b57304691390 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryNestedResourceScope.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "policyEventsResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T20:43:04.6971328Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "181565554491747128", + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T20:43:04.6971328Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "624540685646900425", + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json new file mode 100644 index 000000000000..d8a2ae13afcc --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "policyEventsResource": "default", + "policyAssignmentId": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-08T00:07:16.2804863Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/defaultworkspace-fffedd8f-ffff-fffd-fffd-fffed2f84852-eus", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyDefinitions/myPolicyDefinition", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/microsoft.operationalinsights/workspaces", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "myPolicyAssignment", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": null, + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup", + "PolicyDefinitionName": "myPolicyAssignment", + "PolicyDefinitionAction": "deny", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": null, + "PolicySetDefinitionName": null, + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null, + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fff2f355-fff2-fffc-fffb-fff1639dff94" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-08T00:06:08.4302267Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/defaultworkspace-fffedd8f-ffff-fffd-fffd-fffed2f84852-eus", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyDefinitions/myPolicyDefinition", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/microsoft.operationalinsights/workspaces", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "myPolicyAssignment", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": null, + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup", + "PolicyDefinitionName": "myPolicyAssignment", + "PolicyDefinitionAction": "deny", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": null, + "PolicySetDefinitionName": null, + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null, + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fff2f355-fff2-fffc-fffb-fff1639dff94" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupScope.json new file mode 100644 index 000000000000..27ed7aeb56c9 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupScope.json @@ -0,0 +1,80 @@ +{ + "parameters": { + "policyEventsResource": "default", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceGroupName": "myResourceGroup", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T20:43:04.6971328Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "181565554491747128", + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T20:43:04.6971328Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "624540685646900425", + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceScope.json new file mode 100644 index 000000000000..06f2fc3c8bad --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceScope.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "policyEventsResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T15:14:39.8473851Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ClassicCompute/domainNames", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "PolicyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null, + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T15:14:39.5842458Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/d15545b8-ff50-409a-a6e3-5bd5cc954003", + "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ClassicCompute/domainNames", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "d15545b8-ff50-409a-a6e3-5bd5cc954003", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "PolicyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null, + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelNestedResourceScope.json new file mode 100644 index 000000000000..62ab3a69784b --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelNestedResourceScope.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "policyEventsResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T20:43:04.6971328Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", + "ResourceLocation": "eastus", + "ResourceGroup": "", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "181565554491747128", + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T20:43:04.6971328Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", + "ResourceLocation": "eastus", + "ResourceGroup": "", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "624540685646900425", + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json new file mode 100644 index 000000000000..ccb036aa5144 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "policyEventsResource": "default", + "policyAssignmentId": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-08T19:59:38.6401747Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/Microsoft.ClassicCompute/domainNames", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "PolicyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null, + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-08T19:59:34.2017762Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9daedab3-fb2d-461e-b861-71790eead4f6", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/Microsoft.ClassicCompute/domainNames", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "PolicyDefinitionName": "9daedab3-fb2d-461e-b861-71790eead4f6", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null, + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json new file mode 100644 index 000000000000..ff3eb3607247 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "policyEventsResource": "default", + "policyDefinitionId": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-08T19:58:11.590596Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/deploymentSlots/production/state/start", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/f4cc58b7db524a9799381531", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/Microsoft.ClassicCompute/domainNames/deploymentSlots/state", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "f4cc58b7db524a9799381531", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"TAGNAME_1\":{\"value\":\"NA\"}}", + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "PolicyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "PolicySetDefinitionName": "12b58873-e0f8-4b95-936c-86cbe7c9d697", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "14799174781370023846", + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-08T19:58:11.590596Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/deploymentSlots/production/state/start", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/f4cc58b7db524a9799381531", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/Microsoft.ClassicCompute/domainNames/deploymentSlots/state", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "f4cc58b7db524a9799381531", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"TAGNAME_1\":{\"value\":\"NA\"}}", + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "PolicyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "PolicySetDefinitionName": "12b58873-e0f8-4b95-936c-86cbe7c9d697", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "1679708035638239273", + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json new file mode 100644 index 000000000000..4c99f803e460 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "policyEventsResource": "default", + "policySetDefinitionId": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-08T19:49:32.9539023Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/serviceCertificates/sha1-FFFBDAF1FFFF109FFFD95FFFC9B0FFFD6F264FFF", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/Microsoft.ClassicCompute/domainNames/serviceCertificates", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "3f3c4330183b4e218fe6fd29", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "PolicyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "PolicySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null, + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-08T19:49:32.9498186Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/serviceCertificates/sha1-FFF36C1CFFF4BEA57FFFEFCFFF17B9F81B710FFF", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/Microsoft.ClassicCompute/domainNames/serviceCertificates", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "3f3c4330183b4e218fe6fd29", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "PolicyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "PolicySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null, + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelResourceScope.json new file mode 100644 index 000000000000..eda4626559e5 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelResourceScope.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "policyEventsResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T15:14:39.8473851Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.SomeNamespace/someResourceType", + "ResourceLocation": "eastus", + "ResourceGroup": "", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "PolicyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null, + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T15:14:39.5842458Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/d15545b8-ff50-409a-a6e3-5bd5cc954003", + "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.SomeNamespace/someResourceType", + "ResourceLocation": "eastus", + "ResourceGroup": "", + "ResourceTags": "tbd", + "PolicyAssignmentName": "d15545b8-ff50-409a-a6e3-5bd5cc954003", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "PolicyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null, + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionScope.json new file mode 100644 index 000000000000..0979f432efc7 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionScope.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "policyEventsResource": "default", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T20:43:04.6971328Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "181565554491747128", + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-07T20:43:04.6971328Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "624540685646900425", + "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/TimeRangeSortSelectTop.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/TimeRangeSortSelectTop.json new file mode 100644 index 000000000000..96df86e22050 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/TimeRangeSortSelectTop.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "policyEventsResource": "default", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-12-12-preview", + "$from": "2018-02-05T18:00:00Z", + "$to": "2018-02-06T18:00:00Z", + "$orderby": "Timestamp desc, PolicyAssignmentId asc, SubscriptionId asc, ResourceGroup asc, ResourceId", + "$select": "Timestamp, PolicyAssignmentId, PolicyDefinitionId, SubscriptionId, ResourceGroup, ResourceId", + "$top": 2 + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-05T22:34:02.3475017Z", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/89b27f38-e9e4-4468-ab81-801c84b8c017", + "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceGroup": "myResourceGroup", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomain" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", + "Timestamp": "2018-02-05T22:34:01.6135357Z", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/Enable Monitoring in Azure Security Center", + "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceGroup": "myResourceGroup", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomain" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/policyEvents.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/policyEvents.json new file mode 100644 index 000000000000..7f2365fcf945 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/policyEvents.json @@ -0,0 +1,882 @@ +{ + "swagger": "2.0", + "info": { + "title": "PolicyEventsClient", + "version": "2017-12-12-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/{managementGroupId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { + "post": { + "operationId": "PolicyEvents_ListQueryResultsForManagementGroup", + "description": "Queries policy events for the resources under the management group.", + "parameters": [ + { + "$ref": "#/parameters/policyEventsResourceParameter" + }, + { + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyEventsQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query at management group scope": { "$ref": "./examples/QueryManagementGroupScope.json" } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { + "post": { + "operationId": "PolicyEvents_ListQueryResultsForSubscription", + "description": "Queries policy events for the resources under the subscription.", + "parameters": [ + { + "$ref": "#/parameters/policyEventsResourceParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyEventsQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query at subscription scope": { "$ref": "./examples/QuerySubscriptionScope.json" }, + "Time range; sort, select and limit": { "$ref": "./examples/TimeRangeSortSelectTop.json" }, + "Filter and group with aggregate": { "$ref": "./examples/FilterAndGroupByWithAggregate.json" }, + "Filter and group without aggregate": { "$ref": "./examples/FilterAndGroupByWithoutAggregate.json" }, + "Filter and aggregate only": { "$ref": "./examples/FilterAndAggregateOnly.json" }, + "Filter and multiple groups": { "$ref": "./examples/FilterAndMultipleGroups.json" } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { + "post": { + "operationId": "PolicyEvents_ListQueryResultsForResourceGroup", + "description": "Queries policy events for the resources under the resource group.", + "parameters": [ + { + "$ref": "#/parameters/policyEventsResourceParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyEventsQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query at resource group scope": { "$ref": "./examples/QueryResourceGroupScope.json" } + } + } + }, + "/{resourceId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { + "post": { + "operationId": "PolicyEvents_ListQueryResultsForResource", + "description": "Queries policy events for the resource.", + "parameters": [ + { + "$ref": "#/parameters/policyEventsResourceParameter" + }, + { + "$ref": "#/parameters/resourceIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyEventsQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query at resource scope": { "$ref": "./examples/QueryResourceScope.json" }, + "Query at subscription level resource scope": { "$ref": "./examples/QuerySubscriptionLevelResourceScope.json" }, + "Query at nested resource scope": { "$ref": "./examples/QueryNestedResourceScope.json" }, + "Query at subscription level nested resource scope": { "$ref": "./examples/QuerySubscriptionLevelNestedResourceScope.json" } + } + } + }, + "/{policySetDefinitionId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { + "post": { + "operationId": "PolicyEvents_ListQueryResultsForPolicySetDefinition", + "description": "Queries policy events for the policy set definition.", + "parameters": [ + { + "$ref": "#/parameters/policyEventsResourceParameter" + }, + { + "$ref": "#/parameters/policySetDefinitionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyEventsQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query at subscription level policy set definition scope": { "$ref": "./examples/QuerySubscriptionLevelPolicySetDefinitionScope.json" } + } + } + }, + "/{policyDefinitionId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { + "post": { + "operationId": "PolicyEvents_ListQueryResultsForPolicyDefinition", + "description": "Queries policy events for the policy definition.", + "parameters": [ + { + "$ref": "#/parameters/policyEventsResourceParameter" + }, + { + "$ref": "#/parameters/policyDefinitionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyEventsQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query at subscription level policy definition scope": { "$ref": "./examples/QuerySubscriptionLevelPolicyDefinitionScope.json" } + } + } + }, + "/{policyAssignmentId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { + "post": { + "operationId": "PolicyEvents_ListQueryResultsForPolicyAssignment", + "description": "Queries policy events for the policy assignment.", + "parameters": [ + { + "$ref": "#/parameters/policyEventsResourceParameter" + }, + { + "$ref": "#/parameters/policyAssignmentIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyEventsQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query at subscription level policy assignment scope": { "$ref": "./examples/QuerySubscriptionLevelPolicyAssignmentScope.json" }, + "Query at resource group level policy assignment scope": { "$ref": "./examples/QueryResourceGroupLevelPolicyAssignmentScope.json" } + } + } + }, + "/providers/Microsoft.PolicyInsights/operations": { + "get": { + "operationId": "PolicyInsights_ListOperations", + "description": "Lists available operations.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "List of available operations.", + "schema": { + "$ref": "#/definitions/Operations" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "List operations": { "$ref": "./examples/ListOperations.json" } + } + } + }, + "/{scope}/providers/Microsoft.PolicyInsights/policyEvents/$metadata": { + "get": { + "operationId": "PolicyEvents_GetMetadata", + "description": "Gets OData metadata XML document.", + "produces": [ + "application/xml" + ], + "parameters": [ + { + "$ref": "#/parameters/scopeParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OData metadata XML document.", + "schema": { + "$ref": "#/definitions/MetadataDocument" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Get metadata": { "$ref": "./examples/GetMetadata.json" } + } + } + } + }, + "definitions": { + "PolicyEventsQueryResults": { + "description": "Query results.", + "properties": { + "@odata.context": { + "description": "OData context string; used by OData clients to resolve type information based on metadata.", + "type": "string" + }, + "@odata.count": { + "description": "OData entity count; represents the number of policy event records returned.", + "type": "integer", + "format": "int32", + "minimum": 0 + }, + "value": { + "description": "Query results.", + "type": "array", + "items": { + "$ref": "#/definitions/PolicyEvent" + } + } + } + }, + "PolicyEvent": { + "description": "Policy event record.", + "properties": { + "@odata.id": { + "description": "OData entity ID; always set to null since policy event records do not have an entity ID.", + "type": "string" + }, + "@odata.context": { + "description": "OData context string; used by OData clients to resolve type information based on metadata.", + "type": "string" + }, + "timestamp": { + "description": "Timestamp for the policy event record.", + "type": "string", + "format": "date-time" + }, + "resourceId": { + "description": "Resource ID.", + "type": "string" + }, + "policyAssignmentId": { + "description": "Policy assignment ID.", + "type": "string" + }, + "policyDefinitionId": { + "description": "Policy definition ID.", + "type": "string" + }, + "effectiveParameters": { + "description": "Effective parameters for the policy assignment.", + "type": "string" + }, + "isCompliant": { + "description": "Flag which states whether the resource is compliant against the policy assignment it was evaluated against.", + "type": "boolean" + }, + "subscriptionId": { + "description": "Subscription ID.", + "type": "string" + }, + "resourceType": { + "description": "Resource type.", + "type": "string" + }, + "resourceLocation": { + "description": "Resource location.", + "type": "string" + }, + "resourceGroup": { + "description": "Resource group name.", + "type": "string" + }, + "resourceTags": { + "description": "List of resource tags.", + "type": "string" + }, + "policyAssignmentName": { + "description": "Policy assignment name.", + "type": "string" + }, + "policyAssignmentOwner": { + "description": "Policy assignment owner.", + "type": "string" + }, + "policyAssignmentParameters": { + "description": "Policy assignment parameters.", + "type": "string" + }, + "policyAssignmentScope": { + "description": "Policy assignment scope.", + "type": "string" + }, + "policyDefinitionName": { + "description": "Policy definition name.", + "type": "string" + }, + "policyDefinitionAction": { + "description": "Policy definition action, i.e. effect.", + "type": "string" + }, + "policyDefinitionCategory": { + "description": "Policy definition category.", + "type": "string" + }, + "policySetDefinitionId": { + "description": "Policy set definition ID, if the policy assignment is for a policy set.", + "type": "string" + }, + "policySetDefinitionName": { + "description": "Policy set definition name, if the policy assignment is for a policy set.", + "type": "string" + }, + "policySetDefinitionOwner": { + "description": "Policy set definition owner, if the policy assignment is for a policy set.", + "type": "string" + }, + "policySetDefinitionCategory": { + "description": "Policy set definition category, if the policy assignment is for a policy set.", + "type": "string" + }, + "policySetDefinitionParameters": { + "description": "Policy set definition parameters, if the policy assignment is for a policy set.", + "type": "string" + }, + "managementGroupIds": { + "description": "Comma seperated list of management group IDs, which represent the hierarchy of the management groups the resource is under.", + "type": "string" + }, + "policyDefinitionReferenceId": { + "description": "Reference ID for the policy definition inside the policy set, if the policy assignment is for a policy set.", + "type": "string" + }, + "tenantId": { + "description": "Tenant ID for the policy event record.", + "type": "string" + }, + "principalOid": { + "description": "Principal object ID for the user who initiated the resource operation that triggered the policy event.", + "type": "string" + } + } + }, + "QueryFailure": { + "description": "Error response.", + "properties": { + "error": { + "description": "Error definition.", + "properties": { + "code": { + "description": "Service specific error code which serves as the substatus for the HTTP error code.", + "type": "string" + }, + "message": { + "description": "Description of the error.", + "type": "string" + } + } + } + } + }, + "Operations": { + "description": "List of available operations.", + "properties": { + "value": { + "description": "List of available operations.", + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + } + } + } + }, + "Operation": { + "description": "Operation definition.", + "properties": { + "name": { + "description": "Operation name.", + "type": "string" + }, + "display": { + "description": "Display metadata associated with the operation.", + "properties": { + "provider": { + "description": "Resource provider name.", + "type": "string" + }, + "resource": { + "description": "Resource name on which the operation is performed.", + "type": "string" + }, + "operation": { + "description": "Operation name.", + "type": "string" + }, + "description": { + "description": "Operation description.", + "type": "string" + } + } + } + } + }, + "MetadataDocument": { + "description": "Metadata XML document.", + "type": "string" + } + }, + "parameters": { + "policyEventsResourceParameter": { + "name": "policyEventsResource", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "description": "The name of the virtual resource under PolicyEvents resource type; only \"default\" is allowed.", + "x-ms-parameter-location": "method" + }, + "managementGroupIdParameter": { + "name": "managementGroupId", + "in": "path", + "required": true, + "type": "string", + "description": "Management group ID, e.g. /providers/Microsoft.Management/managementGroups/{name}.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "subscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "Microsoft Azure subscription ID.", + "x-ms-parameter-location": "method" + }, + "resourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Resource group name.", + "x-ms-parameter-location": "method" + }, + "resourceIdParameter": { + "name": "resourceId", + "in": "path", + "required": true, + "type": "string", + "description": "Resource ID.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "policySetDefinitionIdParameter": { + "name": "policySetDefinitionId", + "in": "path", + "required": true, + "type": "string", + "description": "Subscription level policy set definition ID.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "policyDefinitionIdParameter": { + "name": "policyDefinitionId", + "in": "path", + "required": true, + "type": "string", + "description": "Subscription level policy definition ID.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "policyAssignmentIdParameter": { + "name": "policyAssignmentId", + "in": "path", + "required": true, + "type": "string", + "description": "Subscription level or a resource group level policy assignment ID.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "scopeParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "A valid scope, i.e. management group, subscription, resource group, or resource ID. Scope used has no effect on metadata returned.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "API version to use with the client requests.", + "x-ms-parameter-location": "client" + }, + "topParameter": { + "name": "$top", + "in": "query", + "required": false, + "type": "integer", + "format": "int32", + "minimum": 0, + "description": "Maximum number of records to return.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Top" + }, + "orderByParameter": { + "name": "$orderby", + "in": "query", + "required": false, + "type": "string", + "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "OrderBy" + }, + "selectParameter": { + "name": "$select", + "in": "query", + "required": false, + "type": "string", + "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Select" + }, + "fromParameter": { + "name": "$from", + "in": "query", + "required": false, + "type": "string", + "format": "date-time", + "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "From" + }, + "toParameter": { + "name": "$to", + "in": "query", + "required": false, + "type": "string", + "format": "date-time", + "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "To" + }, + "filterParameter": { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "OData filter expression.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Filter" + }, + "applyParameter": { + "name": "$apply", + "in": "query", + "required": false, + "type": "string", + "description": "OData apply expression for aggregations.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Apply" + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndAggregateOnly.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndAggregateOnly.json new file mode 100644 index 000000000000..ba77d538455c --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndAggregateOnly.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "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 NumDenyStates)" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "metadata": { + "generatedQuery": "" + }, + "columns": { + "NumDenyStates": { + "ordinal": 1, + "name": "NumDenyStates", + "dataType": "Numeric" + } + }, + "rows": [ + [ + 12 + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndGroupByWithAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndGroupByWithAggregate.json new file mode 100644 index 000000000000..08ad43bf0cd9 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndGroupByWithAggregate.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-08-09-preview", + "$from": "2018-02-05T18:00:00Z", + "$filter": "IsCompliant eq false and (PolicyDefinitionAction eq 'audit' or PolicyDefinitionAction eq 'deny')", + "$apply": "groupby((PolicyAssignmentId, PolicyDefinitionId, PolicyDefinitionAction, ResourceId), aggregate($count as NumAuditDenyNonComplianceRecords))", + "$orderby": "NumAuditDenyNonComplianceRecords desc", + "$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" + }, + "NumAuditDenyNonComplianceRecords": { + "ordinal": 5, + "name": "NumAuditDenyNonComplianceRecords", + "dataType": "Numeric" + } + }, + "rows": [ + [ + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "audit", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.classiccompute/domainnames/myDomainName", + 8 + ], + [ + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", + "/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.classiccompute/domainnames/myDomainName", + 8 + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndGroupByWithoutAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndGroupByWithoutAggregate.json new file mode 100644 index 000000000000..20c1afea661d --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndGroupByWithoutAggregate.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-08-09-preview", + "$from": "2018-01-05T18:00:00Z", + "$filter": "IsCompliant eq false and (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/providers/microsoft.authorization/policyassignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "/providers/microsoft.authorization/policydefinitions/44452482-524f-4bf4-b852-0bff7cc4a3ed", + "auditifnotexists", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.network/virtualnetworks/vnet" + ], + [ + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d15545b8-ff50-409a-a6e3-5bd5cc954003", + "/providers/microsoft.authorization/policydefinitions/44452482-524f-4bf4-b852-0bff7cc4a3ed", + "auditifnotexists", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.network/virtualnetworks/vnet" + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndMultipleGroups.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndMultipleGroups.json new file mode 100644 index 000000000000..4aff983060b9 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndMultipleGroups.json @@ -0,0 +1,123 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-08-09-preview", + "$filter": "IsCompliant eq false", + "$apply": "groupby((PolicyAssignmentId, PolicySetDefinitionId, PolicyDefinitionId, PolicyDefinitionReferenceId, ResourceId))/groupby((PolicyAssignmentId, PolicySetDefinitionId, PolicyDefinitionId, PolicyDefinitionReferenceId), aggregate($count as NumNonCompliantResources))", + "$orderby": "NumNonCompliantResources desc", + "$top": "10" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "metadata": { + "generatedQuery": "" + }, + "columns": { + "PolicyAssignmentId": { + "ordinal": 1, + "name": "PolicyAssignmentId", + "dataType": "String" + }, + "PolicySetDefinitionId": { + "ordinal": 2, + "name": "PolicySetDefinitionId", + "dataType": "String" + }, + "PolicyDefinitionId": { + "ordinal": 3, + "name": "PolicyDefinitionId", + "dataType": "String" + }, + "PolicyDefinitionReferenceId": { + "ordinal": 4, + "name": "PolicyDefinitionReferenceId", + "dataType": "String" + }, + "NumNonCompliantResources": { + "ordinal": 5, + "name": "NumNonCompliantResources", + "dataType": "Numeric" + } + }, + "rows": [ + [ + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "1679708035638239273", + 557 + ], + [ + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "14799174781370023846", + 557 + ], + [ + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "1679708035638239273", + 557 + ], + [ + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49", + "", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "", + 557 + ], + [ + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7", + "", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "", + 557 + ], + [ + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "14799174781370023846", + 557 + ], + [ + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "", + 552 + ], + [ + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/a03db67e-a286-43c3-9098-b2da83d361ad", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "8935913113203900114", + 544 + ], + [ + "/providers/microsoft.management/managementgroups/azgovtest1/providers/microsoft.authorization/policyassignments/8174043a1e2849179635b874", + "", + "/providers/microsoft.management/managementgroups/azgovtest1/providers/microsoft.authorization/policydefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "", + 526 + ], + [ + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "2124621540977569058", + 509 + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/ListOperations.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/ListOperations.json new file mode 100644 index 000000000000..d5a2b53cb332 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/ListOperations.json @@ -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." + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryManagementGroupScope.json new file mode 100644 index 000000000000..3c7b1026693a --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryManagementGroupScope.json @@ -0,0 +1,203 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "managementGroupId": "providers/Microsoft.Management/managementGroups/myManagementGroup", + "api-version": "2017-08-09-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "metadata": { + "generatedQuery": "" + }, + "columns": { + "Timestamp": { + "ordinal": 1, + "name": "Timestamp", + "dataType": "DateTime" + }, + "ResourceId": { + "ordinal": 2, + "name": "ResourceId", + "dataType": "String" + }, + "PolicyAssignmentId": { + "ordinal": 3, + "name": "PolicyAssignmentId", + "dataType": "String" + }, + "PolicyDefinitionId": { + "ordinal": 4, + "name": "PolicyDefinitionId", + "dataType": "String" + }, + "EffectiveParameters": { + "ordinal": 5, + "name": "EffectiveParameters", + "dataType": "String" + }, + "IsCompliant": { + "ordinal": 6, + "name": "IsCompliant", + "dataType": "Boolean" + }, + "SubscriptionId": { + "ordinal": 7, + "name": "SubscriptionId", + "dataType": "String" + }, + "ResourceType": { + "ordinal": 8, + "name": "ResourceType", + "dataType": "String" + }, + "ResourceLocation": { + "ordinal": 9, + "name": "ResourceLocation", + "dataType": "String" + }, + "ResourceGroup": { + "ordinal": 10, + "name": "ResourceGroup", + "dataType": "String" + }, + "ResourceTags": { + "ordinal": 11, + "name": "ResourceTags", + "dataType": "String" + }, + "PolicyAssignmentName": { + "ordinal": 12, + "name": "PolicyAssignmentName", + "dataType": "String" + }, + "PolicyAssignmentOwner": { + "ordinal": 13, + "name": "PolicyAssignmentOwner", + "dataType": "String" + }, + "PolicyAssignmentParameters": { + "ordinal": 14, + "name": "PolicyAssignmentParameters", + "dataType": "String" + }, + "PolicyAssignmentScope": { + "ordinal": 15, + "name": "PolicyAssignmentScope", + "dataType": "String" + }, + "PolicyDefinitionName": { + "ordinal": 16, + "name": "PolicyDefinitionName", + "dataType": "String" + }, + "PolicyDefinitionAction": { + "ordinal": 17, + "name": "PolicyDefinitionAction", + "dataType": "String" + }, + "PolicyDefinitionCategory": { + "ordinal": 18, + "name": "PolicyDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionId": { + "ordinal": 19, + "name": "PolicySetDefinitionId", + "dataType": "String" + }, + "PolicySetDefinitionName": { + "ordinal": 20, + "name": "PolicySetDefinitionName", + "dataType": "String" + }, + "PolicySetDefinitionOwner": { + "ordinal": 21, + "name": "PolicySetDefinitionOwner", + "dataType": "String" + }, + "PolicySetDefinitionCategory": { + "ordinal": 22, + "name": "PolicySetDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionParameters": { + "ordinal": 23, + "name": "PolicySetDefinitionParameters", + "dataType": "String" + }, + "ManagementGroupIds": { + "ordinal": 24, + "name": "ManagementGroupIds", + "dataType": "String" + }, + "PolicyDefinitionReferenceId": { + "ordinal": 25, + "name": "PolicyDefinitionReferenceId", + "dataType": "String" + } + }, + "rows": [ + [ + "2018-02-08T23:19:37Z", + "/subscriptions/fff83be3-fff8-fff8-fff5-fff2625f5bb5/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myResourceGroup-vnet", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/8174043a1e2849179635b874", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + null, + false, + "fff83be3-fff8-fff8-fff5-fff2625f5bb5", + "/Microsoft.Network/virtualNetworks", + "westcentralus", + "myResourceGroup", + "tbd", + "8174043a1e2849179635b874", + "tbd", + "{\"allowedResourceGroups\":{\"value\":[\"value1\",\"value2\",\"value3\"]}}", + "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "audit", + "tbd", + null, + null, + null, + null, + null, + "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + null + ], + [ + "2018-02-08T23:19:37Z", + "/subscriptions/fff83be3-fff8-fff8-fff5-fff2625f5bb5/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myResourceGroup-vnet", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/95816fce53454b15a7ed803d", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/a2c0414b-82e4-459d-97d5-94c79a89232c", + null, + false, + "fff83be3-fff8-fff8-fff5-fff2625f5bb5", + "/Microsoft.Network/virtualNetworks", + "westcentralus", + "myResourceGroup", + "tbd", + "95816fce53454b15a7ed803d", + "tbd", + "{\"allowedLocations\":{\"value\":[\"eastus\"]}}", + "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "a2c0414b-82e4-459d-97d5-94c79a89232c", + "audit", + "tbd", + null, + null, + null, + null, + null, + "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + null + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryNestedResourceScope.json new file mode 100644 index 000000000000..472b013ee782 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryNestedResourceScope.json @@ -0,0 +1,203 @@ +{ + "parameters": { + "policyStatesResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "api-version": "2017-08-09-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "metadata": { + "generatedQuery": "" + }, + "columns": { + "Timestamp": { + "ordinal": 1, + "name": "Timestamp", + "dataType": "DateTime" + }, + "ResourceId": { + "ordinal": 2, + "name": "ResourceId", + "dataType": "String" + }, + "PolicyAssignmentId": { + "ordinal": 3, + "name": "PolicyAssignmentId", + "dataType": "String" + }, + "PolicyDefinitionId": { + "ordinal": 4, + "name": "PolicyDefinitionId", + "dataType": "String" + }, + "EffectiveParameters": { + "ordinal": 5, + "name": "EffectiveParameters", + "dataType": "String" + }, + "IsCompliant": { + "ordinal": 6, + "name": "IsCompliant", + "dataType": "Boolean" + }, + "SubscriptionId": { + "ordinal": 7, + "name": "SubscriptionId", + "dataType": "String" + }, + "ResourceType": { + "ordinal": 8, + "name": "ResourceType", + "dataType": "String" + }, + "ResourceLocation": { + "ordinal": 9, + "name": "ResourceLocation", + "dataType": "String" + }, + "ResourceGroup": { + "ordinal": 10, + "name": "ResourceGroup", + "dataType": "String" + }, + "ResourceTags": { + "ordinal": 11, + "name": "ResourceTags", + "dataType": "String" + }, + "PolicyAssignmentName": { + "ordinal": 12, + "name": "PolicyAssignmentName", + "dataType": "String" + }, + "PolicyAssignmentOwner": { + "ordinal": 13, + "name": "PolicyAssignmentOwner", + "dataType": "String" + }, + "PolicyAssignmentParameters": { + "ordinal": 14, + "name": "PolicyAssignmentParameters", + "dataType": "String" + }, + "PolicyAssignmentScope": { + "ordinal": 15, + "name": "PolicyAssignmentScope", + "dataType": "String" + }, + "PolicyDefinitionName": { + "ordinal": 16, + "name": "PolicyDefinitionName", + "dataType": "String" + }, + "PolicyDefinitionAction": { + "ordinal": 17, + "name": "PolicyDefinitionAction", + "dataType": "String" + }, + "PolicyDefinitionCategory": { + "ordinal": 18, + "name": "PolicyDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionId": { + "ordinal": 19, + "name": "PolicySetDefinitionId", + "dataType": "String" + }, + "PolicySetDefinitionName": { + "ordinal": 20, + "name": "PolicySetDefinitionName", + "dataType": "String" + }, + "PolicySetDefinitionOwner": { + "ordinal": 21, + "name": "PolicySetDefinitionOwner", + "dataType": "String" + }, + "PolicySetDefinitionCategory": { + "ordinal": 22, + "name": "PolicySetDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionParameters": { + "ordinal": 23, + "name": "PolicySetDefinitionParameters", + "dataType": "String" + }, + "ManagementGroupIds": { + "ordinal": 24, + "name": "ManagementGroupIds", + "dataType": "String" + }, + "PolicyDefinitionReferenceId": { + "ordinal": 25, + "name": "PolicyDefinitionReferenceId", + "dataType": "String" + } + }, + "rows": [ + [ + "2018-02-08T07:04:29Z", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/d6be6bb37e5f4333baa95c2a", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/5948d091-78b7-4d3b-a404-cc6a0329b0c6", + null, + false, + "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "/Microsoft.ServiceFabric/clusters/applications", + "eastus", + "myResourceGroup", + "tbd", + "d6be6bb37e5f4333baa95c2a", + "tbd", + "{}", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "5948d091-78b7-4d3b-a404-cc6a0329b0c6", + "audit", + "tbd", + "", + "", + null, + null, + null, + "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + null + ], + [ + "2018-02-08T07:04:29Z", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + null, + false, + "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "/Microsoft.ServiceFabric/clusters/applications", + "eastus", + "myResourceGroup", + "tbd", + "3f3c4330183b4e218fe6fd29", + "tbd", + "{}", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "24813039-7534-408a-9842-eb99f45721b1", + "audit", + "tbd", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "3e3807c1-65c9-49e0-a406-82d8ae3e338c", + null, + null, + null, + "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + null + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryResourceGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryResourceGroupScope.json new file mode 100644 index 000000000000..db139dfd14f8 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryResourceGroupScope.json @@ -0,0 +1,204 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceGroupName": "myResourceGroup", + "api-version": "2017-08-09-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "metadata": { + "generatedQuery": "" + }, + "columns": { + "Timestamp": { + "ordinal": 1, + "name": "Timestamp", + "dataType": "DateTime" + }, + "ResourceId": { + "ordinal": 2, + "name": "ResourceId", + "dataType": "String" + }, + "PolicyAssignmentId": { + "ordinal": 3, + "name": "PolicyAssignmentId", + "dataType": "String" + }, + "PolicyDefinitionId": { + "ordinal": 4, + "name": "PolicyDefinitionId", + "dataType": "String" + }, + "EffectiveParameters": { + "ordinal": 5, + "name": "EffectiveParameters", + "dataType": "String" + }, + "IsCompliant": { + "ordinal": 6, + "name": "IsCompliant", + "dataType": "Boolean" + }, + "SubscriptionId": { + "ordinal": 7, + "name": "SubscriptionId", + "dataType": "String" + }, + "ResourceType": { + "ordinal": 8, + "name": "ResourceType", + "dataType": "String" + }, + "ResourceLocation": { + "ordinal": 9, + "name": "ResourceLocation", + "dataType": "String" + }, + "ResourceGroup": { + "ordinal": 10, + "name": "ResourceGroup", + "dataType": "String" + }, + "ResourceTags": { + "ordinal": 11, + "name": "ResourceTags", + "dataType": "String" + }, + "PolicyAssignmentName": { + "ordinal": 12, + "name": "PolicyAssignmentName", + "dataType": "String" + }, + "PolicyAssignmentOwner": { + "ordinal": 13, + "name": "PolicyAssignmentOwner", + "dataType": "String" + }, + "PolicyAssignmentParameters": { + "ordinal": 14, + "name": "PolicyAssignmentParameters", + "dataType": "String" + }, + "PolicyAssignmentScope": { + "ordinal": 15, + "name": "PolicyAssignmentScope", + "dataType": "String" + }, + "PolicyDefinitionName": { + "ordinal": 16, + "name": "PolicyDefinitionName", + "dataType": "String" + }, + "PolicyDefinitionAction": { + "ordinal": 17, + "name": "PolicyDefinitionAction", + "dataType": "String" + }, + "PolicyDefinitionCategory": { + "ordinal": 18, + "name": "PolicyDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionId": { + "ordinal": 19, + "name": "PolicySetDefinitionId", + "dataType": "String" + }, + "PolicySetDefinitionName": { + "ordinal": 20, + "name": "PolicySetDefinitionName", + "dataType": "String" + }, + "PolicySetDefinitionOwner": { + "ordinal": 21, + "name": "PolicySetDefinitionOwner", + "dataType": "String" + }, + "PolicySetDefinitionCategory": { + "ordinal": 22, + "name": "PolicySetDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionParameters": { + "ordinal": 23, + "name": "PolicySetDefinitionParameters", + "dataType": "String" + }, + "ManagementGroupIds": { + "ordinal": 24, + "name": "ManagementGroupIds", + "dataType": "String" + }, + "PolicyDefinitionReferenceId": { + "ordinal": 25, + "name": "PolicyDefinitionReferenceId", + "dataType": "String" + } + }, + "rows": [ + [ + "2018-02-09T00:06:00Z", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/serviceCertificates/sha1-FFFBDAF1F25210FFFDD95BD0C9B0AFCD6F26FFFF", + "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + null, + false, + "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "/Microsoft.ClassicCompute/domainNames/serviceCertificates", + "eastus", + "myResourceGroup", + "tbd", + "186044306c044a1d8c0ff76c", + "tbd", + "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "/providers/Microsoft.Management/managementGroups/mymg", + "022d9357-5a90-46f7-9554-21d30ce4c32d", + "audit", + "tbd", + null, + null, + null, + null, + null, + "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + null + ], + [ + "2018-02-09T00:06:00Z", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + null, + false, + "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "/Microsoft.ClassicCompute/domainNames", + "eastus", + "myResourceGroup", + "tbd", + "186044306c044a1d8c0ff76c", + "tbd", + "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "/providers/Microsoft.Management/managementGroups/mymg", + "022d9357-5a90-46f7-9554-21d30ce4c32d", + "audit", + "tbd", + null, + null, + null, + null, + null, + "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + null + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryResourceScope.json new file mode 100644 index 000000000000..8271ca16056d --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryResourceScope.json @@ -0,0 +1,203 @@ +{ + "parameters": { + "policyStatesResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "api-version": "2017-08-09-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "metadata": { + "generatedQuery": "" + }, + "columns": { + "Timestamp": { + "ordinal": 1, + "name": "Timestamp", + "dataType": "DateTime" + }, + "ResourceId": { + "ordinal": 2, + "name": "ResourceId", + "dataType": "String" + }, + "PolicyAssignmentId": { + "ordinal": 3, + "name": "PolicyAssignmentId", + "dataType": "String" + }, + "PolicyDefinitionId": { + "ordinal": 4, + "name": "PolicyDefinitionId", + "dataType": "String" + }, + "EffectiveParameters": { + "ordinal": 5, + "name": "EffectiveParameters", + "dataType": "String" + }, + "IsCompliant": { + "ordinal": 6, + "name": "IsCompliant", + "dataType": "Boolean" + }, + "SubscriptionId": { + "ordinal": 7, + "name": "SubscriptionId", + "dataType": "String" + }, + "ResourceType": { + "ordinal": 8, + "name": "ResourceType", + "dataType": "String" + }, + "ResourceLocation": { + "ordinal": 9, + "name": "ResourceLocation", + "dataType": "String" + }, + "ResourceGroup": { + "ordinal": 10, + "name": "ResourceGroup", + "dataType": "String" + }, + "ResourceTags": { + "ordinal": 11, + "name": "ResourceTags", + "dataType": "String" + }, + "PolicyAssignmentName": { + "ordinal": 12, + "name": "PolicyAssignmentName", + "dataType": "String" + }, + "PolicyAssignmentOwner": { + "ordinal": 13, + "name": "PolicyAssignmentOwner", + "dataType": "String" + }, + "PolicyAssignmentParameters": { + "ordinal": 14, + "name": "PolicyAssignmentParameters", + "dataType": "String" + }, + "PolicyAssignmentScope": { + "ordinal": 15, + "name": "PolicyAssignmentScope", + "dataType": "String" + }, + "PolicyDefinitionName": { + "ordinal": 16, + "name": "PolicyDefinitionName", + "dataType": "String" + }, + "PolicyDefinitionAction": { + "ordinal": 17, + "name": "PolicyDefinitionAction", + "dataType": "String" + }, + "PolicyDefinitionCategory": { + "ordinal": 18, + "name": "PolicyDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionId": { + "ordinal": 19, + "name": "PolicySetDefinitionId", + "dataType": "String" + }, + "PolicySetDefinitionName": { + "ordinal": 20, + "name": "PolicySetDefinitionName", + "dataType": "String" + }, + "PolicySetDefinitionOwner": { + "ordinal": 21, + "name": "PolicySetDefinitionOwner", + "dataType": "String" + }, + "PolicySetDefinitionCategory": { + "ordinal": 22, + "name": "PolicySetDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionParameters": { + "ordinal": 23, + "name": "PolicySetDefinitionParameters", + "dataType": "String" + }, + "ManagementGroupIds": { + "ordinal": 24, + "name": "ManagementGroupIds", + "dataType": "String" + }, + "PolicyDefinitionReferenceId": { + "ordinal": 25, + "name": "PolicyDefinitionReferenceId", + "dataType": "String" + } + }, + "rows": [ + [ + "2018-02-08T07:04:29Z", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + null, + false, + "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "/Microsoft.ClassicCompute/domainNames", + "eastus", + "myResourceGroup", + "tbd", + "186044306c044a1d8c0ff76c", + "tbd", + "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "/providers/Microsoft.Management/managementGroups/mymg", + "022d9357-5a90-46f7-9554-21d30ce4c32d", + "audit", + "tbd", + null, + null, + null, + null, + null, + "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + null + ], + [ + "2018-02-08T07:04:29Z", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", + null, + false, + "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "/Microsoft.ClassicCompute/domainNames", + "eastus", + "myResourceGroup", + "tbd", + "test", + "tbd", + "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "Audit a tag and it's value", + "audit", + "tbd", + null, + null, + null, + null, + null, + "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + null + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QuerySubscriptionLevelNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QuerySubscriptionLevelNestedResourceScope.json new file mode 100644 index 000000000000..e2a800113ec3 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QuerySubscriptionLevelNestedResourceScope.json @@ -0,0 +1,203 @@ +{ + "parameters": { + "policyStatesResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "api-version": "2017-08-09-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "metadata": { + "generatedQuery": "" + }, + "columns": { + "Timestamp": { + "ordinal": 1, + "name": "Timestamp", + "dataType": "DateTime" + }, + "ResourceId": { + "ordinal": 2, + "name": "ResourceId", + "dataType": "String" + }, + "PolicyAssignmentId": { + "ordinal": 3, + "name": "PolicyAssignmentId", + "dataType": "String" + }, + "PolicyDefinitionId": { + "ordinal": 4, + "name": "PolicyDefinitionId", + "dataType": "String" + }, + "EffectiveParameters": { + "ordinal": 5, + "name": "EffectiveParameters", + "dataType": "String" + }, + "IsCompliant": { + "ordinal": 6, + "name": "IsCompliant", + "dataType": "Boolean" + }, + "SubscriptionId": { + "ordinal": 7, + "name": "SubscriptionId", + "dataType": "String" + }, + "ResourceType": { + "ordinal": 8, + "name": "ResourceType", + "dataType": "String" + }, + "ResourceLocation": { + "ordinal": 9, + "name": "ResourceLocation", + "dataType": "String" + }, + "ResourceGroup": { + "ordinal": 10, + "name": "ResourceGroup", + "dataType": "String" + }, + "ResourceTags": { + "ordinal": 11, + "name": "ResourceTags", + "dataType": "String" + }, + "PolicyAssignmentName": { + "ordinal": 12, + "name": "PolicyAssignmentName", + "dataType": "String" + }, + "PolicyAssignmentOwner": { + "ordinal": 13, + "name": "PolicyAssignmentOwner", + "dataType": "String" + }, + "PolicyAssignmentParameters": { + "ordinal": 14, + "name": "PolicyAssignmentParameters", + "dataType": "String" + }, + "PolicyAssignmentScope": { + "ordinal": 15, + "name": "PolicyAssignmentScope", + "dataType": "String" + }, + "PolicyDefinitionName": { + "ordinal": 16, + "name": "PolicyDefinitionName", + "dataType": "String" + }, + "PolicyDefinitionAction": { + "ordinal": 17, + "name": "PolicyDefinitionAction", + "dataType": "String" + }, + "PolicyDefinitionCategory": { + "ordinal": 18, + "name": "PolicyDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionId": { + "ordinal": 19, + "name": "PolicySetDefinitionId", + "dataType": "String" + }, + "PolicySetDefinitionName": { + "ordinal": 20, + "name": "PolicySetDefinitionName", + "dataType": "String" + }, + "PolicySetDefinitionOwner": { + "ordinal": 21, + "name": "PolicySetDefinitionOwner", + "dataType": "String" + }, + "PolicySetDefinitionCategory": { + "ordinal": 22, + "name": "PolicySetDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionParameters": { + "ordinal": 23, + "name": "PolicySetDefinitionParameters", + "dataType": "String" + }, + "ManagementGroupIds": { + "ordinal": 24, + "name": "ManagementGroupIds", + "dataType": "String" + }, + "PolicyDefinitionReferenceId": { + "ordinal": 25, + "name": "PolicyDefinitionReferenceId", + "dataType": "String" + } + }, + "rows": [ + [ + "2018-02-08T07:04:29Z", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/d6be6bb37e5f4333baa95c2a", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/5948d091-78b7-4d3b-a404-cc6a0329b0c6", + null, + false, + "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", + "eastus", + "", + "tbd", + "d6be6bb37e5f4333baa95c2a", + "tbd", + "{}", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "5948d091-78b7-4d3b-a404-cc6a0329b0c6", + "audit", + "tbd", + "", + "", + null, + null, + null, + "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + null + ], + [ + "2018-02-08T07:04:29Z", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + null, + false, + "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", + "eastus", + "", + "tbd", + "3f3c4330183b4e218fe6fd29", + "tbd", + "{}", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "24813039-7534-408a-9842-eb99f45721b1", + "audit", + "tbd", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "3e3807c1-65c9-49e0-a406-82d8ae3e338c", + null, + null, + null, + "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + null + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QuerySubscriptionLevelResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QuerySubscriptionLevelResourceScope.json new file mode 100644 index 000000000000..78f90110965d --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QuerySubscriptionLevelResourceScope.json @@ -0,0 +1,203 @@ +{ + "parameters": { + "policyStatesResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "api-version": "2017-08-09-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "metadata": { + "generatedQuery": "" + }, + "columns": { + "Timestamp": { + "ordinal": 1, + "name": "Timestamp", + "dataType": "DateTime" + }, + "ResourceId": { + "ordinal": 2, + "name": "ResourceId", + "dataType": "String" + }, + "PolicyAssignmentId": { + "ordinal": 3, + "name": "PolicyAssignmentId", + "dataType": "String" + }, + "PolicyDefinitionId": { + "ordinal": 4, + "name": "PolicyDefinitionId", + "dataType": "String" + }, + "EffectiveParameters": { + "ordinal": 5, + "name": "EffectiveParameters", + "dataType": "String" + }, + "IsCompliant": { + "ordinal": 6, + "name": "IsCompliant", + "dataType": "Boolean" + }, + "SubscriptionId": { + "ordinal": 7, + "name": "SubscriptionId", + "dataType": "String" + }, + "ResourceType": { + "ordinal": 8, + "name": "ResourceType", + "dataType": "String" + }, + "ResourceLocation": { + "ordinal": 9, + "name": "ResourceLocation", + "dataType": "String" + }, + "ResourceGroup": { + "ordinal": 10, + "name": "ResourceGroup", + "dataType": "String" + }, + "ResourceTags": { + "ordinal": 11, + "name": "ResourceTags", + "dataType": "String" + }, + "PolicyAssignmentName": { + "ordinal": 12, + "name": "PolicyAssignmentName", + "dataType": "String" + }, + "PolicyAssignmentOwner": { + "ordinal": 13, + "name": "PolicyAssignmentOwner", + "dataType": "String" + }, + "PolicyAssignmentParameters": { + "ordinal": 14, + "name": "PolicyAssignmentParameters", + "dataType": "String" + }, + "PolicyAssignmentScope": { + "ordinal": 15, + "name": "PolicyAssignmentScope", + "dataType": "String" + }, + "PolicyDefinitionName": { + "ordinal": 16, + "name": "PolicyDefinitionName", + "dataType": "String" + }, + "PolicyDefinitionAction": { + "ordinal": 17, + "name": "PolicyDefinitionAction", + "dataType": "String" + }, + "PolicyDefinitionCategory": { + "ordinal": 18, + "name": "PolicyDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionId": { + "ordinal": 19, + "name": "PolicySetDefinitionId", + "dataType": "String" + }, + "PolicySetDefinitionName": { + "ordinal": 20, + "name": "PolicySetDefinitionName", + "dataType": "String" + }, + "PolicySetDefinitionOwner": { + "ordinal": 21, + "name": "PolicySetDefinitionOwner", + "dataType": "String" + }, + "PolicySetDefinitionCategory": { + "ordinal": 22, + "name": "PolicySetDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionParameters": { + "ordinal": 23, + "name": "PolicySetDefinitionParameters", + "dataType": "String" + }, + "ManagementGroupIds": { + "ordinal": 24, + "name": "ManagementGroupIds", + "dataType": "String" + }, + "PolicyDefinitionReferenceId": { + "ordinal": 25, + "name": "PolicyDefinitionReferenceId", + "dataType": "String" + } + }, + "rows": [ + [ + "2018-02-08T07:04:29Z", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + null, + false, + "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "/Microsoft.SomeNamespace/someResourceType", + "eastus", + "", + "tbd", + "186044306c044a1d8c0ff76c", + "tbd", + "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "/providers/Microsoft.Management/managementGroups/mymg", + "022d9357-5a90-46f7-9554-21d30ce4c32d", + "audit", + "tbd", + null, + null, + null, + null, + null, + "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + null + ], + [ + "2018-02-08T07:04:29Z", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", + null, + false, + "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "/Microsoft.SomeNamespace/someResourceType", + "eastus", + "", + "tbd", + "test", + "tbd", + "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", + "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "Audit a tag and it's value", + "audit", + "tbd", + null, + null, + null, + null, + null, + "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + null + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QuerySubscriptionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QuerySubscriptionScope.json new file mode 100644 index 000000000000..d2c4bc025675 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QuerySubscriptionScope.json @@ -0,0 +1,203 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-08-09-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "metadata": { + "generatedQuery": "" + }, + "columns": { + "Timestamp": { + "ordinal": 1, + "name": "Timestamp", + "dataType": "DateTime" + }, + "ResourceId": { + "ordinal": 2, + "name": "ResourceId", + "dataType": "String" + }, + "PolicyAssignmentId": { + "ordinal": 3, + "name": "PolicyAssignmentId", + "dataType": "String" + }, + "PolicyDefinitionId": { + "ordinal": 4, + "name": "PolicyDefinitionId", + "dataType": "String" + }, + "EffectiveParameters": { + "ordinal": 5, + "name": "EffectiveParameters", + "dataType": "String" + }, + "IsCompliant": { + "ordinal": 6, + "name": "IsCompliant", + "dataType": "Boolean" + }, + "SubscriptionId": { + "ordinal": 7, + "name": "SubscriptionId", + "dataType": "String" + }, + "ResourceType": { + "ordinal": 8, + "name": "ResourceType", + "dataType": "String" + }, + "ResourceLocation": { + "ordinal": 9, + "name": "ResourceLocation", + "dataType": "String" + }, + "ResourceGroup": { + "ordinal": 10, + "name": "ResourceGroup", + "dataType": "String" + }, + "ResourceTags": { + "ordinal": 11, + "name": "ResourceTags", + "dataType": "String" + }, + "PolicyAssignmentName": { + "ordinal": 12, + "name": "PolicyAssignmentName", + "dataType": "String" + }, + "PolicyAssignmentOwner": { + "ordinal": 13, + "name": "PolicyAssignmentOwner", + "dataType": "String" + }, + "PolicyAssignmentParameters": { + "ordinal": 14, + "name": "PolicyAssignmentParameters", + "dataType": "String" + }, + "PolicyAssignmentScope": { + "ordinal": 15, + "name": "PolicyAssignmentScope", + "dataType": "String" + }, + "PolicyDefinitionName": { + "ordinal": 16, + "name": "PolicyDefinitionName", + "dataType": "String" + }, + "PolicyDefinitionAction": { + "ordinal": 17, + "name": "PolicyDefinitionAction", + "dataType": "String" + }, + "PolicyDefinitionCategory": { + "ordinal": 18, + "name": "PolicyDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionId": { + "ordinal": 19, + "name": "PolicySetDefinitionId", + "dataType": "String" + }, + "PolicySetDefinitionName": { + "ordinal": 20, + "name": "PolicySetDefinitionName", + "dataType": "String" + }, + "PolicySetDefinitionOwner": { + "ordinal": 21, + "name": "PolicySetDefinitionOwner", + "dataType": "String" + }, + "PolicySetDefinitionCategory": { + "ordinal": 22, + "name": "PolicySetDefinitionCategory", + "dataType": "String" + }, + "PolicySetDefinitionParameters": { + "ordinal": 23, + "name": "PolicySetDefinitionParameters", + "dataType": "String" + }, + "ManagementGroupIds": { + "ordinal": 24, + "name": "ManagementGroupIds", + "dataType": "String" + }, + "PolicyDefinitionReferenceId": { + "ordinal": 25, + "name": "PolicyDefinitionReferenceId", + "dataType": "String" + } + }, + "rows": [ + [ + "2018-02-08T23:26:49Z", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication/services/myService", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + null, + false, + "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "/Microsoft.ServiceFabric/clusters/applications/services", + "eastus", + "myResourceGroup", + "tbd", + "186044306c044a1d8c0ff76c", + "tbd", + "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "022d9357-5a90-46f7-9554-21d30ce4c32d", + "audit", + "tbd", + null, + null, + null, + null, + null, + "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + null + ], + [ + "2018-02-08T23:26:49Z", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + null, + false, + "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "/Microsoft.ServiceFabric/clusters/applications", + "eastus", + "myResourceGroup", + "tbd", + "186044306c044a1d8c0ff76c", + "tbd", + "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "022d9357-5a90-46f7-9554-21d30ce4c32d", + "audit", + "tbd", + null, + null, + null, + null, + null, + "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + null + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/TimeRangeSortSelectTop.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/TimeRangeSortSelectTop.json new file mode 100644 index 000000000000..14ebadc58bf9 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/TimeRangeSortSelectTop.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-08-09-preview", + "$from": "2018-02-05T18:00:00Z", + "$to": "2018-02-06T18:00:00Z", + "$orderby": "Timestamp desc, PolicyAssignmentId asc, SubscriptionId asc, ResourceGroup asc, ResourceId", + "$select": "Timestamp, PolicyAssignmentId, PolicyDefinitionId, SubscriptionId, ResourceGroup, ResourceId", + "$top": 2 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "metadata": { + "generatedQuery": "" + }, + "columns": { + "Timestamp": { + "ordinal": 1, + "name": "Timestamp", + "dataType": "DateTime" + }, + "PolicyAssignmentId": { + "ordinal": 2, + "name": "PolicyAssignmentId", + "dataType": "String" + }, + "PolicyDefinitionId": { + "ordinal": 3, + "name": "PolicyDefinitionId", + "dataType": "String" + }, + "SubscriptionId": { + "ordinal": 4, + "name": "SubscriptionId", + "dataType": "String" + }, + "ResourceGroup": { + "ordinal": 5, + "name": "ResourceGroup", + "dataType": "String" + }, + "ResourceId": { + "ordinal": 6, + "name": "ResourceId", + "dataType": "String" + } + }, + "rows": [ + [ + "2018-02-06T17:58:00Z", + "/providers/Microsoft.Management/managementGroups/8cb1e007-947f-423a-ad0c-7ab7dc7d0255/providers/Microsoft.Authorization/policyAssignments/1654a0254ab34920a60f94eb", + "/providers/Microsoft.Authorization/policyDefinitions/655cb504-bcee-4362-bd4c-402e6aa38759", + "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "myResourceGroup1", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup1/providers/Microsoft.Storage/storageAccounts/mysa1" + ], + [ + "2018-02-06T17:58:00Z", + "/providers/Microsoft.Management/managementGroups/8cb1e007-947f-423a-ad0c-7ab7dc7d0255/providers/Microsoft.Authorization/policyAssignments/1654a0254ab34920a60f94eb", + "/providers/Microsoft.Authorization/policyDefinitions/655cb504-bcee-4362-bd4c-402e6aa38759", + "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "myResourceGroup2", + "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup2/providers/Microsoft.Storage/storageAccounts/mysa2" + ] + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/policyStates.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/policyStates.json new file mode 100644 index 000000000000..885302e98f30 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/policyStates.json @@ -0,0 +1,662 @@ +{ + "swagger": "2.0", + "info": { + "title": "PolicyStatesClient", + "version": "2017-08-09-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/{managementGroupId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { + "post": { + "operationId": "PolicyStates_ListQueryResultsForManagementGroup", + "description": "Queries policy states for the resources under the management group.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesResourceParameter" + }, + { + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyStatesQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query latest at management group scope": { "$ref": "./examples/QueryManagementGroupScope.json" } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { + "post": { + "operationId": "PolicyStates_ListQueryResultsForSubscription", + "description": "Queries policy states for the resources under the subscription.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesResourceParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyStatesQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query latest at subscription scope": { "$ref": "./examples/QuerySubscriptionScope.json" }, + "Time range; sort, select and limit": { "$ref": "./examples/TimeRangeSortSelectTop.json" }, + "Filter and group with aggregate": { "$ref": "./examples/FilterAndGroupByWithAggregate.json" }, + "Filter and group without aggregate": { "$ref": "./examples/FilterAndGroupByWithoutAggregate.json" }, + "Filter and aggregate only": { "$ref": "./examples/FilterAndAggregateOnly.json" }, + "Filter and multiple groups": { "$ref": "./examples/FilterAndMultipleGroups.json" } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { + "post": { + "operationId": "PolicyStates_ListQueryResultsForResourceGroup", + "description": "Queries policy states for the resources under the resource group.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesResourceParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyStatesQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query latest at resource group scope": { "$ref": "./examples/QueryResourceGroupScope.json" } + } + } + }, + "/{resourceId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { + "post": { + "operationId": "PolicyStates_ListQueryResultsForResource", + "description": "Queries policy states for the resource.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesResourceParameter" + }, + { + "$ref": "#/parameters/resourceIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyStatesQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query all policy states at resource scope": { "$ref": "./examples/QueryResourceScope.json" }, + "Query all policy states at subscription level resource scope": { "$ref": "./examples/QuerySubscriptionLevelResourceScope.json" }, + "Query all policy states at nested resource scope": { "$ref": "./examples/QueryNestedResourceScope.json" }, + "Query all policy states at subscription level nested resource scope": { "$ref": "./examples/QuerySubscriptionLevelNestedResourceScope.json" } + } + } + }, + "/providers/Microsoft.PolicyInsights/operations": { + "get": { + "operationId": "PolicyInsights_ListOperations", + "description": "Lists available operations.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "List of available operations.", + "schema": { + "$ref": "#/definitions/Operations" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "List operations": { "$ref": "./examples/ListOperations.json" } + } + } + } + }, + "definitions": { + "PolicyStatesQueryResults": { + "description": "Query results.", + "properties": { + "value": { + "description": "Query results.", + "type": "array", + "items": { + "$ref": "#/definitions/PolicyStatesQueryResultsTable" + } + } + } + }, + "PolicyStatesQueryResultsTable": { + "description": "Query results table.", + "properties": { + "metadata": { + "description": "Metadata about the query results.", + "properties": { + "generatedQuery": { + "description": "Internal query generated. Used for diagnostics purposes.", + "type": "string" + } + } + }, + "columns": { + "description": "List of columns included in query results.", + "properties": { + "Timestamp": { + "description": "Timestamp for the policy state record.", + "$ref": "#/definitions/Column" + }, + "ResourceId": { + "description": "Resource ID.", + "$ref": "#/definitions/Column" + }, + "PolicyAssignmentId": { + "description": "Policy assignment ID.", + "$ref": "#/definitions/Column" + }, + "PolicyDefinitionId": { + "description": "Policy definition ID.", + "$ref": "#/definitions/Column" + }, + "EffectiveParameters": { + "description": "Effective parameters for the policy assignment.", + "$ref": "#/definitions/Column" + }, + "IsCompliant": { + "description": "Flag which states whether the resource is compliant against the policy assignment it was evaluated against.", + "$ref": "#/definitions/Column" + }, + "SubscriptionId": { + "description": "Subscription ID.", + "$ref": "#/definitions/Column" + }, + "ResourceType": { + "description": "Resource type.", + "$ref": "#/definitions/Column" + }, + "ResourceLocation": { + "description": "Resource location.", + "$ref": "#/definitions/Column" + }, + "ResourceGroup": { + "description": "Resource group name.", + "$ref": "#/definitions/Column" + }, + "ResourceTags": { + "description": "List of resource tags.", + "$ref": "#/definitions/Column" + }, + "PolicyAssignmentName": { + "description": "Policy assignment name.", + "$ref": "#/definitions/Column" + }, + "PolicyAssignmentOwner": { + "description": "Policy assignment owner.", + "$ref": "#/definitions/Column" + }, + "PolicyAssignmentParameters": { + "description": "Policy assignment parameters.", + "$ref": "#/definitions/Column" + }, + "PolicyAssignmentScope": { + "description": "Policy assignment scope.", + "$ref": "#/definitions/Column" + }, + "PolicyDefinitionName": { + "description": "Policy definition name.", + "$ref": "#/definitions/Column" + }, + "PolicyDefinitionAction": { + "description": "Policy definition action, i.e. effect.", + "$ref": "#/definitions/Column" + }, + "PolicyDefinitionCategory": { + "description": "Policy definition category.", + "$ref": "#/definitions/Column" + }, + "PolicySetDefinitionId": { + "description": "Policy set definition ID, if the policy assignment is for a policy set.", + "$ref": "#/definitions/Column" + }, + "PolicySetDefinitionName": { + "description": "Policy set definition name, if the policy assignment is for a policy set.", + "$ref": "#/definitions/Column" + }, + "PolicySetDefinitionOwner": { + "description": "Policy set definition owner, if the policy assignment is for a policy set.", + "$ref": "#/definitions/Column" + }, + "PolicySetDefinitionCategory": { + "description": "Policy set definition category, if the policy assignment is for a policy set.", + "$ref": "#/definitions/Column" + }, + "PolicySetDefinitionParameters": { + "description": "Policy set definition parameters, if the policy assignment is for a policy set.", + "$ref": "#/definitions/Column" + }, + "ManagementGroupIds": { + "description": "Comma seperated list of management group IDs, which represent the hierarchy of the management groups the resource is under.", + "$ref": "#/definitions/Column" + }, + "PolicyDefinitionReferenceId": { + "description": "Reference ID for the policy definition inside the policy set, if the policy assignment is for a policy set.", + "$ref": "#/definitions/Column" + } + } + }, + "rows": { + "description": "Query result rows, each representing a policy state record.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object" + } + } + } + } + }, + "Column": { + "description": "Column definition.", + "properties": { + "ordinal": { + "description": "Ordinal value of the column in a record.", + "type": "integer", + "format": "int32" + }, + "name": { + "description": "Name of the column.", + "type": "string" + }, + "dataType": { + "description": "Data type of the column.", + "type": "string" + } + } + }, + "QueryFailure": { + "description": "Error response.", + "properties": { + "error": { + "description": "Error definition.", + "properties": { + "code": { + "description": "Service specific error code which serves as the substatus for the HTTP error code.", + "type": "string" + }, + "message": { + "description": "Description of the error.", + "type": "string" + } + } + } + } + }, + "Operations": { + "description": "List of available operations.", + "properties": { + "value": { + "description": "List of available operations.", + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + } + } + } + }, + "Operation": { + "description": "Operation definition.", + "properties": { + "name": { + "description": "Operation name.", + "type": "string" + }, + "display": { + "description": "Display metadata associated with the operation.", + "properties": { + "provider": { + "description": "Resource provider name.", + "type": "string" + }, + "resource": { + "description": "Resource name on which the operation is performed.", + "type": "string" + }, + "operation": { + "description": "Operation name.", + "type": "string" + }, + "description": { + "description": "Operation description.", + "type": "string" + } + } + } + } + } + }, + "parameters": { + "policyStatesResourceParameter": { + "name": "policyStatesResource", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default", + "latest" + ], + "x-ms-enum": { + "name": "PolicyStatesResource", + "modelAsString": false + }, + "description": "The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).", + "x-ms-parameter-location": "method" + }, + "managementGroupIdParameter": { + "name": "managementGroupId", + "in": "path", + "required": true, + "type": "string", + "description": "Management group ID, e.g. /providers/Microsoft.Management/managementGroups/{name}.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "subscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "Microsoft Azure subscription ID.", + "x-ms-parameter-location": "method" + }, + "resourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Resource group name.", + "x-ms-parameter-location": "method" + }, + "resourceIdParameter": { + "name": "resourceId", + "in": "path", + "required": true, + "type": "string", + "description": "Resource ID.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "API version to use with the client requests.", + "x-ms-parameter-location": "client" + }, + "topParameter": { + "name": "$top", + "in": "query", + "required": false, + "type": "integer", + "format": "int32", + "minimum": 0, + "description": "Maximum number of records to return.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Top" + }, + "orderByParameter": { + "name": "$orderby", + "in": "query", + "required": false, + "type": "string", + "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "OrderBy" + }, + "selectParameter": { + "name": "$select", + "in": "query", + "required": false, + "type": "string", + "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Select" + }, + "fromParameter": { + "name": "$from", + "in": "query", + "required": false, + "type": "string", + "format": "date-time", + "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "From" + }, + "toParameter": { + "name": "$to", + "in": "query", + "required": false, + "type": "string", + "format": "date-time", + "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "To" + }, + "filterParameter": { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "OData filter expression.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Filter" + }, + "applyParameter": { + "name": "$apply", + "in": "query", + "required": false, + "type": "string", + "description": "OData apply expression for aggregations.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Apply" + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndAggregateOnly.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndAggregateOnly.json new file mode 100644 index 000000000000..9a77705b9f87 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndAggregateOnly.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-10-17-preview", + "$from": "2018-02-05T18:00:00Z", + "$filter": "PolicyDefinitionAction eq 'deny'", + "$apply": "aggregate($count as NumDenyStates)" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest", + "@odata.count": 1, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "NumDenyStates": 6 + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndGroupByWithAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndGroupByWithAggregate.json new file mode 100644 index 000000000000..36a2877768c7 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndGroupByWithAggregate.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-10-17-preview", + "$from": "2018-02-05T18:00:00Z", + "$filter": "IsCompliant eq false and (PolicyDefinitionAction eq 'audit' or PolicyDefinitionAction eq 'deny')", + "$apply": "groupby((PolicyAssignmentId, PolicyDefinitionId, PolicyDefinitionAction, ResourceId), aggregate($count as NumAuditDenyNonComplianceRecords))", + "$orderby": "NumAuditDenyNonComplianceRecords desc", + "$top": 2 + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "PolicyDefinitionAction": "audit", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.classiccompute/domainnames/myDomainName", + "NumAuditDenyNonComplianceRecords": 10 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionAction": "audit", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.classiccompute/domainnames/myDomainName", + "NumAuditDenyNonComplianceRecords": 10 + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndGroupByWithoutAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndGroupByWithoutAggregate.json new file mode 100644 index 000000000000..6a56e86e3629 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndGroupByWithoutAggregate.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-10-17-preview", + "$from": "2018-01-05T18:00:00Z", + "$filter": "IsCompliant eq false and (PolicyDefinitionAction ne 'audit' and PolicyDefinitionAction ne 'append')", + "$apply": "groupby((PolicyAssignmentId, PolicyDefinitionId, PolicyDefinitionAction, ResourceId))", + "$top": 2 + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/enable monitoring in azure security center", + "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/44452482-524f-4bf4-b852-0bff7cc4a3ed", + "PolicyDefinitionAction": "auditifnotexists", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.network/virtualnetworks/vnet" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/89b27f38-e9e4-4468-ab81-801c84b8c017", + "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/44452482-524f-4bf4-b852-0bff7cc4a3ed", + "PolicyDefinitionAction": "auditifnotexists", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.network/virtualnetworks/vnet" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndMultipleGroups.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndMultipleGroups.json new file mode 100644 index 000000000000..0cfb45cd4d7f --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndMultipleGroups.json @@ -0,0 +1,111 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-10-17-preview", + "$filter": "IsCompliant eq false", + "$apply": "groupby((PolicyAssignmentId, PolicySetDefinitionId, PolicyDefinitionId, PolicyDefinitionReferenceId, ResourceId))/groupby((PolicyAssignmentId, PolicySetDefinitionId, PolicyDefinitionId, PolicyDefinitionReferenceId), aggregate($count as NumNonCompliantResources))", + "$orderby": "NumNonCompliantResources desc", + "$top": "10" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest", + "@odata.count": 10, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionReferenceId": "14799174781370023846", + "NumNonCompliantResources": 557 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionReferenceId": "1679708035638239273", + "NumNonCompliantResources": 557 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionReferenceId": "14799174781370023846", + "NumNonCompliantResources": 557 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionReferenceId": "1679708035638239273", + "NumNonCompliantResources": 557 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7", + "PolicySetDefinitionId": "", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionReferenceId": "", + "NumNonCompliantResources": 557 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49", + "PolicySetDefinitionId": "", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "PolicyDefinitionReferenceId": "", + "NumNonCompliantResources": 557 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionReferenceId": "", + "NumNonCompliantResources": 552 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/a03db67e-a286-43c3-9098-b2da83d361ad", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "PolicyDefinitionReferenceId": "8935913113203900114", + "NumNonCompliantResources": 544 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/8174043a1e2849179635b874", + "PolicySetDefinitionId": "", + "PolicyDefinitionId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "PolicyDefinitionReferenceId": "", + "NumNonCompliantResources": 526 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "PolicyDefinitionReferenceId": "2124621540977569058", + "NumNonCompliantResources": 509 + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/GetMetadata.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/GetMetadata.json new file mode 100644 index 000000000000..86aee6efadcd --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/GetMetadata.json @@ -0,0 +1,120 @@ +{ + "parameters": { + "scope": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-10-17-preview" + }, + "responses": { + "200": { + "body": [ + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " Org.OData.Capabilities.V1.ConformanceLevelType/Minimal", + " ", + " ", + " ", + " application/json;odata.metadata=minimal;IEEE754Compatible=false;odata.streaming=true", + " application/json;odata.metadata=none;IEEE754Compatible=false;odata.streaming=true", + " ", + " ", + " ", + " ", + " ", + " ", + "" + ] + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/ListOperations.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/ListOperations.json new file mode 100644 index 000000000000..7dfa6867003f --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/ListOperations.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2017-10-17-preview" + }, + "responses": { + "200": { + "body": { + "@odata.count": 3, + "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." + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json new file mode 100644 index 000000000000..c8850c43cca4 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "managementGroupId": "providers/Microsoft.Management/managementGroups/myManagementGroup", + "api-version": "2017-10-17-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-09T17:41:47Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/microsoft.insights/autoscalesettings/mytest1", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/1ef5d536aec743a0aa801c1a", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/microsoft.insights/autoscalesettings", + "ResourceLocation": "westus", + "ResourceGroup": "myrg1", + "ResourceTags": "tbd", + "PolicyAssignmentName": "1ef5d536aec743a0aa801c1a", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/335cefd2-ab16-430f-b364-974a170eb1d5", + "PolicySetDefinitionName": "335cefd2-ab16-430f-b364-974a170eb1d5", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "15521232277412542086" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-09T17:41:47Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/microsoft.insights/autoscalesettings/mytest1", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/microsoft.insights/autoscalesettings", + "ResourceLocation": "westus", + "ResourceGroup": "myrg1", + "ResourceTags": "tbd", + "PolicyAssignmentName": "186044306c044a1d8c0ff76c", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "", + "PolicySetDefinitionName": "", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryNestedResourceScope.json new file mode 100644 index 000000000000..f4731ad3ee7f --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryNestedResourceScope.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "policyStatesResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "api-version": "2017-10-17-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyStates/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", + "Timestamp": "2018-02-09T16:04:31Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "186044306c044a1d8c0ff76c", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", + "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": null, + "PolicySetDefinitionName": null, + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", + "Timestamp": "2018-02-09T16:04:31Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "186044306c044a1d8c0ff76c", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", + "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": null, + "PolicySetDefinitionName": null, + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryResourceGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryResourceGroupScope.json new file mode 100644 index 000000000000..3ed9e2c0dea7 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryResourceGroupScope.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceGroupName": "myResourceGroup", + "api-version": "2017-10-17-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-09T18:42:42Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mysa1", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/Microsoft.Storage/storageAccounts", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "3f3c4330183b4e218fe6fd29", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "PolicyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "PolicySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-09T18:42:42Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mysa1", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/Microsoft.Storage/storageAccounts", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "3f3c4330183b4e218fe6fd29", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "PolicyDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e3682", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "PolicySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryResourceScope.json new file mode 100644 index 000000000000..998b173fa8a9 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryResourceScope.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "policyStatesResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "api-version": "2017-10-17-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", + "Timestamp": "2018-02-09T16:04:31Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ClassicCompute/domainNames", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "test", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", + "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "PolicyDefinitionName": "Audit a tag and it's value", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": null, + "PolicySetDefinitionName": null, + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", + "Timestamp": "2018-02-09T16:04:31Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ClassicCompute/domainNames", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "test", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", + "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "PolicyDefinitionName": "Audit a tag and it's value", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": null, + "PolicySetDefinitionName": null, + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionLevelNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionLevelNestedResourceScope.json new file mode 100644 index 000000000000..975dfaf77162 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionLevelNestedResourceScope.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "policyStatesResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "api-version": "2017-10-17-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyStates/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", + "Timestamp": "2018-02-09T16:04:31Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", + "ResourceLocation": "eastus", + "ResourceGroup": "", + "ResourceTags": "tbd", + "PolicyAssignmentName": "186044306c044a1d8c0ff76c", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", + "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": null, + "PolicySetDefinitionName": null, + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", + "Timestamp": "2018-02-09T16:04:31Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", + "ResourceLocation": "eastus", + "ResourceGroup": "", + "ResourceTags": "tbd", + "PolicyAssignmentName": "186044306c044a1d8c0ff76c", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", + "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": null, + "PolicySetDefinitionName": null, + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionLevelResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionLevelResourceScope.json new file mode 100644 index 000000000000..b0738f7bc6ba --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionLevelResourceScope.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "policyStatesResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "api-version": "2017-10-17-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", + "Timestamp": "2018-02-09T16:04:31Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.SomeNamespace/someResourceType", + "ResourceLocation": "eastus", + "ResourceGroup": "", + "ResourceTags": "tbd", + "PolicyAssignmentName": "test", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", + "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "PolicyDefinitionName": "Audit a tag and it's value", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": null, + "PolicySetDefinitionName": null, + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", + "Timestamp": "2018-02-09T16:04:31Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.SomeNamespace/someResourceType", + "ResourceLocation": "eastus", + "ResourceGroup": "", + "ResourceTags": "tbd", + "PolicyAssignmentName": "test", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", + "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "PolicyDefinitionName": "Audit a tag and it's value", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": null, + "PolicySetDefinitionName": null, + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionScope.json new file mode 100644 index 000000000000..157063aee5cd --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionScope.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-10-17-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-09T17:48:05Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/Microsoft.Network/publicIPAddresses/mypubip1", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/Enable Monitoring in Azure Security Center", + "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9daedab3-fb2d-461e-b861-71790eead4f6", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/Microsoft.Network/publicIPAddresses", + "ResourceLocation": "eastus", + "ResourceGroup": "myrg1", + "ResourceTags": "tbd", + "PolicyAssignmentName": "Enable Monitoring in Azure Security Center", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "PolicyDefinitionName": "9daedab3-fb2d-461e-b861-71790eead4f6", + "PolicyDefinitionAction": "AuditIfNotExists", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-09T17:48:05Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/Microsoft.Network/publicIPAddresses/mypubip1", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/9ac09b0657d942e5ad4041a6", + "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9daedab3-fb2d-461e-b861-71790eead4f6", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/Microsoft.Network/publicIPAddresses", + "ResourceLocation": "eastus", + "ResourceGroup": "myrg1", + "ResourceTags": "tbd", + "PolicyAssignmentName": "9ac09b0657d942e5ad4041a6", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "PolicyDefinitionName": "9daedab3-fb2d-461e-b861-71790eead4f6", + "PolicyDefinitionAction": "AuditIfNotExists", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/TimeRangeSortSelectTop.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/TimeRangeSortSelectTop.json new file mode 100644 index 000000000000..557110993873 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/TimeRangeSortSelectTop.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-10-17-preview", + "$from": "2018-02-05T18:00:00Z", + "$to": "2018-02-06T18:00:00Z", + "$orderby": "Timestamp desc, PolicyAssignmentId asc, SubscriptionId asc, ResourceGroup asc, ResourceId", + "$select": "Timestamp, PolicyAssignmentId, PolicyDefinitionId, SubscriptionId, ResourceGroup, ResourceId", + "$top": 2 + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-06T17:58:00Z", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/8cb1e007-947f-423a-ad0c-7ab7dc7d0255/providers/Microsoft.Authorization/policyAssignments/1654a0254ab34920a60f94eb", + "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/655cb504-bcee-4362-bd4c-402e6aa38759", + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceGroup": "myrg1", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/Microsoft.Storage/storageAccounts/mysa1" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-06T17:58:00Z", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/8cb1e007-947f-423a-ad0c-7ab7dc7d0255/providers/Microsoft.Authorization/policyAssignments/1654a0254ab34920a60f94eb", + "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/655cb504-bcee-4362-bd4c-402e6aa38759", + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceGroup": "myrg2", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg2/providers/Microsoft.Storage/storageAccounts/mysa2" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/policyStates.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/policyStates.json new file mode 100644 index 000000000000..1e38bee019e4 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/policyStates.json @@ -0,0 +1,686 @@ +{ + "swagger": "2.0", + "info": { + "title": "PolicyStatesClient", + "version": "2017-10-17-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/{managementGroupId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { + "post": { + "operationId": "PolicyStates_ListQueryResultsForManagementGroup", + "description": "Queries policy states for the resources under the management group.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesResourceParameter" + }, + { + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyStatesQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query latest at management group scope": { "$ref": "./examples/QueryManagementGroupScope.json" } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { + "post": { + "operationId": "PolicyStates_ListQueryResultsForSubscription", + "description": "Queries policy states for the resources under the subscription.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesResourceParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyStatesQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query latest at subscription scope": { "$ref": "./examples/QuerySubscriptionScope.json" }, + "Time range; sort, select and limit": { "$ref": "./examples/TimeRangeSortSelectTop.json" }, + "Filter and group with aggregate": { "$ref": "./examples/FilterAndGroupByWithAggregate.json" }, + "Filter and group without aggregate": { "$ref": "./examples/FilterAndGroupByWithoutAggregate.json" }, + "Filter and aggregate only": { "$ref": "./examples/FilterAndAggregateOnly.json" }, + "Filter and multiple groups": { "$ref": "./examples/FilterAndMultipleGroups.json" } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { + "post": { + "operationId": "PolicyStates_ListQueryResultsForResourceGroup", + "description": "Queries policy states for the resources under the resource group.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesResourceParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyStatesQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query latest at resource group scope": { "$ref": "./examples/QueryResourceGroupScope.json" } + } + } + }, + "/{resourceId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { + "post": { + "operationId": "PolicyStates_ListQueryResultsForResource", + "description": "Queries policy states for the resource.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesResourceParameter" + }, + { + "$ref": "#/parameters/resourceIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyStatesQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query all policy states at resource scope": { "$ref": "./examples/QueryResourceScope.json" }, + "Query all policy states at subscription level resource scope": { "$ref": "./examples/QuerySubscriptionLevelResourceScope.json" }, + "Query all policy states at nested resource scope": { "$ref": "./examples/QueryNestedResourceScope.json" }, + "Query all policy states at subscription level nested resource scope": { "$ref": "./examples/QuerySubscriptionLevelNestedResourceScope.json" } + } + } + }, + "/providers/Microsoft.PolicyInsights/operations": { + "get": { + "operationId": "PolicyInsights_ListOperations", + "description": "Lists available operations.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "List of available operations.", + "schema": { + "$ref": "#/definitions/Operations" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "List operations": { "$ref": "./examples/ListOperations.json" } + } + } + }, + "/{scope}/providers/Microsoft.PolicyInsights/policyStates/$metadata": { + "get": { + "operationId": "PolicyStates_GetMetadata", + "description": "Gets OData metadata XML document.", + "produces": [ + "application/xml" + ], + "parameters": [ + { + "$ref": "#/parameters/scopeParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OData metadata XML document.", + "schema": { + "$ref": "#/definitions/MetadataDocument" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Get metadata": { "$ref": "./examples/GetMetadata.json" } + } + } + } + }, + "definitions": { + "PolicyStatesQueryResults": { + "description": "Query results.", + "properties": { + "@odata.context": { + "description": "OData context string; used by OData clients to resolve type information based on metadata.", + "type": "string" + }, + "@odata.count": { + "description": "OData entity count; represents the number of policy state records returned.", + "type": "integer", + "format": "int32", + "minimum": 0 + }, + "value": { + "description": "Query results.", + "type": "array", + "items": { + "$ref": "#/definitions/PolicyState" + } + } + } + }, + "PolicyState": { + "description": "Policy state record.", + "properties": { + "@odata.id": { + "description": "OData entity ID; always set to null since policy state records do not have an entity ID.", + "type": "string" + }, + "@odata.context": { + "description": "OData context string; used by OData clients to resolve type information based on metadata.", + "type": "string" + }, + "timestamp": { + "description": "Timestamp for the policy state record.", + "type": "string", + "format": "date-time" + }, + "resourceId": { + "description": "Resource ID.", + "type": "string" + }, + "policyAssignmentId": { + "description": "Policy assignment ID.", + "type": "string" + }, + "policyDefinitionId": { + "description": "Policy definition ID.", + "type": "string" + }, + "effectiveParameters": { + "description": "Effective parameters for the policy assignment.", + "type": "string" + }, + "isCompliant": { + "description": "Flag which states whether the resource is compliant against the policy assignment it was evaluated against.", + "type": "boolean" + }, + "subscriptionId": { + "description": "Subscription ID.", + "type": "string" + }, + "resourceType": { + "description": "Resource type.", + "type": "string" + }, + "resourceLocation": { + "description": "Resource location.", + "type": "string" + }, + "resourceGroup": { + "description": "Resource group name.", + "type": "string" + }, + "resourceTags": { + "description": "List of resource tags.", + "type": "string" + }, + "policyAssignmentName": { + "description": "Policy assignment name.", + "type": "string" + }, + "policyAssignmentOwner": { + "description": "Policy assignment owner.", + "type": "string" + }, + "policyAssignmentParameters": { + "description": "Policy assignment parameters.", + "type": "string" + }, + "policyAssignmentScope": { + "description": "Policy assignment scope.", + "type": "string" + }, + "policyDefinitionName": { + "description": "Policy definition name.", + "type": "string" + }, + "policyDefinitionAction": { + "description": "Policy definition action, i.e. effect.", + "type": "string" + }, + "policyDefinitionCategory": { + "description": "Policy definition category.", + "type": "string" + }, + "policySetDefinitionId": { + "description": "Policy set definition ID, if the policy assignment is for a policy set.", + "type": "string" + }, + "policySetDefinitionName": { + "description": "Policy set definition name, if the policy assignment is for a policy set.", + "type": "string" + }, + "policySetDefinitionOwner": { + "description": "Policy set definition owner, if the policy assignment is for a policy set.", + "type": "string" + }, + "policySetDefinitionCategory": { + "description": "Policy set definition category, if the policy assignment is for a policy set.", + "type": "string" + }, + "policySetDefinitionParameters": { + "description": "Policy set definition parameters, if the policy assignment is for a policy set.", + "type": "string" + }, + "managementGroupIds": { + "description": "Comma seperated list of management group IDs, which represent the hierarchy of the management groups the resource is under.", + "type": "string" + }, + "policyDefinitionReferenceId": { + "description": "Reference ID for the policy definition inside the policy set, if the policy assignment is for a policy set.", + "type": "string" + } + } + }, + "QueryFailure": { + "description": "Error response.", + "properties": { + "error": { + "description": "Error definition.", + "properties": { + "code": { + "description": "Service specific error code which serves as the substatus for the HTTP error code.", + "type": "string" + }, + "message": { + "description": "Description of the error.", + "type": "string" + } + } + } + } + }, + "Operations": { + "description": "List of available operations.", + "properties": { + "value": { + "description": "List of available operations.", + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + } + } + } + }, + "Operation": { + "description": "Operation definition.", + "properties": { + "name": { + "description": "Operation name.", + "type": "string" + }, + "display": { + "description": "Display metadata associated with the operation.", + "properties": { + "provider": { + "description": "Resource provider name.", + "type": "string" + }, + "resource": { + "description": "Resource name on which the operation is performed.", + "type": "string" + }, + "operation": { + "description": "Operation name.", + "type": "string" + }, + "description": { + "description": "Operation description.", + "type": "string" + } + } + } + } + }, + "MetadataDocument": { + "description": "Metadata XML document.", + "type": "string" + } + }, + "parameters": { + "policyStatesResourceParameter": { + "name": "policyStatesResource", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default", + "latest" + ], + "x-ms-enum": { + "name": "PolicyStatesResource", + "modelAsString": false + }, + "description": "The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).", + "x-ms-parameter-location": "method" + }, + "managementGroupIdParameter": { + "name": "managementGroupId", + "in": "path", + "required": true, + "type": "string", + "description": "Management group ID, e.g. /providers/Microsoft.Management/managementGroups/{name}.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "subscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "Microsoft Azure subscription ID.", + "x-ms-parameter-location": "method" + }, + "resourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Resource group name.", + "x-ms-parameter-location": "method" + }, + "resourceIdParameter": { + "name": "resourceId", + "in": "path", + "required": true, + "type": "string", + "description": "Resource ID.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "scopeParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "A valid scope, i.e. management group, subscription, resource group, or resource ID. Scope used has no effect on metadata returned.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "API version to use with the client requests.", + "x-ms-parameter-location": "client" + }, + "topParameter": { + "name": "$top", + "in": "query", + "required": false, + "type": "integer", + "format": "int32", + "minimum": 0, + "description": "Maximum number of records to return.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Top" + }, + "orderByParameter": { + "name": "$orderby", + "in": "query", + "required": false, + "type": "string", + "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "OrderBy" + }, + "selectParameter": { + "name": "$select", + "in": "query", + "required": false, + "type": "string", + "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Select" + }, + "fromParameter": { + "name": "$from", + "in": "query", + "required": false, + "type": "string", + "format": "date-time", + "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "From" + }, + "toParameter": { + "name": "$to", + "in": "query", + "required": false, + "type": "string", + "format": "date-time", + "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "To" + }, + "filterParameter": { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "OData filter expression.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Filter" + }, + "applyParameter": { + "name": "$apply", + "in": "query", + "required": false, + "type": "string", + "description": "OData apply expression for aggregations.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Apply" + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndAggregateOnly.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndAggregateOnly.json new file mode 100644 index 000000000000..41cbee61578d --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndAggregateOnly.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-12-12-preview", + "$from": "2018-02-05T18:00:00Z", + "$filter": "PolicyDefinitionAction eq 'deny'", + "$apply": "aggregate($count as NumDenyStates)" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest", + "@odata.count": 1, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "NumDenyStates": 6 + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndGroupByWithAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndGroupByWithAggregate.json new file mode 100644 index 000000000000..e81602c8f26a --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndGroupByWithAggregate.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-12-12-preview", + "$from": "2018-02-05T18:00:00Z", + "$filter": "IsCompliant eq false and (PolicyDefinitionAction eq 'audit' or PolicyDefinitionAction eq 'deny')", + "$apply": "groupby((PolicyAssignmentId, PolicyDefinitionId, PolicyDefinitionAction, ResourceId), aggregate($count as NumAuditDenyNonComplianceRecords))", + "$orderby": "NumAuditDenyNonComplianceRecords desc", + "$top": 2 + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "PolicyDefinitionAction": "audit", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.classiccompute/domainnames/myDomainName", + "NumAuditDenyNonComplianceRecords": 10 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionAction": "audit", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.classiccompute/domainnames/myDomainName", + "NumAuditDenyNonComplianceRecords": 10 + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndGroupByWithoutAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndGroupByWithoutAggregate.json new file mode 100644 index 000000000000..abdcf47b8786 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndGroupByWithoutAggregate.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-12-12-preview", + "$from": "2018-01-05T18:00:00Z", + "$filter": "IsCompliant eq false and (PolicyDefinitionAction ne 'audit' and PolicyDefinitionAction ne 'append')", + "$apply": "groupby((PolicyAssignmentId, PolicyDefinitionId, PolicyDefinitionAction, ResourceId))", + "$top": 2 + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/enable monitoring in azure security center", + "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/44452482-524f-4bf4-b852-0bff7cc4a3ed", + "PolicyDefinitionAction": "auditifnotexists", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.network/virtualnetworks/vnet" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/89b27f38-e9e4-4468-ab81-801c84b8c017", + "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/44452482-524f-4bf4-b852-0bff7cc4a3ed", + "PolicyDefinitionAction": "auditifnotexists", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.network/virtualnetworks/vnet" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndMultipleGroups.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndMultipleGroups.json new file mode 100644 index 000000000000..529777fb949d --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndMultipleGroups.json @@ -0,0 +1,111 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-12-12-preview", + "$filter": "IsCompliant eq false", + "$apply": "groupby((PolicyAssignmentId, PolicySetDefinitionId, PolicyDefinitionId, PolicyDefinitionReferenceId, ResourceId))/groupby((PolicyAssignmentId, PolicySetDefinitionId, PolicyDefinitionId, PolicyDefinitionReferenceId), aggregate($count as NumNonCompliantResources))", + "$orderby": "NumNonCompliantResources desc", + "$top": "10" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest", + "@odata.count": 10, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionReferenceId": "14799174781370023846", + "NumNonCompliantResources": 557 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionReferenceId": "1679708035638239273", + "NumNonCompliantResources": 557 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionReferenceId": "14799174781370023846", + "NumNonCompliantResources": 557 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionReferenceId": "1679708035638239273", + "NumNonCompliantResources": 557 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7", + "PolicySetDefinitionId": "", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionReferenceId": "", + "NumNonCompliantResources": 557 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49", + "PolicySetDefinitionId": "", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "PolicyDefinitionReferenceId": "", + "NumNonCompliantResources": 557 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionReferenceId": "", + "NumNonCompliantResources": 552 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/a03db67e-a286-43c3-9098-b2da83d361ad", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "PolicyDefinitionReferenceId": "8935913113203900114", + "NumNonCompliantResources": 544 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/8174043a1e2849179635b874", + "PolicySetDefinitionId": "", + "PolicyDefinitionId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "PolicyDefinitionReferenceId": "", + "NumNonCompliantResources": 526 + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "PolicyDefinitionReferenceId": "2124621540977569058", + "NumNonCompliantResources": 509 + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/GetMetadata.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/GetMetadata.json new file mode 100644 index 000000000000..d6a6eb7b5681 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/GetMetadata.json @@ -0,0 +1,167 @@ +{ + "parameters": { + "scope": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": [ + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " Org.OData.Capabilities.V1.ConformanceLevelType/Minimal", + " ", + " ", + " ", + " application/json;odata.metadata=minimal;IEEE754Compatible=false;odata.streaming=true", + " application/json;odata.metadata=none;IEEE754Compatible=false;odata.streaming=true", + " ", + " ", + " ", + " ", + " ", + " ", + "" + ] + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/ListOperations.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/ListOperations.json new file mode 100644 index 000000000000..3de5d287b34c --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/ListOperations.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.count": 4, + "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." + } + }, + { + "name": "latest/summarize/action", + "display": { + "provider": "Microsoft Policy Insights", + "resource": "Policy Latest States", + "operation": "Query Policy Latest States Summary", + "description": "Query summary information about policy latest states." + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json new file mode 100644 index 000000000000..a5a510204a45 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "managementGroupId": "providers/Microsoft.Management/managementGroups/myManagementGroup", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-09T17:41:47Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/microsoft.insights/autoscalesettings/mytest1", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/1ef5d536aec743a0aa801c1a", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/microsoft.insights/autoscalesettings", + "ResourceLocation": "westus", + "ResourceGroup": "myrg1", + "ResourceTags": "tbd", + "PolicyAssignmentName": "1ef5d536aec743a0aa801c1a", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/335cefd2-ab16-430f-b364-974a170eb1d5", + "PolicySetDefinitionName": "335cefd2-ab16-430f-b364-974a170eb1d5", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "15521232277412542086" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-09T17:41:47Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/microsoft.insights/autoscalesettings/mytest1", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/microsoft.insights/autoscalesettings", + "ResourceLocation": "westus", + "ResourceGroup": "myrg1", + "ResourceTags": "tbd", + "PolicyAssignmentName": "186044306c044a1d8c0ff76c", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "", + "PolicySetDefinitionName": "", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryNestedResourceScope.json new file mode 100644 index 000000000000..ece066df6c56 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryNestedResourceScope.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "policyStatesResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyStates/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", + "Timestamp": "2018-02-09T16:04:31Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "186044306c044a1d8c0ff76c", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", + "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": null, + "PolicySetDefinitionName": null, + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", + "Timestamp": "2018-02-09T16:04:31Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "186044306c044a1d8c0ff76c", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", + "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": null, + "PolicySetDefinitionName": null, + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json new file mode 100644 index 000000000000..a29f47acca8a --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "policyAssignmentId": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-13T00:38:50Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Security/policies/mySecurityPolicy", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/4a0425e4-97bf-4ad0-ab36-145b94083c60", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/Microsoft.Security/policies", + "ResourceLocation": null, + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "myPolicyAssignment", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"EUS, WEU\"]}}", + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup", + "PolicyDefinitionName": "4a0425e4-97bf-4ad0-ab36-145b94083c60", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": null, + "PolicySetDefinitionName": null, + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-13T00:38:50Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/test", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/4a0425e4-97bf-4ad0-ab36-145b94083c60", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/Microsoft.Authorization/policyAssignments", + "ResourceLocation": null, + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "myPolicyAssignment", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"EUS, WEU\"]}}", + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup", + "PolicyDefinitionName": "4a0425e4-97bf-4ad0-ab36-145b94083c60", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": null, + "PolicySetDefinitionName": null, + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupScope.json new file mode 100644 index 000000000000..6e503e112667 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupScope.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceGroupName": "myResourceGroup", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-09T18:42:42Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mysa1", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/Microsoft.Storage/storageAccounts", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "3f3c4330183b4e218fe6fd29", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "PolicyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "PolicySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-09T18:42:42Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mysa1", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/Microsoft.Storage/storageAccounts", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "3f3c4330183b4e218fe6fd29", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "PolicyDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e3682", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "PolicySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceScope.json new file mode 100644 index 000000000000..015eca0b9b57 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceScope.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "policyStatesResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", + "Timestamp": "2018-02-09T16:04:31Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ClassicCompute/domainNames", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "test", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", + "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "PolicyDefinitionName": "Audit a tag and it's value", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": null, + "PolicySetDefinitionName": null, + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", + "Timestamp": "2018-02-09T16:04:31Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.ClassicCompute/domainNames", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "test", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", + "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "PolicyDefinitionName": "Audit a tag and it's value", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": null, + "PolicySetDefinitionName": null, + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelNestedResourceScope.json new file mode 100644 index 000000000000..b1f3d26c2a1e --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelNestedResourceScope.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "policyStatesResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyStates/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", + "Timestamp": "2018-02-09T16:04:31Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", + "ResourceLocation": "eastus", + "ResourceGroup": "", + "ResourceTags": "tbd", + "PolicyAssignmentName": "186044306c044a1d8c0ff76c", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", + "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": null, + "PolicySetDefinitionName": null, + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", + "Timestamp": "2018-02-09T16:04:31Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", + "ResourceLocation": "eastus", + "ResourceGroup": "", + "ResourceTags": "tbd", + "PolicyAssignmentName": "186044306c044a1d8c0ff76c", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", + "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": null, + "PolicySetDefinitionName": null, + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json new file mode 100644 index 000000000000..c1b80e3c70c8 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "policyAssignmentId": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-13T00:45:19Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Network/publicIPAddresses/my-ip-1", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/Microsoft.Network/publicIPAddresses", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"TAGNAME_1\":{\"value\":\"test\"}}", + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "PolicyDefinitionName": "c8b79b49-a579-4045-984e-1b249ab8b474", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "PolicySetDefinitionName": "12b58873-e0f8-4b95-936c-86cbe7c9d697", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "2124621540977569058" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-13T00:45:19Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Network/publicIPAddresses/my-ip-1", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/Microsoft.Network/publicIPAddresses", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"TAGNAME_1\":{\"value\":\"test\"}}", + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "PolicyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "PolicySetDefinitionName": "12b58873-e0f8-4b95-936c-86cbe7c9d697", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": "14799174781370023846" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json new file mode 100644 index 000000000000..d165f69a3e58 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "policyDefinitionId": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-13T00:50:27Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication/services/myService", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/d9da7e80af6344ab9d342aa7", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/Microsoft.ServiceFabric/clusters/applications/services", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "d9da7e80af6344ab9d342aa7", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"tagName\":{\"value\":\"MyTag\"}}", + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "PolicyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": null, + "PolicySetDefinitionName": null, + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-13T00:50:27Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication/services/myService", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/d9da7e80af6344ab9d342aa7", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/Microsoft.ServiceFabric/clusters/applications/services", + "ResourceLocation": "eastus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "d9da7e80af6344ab9d342aa7", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"tagName\":{\"value\":\"MyTag\"}}", + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "PolicyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": null, + "PolicySetDefinitionName": null, + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json new file mode 100644 index 000000000000..0e9be4e4e99f --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "policySetDefinitionId": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-13T00:54:58Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Web/sites/mySite", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/Microsoft.Web/sites", + "ResourceLocation": "centralus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "3f3c4330183b4e218fe6fd29", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "PolicyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "PolicySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-13T00:54:58Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Web/sites/mySite", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/LocationAuditDefinition", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/Microsoft.Web/sites", + "ResourceLocation": "centralus", + "ResourceGroup": "myResourceGroup", + "ResourceTags": "tbd", + "PolicyAssignmentName": "3f3c4330183b4e218fe6fd29", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "PolicyDefinitionName": "LocationAuditDefinition", + "PolicyDefinitionAction": "Audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "PolicySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelResourceScope.json new file mode 100644 index 000000000000..8cbf7179eea7 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelResourceScope.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "policyStatesResource": "default", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", + "Timestamp": "2018-02-09T16:04:31Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.SomeNamespace/someResourceType", + "ResourceLocation": "eastus", + "ResourceGroup": "", + "ResourceTags": "tbd", + "PolicyAssignmentName": "test", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", + "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "PolicyDefinitionName": "Audit a tag and it's value", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": null, + "PolicySetDefinitionName": null, + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", + "Timestamp": "2018-02-09T16:04:31Z", + "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "ResourceType": "/Microsoft.SomeNamespace/someResourceType", + "ResourceLocation": "eastus", + "ResourceGroup": "", + "ResourceTags": "tbd", + "PolicyAssignmentName": "test", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", + "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "PolicyDefinitionName": "Audit a tag and it's value", + "PolicyDefinitionAction": "audit", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": null, + "PolicySetDefinitionName": null, + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionScope.json new file mode 100644 index 000000000000..a9eaf1a9f68f --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionScope.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-09T17:48:05Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/Microsoft.Network/publicIPAddresses/mypubip1", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/Enable Monitoring in Azure Security Center", + "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9daedab3-fb2d-461e-b861-71790eead4f6", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/Microsoft.Network/publicIPAddresses", + "ResourceLocation": "eastus", + "ResourceGroup": "myrg1", + "ResourceTags": "tbd", + "PolicyAssignmentName": "Enable Monitoring in Azure Security Center", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "PolicyDefinitionName": "9daedab3-fb2d-461e-b861-71790eead4f6", + "PolicyDefinitionAction": "AuditIfNotExists", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-09T17:48:05Z", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/Microsoft.Network/publicIPAddresses/mypubip1", + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/9ac09b0657d942e5ad4041a6", + "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9daedab3-fb2d-461e-b861-71790eead4f6", + "EffectiveParameters": null, + "IsCompliant": false, + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceType": "/Microsoft.Network/publicIPAddresses", + "ResourceLocation": "eastus", + "ResourceGroup": "myrg1", + "ResourceTags": "tbd", + "PolicyAssignmentName": "9ac09b0657d942e5ad4041a6", + "PolicyAssignmentOwner": "tbd", + "PolicyAssignmentParameters": "{}", + "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "PolicyDefinitionName": "9daedab3-fb2d-461e-b861-71790eead4f6", + "PolicyDefinitionAction": "AuditIfNotExists", + "PolicyDefinitionCategory": "tbd", + "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "PolicySetDefinitionOwner": null, + "PolicySetDefinitionCategory": null, + "PolicySetDefinitionParameters": null, + "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "PolicyDefinitionReferenceId": null + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeManagementGroupScope.json new file mode 100644 index 000000000000..b246ea20af0f --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeManagementGroupScope.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "policyStatesSummaryResource": "latest", + "managementGroupId": "providers/Microsoft.Management/managementGroups/myManagementGroup", + "api-version": "2017-12-12-preview", + "$from": "2018-02-05T18:00:00Z", + "$to": "2018-02-06T18:00:00Z", + "$filter": "PolicyDefinitionAction eq 'deny' or PolicyDefinitionAction eq 'audit'", + "$top": 0 + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary", + "@odata.count": 1, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary/$entity", + "Results": { + "QueryResultsUri": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-05 18:00:00Z&$to=2018-02-06 18:00:00Z&$filter=(PolicyDefinitionAction eq 'deny' or PolicyDefinitionAction eq 'audit') and IsCompliant eq false", + "NonCompliantResources": 15410, + "NonCompliantPolicies": 68 + }, + "PolicyAssignments": [] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicyAssignmentScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicyAssignmentScope.json new file mode 100644 index 000000000000..83c4366738d9 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicyAssignmentScope.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "policyStatesSummaryResource": "latest", + "policyAssignmentId": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary", + "@odata.count": 1, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary/$entity", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false", + "NonCompliantResources": 531, + "NonCompliantPolicies": 1 + }, + "PolicyAssignments": [ + { + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531'", + "NonCompliantResources": 531, + "NonCompliantPolicies": 4 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'", + "NonCompliantResources": 531 + } + }, + { + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", + "NonCompliantResources": 531 + } + }, + { + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/locationauditdefinition", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/locationauditdefinition'", + "NonCompliantResources": 220 + } + }, + { + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682'", + "NonCompliantResources": 54 + } + } + ] + } + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicyDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicyDefinitionScope.json new file mode 100644 index 000000000000..e8c19d765587 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicyDefinitionScope.json @@ -0,0 +1,104 @@ +{ + "parameters": { + "policyStatesSummaryResource": "latest", + "policyDefinitionId": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary", + "@odata.count": 1, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary/$entity", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false", + "NonCompliantResources": 561, + "NonCompliantPolicies": 4 + }, + "PolicyAssignments": [ + { + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7", + "PolicySetDefinitionId": "", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7'", + "NonCompliantResources": 558, + "NonCompliantPolicies": 1 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", + "NonCompliantResources": 558 + } + } + ] + }, + { + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29'", + "NonCompliantResources": 553, + "NonCompliantPolicies": 1 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", + "NonCompliantResources": 553 + } + } + ] + }, + { + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1'", + "NonCompliantResources": 531, + "NonCompliantPolicies": 1 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", + "NonCompliantResources": 531 + } + } + ] + }, + { + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531'", + "NonCompliantResources": 531, + "NonCompliantPolicies": 1 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", + "NonCompliantResources": 531 + } + } + ] + } + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicySetDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicySetDefinitionScope.json new file mode 100644 index 000000000000..4a49d8b9fe45 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicySetDefinitionScope.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "policyStatesSummaryResource": "latest", + "policySetDefinitionId": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "api-version": "2017-12-12-preview", + "$from": "2018-02-05T18:00:00Z", + "$to": "2018-02-06T18:00:00Z", + "$filter": "PolicyDefinitionAction eq 'deny'", + "$top": 1 + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary", + "@odata.count": 1, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary/$entity", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-05 18:00:00Z&$to=2018-02-06 18:00:00Z&$filter=(PolicyDefinitionAction eq 'deny') and IsCompliant eq false", + "NonCompliantResources": 0, + "NonCompliantPolicies": 0 + }, + "PolicyAssignments": [] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceGroupScope.json new file mode 100644 index 000000000000..9c9707f605fb --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceGroupScope.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "policyStatesSummaryResource": "latest", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceGroupName": "myResourceGroup", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary", + "@odata.count": 1, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary/$entity", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:55:09Z&$to=2018-02-13 19:55:09Z&$filter=IsCompliant eq false", + "NonCompliantResources": 55, + "NonCompliantPolicies": 20 + }, + "PolicyAssignments": [ + { + "PolicyAssignmentId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c", + "PolicySetDefinitionId": "", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:55:09Z&$to=2018-02-13 19:55:09Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c'", + "NonCompliantResources": 55, + "NonCompliantPolicies": 1 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:55:09Z&$to=2018-02-13 19:55:09Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d'", + "NonCompliantResources": 55 + } + } + ] + }, + { + "PolicyAssignmentId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a", + "PolicySetDefinitionId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policysetdefinitions/335cefd2-ab16-430f-b364-974a170eb1d5", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:55:09Z&$to=2018-02-13 19:55:09Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a'", + "NonCompliantResources": 55, + "NonCompliantPolicies": 1 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:55:09Z&$to=2018-02-13 19:55:09Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d'", + "NonCompliantResources": 55 + } + } + ] + } + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceScope.json new file mode 100644 index 000000000000..3bb557d9bf20 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceScope.json @@ -0,0 +1,334 @@ +{ + "parameters": { + "policyStatesSummaryResource": "latest", + "resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary", + "@odata.count": 1, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary/$entity", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false", + "NonCompliantResources": 1, + "NonCompliantPolicies": 14 + }, + "PolicyAssignments": [ + { + "PolicyAssignmentId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/8174043a1e2849179635b874", + "PolicySetDefinitionId": "", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/8174043a1e2849179635b874'", + "NonCompliantResources": 1, + "NonCompliantPolicies": 1 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/8174043a1e2849179635b874' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066'", + "NonCompliantResources": 1 + } + } + ] + }, + { + "PolicyAssignmentId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a", + "PolicySetDefinitionId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policysetdefinitions/335cefd2-ab16-430f-b364-974a170eb1d5", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a'", + "NonCompliantResources": 1, + "NonCompliantPolicies": 1 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d'", + "NonCompliantResources": 1 + } + } + ] + }, + { + "PolicyAssignmentId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c", + "PolicySetDefinitionId": "", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c'", + "NonCompliantResources": 1, + "NonCompliantPolicies": 1 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d'", + "NonCompliantResources": 1 + } + } + ] + }, + { + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/fed0d6ef-c76c-4a3d-a4ec-de07b1e7900b", + "PolicySetDefinitionId": "", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/fed0d6ef-c76c-4a3d-a4ec-de07b1e7900b'", + "NonCompliantResources": 1, + "NonCompliantPolicies": 1 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/fed0d6ef-c76c-4a3d-a4ec-de07b1e7900b' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value'", + "NonCompliantResources": 1 + } + } + ] + }, + { + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f5f5249bd6124d0692c2af52", + "PolicySetDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/bafcd34b-58c6-47b4-bc8b-f35198d6a025", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f5f5249bd6124d0692c2af52'", + "NonCompliantResources": 1, + "NonCompliantPolicies": 1 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/test", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f5f5249bd6124d0692c2af52' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/testtest'", + "NonCompliantResources": 1 + } + } + ] + }, + { + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e4a08f18-4e3e-47af-a2eb-cc96d8c9a030", + "PolicySetDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/e4a08f18-4e3e-47af-a2eb-cc96d8c9a01f", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e4a08f18-4e3e-47af-a2eb-cc96d8c9a030'", + "NonCompliantResources": 1, + "NonCompliantPolicies": 2 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and its value", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e4a08f18-4e3e-47af-a2eb-cc96d8c9a030' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and its value'", + "NonCompliantResources": 1 + } + }, + { + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e4a08f18-4e3e-47af-a2eb-cc96d8c9a030' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value'", + "NonCompliantResources": 1 + } + } + ] + }, + { + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01", + "PolicySetDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/a03db67e-a286-43c3-9098-b2da83d361ad", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01'", + "NonCompliantResources": 1, + "NonCompliantPolicies": 1 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'", + "NonCompliantResources": 1 + } + } + ] + }, + { + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49", + "PolicySetDefinitionId": "", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49'", + "NonCompliantResources": 1, + "NonCompliantPolicies": 1 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'", + "NonCompliantResources": 1 + } + } + ] + }, + { + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dc7c38a6-42a9-4261-b54e-92549cd6e010", + "PolicySetDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/deny a resource based on owner tag", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dc7c38a6-42a9-4261-b54e-92549cd6e010'", + "NonCompliantResources": 1, + "NonCompliantPolicies": 1 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dc7c38a6-42a9-4261-b54e-92549cd6e010' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value'", + "NonCompliantResources": 1 + } + } + ] + }, + { + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7", + "PolicySetDefinitionId": "", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7'", + "NonCompliantResources": 1, + "NonCompliantPolicies": 1 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", + "NonCompliantResources": 1 + } + } + ] + }, + { + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d6be6bb37e5f4333baa95c2a", + "PolicySetDefinitionId": "", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d6be6bb37e5f4333baa95c2a'", + "NonCompliantResources": 1, + "NonCompliantPolicies": 1 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/5948d091-78b7-4d3b-a404-cc6a0329b0c6", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d6be6bb37e5f4333baa95c2a' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/5948d091-78b7-4d3b-a404-cc6a0329b0c6'", + "NonCompliantResources": 1 + } + } + ] + }, + { + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29", + "PolicySetDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29'", + "NonCompliantResources": 1, + "NonCompliantPolicies": 1 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", + "NonCompliantResources": 1 + } + } + ] + }, + { + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", + "PolicySetDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531'", + "NonCompliantResources": 1, + "NonCompliantPolicies": 3 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/locationauditdefinition", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/locationauditdefinition'", + "NonCompliantResources": 1 + } + }, + { + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'", + "NonCompliantResources": 1 + } + }, + { + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", + "NonCompliantResources": 1 + } + } + ] + }, + { + "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", + "PolicySetDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1'", + "NonCompliantResources": 1, + "NonCompliantPolicies": 3 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/locationauditdefinition", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/locationauditdefinition'", + "NonCompliantResources": 1 + } + }, + { + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'", + "NonCompliantResources": 1 + } + }, + { + "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", + "NonCompliantResources": 1 + } + } + ] + } + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionScope.json new file mode 100644 index 000000000000..1c9372d87887 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionScope.json @@ -0,0 +1,140 @@ +{ + "parameters": { + "policyStatesSummaryResource": "latest", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-12-12-preview", + "$top": 5 + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary", + "@odata.count": 1, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary/$entity", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false", + "NonCompliantResources": 619, + "NonCompliantPolicies": 40 + }, + "PolicyAssignments": [ + { + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/a03db67e-a286-43c3-9098-b2da83d361ad", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01'", + "NonCompliantResources": 557, + "NonCompliantPolicies": 1 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'", + "NonCompliantResources": 557 + } + } + ] + }, + { + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7", + "PolicySetDefinitionId": "", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7'", + "NonCompliantResources": 557, + "NonCompliantPolicies": 1 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", + "NonCompliantResources": 557 + } + } + ] + }, + { + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49", + "PolicySetDefinitionId": "", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49'", + "NonCompliantResources": 557, + "NonCompliantPolicies": 1 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'", + "NonCompliantResources": 557 + } + } + ] + }, + { + "PolicyAssignmentId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a", + "PolicySetDefinitionId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policysetdefinitions/335cefd2-ab16-430f-b364-974a170eb1d5", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a'", + "NonCompliantResources": 557, + "NonCompliantPolicies": 1 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d'", + "NonCompliantResources": 557 + } + } + ] + }, + { + "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29", + "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29'", + "NonCompliantResources": 552, + "NonCompliantPolicies": 3 + }, + "PolicyDefinitions": [ + { + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", + "NonCompliantResources": 552 + } + }, + { + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/locationauditdefinition", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/locationauditdefinition'", + "NonCompliantResources": 29 + } + }, + { + "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682", + "Effect": "audit", + "Results": { + "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682'", + "NonCompliantResources": 2 + } + } + ] + } + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/TimeRangeSortSelectTop.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/TimeRangeSortSelectTop.json new file mode 100644 index 000000000000..df1d92c8d5ad --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/TimeRangeSortSelectTop.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "policyStatesResource": "latest", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "api-version": "2017-12-12-preview", + "$from": "2018-02-05T18:00:00Z", + "$to": "2018-02-06T18:00:00Z", + "$orderby": "Timestamp desc, PolicyAssignmentId asc, SubscriptionId asc, ResourceGroup asc, ResourceId", + "$select": "Timestamp, PolicyAssignmentId, PolicyDefinitionId, SubscriptionId, ResourceGroup, ResourceId", + "$top": 2 + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest", + "@odata.count": 2, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-06T17:58:00Z", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/8cb1e007-947f-423a-ad0c-7ab7dc7d0255/providers/Microsoft.Authorization/policyAssignments/1654a0254ab34920a60f94eb", + "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/655cb504-bcee-4362-bd4c-402e6aa38759", + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceGroup": "myrg1", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/Microsoft.Storage/storageAccounts/mysa1" + }, + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", + "Timestamp": "2018-02-06T17:58:00Z", + "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/8cb1e007-947f-423a-ad0c-7ab7dc7d0255/providers/Microsoft.Authorization/policyAssignments/1654a0254ab34920a60f94eb", + "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/655cb504-bcee-4362-bd4c-402e6aa38759", + "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "ResourceGroup": "myrg2", + "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg2/providers/Microsoft.Storage/storageAccounts/mysa2" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/policyStates.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/policyStates.json new file mode 100644 index 000000000000..684fcd18a434 --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/policyStates.json @@ -0,0 +1,1324 @@ +{ + "swagger": "2.0", + "info": { + "title": "PolicyStatesClient", + "version": "2017-12-12-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/{managementGroupId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { + "post": { + "operationId": "PolicyStates_ListQueryResultsForManagementGroup", + "description": "Queries policy states for the resources under the management group.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesResourceParameter" + }, + { + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyStatesQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query latest at management group scope": { "$ref": "./examples/QueryManagementGroupScope.json" } + } + } + }, + "/{managementGroupId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { + "post": { + "operationId": "PolicyStates_SummarizeForManagementGroup", + "description": "Summarizes policy states for the resources under the management group.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesSummaryResourceParameter" + }, + { + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + } + ], + "responses": { + "200": { + "description": "Summarize results.", + "schema": { + "$ref": "#/definitions/SummarizeResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Summarize at management group scope": { "$ref": "./examples/SummarizeManagementGroupScope.json" } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { + "post": { + "operationId": "PolicyStates_ListQueryResultsForSubscription", + "description": "Queries policy states for the resources under the subscription.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesResourceParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyStatesQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query latest at subscription scope": { "$ref": "./examples/QuerySubscriptionScope.json" }, + "Time range; sort, select and limit": { "$ref": "./examples/TimeRangeSortSelectTop.json" }, + "Filter and group with aggregate": { "$ref": "./examples/FilterAndGroupByWithAggregate.json" }, + "Filter and group without aggregate": { "$ref": "./examples/FilterAndGroupByWithoutAggregate.json" }, + "Filter and aggregate only": { "$ref": "./examples/FilterAndAggregateOnly.json" }, + "Filter and multiple groups": { "$ref": "./examples/FilterAndMultipleGroups.json" } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { + "post": { + "operationId": "PolicyStates_SummarizeForSubscription", + "description": "Summarizes policy states for the resources under the subscription.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesSummaryResourceParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + } + ], + "responses": { + "200": { + "description": "Summarize results.", + "schema": { + "$ref": "#/definitions/SummarizeResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Summarize at subscription scope": { "$ref": "./examples/SummarizeSubscriptionScope.json" } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { + "post": { + "operationId": "PolicyStates_ListQueryResultsForResourceGroup", + "description": "Queries policy states for the resources under the resource group.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesResourceParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyStatesQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query latest at resource group scope": { "$ref": "./examples/QueryResourceGroupScope.json" } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { + "post": { + "operationId": "PolicyStates_SummarizeForResourceGroup", + "description": "Summarizes policy states for the resources under the resource group.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesSummaryResourceParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + } + ], + "responses": { + "200": { + "description": "Summarize results.", + "schema": { + "$ref": "#/definitions/SummarizeResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Summarize at resource group scope": { "$ref": "./examples/SummarizeResourceGroupScope.json" } + } + } + }, + "/{resourceId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { + "post": { + "operationId": "PolicyStates_ListQueryResultsForResource", + "description": "Queries policy states for the resource.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesResourceParameter" + }, + { + "$ref": "#/parameters/resourceIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyStatesQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query all policy states at resource scope": { "$ref": "./examples/QueryResourceScope.json" }, + "Query all policy states at subscription level resource scope": { "$ref": "./examples/QuerySubscriptionLevelResourceScope.json" }, + "Query all policy states at nested resource scope": { "$ref": "./examples/QueryNestedResourceScope.json" }, + "Query all policy states at subscription level nested resource scope": { "$ref": "./examples/QuerySubscriptionLevelNestedResourceScope.json" } + } + } + }, + "/{resourceId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { + "post": { + "operationId": "PolicyStates_SummarizeForResource", + "description": "Summarizes policy states for the resource.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesSummaryResourceParameter" + }, + { + "$ref": "#/parameters/resourceIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + } + ], + "responses": { + "200": { + "description": "Summarize results.", + "schema": { + "$ref": "#/definitions/SummarizeResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Summarize at resource scope": { "$ref": "./examples/SummarizeResourceScope.json" } + } + } + }, + "/{policySetDefinitionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { + "post": { + "operationId": "PolicyStates_ListQueryResultsForPolicySetDefinition", + "description": "Queries policy states for the policy set definition.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesResourceParameter" + }, + { + "$ref": "#/parameters/policySetDefinitionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyStatesQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query latest at subscription level policy set definition scope": { "$ref": "./examples/QuerySubscriptionLevelPolicySetDefinitionScope.json" } + } + } + }, + "/{policySetDefinitionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { + "post": { + "operationId": "PolicyStates_SummarizeForPolicySetDefinition", + "description": "Summarizes policy states for the policy set definition.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesSummaryResourceParameter" + }, + { + "$ref": "#/parameters/policySetDefinitionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + } + ], + "responses": { + "200": { + "description": "Summarize results.", + "schema": { + "$ref": "#/definitions/SummarizeResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Summarize at policy set definition scope": { "$ref": "./examples/SummarizePolicySetDefinitionScope.json" } + } + } + }, + "/{policyDefinitionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { + "post": { + "operationId": "PolicyStates_ListQueryResultsForPolicyDefinition", + "description": "Queries policy states for the policy definition.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesResourceParameter" + }, + { + "$ref": "#/parameters/policyDefinitionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyStatesQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query latest at subscription level policy definition scope": { "$ref": "./examples/QuerySubscriptionLevelPolicyDefinitionScope.json" } + } + } + }, + "/{policyDefinitionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { + "post": { + "operationId": "PolicyStates_SummarizeForPolicyDefinition", + "description": "Summarizes policy states for the policy definition.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesSummaryResourceParameter" + }, + { + "$ref": "#/parameters/policyDefinitionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + } + ], + "responses": { + "200": { + "description": "Summarize results.", + "schema": { + "$ref": "#/definitions/SummarizeResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Summarize at policy definition scope": { "$ref": "./examples/SummarizePolicyDefinitionScope.json" } + } + } + }, + "/{policyAssignmentId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { + "post": { + "operationId": "PolicyStates_ListQueryResultsForPolicyAssignment", + "description": "Queries policy states for the policy assignment.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesResourceParameter" + }, + { + "$ref": "#/parameters/policyAssignmentIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyStatesQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query latest at subscription level policy assignment scope": { "$ref": "./examples/QuerySubscriptionLevelPolicyAssignmentScope.json" }, + "Query latest at resource group level policy assignment scope": { "$ref": "./examples/QueryResourceGroupLevelPolicyAssignmentScope.json" } + } + } + }, + "/{policyAssignmentId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { + "post": { + "operationId": "PolicyStates_SummarizeForPolicyAssignment", + "description": "Summarizes policy states for the policy assignment.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesSummaryResourceParameter" + }, + { + "$ref": "#/parameters/policyAssignmentIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + } + ], + "responses": { + "200": { + "description": "Summarize results.", + "schema": { + "$ref": "#/definitions/SummarizeResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Summarize at policy assignment scope": { "$ref": "./examples/SummarizePolicyAssignmentScope.json" } + } + } + }, + "/providers/Microsoft.PolicyInsights/operations": { + "get": { + "operationId": "PolicyInsights_ListOperations", + "description": "Lists available operations.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "List of available operations.", + "schema": { + "$ref": "#/definitions/Operations" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "List operations": { "$ref": "./examples/ListOperations.json" } + } + } + }, + "/{scope}/providers/Microsoft.PolicyInsights/policyStates/$metadata": { + "get": { + "operationId": "PolicyStates_GetMetadata", + "description": "Gets OData metadata XML document.", + "produces": [ + "application/xml" + ], + "parameters": [ + { + "$ref": "#/parameters/scopeParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OData metadata XML document.", + "schema": { + "$ref": "#/definitions/MetadataDocument" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Get metadata": { "$ref": "./examples/GetMetadata.json" } + } + } + } + }, + "definitions": { + "PolicyStatesQueryResults": { + "description": "Query results.", + "properties": { + "@odata.context": { + "description": "OData context string; used by OData clients to resolve type information based on metadata.", + "type": "string" + }, + "@odata.count": { + "description": "OData entity count; represents the number of policy state records returned.", + "type": "integer", + "format": "int32", + "minimum": 0 + }, + "value": { + "description": "Query results.", + "type": "array", + "items": { + "$ref": "#/definitions/PolicyState" + } + } + } + }, + "PolicyState": { + "description": "Policy state record.", + "properties": { + "@odata.id": { + "description": "OData entity ID; always set to null since policy state records do not have an entity ID.", + "type": "string" + }, + "@odata.context": { + "description": "OData context string; used by OData clients to resolve type information based on metadata.", + "type": "string" + }, + "timestamp": { + "description": "Timestamp for the policy state record.", + "type": "string", + "format": "date-time" + }, + "resourceId": { + "description": "Resource ID.", + "type": "string" + }, + "policyAssignmentId": { + "description": "Policy assignment ID.", + "type": "string" + }, + "policyDefinitionId": { + "description": "Policy definition ID.", + "type": "string" + }, + "effectiveParameters": { + "description": "Effective parameters for the policy assignment.", + "type": "string" + }, + "isCompliant": { + "description": "Flag which states whether the resource is compliant against the policy assignment it was evaluated against.", + "type": "boolean" + }, + "subscriptionId": { + "description": "Subscription ID.", + "type": "string" + }, + "resourceType": { + "description": "Resource type.", + "type": "string" + }, + "resourceLocation": { + "description": "Resource location.", + "type": "string" + }, + "resourceGroup": { + "description": "Resource group name.", + "type": "string" + }, + "resourceTags": { + "description": "List of resource tags.", + "type": "string" + }, + "policyAssignmentName": { + "description": "Policy assignment name.", + "type": "string" + }, + "policyAssignmentOwner": { + "description": "Policy assignment owner.", + "type": "string" + }, + "policyAssignmentParameters": { + "description": "Policy assignment parameters.", + "type": "string" + }, + "policyAssignmentScope": { + "description": "Policy assignment scope.", + "type": "string" + }, + "policyDefinitionName": { + "description": "Policy definition name.", + "type": "string" + }, + "policyDefinitionAction": { + "description": "Policy definition action, i.e. effect.", + "type": "string" + }, + "policyDefinitionCategory": { + "description": "Policy definition category.", + "type": "string" + }, + "policySetDefinitionId": { + "description": "Policy set definition ID, if the policy assignment is for a policy set.", + "type": "string" + }, + "policySetDefinitionName": { + "description": "Policy set definition name, if the policy assignment is for a policy set.", + "type": "string" + }, + "policySetDefinitionOwner": { + "description": "Policy set definition owner, if the policy assignment is for a policy set.", + "type": "string" + }, + "policySetDefinitionCategory": { + "description": "Policy set definition category, if the policy assignment is for a policy set.", + "type": "string" + }, + "policySetDefinitionParameters": { + "description": "Policy set definition parameters, if the policy assignment is for a policy set.", + "type": "string" + }, + "managementGroupIds": { + "description": "Comma seperated list of management group IDs, which represent the hierarchy of the management groups the resource is under.", + "type": "string" + }, + "policyDefinitionReferenceId": { + "description": "Reference ID for the policy definition inside the policy set, if the policy assignment is for a policy set.", + "type": "string" + } + } + }, + "SummarizeResults": { + "description": "Summarize action results.", + "properties": { + "@odata.context": { + "description": "OData context string; used by OData clients to resolve type information based on metadata.", + "type": "string" + }, + "@odata.count": { + "description": "OData entity count; represents the number of summaries returned; always set to 1.", + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 1 + }, + "value": { + "description": "Summarize action results.", + "type": "array", + "items": { + "$ref": "#/definitions/Summary" + } + } + } + }, + "Summary": { + "description": "Summary results.", + "properties": { + "@odata.id": { + "description": "OData entity ID; always set to null since summaries do not have an entity ID.", + "type": "string" + }, + "@odata.context": { + "description": "OData context string; used by OData clients to resolve type information based on metadata.", + "type": "string" + }, + "results": { + "description": "Non-compliance summary for all policy assignments.", + "$ref": "#/definitions/SummaryResults" + }, + "policyAssignments": { + "description": "Policy assignments summary.", + "type": "array", + "items": { + "$ref": "#/definitions/PolicyAssignmentSummary" + } + } + } + }, + "SummaryResults": { + "description": "Non-compliance summary on a particular summary level.", + "properties": { + "queryResultsUri": { + "description": "HTTP POST URI for queryResults action on Microsoft.PolicyInsights to retrieve raw results for the non-compliance summary.", + "type": "string" + }, + "nonCompliantResources": { + "description": "Number of non-compliant resources.", + "type": "integer", + "format": "int32", + "minimum": 0 + }, + "nonCompliantPolicies": { + "description": "Number of non-compliant policies.", + "type": "integer", + "format": "int32", + "minimum": 0 + } + } + }, + "PolicyAssignmentSummary": { + "description": "Policy assignment summary.", + "properties": { + "policyAssignmentId": { + "description": "Policy assignment ID.", + "type": "string" + }, + "policySetDefinitionId": { + "description": "Policy set definition ID, if the policy assignment is for a policy set.", + "type": "string" + }, + "results": { + "description": "Non-compliance summary for the policy assignment.", + "$ref": "#/definitions/SummaryResults" + }, + "policyDefinitions": { + "description": "Policy definitions summary.", + "type": "array", + "items": { + "$ref": "#/definitions/PolicyDefinitionSummary" + } + } + } + }, + "PolicyDefinitionSummary": { + "description": "Policy definition summary.", + "properties": { + "policyDefinitionId": { + "description": "Policy definition ID.", + "type": "string" + }, + "effect": { + "description": "Policy effect, i.e. policy definition action.", + "type": "string" + }, + "results": { + "description": "Non-compliance summary for the policy definition.", + "$ref": "#/definitions/SummaryResults" + } + } + }, + "QueryFailure": { + "description": "Error response.", + "properties": { + "error": { + "description": "Error definition.", + "properties": { + "code": { + "description": "Service specific error code which serves as the substatus for the HTTP error code.", + "type": "string" + }, + "message": { + "description": "Description of the error.", + "type": "string" + } + } + } + } + }, + "Operations": { + "description": "List of available operations.", + "properties": { + "value": { + "description": "List of available operations.", + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + } + } + } + }, + "Operation": { + "description": "Operation definition.", + "properties": { + "name": { + "description": "Operation name.", + "type": "string" + }, + "display": { + "description": "Display metadata associated with the operation.", + "properties": { + "provider": { + "description": "Resource provider name.", + "type": "string" + }, + "resource": { + "description": "Resource name on which the operation is performed.", + "type": "string" + }, + "operation": { + "description": "Operation name.", + "type": "string" + }, + "description": { + "description": "Operation description.", + "type": "string" + } + } + } + } + }, + "MetadataDocument": { + "description": "Metadata XML document.", + "type": "string" + } + }, + "parameters": { + "policyStatesResourceParameter": { + "name": "policyStatesResource", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default", + "latest" + ], + "x-ms-enum": { + "name": "PolicyStatesResource", + "modelAsString": false + }, + "description": "The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).", + "x-ms-parameter-location": "method" + }, + "policyStatesSummaryResourceParameter": { + "name": "policyStatesSummaryResource", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "latest" + ], + "description": "The virtual resource under PolicyStates resource type for summarize action. In a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.", + "x-ms-parameter-location": "method" + }, + "managementGroupIdParameter": { + "name": "managementGroupId", + "in": "path", + "required": true, + "type": "string", + "description": "Management group ID, e.g. /providers/Microsoft.Management/managementGroups/{name}.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "subscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "Microsoft Azure subscription ID.", + "x-ms-parameter-location": "method" + }, + "resourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Resource group name.", + "x-ms-parameter-location": "method" + }, + "resourceIdParameter": { + "name": "resourceId", + "in": "path", + "required": true, + "type": "string", + "description": "Resource ID.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "policySetDefinitionIdParameter": { + "name": "policySetDefinitionId", + "in": "path", + "required": true, + "type": "string", + "description": "Subscription level policy set definition ID.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "policyDefinitionIdParameter": { + "name": "policyDefinitionId", + "in": "path", + "required": true, + "type": "string", + "description": "Subscription level policy definition ID.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "policyAssignmentIdParameter": { + "name": "policyAssignmentId", + "in": "path", + "required": true, + "type": "string", + "description": "Subscription level or a resource group level policy assignment ID.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "scopeParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "A valid scope, i.e. management group, subscription, resource group, or resource ID. Scope used has no effect on metadata returned.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "API version to use with the client requests.", + "x-ms-parameter-location": "client" + }, + "topParameter": { + "name": "$top", + "in": "query", + "required": false, + "type": "integer", + "format": "int32", + "minimum": 0, + "description": "Maximum number of records to return.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Top" + }, + "orderByParameter": { + "name": "$orderby", + "in": "query", + "required": false, + "type": "string", + "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "OrderBy" + }, + "selectParameter": { + "name": "$select", + "in": "query", + "required": false, + "type": "string", + "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Select" + }, + "fromParameter": { + "name": "$from", + "in": "query", + "required": false, + "type": "string", + "format": "date-time", + "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "From" + }, + "toParameter": { + "name": "$to", + "in": "query", + "required": false, + "type": "string", + "format": "date-time", + "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "To" + }, + "filterParameter": { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "OData filter expression.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Filter" + }, + "applyParameter": { + "name": "$apply", + "in": "query", + "required": false, + "type": "string", + "description": "OData apply expression for aggregations.", + "x-ms-parameter-location": "method", + "x-ms-parameter-grouping": { + "name": "QueryOptions" + }, + "x-ms-client-name": "Apply" + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/readme.md b/specification/policyinsights/resource-manager/readme.md new file mode 100644 index 000000000000..593600de4651 --- /dev/null +++ b/specification/policyinsights/resource-manager/readme.md @@ -0,0 +1,205 @@ +# PolicyInsights + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for PolicyInsights. + + + +--- +## Getting Started +To build the SDK for PolicyInsights, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: + +> `autorest` + +To see additional help and options, run: + +> `autorest --help` +--- + +## Configuration + + + +### Basic Information +These are the global settings for the PolicyInsights API. + +``` yaml +title: PolicyInsightsClient +openapi-type: arm +azure-validator: true +tag: package-2017-12 +``` + + +## Suppression +``` yaml +directive: + - suppress: EnumInsteadOfBoolean + reason: The data type in store is boolean. If we change the type in RP, it will break existing clients, and we will incur runtime conversion cost. + #where: + # - $.definitions.PolicyEvent.properties.isCompliant + # - $.definitions.PolicyState.properties.isCompliant + + - suppress: NonApplicationJsonType + reason: ODATA $metadata endpoint for each resource type returns metadata document as XML. + #where: + # - $.paths["/{scope}/providers/Microsoft.PolicyInsights/policyEvents/$metadata"] + # - $.paths["/{scope}/providers/Microsoft.PolicyInsights/policyStates/$metadata"] + +``` + +### Tag: package-2017-12 + +These settings apply only when `--tag=package-2017-12` is specified on the command line. + +``` yaml $(tag) == 'package-2017-12' +input-file: +- Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/policyEvents.json +- Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/policyStates.json +``` + + +### Tag: package-2017-10 + +These settings apply only when `--tag=package-2017-10` is specified on the command line. + +``` yaml $(tag) == 'package-2017-10' +input-file: +- Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/policyEvents.json +- Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/policyStates.json +``` + + +### Tag: package-2017-08 + +These settings apply only when `--tag=package-2017-08` is specified on the command line. + +``` yaml $(tag) == 'package-2017-08' +input-file: +- Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/policyEvents.json +- Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/policyStates.json +``` + + +--- +# Code Generation + + +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +``` yaml $(swagger-to-sdk) +swagger-to-sdk: + - repo: azure-sdk-for-python + - repo: azure-libraries-for-java + - repo: azure-sdk-for-go +``` + + +## C# + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +``` yaml $(csharp) +csharp: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + namespace: Microsoft.Azure.Management.PolicyInsights + output-folder: $(csharp-sdks-folder)/PolicyInsights/Management/Management.PolicyInsights/Generated + clear-output-folder: true +``` + +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. +Use `--python-mode=update` if you already have a setup.py and just want to update the code itself. + +``` yaml $(python) +python-mode: create +python: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 2 + namespace: azure.mgmt.policyinsights + package-name: azure-mgmt-policyinsights + clear-output-folder: true +``` +``` yaml $(python) && $(python-mode) == 'update' +python: + no-namespace-folders: true + output-folder: $(python-sdks-folder)/azure-mgmt-policyinsights/azure/mgmt/policyinsights +``` +``` yaml $(python) && $(python-mode) == 'create' +python: + basic-setup-py: true + output-folder: $(python-sdks-folder)/azure-mgmt-policyinsights +``` + + +## Go + +These settings apply only when `--go` is specified on the command line. + +``` yaml $(go) +go: + license-header: MICROSOFT_APACHE_NO_VERSION + namespace: policyinsights + clear-output-folder: true +``` + +### Go multi-api + +``` yaml $(go) && $(multiapi) +batch: + - tag: package-2017-12 + - tag: package-2017-10 + - tag: package-2017-08 +``` + +### Tag: package-2017-12 and go + +These settings apply only when `--tag=package-2017-12 --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag) == 'package-2017-12' && $(go) +output-folder: $(go-sdk-folder)/services/policyinsights/mgmt/2017-12-12-preview/policyinsights +``` + +### Tag: package-2017-10 and go + +These settings apply only when `--tag=package-2017-10 --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag) == 'package-2017-10' && $(go) +output-folder: $(go-sdk-folder)/services/policyinsights/mgmt/2017-10-17-preview/policyinsights +``` + +### Tag: package-2017-08 and go + +These settings apply only when `--tag=package-2017-08 --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag) == 'package-2017-08' && $(go) +output-folder: $(go-sdk-folder)/services/policyinsights/mgmt/2017-08-09-preview/policyinsights +``` + + +## Java + +These settings apply only when `--java` is specified on the command line. +Please also specify `--azure-libraries-for-java-folder=`. + +``` yaml $(java) +java: + azure-arm: true + fluent: true + namespace: com.microsoft.azure.management.policyinsights + license-header: MICROSOFT_MIT_NO_CODEGEN + payload-flattening-threshold: 1 + output-folder: $(azure-libraries-for-java-folder)/azure-mgmt-policyinsights +``` \ No newline at end of file From 0de1d2e2cf94125a6555ce46ac7b2c027b3b0454 Mon Sep 17 00:00:00 2001 From: Bulent Elmaci Date: Thu, 22 Feb 2018 12:09:21 -0800 Subject: [PATCH 02/13] Add support for --validate; make where clauses explicit in existing (approval request pending) suppressions; add new suppression for equivalent paths error (approval request pending) --- .../policyinsights/resource-manager/readme.md | 40 ++++++++++++++++--- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/specification/policyinsights/resource-manager/readme.md b/specification/policyinsights/resource-manager/readme.md index 593600de4651..539ee60b7e27 100644 --- a/specification/policyinsights/resource-manager/readme.md +++ b/specification/policyinsights/resource-manager/readme.md @@ -31,21 +31,49 @@ azure-validator: true tag: package-2017-12 ``` +### Validations +Run validations when `--validate` is specified on command line + +``` yaml $(validate) +azure-validator: true +semantic-validator: true +model-validator: true +message-format: json +``` ## Suppression ``` yaml directive: - suppress: EnumInsteadOfBoolean reason: The data type in store is boolean. If we change the type in RP, it will break existing clients, and we will incur runtime conversion cost. - #where: - # - $.definitions.PolicyEvent.properties.isCompliant - # - $.definitions.PolicyState.properties.isCompliant + where: + - $.definitions.PolicyEvent.properties.isCompliant + - $.definitions.PolicyState.properties.isCompliant - suppress: NonApplicationJsonType reason: ODATA $metadata endpoint for each resource type returns metadata document as XML. - #where: - # - $.paths["/{scope}/providers/Microsoft.PolicyInsights/policyEvents/$metadata"] - # - $.paths["/{scope}/providers/Microsoft.PolicyInsights/policyStates/$metadata"] + where: + - $.paths["/{scope}/providers/Microsoft.PolicyInsights/policyEvents/$metadata"].get.produces[0] + - $.paths["/{scope}/providers/Microsoft.PolicyInsights/policyStates/$metadata"].get.produces[0] + + - suppress: EQUIVALENT_PATH + reason: These paths are semantically different paths that need to be modelled separately. + where: + - $.paths["/{managementGroupId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults"] + - $.paths["/{resourceId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults"] + - $.paths["/{policySetDefinitionId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults"] + - $.paths["/{policyDefinitionId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults"] + - $.paths["/{policyAssignmentId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults"] + - $.paths["/{managementGroupId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults"] + - $.paths["/{resourceId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults"] + - $.paths["/{policySetDefinitionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults"] + - $.paths["/{policyDefinitionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults"] + - $.paths["/{policyAssignmentId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults"] + - $.paths["/{managementGroupId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize"] + - $.paths["/{resourceId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize"] + - $.paths["/{policySetDefinitionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize"] + - $.paths["/{policyDefinitionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize"] + - $.paths["/{policyAssignmentId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize"] ``` From 2e33f8f73597843f15a3fd78445fdab6a5a8b45e Mon Sep 17 00:00:00 2001 From: Bulent Elmaci Date: Thu, 22 Feb 2018 16:13:24 -0800 Subject: [PATCH 03/13] Fix $top in examples; fix casing in examples --- .../FilterAndGroupByWithAggregate.json | 16 +-- .../FilterAndGroupByWithoutAggregate.json | 16 +-- .../examples/FilterAndMultipleGroups.json | 26 ++--- .../examples/QueryManagementGroupScope.json | 108 +++++++++--------- .../examples/QueryNestedResourceScope.json | 108 +++++++++--------- .../examples/QueryResourceGroupScope.json | 108 +++++++++--------- .../examples/QueryResourceScope.json | 108 +++++++++--------- ...ySubscriptionLevelNestedResourceScope.json | 108 +++++++++--------- .../QuerySubscriptionLevelResourceScope.json | 108 +++++++++--------- .../examples/QuerySubscriptionScope.json | 108 +++++++++--------- .../examples/TimeRangeSortSelectTop.json | 24 ++-- .../FilterAndGroupByWithAggregate.json | 16 +-- .../FilterAndGroupByWithoutAggregate.json | 16 +-- .../examples/FilterAndMultipleGroups.json | 26 ++--- .../examples/QueryManagementGroupScope.json | 108 +++++++++--------- .../examples/QueryNestedResourceScope.json | 108 +++++++++--------- ...sourceGroupLevelPolicyAssignmentScope.json | 108 +++++++++--------- .../examples/QueryResourceGroupScope.json | 108 +++++++++--------- .../examples/QueryResourceScope.json | 108 +++++++++--------- ...ySubscriptionLevelNestedResourceScope.json | 108 +++++++++--------- ...ubscriptionLevelPolicyAssignmentScope.json | 108 +++++++++--------- ...ubscriptionLevelPolicyDefinitionScope.json | 108 +++++++++--------- ...criptionLevelPolicySetDefinitionScope.json | 108 +++++++++--------- .../QuerySubscriptionLevelResourceScope.json | 108 +++++++++--------- .../examples/QuerySubscriptionScope.json | 108 +++++++++--------- .../examples/TimeRangeSortSelectTop.json | 24 ++-- .../FilterAndGroupByWithAggregate.json | 16 +-- .../FilterAndGroupByWithoutAggregate.json | 16 +-- .../examples/FilterAndMultipleGroups.json | 82 ++++++------- .../examples/QueryManagementGroupScope.json | 100 ++++++++-------- .../examples/QueryNestedResourceScope.json | 100 ++++++++-------- .../examples/QueryResourceGroupScope.json | 100 ++++++++-------- .../examples/QueryResourceScope.json | 100 ++++++++-------- ...ySubscriptionLevelNestedResourceScope.json | 100 ++++++++-------- .../QuerySubscriptionLevelResourceScope.json | 100 ++++++++-------- .../examples/QuerySubscriptionScope.json | 100 ++++++++-------- .../examples/TimeRangeSortSelectTop.json | 24 ++-- .../FilterAndGroupByWithAggregate.json | 16 +-- .../FilterAndGroupByWithoutAggregate.json | 16 +-- .../examples/FilterAndMultipleGroups.json | 82 ++++++------- .../examples/QueryManagementGroupScope.json | 100 ++++++++-------- .../examples/QueryNestedResourceScope.json | 100 ++++++++-------- ...sourceGroupLevelPolicyAssignmentScope.json | 100 ++++++++-------- .../examples/QueryResourceGroupScope.json | 100 ++++++++-------- .../examples/QueryResourceScope.json | 100 ++++++++-------- ...ySubscriptionLevelNestedResourceScope.json | 100 ++++++++-------- ...ubscriptionLevelPolicyAssignmentScope.json | 100 ++++++++-------- ...ubscriptionLevelPolicyDefinitionScope.json | 100 ++++++++-------- ...criptionLevelPolicySetDefinitionScope.json | 100 ++++++++-------- .../QuerySubscriptionLevelResourceScope.json | 100 ++++++++-------- .../examples/QuerySubscriptionScope.json | 100 ++++++++-------- 51 files changed, 2080 insertions(+), 2080 deletions(-) diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndGroupByWithAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndGroupByWithAggregate.json index 611086bb9fc9..77d555367519 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndGroupByWithAggregate.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndGroupByWithAggregate.json @@ -17,19 +17,19 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionAction": "audit", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/resourcescachemonitor/services/myService", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionAction": "audit", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/resourcescachemonitor/services/myService", "NumEvents": 1 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d6be6bb37e5f4333baa95c2a", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/5948d091-78b7-4d3b-a404-cc6a0329b0c6", - "PolicyDefinitionAction": "audit", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/resourcescachemonitor/services/myService", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d6be6bb37e5f4333baa95c2a", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/5948d091-78b7-4d3b-a404-cc6a0329b0c6", + "policyDefinitionAction": "audit", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/resourcescachemonitor/services/myService", "NumEvents": 1 } ] diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndGroupByWithoutAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndGroupByWithoutAggregate.json index 14ce278a3b69..3d88615e5f30 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndGroupByWithoutAggregate.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndGroupByWithoutAggregate.json @@ -17,18 +17,18 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/5bc427ca-0089-4d0d-85bd-e98d1e40b3bf/providers/microsoft.authorization/policyassignments/storageaccountsku", - "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1", - "PolicyDefinitionAction": "deny", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/5bc427ca-0089-4d0d-85bd-e98d1e40b3bf/providers/microsoft.storage/storageaccounts/7d528d3a" + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/5bc427ca-0089-4d0d-85bd-e98d1e40b3bf/providers/microsoft.authorization/policyassignments/storageaccountsku", + "policyDefinitionId": "/providers/microsoft.authorization/policydefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1", + "policyDefinitionAction": "deny", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/5bc427ca-0089-4d0d-85bd-e98d1e40b3bf/providers/microsoft.storage/storageaccounts/7d528d3a" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.authorization/policyassignments/da43b50031bf4bce84584faa", - "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62", - "PolicyDefinitionAction": "deny", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/mysa1" + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.authorization/policyassignments/da43b50031bf4bce84584faa", + "policyDefinitionId": "/providers/microsoft.authorization/policydefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62", + "policyDefinitionAction": "deny", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/mysa1" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndMultipleGroups.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndMultipleGroups.json index f5e1a2a61c4b..a4d6f148c8f3 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndMultipleGroups.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndMultipleGroups.json @@ -7,7 +7,7 @@ "$filter": "PolicyDefinitionAction eq 'deny'", "$apply": "groupby((PolicyAssignmentId, PolicyDefinitionId, ResourceId))/groupby((PolicyAssignmentId, PolicyDefinitionId), aggregate($count as NumDeniedResources))", "$orderby": "NumDeniedResources desc", - "$top": "10" + "$top": 10 }, "responses": { "200": { @@ -18,43 +18,43 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/0591f497c35344fcbaf7a393", - "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/0591f497c35344fcbaf7a393", + "policyDefinitionId": "/providers/microsoft.authorization/policydefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c", "NumDeniedResources": 3 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/myassignment1", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mydefinition1", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/myassignment1", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mydefinition1", "NumDeniedResources": 2 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/myassignment1", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mydefinition2", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/myassignment1", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mydefinition2", "NumDeniedResources": 2 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/5bc427ca-0089-4d0d-85bd-e98d1e40b3bf/providers/microsoft.authorization/policyassignments/storageaccountsku", - "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/5bc427ca-0089-4d0d-85bd-e98d1e40b3bf/providers/microsoft.authorization/policyassignments/storageaccountsku", + "policyDefinitionId": "/providers/microsoft.authorization/policydefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1", "NumDeniedResources": 1 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup2/providers/microsoft.authorization/policyassignments/da43b50031bf4bce84584faa", - "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup2/providers/microsoft.authorization/policyassignments/da43b50031bf4bce84584faa", + "policyDefinitionId": "/providers/microsoft.authorization/policydefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62", "NumDeniedResources": 1 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup2/providers/microsoft.authorization/policyassignments/myassignment2", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mydefinition3", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup2/providers/microsoft.authorization/policyassignments/myassignment2", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mydefinition3", "NumDeniedResources": 1 } ] diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json index c74d179a46e0..bc316b27b29e 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json @@ -13,64 +13,64 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T22:19:18.8896095Z", - "ResourceId": "/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myrg/providers/Microsoft.Compute/virtualMachines/myvm1/extensions/DAExtension", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/1ef5d536aec743a0aa801c1a", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef", - "ResourceType": "/Microsoft.Compute/virtualMachines/extensions", - "ResourceLocation": "westeurope", - "ResourceGroup": "myrg", - "ResourceTags": "tbd", - "PolicyAssignmentName": "1ef5d536aec743a0aa801c1a", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/335cefd2-ab16-430f-b364-974a170eb1d5", - "PolicySetDefinitionName": "335cefd2-ab16-430f-b364-974a170eb1d5", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "15521232277412542086", - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fff3e452-fff2-fff1-fff8-fff12618f1b8" + "timestamp": "2018-02-07T22:19:18.8896095Z", + "resourceId": "/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myrg/providers/Microsoft.Compute/virtualMachines/myvm1/extensions/DAExtension", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/1ef5d536aec743a0aa801c1a", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef", + "resourceType": "/Microsoft.Compute/virtualMachines/extensions", + "resourceLocation": "westeurope", + "resourceGroup": "myrg", + "resourceTags": "tbd", + "policyAssignmentName": "1ef5d536aec743a0aa801c1a", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/335cefd2-ab16-430f-b364-974a170eb1d5", + "policySetDefinitionName": "335cefd2-ab16-430f-b364-974a170eb1d5", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "15521232277412542086", + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fff3e452-fff2-fff1-fff8-fff12618f1b8" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T22:19:18.8896095Z", - "ResourceId": "/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myrg/providers/Microsoft.Compute/virtualMachines/myvm1/extensions/DAExtension", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/95816fce53454b15a7ed803d", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/a2c0414b-82e4-459d-97d5-94c79a89232c", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef", - "ResourceType": "/Microsoft.Compute/virtualMachines/extensions", - "ResourceLocation": "westeurope", - "ResourceGroup": "myrg", - "ResourceTags": "tbd", - "PolicyAssignmentName": "95816fce53454b15a7ed803d", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"eastus\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "a2c0414b-82e4-459d-97d5-94c79a89232c", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "", - "PolicySetDefinitionName": "", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "", - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fff3e452-fff2-fff1-fff8-fff12618f1b8" + "timestamp": "2018-02-07T22:19:18.8896095Z", + "resourceId": "/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myrg/providers/Microsoft.Compute/virtualMachines/myvm1/extensions/DAExtension", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/95816fce53454b15a7ed803d", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/a2c0414b-82e4-459d-97d5-94c79a89232c", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef", + "resourceType": "/Microsoft.Compute/virtualMachines/extensions", + "resourceLocation": "westeurope", + "resourceGroup": "myrg", + "resourceTags": "tbd", + "policyAssignmentName": "95816fce53454b15a7ed803d", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"eastus\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "a2c0414b-82e4-459d-97d5-94c79a89232c", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "", + "policySetDefinitionName": "", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "", + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fff3e452-fff2-fff1-fff8-fff12618f1b8" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryNestedResourceScope.json index 3edaea730e80..aafd6dee8bc2 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryNestedResourceScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryNestedResourceScope.json @@ -13,64 +13,64 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T20:43:04.6971328Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "181565554491747128", - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + "timestamp": "2018-02-07T20:43:04.6971328Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ServiceFabric/clusters/applications", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "ec62f9b2a454487296f2ccd4", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "181565554491747128", + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T20:43:04.6971328Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "624540685646900425", - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + "timestamp": "2018-02-07T20:43:04.6971328Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ServiceFabric/clusters/applications", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "ec62f9b2a454487296f2ccd4", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "624540685646900425", + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryResourceGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryResourceGroupScope.json index 02a4b0544731..86ca4e519e5a 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryResourceGroupScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryResourceGroupScope.json @@ -14,64 +14,64 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T20:43:04.6971328Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "181565554491747128", - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + "timestamp": "2018-02-07T20:43:04.6971328Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ServiceFabric/clusters/applications", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "ec62f9b2a454487296f2ccd4", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "181565554491747128", + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T20:43:04.6971328Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "624540685646900425", - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + "timestamp": "2018-02-07T20:43:04.6971328Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ServiceFabric/clusters/applications", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "ec62f9b2a454487296f2ccd4", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "624540685646900425", + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryResourceScope.json index deba87d17758..78bee2e47c43 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryResourceScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryResourceScope.json @@ -13,64 +13,64 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T15:14:39.8473851Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", - "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ClassicCompute/domainNames", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "PolicyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null, - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + "timestamp": "2018-02-07T15:14:39.8473851Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ClassicCompute/domainNames", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "policyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null, + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T15:14:39.5842458Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/d15545b8-ff50-409a-a6e3-5bd5cc954003", - "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ClassicCompute/domainNames", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "d15545b8-ff50-409a-a6e3-5bd5cc954003", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "PolicyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null, - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + "timestamp": "2018-02-07T15:14:39.5842458Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/d15545b8-ff50-409a-a6e3-5bd5cc954003", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ClassicCompute/domainNames", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "d15545b8-ff50-409a-a6e3-5bd5cc954003", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "policyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null, + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionLevelNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionLevelNestedResourceScope.json index 41a583aad565..dc3723aff046 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionLevelNestedResourceScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionLevelNestedResourceScope.json @@ -13,64 +13,64 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T20:43:04.6971328Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", - "ResourceLocation": "eastus", - "ResourceGroup": "", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "181565554491747128", - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + "timestamp": "2018-02-07T20:43:04.6971328Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", + "resourceLocation": "eastus", + "resourceGroup": "", + "resourceTags": "tbd", + "policyAssignmentName": "ec62f9b2a454487296f2ccd4", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "181565554491747128", + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T20:43:04.6971328Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", - "ResourceLocation": "eastus", - "ResourceGroup": "", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "624540685646900425", - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + "timestamp": "2018-02-07T20:43:04.6971328Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", + "resourceLocation": "eastus", + "resourceGroup": "", + "resourceTags": "tbd", + "policyAssignmentName": "ec62f9b2a454487296f2ccd4", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "624540685646900425", + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionLevelResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionLevelResourceScope.json index df1664fcee6f..08c4d91c6f27 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionLevelResourceScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionLevelResourceScope.json @@ -13,64 +13,64 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T15:14:39.8473851Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", - "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.SomeNamespace/someResourceType", - "ResourceLocation": "eastus", - "ResourceGroup": "", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "PolicyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null, - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + "timestamp": "2018-02-07T15:14:39.8473851Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.SomeNamespace/someResourceType", + "resourceLocation": "eastus", + "resourceGroup": "", + "resourceTags": "tbd", + "policyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "policyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null, + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T15:14:39.5842458Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/d15545b8-ff50-409a-a6e3-5bd5cc954003", - "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.SomeNamespace/someResourceType", - "ResourceLocation": "eastus", - "ResourceGroup": "", - "ResourceTags": "tbd", - "PolicyAssignmentName": "d15545b8-ff50-409a-a6e3-5bd5cc954003", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "PolicyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null, - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + "timestamp": "2018-02-07T15:14:39.5842458Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/d15545b8-ff50-409a-a6e3-5bd5cc954003", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.SomeNamespace/someResourceType", + "resourceLocation": "eastus", + "resourceGroup": "", + "resourceTags": "tbd", + "policyAssignmentName": "d15545b8-ff50-409a-a6e3-5bd5cc954003", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "policyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null, + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionScope.json index 4e9ab06a2a37..20ad429a16c3 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionScope.json @@ -13,64 +13,64 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T20:43:04.6971328Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "181565554491747128", - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + "timestamp": "2018-02-07T20:43:04.6971328Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ServiceFabric/clusters/applications", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "ec62f9b2a454487296f2ccd4", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "181565554491747128", + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T20:43:04.6971328Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "624540685646900425", - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + "timestamp": "2018-02-07T20:43:04.6971328Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ServiceFabric/clusters/applications", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "ec62f9b2a454487296f2ccd4", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "624540685646900425", + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/TimeRangeSortSelectTop.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/TimeRangeSortSelectTop.json index 00b3541594a1..761a5f9ec917 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/TimeRangeSortSelectTop.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/TimeRangeSortSelectTop.json @@ -18,22 +18,22 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-05T22:34:02.3475017Z", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/89b27f38-e9e4-4468-ab81-801c84b8c017", - "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceGroup": "myResourceGroup", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomain" + "timestamp": "2018-02-05T22:34:02.3475017Z", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/89b27f38-e9e4-4468-ab81-801c84b8c017", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceGroup": "myResourceGroup", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomain" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-05T22:34:01.6135357Z", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/Enable Monitoring in Azure Security Center", - "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceGroup": "myResourceGroup", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomain" + "timestamp": "2018-02-05T22:34:01.6135357Z", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/Enable Monitoring in Azure Security Center", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceGroup": "myResourceGroup", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomain" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndGroupByWithAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndGroupByWithAggregate.json index cb83c5e4f923..022ab140f937 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndGroupByWithAggregate.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndGroupByWithAggregate.json @@ -17,19 +17,19 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionAction": "audit", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/resourcescachemonitor/services/myService", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionAction": "audit", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/resourcescachemonitor/services/myService", "NumEvents": 1 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d6be6bb37e5f4333baa95c2a", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/5948d091-78b7-4d3b-a404-cc6a0329b0c6", - "PolicyDefinitionAction": "audit", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/resourcescachemonitor/services/myService", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d6be6bb37e5f4333baa95c2a", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/5948d091-78b7-4d3b-a404-cc6a0329b0c6", + "policyDefinitionAction": "audit", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/resourcescachemonitor/services/myService", "NumEvents": 1 } ] diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndGroupByWithoutAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndGroupByWithoutAggregate.json index 4c7d33e22edf..ba318c2e7c0a 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndGroupByWithoutAggregate.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndGroupByWithoutAggregate.json @@ -17,18 +17,18 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/5bc427ca-0089-4d0d-85bd-e98d1e40b3bf/providers/microsoft.authorization/policyassignments/storageaccountsku", - "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1", - "PolicyDefinitionAction": "deny", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/5bc427ca-0089-4d0d-85bd-e98d1e40b3bf/providers/microsoft.storage/storageaccounts/7d528d3a" + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/5bc427ca-0089-4d0d-85bd-e98d1e40b3bf/providers/microsoft.authorization/policyassignments/storageaccountsku", + "policyDefinitionId": "/providers/microsoft.authorization/policydefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1", + "policyDefinitionAction": "deny", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/5bc427ca-0089-4d0d-85bd-e98d1e40b3bf/providers/microsoft.storage/storageaccounts/7d528d3a" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.authorization/policyassignments/da43b50031bf4bce84584faa", - "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62", - "PolicyDefinitionAction": "deny", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/mysa1" + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.authorization/policyassignments/da43b50031bf4bce84584faa", + "policyDefinitionId": "/providers/microsoft.authorization/policydefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62", + "policyDefinitionAction": "deny", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/mysa1" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndMultipleGroups.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndMultipleGroups.json index 14a68067c720..8c838724c7a9 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndMultipleGroups.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndMultipleGroups.json @@ -7,7 +7,7 @@ "$filter": "PolicyDefinitionAction eq 'deny'", "$apply": "groupby((PolicyAssignmentId, PolicyDefinitionId, ResourceId))/groupby((PolicyAssignmentId, PolicyDefinitionId), aggregate($count as NumDeniedResources))", "$orderby": "NumDeniedResources desc", - "$top": "10" + "$top": 10 }, "responses": { "200": { @@ -18,43 +18,43 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/0591f497c35344fcbaf7a393", - "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/0591f497c35344fcbaf7a393", + "policyDefinitionId": "/providers/microsoft.authorization/policydefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c", "NumDeniedResources": 3 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/myassignment1", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mydefinition1", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/myassignment1", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mydefinition1", "NumDeniedResources": 2 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/myassignment1", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mydefinition2", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup1/providers/microsoft.authorization/policyassignments/myassignment1", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mydefinition2", "NumDeniedResources": 2 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/5bc427ca-0089-4d0d-85bd-e98d1e40b3bf/providers/microsoft.authorization/policyassignments/storageaccountsku", - "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/5bc427ca-0089-4d0d-85bd-e98d1e40b3bf/providers/microsoft.authorization/policyassignments/storageaccountsku", + "policyDefinitionId": "/providers/microsoft.authorization/policydefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1", "NumDeniedResources": 1 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup2/providers/microsoft.authorization/policyassignments/da43b50031bf4bce84584faa", - "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup2/providers/microsoft.authorization/policyassignments/da43b50031bf4bce84584faa", + "policyDefinitionId": "/providers/microsoft.authorization/policydefinitions/1e30110a-5ceb-460c-a204-c1c3969c6d62", "NumDeniedResources": 1 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup2/providers/microsoft.authorization/policyassignments/myassignment2", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mydefinition3", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup2/providers/microsoft.authorization/policyassignments/myassignment2", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/mydefinition3", "NumDeniedResources": 1 } ] diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json index f30d8cef0d80..8f8a041ed201 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json @@ -13,64 +13,64 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T22:19:18.8896095Z", - "ResourceId": "/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myrg/providers/Microsoft.Compute/virtualMachines/myvm1/extensions/DAExtension", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/1ef5d536aec743a0aa801c1a", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef", - "ResourceType": "/Microsoft.Compute/virtualMachines/extensions", - "ResourceLocation": "westeurope", - "ResourceGroup": "myrg", - "ResourceTags": "tbd", - "PolicyAssignmentName": "1ef5d536aec743a0aa801c1a", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/335cefd2-ab16-430f-b364-974a170eb1d5", - "PolicySetDefinitionName": "335cefd2-ab16-430f-b364-974a170eb1d5", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "15521232277412542086", - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fff3e452-fff2-fff1-fff8-fff12618f1b8" + "timestamp": "2018-02-07T22:19:18.8896095Z", + "resourceId": "/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myrg/providers/Microsoft.Compute/virtualMachines/myvm1/extensions/DAExtension", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/1ef5d536aec743a0aa801c1a", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef", + "resourceType": "/Microsoft.Compute/virtualMachines/extensions", + "resourceLocation": "westeurope", + "resourceGroup": "myrg", + "resourceTags": "tbd", + "policyAssignmentName": "1ef5d536aec743a0aa801c1a", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/335cefd2-ab16-430f-b364-974a170eb1d5", + "policySetDefinitionName": "335cefd2-ab16-430f-b364-974a170eb1d5", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "15521232277412542086", + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fff3e452-fff2-fff1-fff8-fff12618f1b8" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T22:19:18.8896095Z", - "ResourceId": "/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myrg/providers/Microsoft.Compute/virtualMachines/myvm1/extensions/DAExtension", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/95816fce53454b15a7ed803d", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/a2c0414b-82e4-459d-97d5-94c79a89232c", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef", - "ResourceType": "/Microsoft.Compute/virtualMachines/extensions", - "ResourceLocation": "westeurope", - "ResourceGroup": "myrg", - "ResourceTags": "tbd", - "PolicyAssignmentName": "95816fce53454b15a7ed803d", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"eastus\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "a2c0414b-82e4-459d-97d5-94c79a89232c", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "", - "PolicySetDefinitionName": "", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "", - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fff3e452-fff2-fff1-fff8-fff12618f1b8" + "timestamp": "2018-02-07T22:19:18.8896095Z", + "resourceId": "/subscriptions/fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef/resourceGroups/myrg/providers/Microsoft.Compute/virtualMachines/myvm1/extensions/DAExtension", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/95816fce53454b15a7ed803d", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/a2c0414b-82e4-459d-97d5-94c79a89232c", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff8dfdb-fff3-fff0-fff4-fffdcbe6b2ef", + "resourceType": "/Microsoft.Compute/virtualMachines/extensions", + "resourceLocation": "westeurope", + "resourceGroup": "myrg", + "resourceTags": "tbd", + "policyAssignmentName": "95816fce53454b15a7ed803d", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"eastus\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "a2c0414b-82e4-459d-97d5-94c79a89232c", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "", + "policySetDefinitionName": "", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "", + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fff3e452-fff2-fff1-fff8-fff12618f1b8" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryNestedResourceScope.json index b57304691390..402bddb8261c 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryNestedResourceScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryNestedResourceScope.json @@ -13,64 +13,64 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T20:43:04.6971328Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "181565554491747128", - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + "timestamp": "2018-02-07T20:43:04.6971328Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ServiceFabric/clusters/applications", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "ec62f9b2a454487296f2ccd4", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "181565554491747128", + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/microsoft.servicefabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T20:43:04.6971328Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "624540685646900425", - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + "timestamp": "2018-02-07T20:43:04.6971328Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ServiceFabric/clusters/applications", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "ec62f9b2a454487296f2ccd4", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "624540685646900425", + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json index d8a2ae13afcc..689cd22ab9e7 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json @@ -13,64 +13,64 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-08T00:07:16.2804863Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/defaultworkspace-fffedd8f-ffff-fffd-fffd-fffed2f84852-eus", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyDefinitions/myPolicyDefinition", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/microsoft.operationalinsights/workspaces", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "myPolicyAssignment", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": null, - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup", - "PolicyDefinitionName": "myPolicyAssignment", - "PolicyDefinitionAction": "deny", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": null, - "PolicySetDefinitionName": null, - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null, - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fff2f355-fff2-fffc-fffb-fff1639dff94" + "timestamp": "2018-02-08T00:07:16.2804863Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/defaultworkspace-fffedd8f-ffff-fffd-fffd-fffed2f84852-eus", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyDefinitions/myPolicyDefinition", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/microsoft.operationalinsights/workspaces", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "myPolicyAssignment", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": null, + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup", + "policyDefinitionName": "myPolicyAssignment", + "policyDefinitionAction": "deny", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": null, + "policySetDefinitionName": null, + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null, + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fff2f355-fff2-fffc-fffb-fff1639dff94" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-08T00:06:08.4302267Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/defaultworkspace-fffedd8f-ffff-fffd-fffd-fffed2f84852-eus", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyDefinitions/myPolicyDefinition", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/microsoft.operationalinsights/workspaces", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "myPolicyAssignment", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": null, - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup", - "PolicyDefinitionName": "myPolicyAssignment", - "PolicyDefinitionAction": "deny", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": null, - "PolicySetDefinitionName": null, - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null, - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fff2f355-fff2-fffc-fffb-fff1639dff94" + "timestamp": "2018-02-08T00:06:08.4302267Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/defaultworkspace-fffedd8f-ffff-fffd-fffd-fffed2f84852-eus", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyDefinitions/myPolicyDefinition", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/microsoft.operationalinsights/workspaces", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "myPolicyAssignment", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": null, + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup", + "policyDefinitionName": "myPolicyAssignment", + "policyDefinitionAction": "deny", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": null, + "policySetDefinitionName": null, + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null, + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fff2f355-fff2-fffc-fffb-fff1639dff94" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupScope.json index 27ed7aeb56c9..2d88893fb7fc 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupScope.json @@ -14,64 +14,64 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T20:43:04.6971328Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "181565554491747128", - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + "timestamp": "2018-02-07T20:43:04.6971328Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ServiceFabric/clusters/applications", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "ec62f9b2a454487296f2ccd4", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "181565554491747128", + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T20:43:04.6971328Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "624540685646900425", - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + "timestamp": "2018-02-07T20:43:04.6971328Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ServiceFabric/clusters/applications", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "ec62f9b2a454487296f2ccd4", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "624540685646900425", + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceScope.json index 06f2fc3c8bad..373699893a2d 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceScope.json @@ -13,64 +13,64 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T15:14:39.8473851Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", - "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ClassicCompute/domainNames", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "PolicyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null, - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + "timestamp": "2018-02-07T15:14:39.8473851Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ClassicCompute/domainNames", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "policyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null, + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T15:14:39.5842458Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/d15545b8-ff50-409a-a6e3-5bd5cc954003", - "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ClassicCompute/domainNames", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "d15545b8-ff50-409a-a6e3-5bd5cc954003", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "PolicyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null, - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + "timestamp": "2018-02-07T15:14:39.5842458Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/d15545b8-ff50-409a-a6e3-5bd5cc954003", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ClassicCompute/domainNames", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "d15545b8-ff50-409a-a6e3-5bd5cc954003", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "policyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null, + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelNestedResourceScope.json index 62ab3a69784b..c052cf688275 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelNestedResourceScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelNestedResourceScope.json @@ -13,64 +13,64 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T20:43:04.6971328Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", - "ResourceLocation": "eastus", - "ResourceGroup": "", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "181565554491747128", - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + "timestamp": "2018-02-07T20:43:04.6971328Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", + "resourceLocation": "eastus", + "resourceGroup": "", + "resourceTags": "tbd", + "policyAssignmentName": "ec62f9b2a454487296f2ccd4", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "181565554491747128", + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T20:43:04.6971328Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", - "ResourceLocation": "eastus", - "ResourceGroup": "", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "624540685646900425", - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + "timestamp": "2018-02-07T20:43:04.6971328Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", + "resourceLocation": "eastus", + "resourceGroup": "", + "resourceTags": "tbd", + "policyAssignmentName": "ec62f9b2a454487296f2ccd4", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "624540685646900425", + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json index ccb036aa5144..dad565083ecd 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json @@ -13,64 +13,64 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-08T19:59:38.6401747Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", - "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/Microsoft.ClassicCompute/domainNames", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", - "PolicyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null, - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + "timestamp": "2018-02-08T19:59:38.6401747Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/Microsoft.ClassicCompute/domainNames", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "policyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null, + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-08T19:59:34.2017762Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", - "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9daedab3-fb2d-461e-b861-71790eead4f6", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/Microsoft.ClassicCompute/domainNames", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", - "PolicyDefinitionName": "9daedab3-fb2d-461e-b861-71790eead4f6", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null, - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + "timestamp": "2018-02-08T19:59:34.2017762Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9daedab3-fb2d-461e-b861-71790eead4f6", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/Microsoft.ClassicCompute/domainNames", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "policyDefinitionName": "9daedab3-fb2d-461e-b861-71790eead4f6", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null, + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json index ff3eb3607247..048e646e0b65 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json @@ -13,64 +13,64 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-08T19:58:11.590596Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/deploymentSlots/production/state/start", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/f4cc58b7db524a9799381531", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/Microsoft.ClassicCompute/domainNames/deploymentSlots/state", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "f4cc58b7db524a9799381531", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"TAGNAME_1\":{\"value\":\"NA\"}}", - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", - "PolicyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", - "PolicySetDefinitionName": "12b58873-e0f8-4b95-936c-86cbe7c9d697", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "14799174781370023846", - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + "timestamp": "2018-02-08T19:58:11.590596Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/deploymentSlots/production/state/start", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/f4cc58b7db524a9799381531", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/Microsoft.ClassicCompute/domainNames/deploymentSlots/state", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "f4cc58b7db524a9799381531", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"TAGNAME_1\":{\"value\":\"NA\"}}", + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "policyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "policySetDefinitionName": "12b58873-e0f8-4b95-936c-86cbe7c9d697", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "14799174781370023846", + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-08T19:58:11.590596Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/deploymentSlots/production/state/start", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/f4cc58b7db524a9799381531", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/Microsoft.ClassicCompute/domainNames/deploymentSlots/state", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "f4cc58b7db524a9799381531", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"TAGNAME_1\":{\"value\":\"NA\"}}", - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", - "PolicyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", - "PolicySetDefinitionName": "12b58873-e0f8-4b95-936c-86cbe7c9d697", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "1679708035638239273", - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + "timestamp": "2018-02-08T19:58:11.590596Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/deploymentSlots/production/state/start", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/f4cc58b7db524a9799381531", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/Microsoft.ClassicCompute/domainNames/deploymentSlots/state", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "f4cc58b7db524a9799381531", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"TAGNAME_1\":{\"value\":\"NA\"}}", + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "policyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "policySetDefinitionName": "12b58873-e0f8-4b95-936c-86cbe7c9d697", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "1679708035638239273", + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json index 4c99f803e460..407220af986d 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json @@ -13,64 +13,64 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-08T19:49:32.9539023Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/serviceCertificates/sha1-FFFBDAF1FFFF109FFFD95FFFC9B0FFFD6F264FFF", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/Microsoft.ClassicCompute/domainNames/serviceCertificates", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "3f3c4330183b4e218fe6fd29", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", - "PolicyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", - "PolicySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null, - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + "timestamp": "2018-02-08T19:49:32.9539023Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/serviceCertificates/sha1-FFFBDAF1FFFF109FFFD95FFFC9B0FFFD6F264FFF", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/Microsoft.ClassicCompute/domainNames/serviceCertificates", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "3f3c4330183b4e218fe6fd29", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "policyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "policySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null, + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-08T19:49:32.9498186Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/serviceCertificates/sha1-FFF36C1CFFF4BEA57FFFEFCFFF17B9F81B710FFF", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/Microsoft.ClassicCompute/domainNames/serviceCertificates", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "3f3c4330183b4e218fe6fd29", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", - "PolicyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", - "PolicySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null, - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + "timestamp": "2018-02-08T19:49:32.9498186Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/serviceCertificates/sha1-FFF36C1CFFF4BEA57FFFEFCFFF17B9F81B710FFF", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/Microsoft.ClassicCompute/domainNames/serviceCertificates", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "3f3c4330183b4e218fe6fd29", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "policyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "policySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null, + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelResourceScope.json index eda4626559e5..ab03f9b6dbcb 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelResourceScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelResourceScope.json @@ -13,64 +13,64 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T15:14:39.8473851Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", - "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.SomeNamespace/someResourceType", - "ResourceLocation": "eastus", - "ResourceGroup": "", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "PolicyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null, - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + "timestamp": "2018-02-07T15:14:39.8473851Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.SomeNamespace/someResourceType", + "resourceLocation": "eastus", + "resourceGroup": "", + "resourceTags": "tbd", + "policyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "policyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null, + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T15:14:39.5842458Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/d15545b8-ff50-409a-a6e3-5bd5cc954003", - "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.SomeNamespace/someResourceType", - "ResourceLocation": "eastus", - "ResourceGroup": "", - "ResourceTags": "tbd", - "PolicyAssignmentName": "d15545b8-ff50-409a-a6e3-5bd5cc954003", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "PolicyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null, - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" + "timestamp": "2018-02-07T15:14:39.5842458Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/d15545b8-ff50-409a-a6e3-5bd5cc954003", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.SomeNamespace/someResourceType", + "resourceLocation": "eastus", + "resourceGroup": "", + "resourceTags": "tbd", + "policyAssignmentName": "d15545b8-ff50-409a-a6e3-5bd5cc954003", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "policyDefinitionName": "201ea587-7c90-41c3-910f-c280ae01cfd6", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null, + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fff890fa-fff0-fff3-fff9-fffd7653f078" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionScope.json index 0979f432efc7..f086b99c01e0 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionScope.json @@ -13,64 +13,64 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T20:43:04.6971328Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "181565554491747128", - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + "timestamp": "2018-02-07T20:43:04.6971328Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ServiceFabric/clusters/applications", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "ec62f9b2a454487296f2ccd4", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "181565554491747128", + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-07T20:43:04.6971328Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec62f9b2a454487296f2ccd4", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "624540685646900425", - "TenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", - "PrincipalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" + "timestamp": "2018-02-07T20:43:04.6971328Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/ec62f9b2a454487296f2ccd4", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ServiceFabric/clusters/applications", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "ec62f9b2a454487296f2ccd4", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"ALLOWEDRESOURCEGROUPS_1\":{\"value\":[\"rg1\",\"rg2\"]},\"ALLOWEDRESOURCEGROUPS_2\":{\"value\":[\"myrg3\",\"myrg4\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "72c0c41a-c752-4bc0-9c61-0d6adc567066", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionName": "00b36c66-612b-44e2-9f8e-b758296d40fe", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "624540685646900425", + "tenantId": "fff988bf-fff1-ffff-fffb-fffcd011db47", + "principalOid": "fffdfc0f-fff5-fff0-fff3-fff1a968dcc6" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/TimeRangeSortSelectTop.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/TimeRangeSortSelectTop.json index 96df86e22050..f29e6fe38555 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/TimeRangeSortSelectTop.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/TimeRangeSortSelectTop.json @@ -18,22 +18,22 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-05T22:34:02.3475017Z", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/89b27f38-e9e4-4468-ab81-801c84b8c017", - "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceGroup": "myResourceGroup", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomain" + "timestamp": "2018-02-05T22:34:02.3475017Z", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/89b27f38-e9e4-4468-ab81-801c84b8c017", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceGroup": "myResourceGroup", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomain" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyEvents/$metadata#default/$entity", - "Timestamp": "2018-02-05T22:34:01.6135357Z", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/Enable Monitoring in Azure Security Center", - "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceGroup": "myResourceGroup", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomain" + "timestamp": "2018-02-05T22:34:01.6135357Z", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/Enable Monitoring in Azure Security Center", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/201ea587-7c90-41c3-910f-c280ae01cfd6", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceGroup": "myResourceGroup", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomain" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndGroupByWithAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndGroupByWithAggregate.json index 36a2877768c7..4a5653af6f3b 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndGroupByWithAggregate.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndGroupByWithAggregate.json @@ -18,19 +18,19 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", - "PolicyDefinitionAction": "audit", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.classiccompute/domainnames/myDomainName", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "policyDefinitionAction": "audit", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.classiccompute/domainnames/myDomainName", "NumAuditDenyNonComplianceRecords": 10 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionAction": "audit", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.classiccompute/domainnames/myDomainName", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionAction": "audit", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.classiccompute/domainnames/myDomainName", "NumAuditDenyNonComplianceRecords": 10 } ] diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndGroupByWithoutAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndGroupByWithoutAggregate.json index 6a56e86e3629..91fb36d5f795 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndGroupByWithoutAggregate.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndGroupByWithoutAggregate.json @@ -17,18 +17,18 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/enable monitoring in azure security center", - "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/44452482-524f-4bf4-b852-0bff7cc4a3ed", - "PolicyDefinitionAction": "auditifnotexists", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.network/virtualnetworks/vnet" + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/enable monitoring in azure security center", + "policyDefinitionId": "/providers/microsoft.authorization/policydefinitions/44452482-524f-4bf4-b852-0bff7cc4a3ed", + "policyDefinitionAction": "auditifnotexists", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.network/virtualnetworks/vnet" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/89b27f38-e9e4-4468-ab81-801c84b8c017", - "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/44452482-524f-4bf4-b852-0bff7cc4a3ed", - "PolicyDefinitionAction": "auditifnotexists", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.network/virtualnetworks/vnet" + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/89b27f38-e9e4-4468-ab81-801c84b8c017", + "policyDefinitionId": "/providers/microsoft.authorization/policydefinitions/44452482-524f-4bf4-b852-0bff7cc4a3ed", + "policyDefinitionAction": "auditifnotexists", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.network/virtualnetworks/vnet" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndMultipleGroups.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndMultipleGroups.json index 0cfb45cd4d7f..5486bac2abd0 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndMultipleGroups.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndMultipleGroups.json @@ -6,7 +6,7 @@ "$filter": "IsCompliant eq false", "$apply": "groupby((PolicyAssignmentId, PolicySetDefinitionId, PolicyDefinitionId, PolicyDefinitionReferenceId, ResourceId))/groupby((PolicyAssignmentId, PolicySetDefinitionId, PolicyDefinitionId, PolicyDefinitionReferenceId), aggregate($count as NumNonCompliantResources))", "$orderby": "NumNonCompliantResources desc", - "$top": "10" + "$top": 10 }, "responses": { "200": { @@ -17,91 +17,91 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionReferenceId": "14799174781370023846", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionReferenceId": "14799174781370023846", "NumNonCompliantResources": 557 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionReferenceId": "1679708035638239273", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionReferenceId": "1679708035638239273", "NumNonCompliantResources": 557 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionReferenceId": "14799174781370023846", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionReferenceId": "14799174781370023846", "NumNonCompliantResources": 557 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionReferenceId": "1679708035638239273", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionReferenceId": "1679708035638239273", "NumNonCompliantResources": 557 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7", - "PolicySetDefinitionId": "", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionReferenceId": "", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7", + "policySetDefinitionId": "", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionReferenceId": "", "NumNonCompliantResources": 557 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49", - "PolicySetDefinitionId": "", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", - "PolicyDefinitionReferenceId": "", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49", + "policySetDefinitionId": "", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "policyDefinitionReferenceId": "", "NumNonCompliantResources": 557 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionReferenceId": "", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionReferenceId": "", "NumNonCompliantResources": 552 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/a03db67e-a286-43c3-9098-b2da83d361ad", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", - "PolicyDefinitionReferenceId": "8935913113203900114", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/a03db67e-a286-43c3-9098-b2da83d361ad", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "policyDefinitionReferenceId": "8935913113203900114", "NumNonCompliantResources": 544 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/8174043a1e2849179635b874", - "PolicySetDefinitionId": "", - "PolicyDefinitionId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", - "PolicyDefinitionReferenceId": "", + "policyAssignmentId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/8174043a1e2849179635b874", + "policySetDefinitionId": "", + "policyDefinitionId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "policyDefinitionReferenceId": "", "NumNonCompliantResources": 526 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", - "PolicyDefinitionReferenceId": "2124621540977569058", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "policyDefinitionReferenceId": "2124621540977569058", "NumNonCompliantResources": 509 } ] diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json index c8850c43cca4..6740f1c4ad0f 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json @@ -13,60 +13,60 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-09T17:41:47Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/microsoft.insights/autoscalesettings/mytest1", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/1ef5d536aec743a0aa801c1a", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/microsoft.insights/autoscalesettings", - "ResourceLocation": "westus", - "ResourceGroup": "myrg1", - "ResourceTags": "tbd", - "PolicyAssignmentName": "1ef5d536aec743a0aa801c1a", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/335cefd2-ab16-430f-b364-974a170eb1d5", - "PolicySetDefinitionName": "335cefd2-ab16-430f-b364-974a170eb1d5", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "15521232277412542086" + "timestamp": "2018-02-09T17:41:47Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/microsoft.insights/autoscalesettings/mytest1", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/1ef5d536aec743a0aa801c1a", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/microsoft.insights/autoscalesettings", + "resourceLocation": "westus", + "resourceGroup": "myrg1", + "resourceTags": "tbd", + "policyAssignmentName": "1ef5d536aec743a0aa801c1a", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/335cefd2-ab16-430f-b364-974a170eb1d5", + "policySetDefinitionName": "335cefd2-ab16-430f-b364-974a170eb1d5", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "15521232277412542086" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-09T17:41:47Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/microsoft.insights/autoscalesettings/mytest1", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/microsoft.insights/autoscalesettings", - "ResourceLocation": "westus", - "ResourceGroup": "myrg1", - "ResourceTags": "tbd", - "PolicyAssignmentName": "186044306c044a1d8c0ff76c", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "", - "PolicySetDefinitionName": "", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "" + "timestamp": "2018-02-09T17:41:47Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/microsoft.insights/autoscalesettings/mytest1", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/microsoft.insights/autoscalesettings", + "resourceLocation": "westus", + "resourceGroup": "myrg1", + "resourceTags": "tbd", + "policyAssignmentName": "186044306c044a1d8c0ff76c", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "", + "policySetDefinitionName": "", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryNestedResourceScope.json index f4731ad3ee7f..dbc832842cc8 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryNestedResourceScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryNestedResourceScope.json @@ -13,60 +13,60 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", - "Timestamp": "2018-02-09T16:04:31Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "186044306c044a1d8c0ff76c", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", - "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": null, - "PolicySetDefinitionName": null, - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T16:04:31Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ServiceFabric/clusters/applications", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "186044306c044a1d8c0ff76c", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", + "policyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": null, + "policySetDefinitionName": null, + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", - "Timestamp": "2018-02-09T16:04:31Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "186044306c044a1d8c0ff76c", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", - "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": null, - "PolicySetDefinitionName": null, - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T16:04:31Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ServiceFabric/clusters/applications", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "186044306c044a1d8c0ff76c", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", + "policyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": null, + "policySetDefinitionName": null, + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryResourceGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryResourceGroupScope.json index 3ed9e2c0dea7..a0b163fc24e9 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryResourceGroupScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryResourceGroupScope.json @@ -14,60 +14,60 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-09T18:42:42Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mysa1", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/Microsoft.Storage/storageAccounts", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "3f3c4330183b4e218fe6fd29", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", - "PolicyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", - "PolicySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T18:42:42Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mysa1", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/Microsoft.Storage/storageAccounts", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "3f3c4330183b4e218fe6fd29", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "policyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "policySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-09T18:42:42Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mysa1", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/Microsoft.Storage/storageAccounts", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "3f3c4330183b4e218fe6fd29", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", - "PolicyDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e3682", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", - "PolicySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T18:42:42Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mysa1", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/Microsoft.Storage/storageAccounts", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "3f3c4330183b4e218fe6fd29", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "policyDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e3682", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "policySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryResourceScope.json index 998b173fa8a9..73ded1e6be65 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryResourceScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryResourceScope.json @@ -13,60 +13,60 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", - "Timestamp": "2018-02-09T16:04:31Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ClassicCompute/domainNames", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "test", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", - "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "PolicyDefinitionName": "Audit a tag and it's value", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": null, - "PolicySetDefinitionName": null, - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T16:04:31Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ClassicCompute/domainNames", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "test", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", + "policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "policyDefinitionName": "Audit a tag and it's value", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": null, + "policySetDefinitionName": null, + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", - "Timestamp": "2018-02-09T16:04:31Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ClassicCompute/domainNames", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "test", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", - "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "PolicyDefinitionName": "Audit a tag and it's value", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": null, - "PolicySetDefinitionName": null, - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T16:04:31Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ClassicCompute/domainNames", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "test", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", + "policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "policyDefinitionName": "Audit a tag and it's value", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": null, + "policySetDefinitionName": null, + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionLevelNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionLevelNestedResourceScope.json index 975dfaf77162..e38d715199ef 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionLevelNestedResourceScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionLevelNestedResourceScope.json @@ -13,60 +13,60 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", - "Timestamp": "2018-02-09T16:04:31Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", - "ResourceLocation": "eastus", - "ResourceGroup": "", - "ResourceTags": "tbd", - "PolicyAssignmentName": "186044306c044a1d8c0ff76c", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", - "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": null, - "PolicySetDefinitionName": null, - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T16:04:31Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", + "resourceLocation": "eastus", + "resourceGroup": "", + "resourceTags": "tbd", + "policyAssignmentName": "186044306c044a1d8c0ff76c", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", + "policyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": null, + "policySetDefinitionName": null, + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", - "Timestamp": "2018-02-09T16:04:31Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", - "ResourceLocation": "eastus", - "ResourceGroup": "", - "ResourceTags": "tbd", - "PolicyAssignmentName": "186044306c044a1d8c0ff76c", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", - "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": null, - "PolicySetDefinitionName": null, - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T16:04:31Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", + "resourceLocation": "eastus", + "resourceGroup": "", + "resourceTags": "tbd", + "policyAssignmentName": "186044306c044a1d8c0ff76c", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", + "policyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": null, + "policySetDefinitionName": null, + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionLevelResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionLevelResourceScope.json index b0738f7bc6ba..52f7ef267b0f 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionLevelResourceScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionLevelResourceScope.json @@ -13,60 +13,60 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", - "Timestamp": "2018-02-09T16:04:31Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.SomeNamespace/someResourceType", - "ResourceLocation": "eastus", - "ResourceGroup": "", - "ResourceTags": "tbd", - "PolicyAssignmentName": "test", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", - "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "PolicyDefinitionName": "Audit a tag and it's value", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": null, - "PolicySetDefinitionName": null, - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T16:04:31Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.SomeNamespace/someResourceType", + "resourceLocation": "eastus", + "resourceGroup": "", + "resourceTags": "tbd", + "policyAssignmentName": "test", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", + "policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "policyDefinitionName": "Audit a tag and it's value", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": null, + "policySetDefinitionName": null, + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", - "Timestamp": "2018-02-09T16:04:31Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.SomeNamespace/someResourceType", - "ResourceLocation": "eastus", - "ResourceGroup": "", - "ResourceTags": "tbd", - "PolicyAssignmentName": "test", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", - "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "PolicyDefinitionName": "Audit a tag and it's value", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": null, - "PolicySetDefinitionName": null, - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T16:04:31Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.SomeNamespace/someResourceType", + "resourceLocation": "eastus", + "resourceGroup": "", + "resourceTags": "tbd", + "policyAssignmentName": "test", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", + "policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "policyDefinitionName": "Audit a tag and it's value", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": null, + "policySetDefinitionName": null, + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionScope.json index 157063aee5cd..b0f0aa96c8a1 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionScope.json @@ -13,60 +13,60 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-09T17:48:05Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/Microsoft.Network/publicIPAddresses/mypubip1", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/Enable Monitoring in Azure Security Center", - "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9daedab3-fb2d-461e-b861-71790eead4f6", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/Microsoft.Network/publicIPAddresses", - "ResourceLocation": "eastus", - "ResourceGroup": "myrg1", - "ResourceTags": "tbd", - "PolicyAssignmentName": "Enable Monitoring in Azure Security Center", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", - "PolicyDefinitionName": "9daedab3-fb2d-461e-b861-71790eead4f6", - "PolicyDefinitionAction": "AuditIfNotExists", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T17:48:05Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/Microsoft.Network/publicIPAddresses/mypubip1", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/Enable Monitoring in Azure Security Center", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9daedab3-fb2d-461e-b861-71790eead4f6", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/Microsoft.Network/publicIPAddresses", + "resourceLocation": "eastus", + "resourceGroup": "myrg1", + "resourceTags": "tbd", + "policyAssignmentName": "Enable Monitoring in Azure Security Center", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "policyDefinitionName": "9daedab3-fb2d-461e-b861-71790eead4f6", + "policyDefinitionAction": "AuditIfNotExists", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-09T17:48:05Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/Microsoft.Network/publicIPAddresses/mypubip1", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/9ac09b0657d942e5ad4041a6", - "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9daedab3-fb2d-461e-b861-71790eead4f6", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/Microsoft.Network/publicIPAddresses", - "ResourceLocation": "eastus", - "ResourceGroup": "myrg1", - "ResourceTags": "tbd", - "PolicyAssignmentName": "9ac09b0657d942e5ad4041a6", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", - "PolicyDefinitionName": "9daedab3-fb2d-461e-b861-71790eead4f6", - "PolicyDefinitionAction": "AuditIfNotExists", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T17:48:05Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/Microsoft.Network/publicIPAddresses/mypubip1", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/9ac09b0657d942e5ad4041a6", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9daedab3-fb2d-461e-b861-71790eead4f6", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/Microsoft.Network/publicIPAddresses", + "resourceLocation": "eastus", + "resourceGroup": "myrg1", + "resourceTags": "tbd", + "policyAssignmentName": "9ac09b0657d942e5ad4041a6", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "policyDefinitionName": "9daedab3-fb2d-461e-b861-71790eead4f6", + "policyDefinitionAction": "AuditIfNotExists", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/TimeRangeSortSelectTop.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/TimeRangeSortSelectTop.json index 557110993873..cc5cc28b89d1 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/TimeRangeSortSelectTop.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/TimeRangeSortSelectTop.json @@ -18,22 +18,22 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-06T17:58:00Z", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/8cb1e007-947f-423a-ad0c-7ab7dc7d0255/providers/Microsoft.Authorization/policyAssignments/1654a0254ab34920a60f94eb", - "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/655cb504-bcee-4362-bd4c-402e6aa38759", - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceGroup": "myrg1", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/Microsoft.Storage/storageAccounts/mysa1" + "timestamp": "2018-02-06T17:58:00Z", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/8cb1e007-947f-423a-ad0c-7ab7dc7d0255/providers/Microsoft.Authorization/policyAssignments/1654a0254ab34920a60f94eb", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/655cb504-bcee-4362-bd4c-402e6aa38759", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceGroup": "myrg1", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/Microsoft.Storage/storageAccounts/mysa1" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-06T17:58:00Z", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/8cb1e007-947f-423a-ad0c-7ab7dc7d0255/providers/Microsoft.Authorization/policyAssignments/1654a0254ab34920a60f94eb", - "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/655cb504-bcee-4362-bd4c-402e6aa38759", - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceGroup": "myrg2", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg2/providers/Microsoft.Storage/storageAccounts/mysa2" + "timestamp": "2018-02-06T17:58:00Z", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/8cb1e007-947f-423a-ad0c-7ab7dc7d0255/providers/Microsoft.Authorization/policyAssignments/1654a0254ab34920a60f94eb", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/655cb504-bcee-4362-bd4c-402e6aa38759", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceGroup": "myrg2", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg2/providers/Microsoft.Storage/storageAccounts/mysa2" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndGroupByWithAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndGroupByWithAggregate.json index e81602c8f26a..b2a9330e4602 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndGroupByWithAggregate.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndGroupByWithAggregate.json @@ -18,19 +18,19 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", - "PolicyDefinitionAction": "audit", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.classiccompute/domainnames/myDomainName", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "policyDefinitionAction": "audit", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.classiccompute/domainnames/myDomainName", "NumAuditDenyNonComplianceRecords": 10 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionAction": "audit", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.classiccompute/domainnames/myDomainName", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionAction": "audit", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.classiccompute/domainnames/myDomainName", "NumAuditDenyNonComplianceRecords": 10 } ] diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndGroupByWithoutAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndGroupByWithoutAggregate.json index abdcf47b8786..66b1d4313104 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndGroupByWithoutAggregate.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndGroupByWithoutAggregate.json @@ -17,18 +17,18 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/enable monitoring in azure security center", - "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/44452482-524f-4bf4-b852-0bff7cc4a3ed", - "PolicyDefinitionAction": "auditifnotexists", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.network/virtualnetworks/vnet" + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/enable monitoring in azure security center", + "policyDefinitionId": "/providers/microsoft.authorization/policydefinitions/44452482-524f-4bf4-b852-0bff7cc4a3ed", + "policyDefinitionAction": "auditifnotexists", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.network/virtualnetworks/vnet" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/89b27f38-e9e4-4468-ab81-801c84b8c017", - "PolicyDefinitionId": "/providers/microsoft.authorization/policydefinitions/44452482-524f-4bf4-b852-0bff7cc4a3ed", - "PolicyDefinitionAction": "auditifnotexists", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.network/virtualnetworks/vnet" + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/89b27f38-e9e4-4468-ab81-801c84b8c017", + "policyDefinitionId": "/providers/microsoft.authorization/policydefinitions/44452482-524f-4bf4-b852-0bff7cc4a3ed", + "policyDefinitionAction": "auditifnotexists", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myrg/providers/microsoft.network/virtualnetworks/vnet" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndMultipleGroups.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndMultipleGroups.json index 529777fb949d..99670597c2c8 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndMultipleGroups.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndMultipleGroups.json @@ -6,7 +6,7 @@ "$filter": "IsCompliant eq false", "$apply": "groupby((PolicyAssignmentId, PolicySetDefinitionId, PolicyDefinitionId, PolicyDefinitionReferenceId, ResourceId))/groupby((PolicyAssignmentId, PolicySetDefinitionId, PolicyDefinitionId, PolicyDefinitionReferenceId), aggregate($count as NumNonCompliantResources))", "$orderby": "NumNonCompliantResources desc", - "$top": "10" + "$top": 10 }, "responses": { "200": { @@ -17,91 +17,91 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionReferenceId": "14799174781370023846", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionReferenceId": "14799174781370023846", "NumNonCompliantResources": 557 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionReferenceId": "1679708035638239273", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionReferenceId": "1679708035638239273", "NumNonCompliantResources": 557 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionReferenceId": "14799174781370023846", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionReferenceId": "14799174781370023846", "NumNonCompliantResources": 557 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionReferenceId": "1679708035638239273", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionReferenceId": "1679708035638239273", "NumNonCompliantResources": 557 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7", - "PolicySetDefinitionId": "", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionReferenceId": "", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7", + "policySetDefinitionId": "", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionReferenceId": "", "NumNonCompliantResources": 557 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49", - "PolicySetDefinitionId": "", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", - "PolicyDefinitionReferenceId": "", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49", + "policySetDefinitionId": "", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "policyDefinitionReferenceId": "", "NumNonCompliantResources": 557 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionReferenceId": "", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionReferenceId": "", "NumNonCompliantResources": 552 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/a03db67e-a286-43c3-9098-b2da83d361ad", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", - "PolicyDefinitionReferenceId": "8935913113203900114", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/a03db67e-a286-43c3-9098-b2da83d361ad", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "policyDefinitionReferenceId": "8935913113203900114", "NumNonCompliantResources": 544 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/8174043a1e2849179635b874", - "PolicySetDefinitionId": "", - "PolicyDefinitionId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", - "PolicyDefinitionReferenceId": "", + "policyAssignmentId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/8174043a1e2849179635b874", + "policySetDefinitionId": "", + "policyDefinitionId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "policyDefinitionReferenceId": "", "NumNonCompliantResources": 526 }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", - "PolicyDefinitionReferenceId": "2124621540977569058", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "policyDefinitionReferenceId": "2124621540977569058", "NumNonCompliantResources": 509 } ] diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json index a5a510204a45..38584b03bf6a 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json @@ -13,60 +13,60 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-09T17:41:47Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/microsoft.insights/autoscalesettings/mytest1", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/1ef5d536aec743a0aa801c1a", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/microsoft.insights/autoscalesettings", - "ResourceLocation": "westus", - "ResourceGroup": "myrg1", - "ResourceTags": "tbd", - "PolicyAssignmentName": "1ef5d536aec743a0aa801c1a", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/335cefd2-ab16-430f-b364-974a170eb1d5", - "PolicySetDefinitionName": "335cefd2-ab16-430f-b364-974a170eb1d5", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "15521232277412542086" + "timestamp": "2018-02-09T17:41:47Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/microsoft.insights/autoscalesettings/mytest1", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/1ef5d536aec743a0aa801c1a", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/microsoft.insights/autoscalesettings", + "resourceLocation": "westus", + "resourceGroup": "myrg1", + "resourceTags": "tbd", + "policyAssignmentName": "1ef5d536aec743a0aa801c1a", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policySetDefinitions/335cefd2-ab16-430f-b364-974a170eb1d5", + "policySetDefinitionName": "335cefd2-ab16-430f-b364-974a170eb1d5", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "15521232277412542086" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-09T17:41:47Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/microsoft.insights/autoscalesettings/mytest1", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/microsoft.insights/autoscalesettings", - "ResourceLocation": "westus", - "ResourceGroup": "myrg1", - "ResourceTags": "tbd", - "PolicyAssignmentName": "186044306c044a1d8c0ff76c", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", - "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "", - "PolicySetDefinitionName": "", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "" + "timestamp": "2018-02-09T17:41:47Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/microsoft.insights/autoscalesettings/mytest1", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/microsoft.insights/autoscalesettings", + "resourceLocation": "westus", + "resourceGroup": "myrg1", + "resourceTags": "tbd", + "policyAssignmentName": "186044306c044a1d8c0ff76c", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/myManagementGroup", + "policyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "", + "policySetDefinitionName": "", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "myManagementGroup,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryNestedResourceScope.json index ece066df6c56..f726792ab748 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryNestedResourceScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryNestedResourceScope.json @@ -13,60 +13,60 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", - "Timestamp": "2018-02-09T16:04:31Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "186044306c044a1d8c0ff76c", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", - "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": null, - "PolicySetDefinitionName": null, - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T16:04:31Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ServiceFabric/clusters/applications", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "186044306c044a1d8c0ff76c", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", + "policyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": null, + "policySetDefinitionName": null, + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", - "Timestamp": "2018-02-09T16:04:31Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ServiceFabric/clusters/applications", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "186044306c044a1d8c0ff76c", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", - "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": null, - "PolicySetDefinitionName": null, - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T16:04:31Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ServiceFabric/clusters/applications", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "186044306c044a1d8c0ff76c", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", + "policyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": null, + "policySetDefinitionName": null, + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json index a29f47acca8a..aad36ab77595 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json @@ -13,60 +13,60 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-13T00:38:50Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Security/policies/mySecurityPolicy", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/4a0425e4-97bf-4ad0-ab36-145b94083c60", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/Microsoft.Security/policies", - "ResourceLocation": null, - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "myPolicyAssignment", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"EUS, WEU\"]}}", - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup", - "PolicyDefinitionName": "4a0425e4-97bf-4ad0-ab36-145b94083c60", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": null, - "PolicySetDefinitionName": null, - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-13T00:38:50Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Security/policies/mySecurityPolicy", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/4a0425e4-97bf-4ad0-ab36-145b94083c60", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/Microsoft.Security/policies", + "resourceLocation": null, + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "myPolicyAssignment", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"EUS, WEU\"]}}", + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup", + "policyDefinitionName": "4a0425e4-97bf-4ad0-ab36-145b94083c60", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": null, + "policySetDefinitionName": null, + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-13T00:38:50Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/test", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/4a0425e4-97bf-4ad0-ab36-145b94083c60", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/Microsoft.Authorization/policyAssignments", - "ResourceLocation": null, - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "myPolicyAssignment", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"EUS, WEU\"]}}", - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup", - "PolicyDefinitionName": "4a0425e4-97bf-4ad0-ab36-145b94083c60", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": null, - "PolicySetDefinitionName": null, - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-13T00:38:50Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/test", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/4a0425e4-97bf-4ad0-ab36-145b94083c60", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/Microsoft.Authorization/policyAssignments", + "resourceLocation": null, + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "myPolicyAssignment", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"EUS, WEU\"]}}", + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup", + "policyDefinitionName": "4a0425e4-97bf-4ad0-ab36-145b94083c60", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": null, + "policySetDefinitionName": null, + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupScope.json index 6e503e112667..8ff86a37b152 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupScope.json @@ -14,60 +14,60 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-09T18:42:42Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mysa1", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/Microsoft.Storage/storageAccounts", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "3f3c4330183b4e218fe6fd29", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", - "PolicyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", - "PolicySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T18:42:42Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mysa1", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/Microsoft.Storage/storageAccounts", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "3f3c4330183b4e218fe6fd29", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "policyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "policySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-09T18:42:42Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mysa1", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/Microsoft.Storage/storageAccounts", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "3f3c4330183b4e218fe6fd29", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", - "PolicyDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e3682", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", - "PolicySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T18:42:42Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mysa1", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/Microsoft.Storage/storageAccounts", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "3f3c4330183b4e218fe6fd29", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "policyDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e3682", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "policySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceScope.json index 015eca0b9b57..94d1121594e6 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceScope.json @@ -13,60 +13,60 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", - "Timestamp": "2018-02-09T16:04:31Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ClassicCompute/domainNames", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "test", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", - "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "PolicyDefinitionName": "Audit a tag and it's value", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": null, - "PolicySetDefinitionName": null, - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T16:04:31Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ClassicCompute/domainNames", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "test", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", + "policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "policyDefinitionName": "Audit a tag and it's value", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": null, + "policySetDefinitionName": null, + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", - "Timestamp": "2018-02-09T16:04:31Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.ClassicCompute/domainNames", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "test", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", - "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "PolicyDefinitionName": "Audit a tag and it's value", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": null, - "PolicySetDefinitionName": null, - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T16:04:31Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ClassicCompute/domainNames/myDomainName", + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.ClassicCompute/domainNames", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "test", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", + "policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "policyDefinitionName": "Audit a tag and it's value", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": null, + "policySetDefinitionName": null, + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelNestedResourceScope.json index b1f3d26c2a1e..f30599819154 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelNestedResourceScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelNestedResourceScope.json @@ -13,60 +13,60 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", - "Timestamp": "2018-02-09T16:04:31Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", - "ResourceLocation": "eastus", - "ResourceGroup": "", - "ResourceTags": "tbd", - "PolicyAssignmentName": "186044306c044a1d8c0ff76c", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", - "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": null, - "PolicySetDefinitionName": null, - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T16:04:31Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", + "resourceLocation": "eastus", + "resourceGroup": "", + "resourceTags": "tbd", + "policyAssignmentName": "186044306c044a1d8c0ff76c", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", + "policyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": null, + "policySetDefinitionName": null, + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", - "Timestamp": "2018-02-09T16:04:31Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", - "PolicyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", - "ResourceLocation": "eastus", - "ResourceGroup": "", - "ResourceTags": "tbd", - "PolicyAssignmentName": "186044306c044a1d8c0ff76c", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", - "PolicyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", - "PolicyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": null, - "PolicySetDefinitionName": null, - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T16:04:31Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResource/someNestedResourceType/someNestedResource", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c", + "policyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.SomeNamespace/someResourceType/someNestedResourceType", + "resourceLocation": "eastus", + "resourceGroup": "", + "resourceTags": "tbd", + "policyAssignmentName": "186044306c044a1d8c0ff76c", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"allowedLocations\":{\"value\":[\"centralus\"]}}", + "policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg", + "policyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": null, + "policySetDefinitionName": null, + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json index c1b80e3c70c8..a9607c4eee48 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json @@ -13,60 +13,60 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-13T00:45:19Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Network/publicIPAddresses/my-ip-1", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/Microsoft.Network/publicIPAddresses", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"TAGNAME_1\":{\"value\":\"test\"}}", - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", - "PolicyDefinitionName": "c8b79b49-a579-4045-984e-1b249ab8b474", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", - "PolicySetDefinitionName": "12b58873-e0f8-4b95-936c-86cbe7c9d697", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "2124621540977569058" + "timestamp": "2018-02-13T00:45:19Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Network/publicIPAddresses/my-ip-1", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/Microsoft.Network/publicIPAddresses", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"TAGNAME_1\":{\"value\":\"test\"}}", + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "policyDefinitionName": "c8b79b49-a579-4045-984e-1b249ab8b474", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "policySetDefinitionName": "12b58873-e0f8-4b95-936c-86cbe7c9d697", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "2124621540977569058" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-13T00:45:19Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Network/publicIPAddresses/my-ip-1", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/Microsoft.Network/publicIPAddresses", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"TAGNAME_1\":{\"value\":\"test\"}}", - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", - "PolicyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", - "PolicySetDefinitionName": "12b58873-e0f8-4b95-936c-86cbe7c9d697", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": "14799174781370023846" + "timestamp": "2018-02-13T00:45:19Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Network/publicIPAddresses/my-ip-1", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/Microsoft.Network/publicIPAddresses", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"TAGNAME_1\":{\"value\":\"test\"}}", + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "policyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "policySetDefinitionName": "12b58873-e0f8-4b95-936c-86cbe7c9d697", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": "14799174781370023846" } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json index d165f69a3e58..cbee57e61261 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json @@ -13,60 +13,60 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-13T00:50:27Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication/services/myService", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/d9da7e80af6344ab9d342aa7", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/Microsoft.ServiceFabric/clusters/applications/services", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "d9da7e80af6344ab9d342aa7", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"tagName\":{\"value\":\"MyTag\"}}", - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", - "PolicyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": null, - "PolicySetDefinitionName": null, - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-13T00:50:27Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication/services/myService", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/d9da7e80af6344ab9d342aa7", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/Microsoft.ServiceFabric/clusters/applications/services", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "d9da7e80af6344ab9d342aa7", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"tagName\":{\"value\":\"MyTag\"}}", + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "policyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": null, + "policySetDefinitionName": null, + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-13T00:50:27Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication/services/myService", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/d9da7e80af6344ab9d342aa7", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/Microsoft.ServiceFabric/clusters/applications/services", - "ResourceLocation": "eastus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "d9da7e80af6344ab9d342aa7", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"tagName\":{\"value\":\"MyTag\"}}", - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", - "PolicyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": null, - "PolicySetDefinitionName": null, - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-13T00:50:27Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.ServiceFabric/clusters/myCluster/applications/myApplication/services/myService", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/d9da7e80af6344ab9d342aa7", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/Microsoft.ServiceFabric/clusters/applications/services", + "resourceLocation": "eastus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "d9da7e80af6344ab9d342aa7", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"tagName\":{\"value\":\"MyTag\"}}", + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "policyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": null, + "policySetDefinitionName": null, + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json index 0e9be4e4e99f..895eec5d6cc2 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json @@ -13,60 +13,60 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-13T00:54:58Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Web/sites/mySite", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/Microsoft.Web/sites", - "ResourceLocation": "centralus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "3f3c4330183b4e218fe6fd29", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", - "PolicyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", - "PolicySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-13T00:54:58Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Web/sites/mySite", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/Microsoft.Web/sites", + "resourceLocation": "centralus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "3f3c4330183b4e218fe6fd29", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "policyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "policySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-13T00:54:58Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Web/sites/mySite", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/LocationAuditDefinition", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/Microsoft.Web/sites", - "ResourceLocation": "centralus", - "ResourceGroup": "myResourceGroup", - "ResourceTags": "tbd", - "PolicyAssignmentName": "3f3c4330183b4e218fe6fd29", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", - "PolicyDefinitionName": "LocationAuditDefinition", - "PolicyDefinitionAction": "Audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", - "PolicySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-13T00:54:58Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Web/sites/mySite", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/3f3c4330183b4e218fe6fd29", + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/LocationAuditDefinition", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/Microsoft.Web/sites", + "resourceLocation": "centralus", + "resourceGroup": "myResourceGroup", + "resourceTags": "tbd", + "policyAssignmentName": "3f3c4330183b4e218fe6fd29", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "policyDefinitionName": "LocationAuditDefinition", + "policyDefinitionAction": "Audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "policySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelResourceScope.json index 8cbf7179eea7..7c841710898e 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelResourceScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelResourceScope.json @@ -13,60 +13,60 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", - "Timestamp": "2018-02-09T16:04:31Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.SomeNamespace/someResourceType", - "ResourceLocation": "eastus", - "ResourceGroup": "", - "ResourceTags": "tbd", - "PolicyAssignmentName": "test", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", - "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "PolicyDefinitionName": "Audit a tag and it's value", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": null, - "PolicySetDefinitionName": null, - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T16:04:31Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.SomeNamespace/someResourceType", + "resourceLocation": "eastus", + "resourceGroup": "", + "resourceTags": "tbd", + "policyAssignmentName": "test", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", + "policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "policyDefinitionName": "Audit a tag and it's value", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": null, + "policySetDefinitionName": null, + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName/providers/Microsoft.PolicyInsights/policyStates/$metadata#default/$entity", - "Timestamp": "2018-02-09T16:04:31Z", - "ResourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "ResourceType": "/Microsoft.SomeNamespace/someResourceType", - "ResourceLocation": "eastus", - "ResourceGroup": "", - "ResourceTags": "tbd", - "PolicyAssignmentName": "test", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", - "PolicyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", - "PolicyDefinitionName": "Audit a tag and it's value", - "PolicyDefinitionAction": "audit", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": null, - "PolicySetDefinitionName": null, - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T16:04:31Z", + "resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.SomeNamespace/someResourceType/someResourceName", + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test", + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/Audit a tag and it's value", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "resourceType": "/Microsoft.SomeNamespace/someResourceType", + "resourceLocation": "eastus", + "resourceGroup": "", + "resourceTags": "tbd", + "policyAssignmentName": "test", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{\"tagName\":{\"value\":\"no\"},\"tagValue\":{\"value\":\"no\"}}", + "policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5", + "policyDefinitionName": "Audit a tag and it's value", + "policyDefinitionAction": "audit", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": null, + "policySetDefinitionName": null, + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionScope.json index a9eaf1a9f68f..8ddcc6ffcab3 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionScope.json @@ -13,60 +13,60 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-09T17:48:05Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/Microsoft.Network/publicIPAddresses/mypubip1", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/Enable Monitoring in Azure Security Center", - "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9daedab3-fb2d-461e-b861-71790eead4f6", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/Microsoft.Network/publicIPAddresses", - "ResourceLocation": "eastus", - "ResourceGroup": "myrg1", - "ResourceTags": "tbd", - "PolicyAssignmentName": "Enable Monitoring in Azure Security Center", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", - "PolicyDefinitionName": "9daedab3-fb2d-461e-b861-71790eead4f6", - "PolicyDefinitionAction": "AuditIfNotExists", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T17:48:05Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/Microsoft.Network/publicIPAddresses/mypubip1", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/Enable Monitoring in Azure Security Center", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9daedab3-fb2d-461e-b861-71790eead4f6", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/Microsoft.Network/publicIPAddresses", + "resourceLocation": "eastus", + "resourceGroup": "myrg1", + "resourceTags": "tbd", + "policyAssignmentName": "Enable Monitoring in Azure Security Center", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "policyDefinitionName": "9daedab3-fb2d-461e-b861-71790eead4f6", + "policyDefinitionAction": "AuditIfNotExists", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-09T17:48:05Z", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/Microsoft.Network/publicIPAddresses/mypubip1", - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/9ac09b0657d942e5ad4041a6", - "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9daedab3-fb2d-461e-b861-71790eead4f6", - "EffectiveParameters": null, - "IsCompliant": false, - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceType": "/Microsoft.Network/publicIPAddresses", - "ResourceLocation": "eastus", - "ResourceGroup": "myrg1", - "ResourceTags": "tbd", - "PolicyAssignmentName": "9ac09b0657d942e5ad4041a6", - "PolicyAssignmentOwner": "tbd", - "PolicyAssignmentParameters": "{}", - "PolicyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", - "PolicyDefinitionName": "9daedab3-fb2d-461e-b861-71790eead4f6", - "PolicyDefinitionAction": "AuditIfNotExists", - "PolicyDefinitionCategory": "tbd", - "PolicySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "PolicySetDefinitionOwner": null, - "PolicySetDefinitionCategory": null, - "PolicySetDefinitionParameters": null, - "ManagementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", - "PolicyDefinitionReferenceId": null + "timestamp": "2018-02-09T17:48:05Z", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/Microsoft.Network/publicIPAddresses/mypubip1", + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/9ac09b0657d942e5ad4041a6", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9daedab3-fb2d-461e-b861-71790eead4f6", + "effectiveParameters": null, + "isCompliant": false, + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceType": "/Microsoft.Network/publicIPAddresses", + "resourceLocation": "eastus", + "resourceGroup": "myrg1", + "resourceTags": "tbd", + "policyAssignmentName": "9ac09b0657d942e5ad4041a6", + "policyAssignmentOwner": "tbd", + "policyAssignmentParameters": "{}", + "policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852", + "policyDefinitionName": "9daedab3-fb2d-461e-b861-71790eead4f6", + "policyDefinitionAction": "AuditIfNotExists", + "policyDefinitionCategory": "tbd", + "policySetDefinitionId": "/providers/Microsoft.Authorization/policySetDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionName": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "policySetDefinitionOwner": null, + "policySetDefinitionCategory": null, + "policySetDefinitionParameters": null, + "managementGroupIds": "mymg,fff988bf-fff1-ffff-fffb-fffcd011db47", + "policyDefinitionReferenceId": null } ] } From 2b6f21fd3048ef40051325722a1714d14953b87d Mon Sep 17 00:00:00 2001 From: Bulent Elmaci Date: Thu, 22 Feb 2018 16:14:48 -0800 Subject: [PATCH 04/13] Fix two more instances of $top type in examples --- .../2017-08-09-preview/examples/FilterAndMultipleGroups.json | 2 +- .../2017-08-09-preview/examples/FilterAndMultipleGroups.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndMultipleGroups.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndMultipleGroups.json index 0c5811bc5d1f..fa7245208b18 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndMultipleGroups.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndMultipleGroups.json @@ -7,7 +7,7 @@ "$filter": "PolicyDefinitionAction eq 'deny'", "$apply": "groupby((PolicyAssignmentId, PolicyDefinitionId, ResourceId))/groupby((PolicyAssignmentId, PolicyDefinitionId), aggregate($count as NumDeniedResources))", "$orderby": "NumDeniedResources desc", - "$top": "10" + "$top": 10 }, "responses": { "200": { diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndMultipleGroups.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndMultipleGroups.json index 4aff983060b9..637bee4487e5 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndMultipleGroups.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndMultipleGroups.json @@ -6,7 +6,7 @@ "$filter": "IsCompliant eq false", "$apply": "groupby((PolicyAssignmentId, PolicySetDefinitionId, PolicyDefinitionId, PolicyDefinitionReferenceId, ResourceId))/groupby((PolicyAssignmentId, PolicySetDefinitionId, PolicyDefinitionId, PolicyDefinitionReferenceId), aggregate($count as NumNonCompliantResources))", "$orderby": "NumNonCompliantResources desc", - "$top": "10" + "$top": 10 }, "responses": { "200": { From 460ce32445ee38d8b916f13bf953b3ed8609c6bd Mon Sep 17 00:00:00 2001 From: Bulent Elmaci Date: Thu, 22 Feb 2018 16:33:15 -0800 Subject: [PATCH 05/13] Fix metadata examples by adding content type header and changing the body to a single string --- .../examples/GetMetadata.json | 89 +--------- .../examples/GetMetadata.json | 89 +--------- .../examples/GetMetadata.json | 114 +------------ .../examples/GetMetadata.json | 161 +----------------- 4 files changed, 16 insertions(+), 437 deletions(-) diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/GetMetadata.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/GetMetadata.json index 80442e83a0f1..46af2d35d0da 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/GetMetadata.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/GetMetadata.json @@ -5,91 +5,10 @@ }, "responses": { "200": { - "body": [ - "", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " Org.OData.Capabilities.V1.ConformanceLevelType/Minimal", - " ", - " ", - " ", - " application/json;odata.metadata=minimal;IEEE754Compatible=false;odata.streaming=true", - " application/json;odata.metadata=none;IEEE754Compatible=false;odata.streaming=true", - " ", - " ", - " ", - " ", - " ", - " ", - "" - ] + "headers": { + "content-type": "application/xml" + }, + "body": " Org.OData.Capabilities.V1.ConformanceLevelType/Minimal application/json;odata.metadata=minimal;IEEE754Compatible=false;odata.streaming=true application/json;odata.metadata=none;IEEE754Compatible=false;odata.streaming=true " } } } \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/GetMetadata.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/GetMetadata.json index d745d0ab979e..4fd89e615525 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/GetMetadata.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/GetMetadata.json @@ -5,91 +5,10 @@ }, "responses": { "200": { - "body": [ - "", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " Org.OData.Capabilities.V1.ConformanceLevelType/Minimal", - " ", - " ", - " ", - " application/json;odata.metadata=minimal;IEEE754Compatible=false;odata.streaming=true", - " application/json;odata.metadata=none;IEEE754Compatible=false;odata.streaming=true", - " ", - " ", - " ", - " ", - " ", - " ", - "" - ] + "headers": { + "content-type": "application/xml" + }, + "body": " Org.OData.Capabilities.V1.ConformanceLevelType/Minimal application/json;odata.metadata=minimal;IEEE754Compatible=false;odata.streaming=true application/json;odata.metadata=none;IEEE754Compatible=false;odata.streaming=true " } } } \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/GetMetadata.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/GetMetadata.json index 86aee6efadcd..45f6e3b5c72f 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/GetMetadata.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/GetMetadata.json @@ -5,116 +5,10 @@ }, "responses": { "200": { - "body": [ - "", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " Org.OData.Capabilities.V1.ConformanceLevelType/Minimal", - " ", - " ", - " ", - " application/json;odata.metadata=minimal;IEEE754Compatible=false;odata.streaming=true", - " application/json;odata.metadata=none;IEEE754Compatible=false;odata.streaming=true", - " ", - " ", - " ", - " ", - " ", - " ", - "" - ] + "headers": { + "content-type": "application/xml" + }, + "body": " Org.OData.Capabilities.V1.ConformanceLevelType/Minimal application/json;odata.metadata=minimal;IEEE754Compatible=false;odata.streaming=true application/json;odata.metadata=none;IEEE754Compatible=false;odata.streaming=true " } } } \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/GetMetadata.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/GetMetadata.json index d6a6eb7b5681..fb8f8c3e2620 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/GetMetadata.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/GetMetadata.json @@ -5,163 +5,10 @@ }, "responses": { "200": { - "body": [ - "", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " Org.OData.Capabilities.V1.ConformanceLevelType/Minimal", - " ", - " ", - " ", - " application/json;odata.metadata=minimal;IEEE754Compatible=false;odata.streaming=true", - " application/json;odata.metadata=none;IEEE754Compatible=false;odata.streaming=true", - " ", - " ", - " ", - " ", - " ", - " ", - "" - ] + "headers": { + "content-type": "application/xml" + }, + "body": " Org.OData.Capabilities.V1.ConformanceLevelType/Minimal application/json;odata.metadata=minimal;IEEE754Compatible=false;odata.streaming=true application/json;odata.metadata=none;IEEE754Compatible=false;odata.streaming=true " } } } \ No newline at end of file From d9049128d132e3534c20e457690253fa7904ff9d Mon Sep 17 00:00:00 2001 From: Bulent Elmaci Date: Thu, 22 Feb 2018 16:43:59 -0800 Subject: [PATCH 06/13] Remove EQUIVALENT_PATH suppressions; add extendedProperties as additionalProperties; add @odata.count to operations; remove "type" from "rows" in first 2017-08-09-preview and add descriptions --- .../2017-08-09-preview/policyEvents.json | 10 +++++++++- .../2017-10-17-preview/policyEvents.json | 12 ++++++++++++ .../2017-12-12-preview/policyEvents.json | 12 ++++++++++++ .../2017-08-09-preview/policyStates.json | 10 +++++++++- .../2017-10-17-preview/policyStates.json | 12 ++++++++++++ .../2017-12-12-preview/policyStates.json | 12 ++++++++++++ .../policyinsights/resource-manager/readme.md | 19 ------------------- 7 files changed, 66 insertions(+), 21 deletions(-) diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/policyEvents.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/policyEvents.json index 29da1012fbc6..05bca0b0d07b 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/policyEvents.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/policyEvents.json @@ -425,6 +425,13 @@ "PrincipalOid": { "description": "Principal object ID for the user who initiated the resource operation that triggered the policy event.", "$ref": "#/definitions/Column" + }, + "ExtendedProperties": { + "type": "object", + "description": "The collection of extended properties, e.g. aggregates.", + "additionalProperties": { + "$ref": "#/definitions/Column" + } } } }, @@ -432,9 +439,10 @@ "description": "Query result rows, each representing a policy event record.", "type": "array", "items": { + "description": "Query result row.", "type": "array", "items": { - "type": "object" + "description": "Each column of the query result row." } } } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/policyEvents.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/policyEvents.json index 806ee9df79f4..e3810d594318 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/policyEvents.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/policyEvents.json @@ -466,6 +466,12 @@ "principalOid": { "description": "Principal object ID for the user who initiated the resource operation that triggered the policy event.", "type": "string" + }, + "extendedProperties": { + "description": "The collection of extended properties, e.g. aggregates.", + "type": "object", + "additionalProperties": { + } } } }, @@ -490,6 +496,12 @@ "Operations": { "description": "List of available operations.", "properties": { + "@odata.count": { + "description": "OData entity count; represents the number of operations returned.", + "type": "integer", + "format": "int32", + "minimum": 1 + }, "value": { "description": "List of available operations.", "type": "array", diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/policyEvents.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/policyEvents.json index 7f2365fcf945..d2157926abb8 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/policyEvents.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/policyEvents.json @@ -632,6 +632,12 @@ "principalOid": { "description": "Principal object ID for the user who initiated the resource operation that triggered the policy event.", "type": "string" + }, + "extendedProperties": { + "description": "The collection of extended properties, e.g. aggregates.", + "type": "object", + "additionalProperties": { + } } } }, @@ -656,6 +662,12 @@ "Operations": { "description": "List of available operations.", "properties": { + "@odata.count": { + "description": "OData entity count; represents the number of operations returned.", + "type": "integer", + "format": "int32", + "minimum": 1 + }, "value": { "description": "List of available operations.", "type": "array", diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/policyStates.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/policyStates.json index 885302e98f30..972da9e98edf 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/policyStates.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/policyStates.json @@ -417,6 +417,13 @@ "PolicyDefinitionReferenceId": { "description": "Reference ID for the policy definition inside the policy set, if the policy assignment is for a policy set.", "$ref": "#/definitions/Column" + }, + "ExtendedProperties": { + "type": "object", + "description": "The collection of extended properties, e.g. aggregates.", + "additionalProperties": { + "$ref": "#/definitions/Column" + } } } }, @@ -424,9 +431,10 @@ "description": "Query result rows, each representing a policy state record.", "type": "array", "items": { + "description": "Query result row.", "type": "array", "items": { - "type": "object" + "description": "Each column of the query result row." } } } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/policyStates.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/policyStates.json index 1e38bee019e4..ef0e2074d7dc 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/policyStates.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/policyStates.json @@ -458,6 +458,12 @@ "policyDefinitionReferenceId": { "description": "Reference ID for the policy definition inside the policy set, if the policy assignment is for a policy set.", "type": "string" + }, + "extendedProperties": { + "description": "The collection of extended properties, e.g. aggregates.", + "type": "object", + "additionalProperties": { + } } } }, @@ -482,6 +488,12 @@ "Operations": { "description": "List of available operations.", "properties": { + "@odata.count": { + "description": "OData entity count; represents the number of operations returned.", + "type": "integer", + "format": "int32", + "minimum": 1 + }, "value": { "description": "List of available operations.", "type": "array", diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/policyStates.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/policyStates.json index 684fcd18a434..4839db83ff08 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/policyStates.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/policyStates.json @@ -949,6 +949,12 @@ "policyDefinitionReferenceId": { "description": "Reference ID for the policy definition inside the policy set, if the policy assignment is for a policy set.", "type": "string" + }, + "extendedProperties": { + "description": "The collection of extended properties, e.g. aggregates.", + "type": "object", + "additionalProperties": { + } } } }, @@ -1082,6 +1088,12 @@ "Operations": { "description": "List of available operations.", "properties": { + "@odata.count": { + "description": "OData entity count; represents the number of operations returned.", + "type": "integer", + "format": "int32", + "minimum": 1 + }, "value": { "description": "List of available operations.", "type": "array", diff --git a/specification/policyinsights/resource-manager/readme.md b/specification/policyinsights/resource-manager/readme.md index 539ee60b7e27..5a4420c13852 100644 --- a/specification/policyinsights/resource-manager/readme.md +++ b/specification/policyinsights/resource-manager/readme.md @@ -56,25 +56,6 @@ directive: - $.paths["/{scope}/providers/Microsoft.PolicyInsights/policyEvents/$metadata"].get.produces[0] - $.paths["/{scope}/providers/Microsoft.PolicyInsights/policyStates/$metadata"].get.produces[0] - - suppress: EQUIVALENT_PATH - reason: These paths are semantically different paths that need to be modelled separately. - where: - - $.paths["/{managementGroupId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults"] - - $.paths["/{resourceId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults"] - - $.paths["/{policySetDefinitionId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults"] - - $.paths["/{policyDefinitionId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults"] - - $.paths["/{policyAssignmentId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults"] - - $.paths["/{managementGroupId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults"] - - $.paths["/{resourceId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults"] - - $.paths["/{policySetDefinitionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults"] - - $.paths["/{policyDefinitionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults"] - - $.paths["/{policyAssignmentId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults"] - - $.paths["/{managementGroupId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize"] - - $.paths["/{resourceId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize"] - - $.paths["/{policySetDefinitionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize"] - - $.paths["/{policyDefinitionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize"] - - $.paths["/{policyAssignmentId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize"] - ``` ### Tag: package-2017-12 From 0d393339836518d1853517d5bdbba119d31be87f Mon Sep 17 00:00:00 2001 From: Bulent Elmaci Date: Thu, 22 Feb 2018 17:37:17 -0800 Subject: [PATCH 07/13] Fix remaining examples with bad casings --- .../SummarizeManagementGroupScope.json | 10 +- .../SummarizePolicyAssignmentScope.json | 64 +-- .../SummarizePolicyDefinitionScope.json | 106 ++--- .../SummarizePolicySetDefinitionScope.json | 10 +- .../examples/SummarizeResourceGroupScope.json | 58 +-- .../examples/SummarizeResourceScope.json | 396 +++++++++--------- .../examples/SummarizeSubscriptionScope.json | 150 +++---- .../examples/TimeRangeSortSelectTop.json | 24 +- 8 files changed, 409 insertions(+), 409 deletions(-) diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeManagementGroupScope.json index b246ea20af0f..79bae0a915b0 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeManagementGroupScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeManagementGroupScope.json @@ -17,12 +17,12 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary/$entity", - "Results": { - "QueryResultsUri": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-05 18:00:00Z&$to=2018-02-06 18:00:00Z&$filter=(PolicyDefinitionAction eq 'deny' or PolicyDefinitionAction eq 'audit') and IsCompliant eq false", - "NonCompliantResources": 15410, - "NonCompliantPolicies": 68 + "results": { + "queryResultsUri": "https://management.azure.com/providers/Microsoft.Management/managementGroups/myManagementGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-05 18:00:00Z&$to=2018-02-06 18:00:00Z&$filter=(PolicyDefinitionAction eq 'deny' or PolicyDefinitionAction eq 'audit') and IsCompliant eq false", + "nonCompliantResources": 15410, + "nonCompliantPolicies": 68 }, - "PolicyAssignments": [] + "policyAssignments": [] } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicyAssignmentScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicyAssignmentScope.json index 83c4366738d9..704d4595584d 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicyAssignmentScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicyAssignmentScope.json @@ -13,51 +13,51 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary/$entity", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false", - "NonCompliantResources": 531, - "NonCompliantPolicies": 1 + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false", + "nonCompliantResources": 531, + "nonCompliantPolicies": 1 }, - "PolicyAssignments": [ + "policyAssignments": [ { - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531'", - "NonCompliantResources": 531, - "NonCompliantPolicies": 4 + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531'", + "nonCompliantResources": 531, + "nonCompliantPolicies": 4 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'", - "NonCompliantResources": 531 + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'", + "nonCompliantResources": 531 } }, { - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", - "NonCompliantResources": 531 + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", + "nonCompliantResources": 531 } }, { - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/locationauditdefinition", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/locationauditdefinition'", - "NonCompliantResources": 220 + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/locationauditdefinition", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/locationauditdefinition'", + "nonCompliantResources": 220 } }, { - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682'", - "NonCompliantResources": 54 + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:09:24Z&$to=2018-02-13 20:09:24Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682'", + "nonCompliantResources": 54 } } ] diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicyDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicyDefinitionScope.json index e8c19d765587..31a618249131 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicyDefinitionScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicyDefinitionScope.json @@ -13,84 +13,84 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary/$entity", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false", - "NonCompliantResources": 561, - "NonCompliantPolicies": 4 + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false", + "nonCompliantResources": 561, + "nonCompliantPolicies": 4 }, - "PolicyAssignments": [ + "policyAssignments": [ { - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7", - "PolicySetDefinitionId": "", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7'", - "NonCompliantResources": 558, - "NonCompliantPolicies": 1 + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7", + "policySetDefinitionId": "", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7'", + "nonCompliantResources": 558, + "nonCompliantPolicies": 1 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", - "NonCompliantResources": 558 + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", + "nonCompliantResources": 558 } } ] }, { - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29'", - "NonCompliantResources": 553, - "NonCompliantPolicies": 1 + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29'", + "nonCompliantResources": 553, + "nonCompliantPolicies": 1 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", - "NonCompliantResources": 553 + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", + "nonCompliantResources": 553 } } ] }, { - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1'", - "NonCompliantResources": 531, - "NonCompliantPolicies": 1 + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1'", + "nonCompliantResources": 531, + "nonCompliantPolicies": 1 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", - "NonCompliantResources": 531 + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", + "nonCompliantResources": 531 } } ] }, { - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531'", - "NonCompliantResources": 531, - "NonCompliantPolicies": 1 + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531'", + "nonCompliantResources": 531, + "nonCompliantPolicies": 1 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", - "NonCompliantResources": 531 + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 20:07:10Z&$to=2018-02-13 20:07:10Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", + "nonCompliantResources": 531 } } ] diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicySetDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicySetDefinitionScope.json index 4a49d8b9fe45..1ff2cc46e86b 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicySetDefinitionScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicySetDefinitionScope.json @@ -17,12 +17,12 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary/$entity", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-05 18:00:00Z&$to=2018-02-06 18:00:00Z&$filter=(PolicyDefinitionAction eq 'deny') and IsCompliant eq false", - "NonCompliantResources": 0, - "NonCompliantPolicies": 0 + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-05 18:00:00Z&$to=2018-02-06 18:00:00Z&$filter=(PolicyDefinitionAction eq 'deny') and IsCompliant eq false", + "nonCompliantResources": 0, + "nonCompliantPolicies": 0 }, - "PolicyAssignments": [] + "policyAssignments": [] } ] } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceGroupScope.json index 9c9707f605fb..147569e8323f 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceGroupScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceGroupScope.json @@ -14,46 +14,46 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary/$entity", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:55:09Z&$to=2018-02-13 19:55:09Z&$filter=IsCompliant eq false", - "NonCompliantResources": 55, - "NonCompliantPolicies": 20 + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:55:09Z&$to=2018-02-13 19:55:09Z&$filter=IsCompliant eq false", + "nonCompliantResources": 55, + "nonCompliantPolicies": 20 }, - "PolicyAssignments": [ + "policyAssignments": [ { - "PolicyAssignmentId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c", - "PolicySetDefinitionId": "", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:55:09Z&$to=2018-02-13 19:55:09Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c'", - "NonCompliantResources": 55, - "NonCompliantPolicies": 1 + "policyAssignmentId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c", + "policySetDefinitionId": "", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:55:09Z&$to=2018-02-13 19:55:09Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c'", + "nonCompliantResources": 55, + "nonCompliantPolicies": 1 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:55:09Z&$to=2018-02-13 19:55:09Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d'", - "NonCompliantResources": 55 + "policyDefinitionId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:55:09Z&$to=2018-02-13 19:55:09Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d'", + "nonCompliantResources": 55 } } ] }, { - "PolicyAssignmentId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a", - "PolicySetDefinitionId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policysetdefinitions/335cefd2-ab16-430f-b364-974a170eb1d5", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:55:09Z&$to=2018-02-13 19:55:09Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a'", - "NonCompliantResources": 55, - "NonCompliantPolicies": 1 + "policyAssignmentId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a", + "policySetDefinitionId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policysetdefinitions/335cefd2-ab16-430f-b364-974a170eb1d5", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:55:09Z&$to=2018-02-13 19:55:09Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a'", + "nonCompliantResources": 55, + "nonCompliantPolicies": 1 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:55:09Z&$to=2018-02-13 19:55:09Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d'", - "NonCompliantResources": 55 + "policyDefinitionId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:55:09Z&$to=2018-02-13 19:55:09Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d'", + "nonCompliantResources": 55 } } ] diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceScope.json index 3bb557d9bf20..4721644012fb 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceScope.json @@ -13,314 +13,314 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary/$entity", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false", - "NonCompliantResources": 1, - "NonCompliantPolicies": 14 + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false", + "nonCompliantResources": 1, + "nonCompliantPolicies": 14 }, - "PolicyAssignments": [ + "policyAssignments": [ { - "PolicyAssignmentId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/8174043a1e2849179635b874", - "PolicySetDefinitionId": "", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/8174043a1e2849179635b874'", - "NonCompliantResources": 1, - "NonCompliantPolicies": 1 + "policyAssignmentId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/8174043a1e2849179635b874", + "policySetDefinitionId": "", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/8174043a1e2849179635b874'", + "nonCompliantResources": 1, + "nonCompliantPolicies": 1 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/8174043a1e2849179635b874' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066'", - "NonCompliantResources": 1 + "policyDefinitionId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/8174043a1e2849179635b874' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/72c0c41a-c752-4bc0-9c61-0d6adc567066'", + "nonCompliantResources": 1 } } ] }, { - "PolicyAssignmentId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a", - "PolicySetDefinitionId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policysetdefinitions/335cefd2-ab16-430f-b364-974a170eb1d5", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a'", - "NonCompliantResources": 1, - "NonCompliantPolicies": 1 + "policyAssignmentId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a", + "policySetDefinitionId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policysetdefinitions/335cefd2-ab16-430f-b364-974a170eb1d5", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a'", + "nonCompliantResources": 1, + "nonCompliantPolicies": 1 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d'", - "NonCompliantResources": 1 + "policyDefinitionId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d'", + "nonCompliantResources": 1 } } ] }, { - "PolicyAssignmentId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c", - "PolicySetDefinitionId": "", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c'", - "NonCompliantResources": 1, - "NonCompliantPolicies": 1 + "policyAssignmentId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c", + "policySetDefinitionId": "", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c'", + "nonCompliantResources": 1, + "nonCompliantPolicies": 1 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d'", - "NonCompliantResources": 1 + "policyDefinitionId": "/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/mymg/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d'", + "nonCompliantResources": 1 } } ] }, { - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/fed0d6ef-c76c-4a3d-a4ec-de07b1e7900b", - "PolicySetDefinitionId": "", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/fed0d6ef-c76c-4a3d-a4ec-de07b1e7900b'", - "NonCompliantResources": 1, - "NonCompliantPolicies": 1 + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/fed0d6ef-c76c-4a3d-a4ec-de07b1e7900b", + "policySetDefinitionId": "", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/fed0d6ef-c76c-4a3d-a4ec-de07b1e7900b'", + "nonCompliantResources": 1, + "nonCompliantPolicies": 1 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/fed0d6ef-c76c-4a3d-a4ec-de07b1e7900b' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value'", - "NonCompliantResources": 1 + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/fed0d6ef-c76c-4a3d-a4ec-de07b1e7900b' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value'", + "nonCompliantResources": 1 } } ] }, { - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f5f5249bd6124d0692c2af52", - "PolicySetDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/bafcd34b-58c6-47b4-bc8b-f35198d6a025", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f5f5249bd6124d0692c2af52'", - "NonCompliantResources": 1, - "NonCompliantPolicies": 1 + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f5f5249bd6124d0692c2af52", + "policySetDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/bafcd34b-58c6-47b4-bc8b-f35198d6a025", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f5f5249bd6124d0692c2af52'", + "nonCompliantResources": 1, + "nonCompliantPolicies": 1 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/test", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f5f5249bd6124d0692c2af52' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/testtest'", - "NonCompliantResources": 1 + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/test", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f5f5249bd6124d0692c2af52' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/testtest'", + "nonCompliantResources": 1 } } ] }, { - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e4a08f18-4e3e-47af-a2eb-cc96d8c9a030", - "PolicySetDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/e4a08f18-4e3e-47af-a2eb-cc96d8c9a01f", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e4a08f18-4e3e-47af-a2eb-cc96d8c9a030'", - "NonCompliantResources": 1, - "NonCompliantPolicies": 2 + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e4a08f18-4e3e-47af-a2eb-cc96d8c9a030", + "policySetDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/e4a08f18-4e3e-47af-a2eb-cc96d8c9a01f", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e4a08f18-4e3e-47af-a2eb-cc96d8c9a030'", + "nonCompliantResources": 1, + "nonCompliantPolicies": 2 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and its value", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e4a08f18-4e3e-47af-a2eb-cc96d8c9a030' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and its value'", - "NonCompliantResources": 1 + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and its value", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e4a08f18-4e3e-47af-a2eb-cc96d8c9a030' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and its value'", + "nonCompliantResources": 1 } }, { - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e4a08f18-4e3e-47af-a2eb-cc96d8c9a030' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value'", - "NonCompliantResources": 1 + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e4a08f18-4e3e-47af-a2eb-cc96d8c9a030' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value'", + "nonCompliantResources": 1 } } ] }, { - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01", - "PolicySetDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/a03db67e-a286-43c3-9098-b2da83d361ad", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01'", - "NonCompliantResources": 1, - "NonCompliantPolicies": 1 + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01", + "policySetDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/a03db67e-a286-43c3-9098-b2da83d361ad", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01'", + "nonCompliantResources": 1, + "nonCompliantPolicies": 1 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'", - "NonCompliantResources": 1 + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'", + "nonCompliantResources": 1 } } ] }, { - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49", - "PolicySetDefinitionId": "", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49'", - "NonCompliantResources": 1, - "NonCompliantPolicies": 1 + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49", + "policySetDefinitionId": "", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49'", + "nonCompliantResources": 1, + "nonCompliantPolicies": 1 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'", - "NonCompliantResources": 1 + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'", + "nonCompliantResources": 1 } } ] }, { - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dc7c38a6-42a9-4261-b54e-92549cd6e010", - "PolicySetDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/deny a resource based on owner tag", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dc7c38a6-42a9-4261-b54e-92549cd6e010'", - "NonCompliantResources": 1, - "NonCompliantPolicies": 1 + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dc7c38a6-42a9-4261-b54e-92549cd6e010", + "policySetDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/deny a resource based on owner tag", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dc7c38a6-42a9-4261-b54e-92549cd6e010'", + "nonCompliantResources": 1, + "nonCompliantPolicies": 1 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dc7c38a6-42a9-4261-b54e-92549cd6e010' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value'", - "NonCompliantResources": 1 + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/dc7c38a6-42a9-4261-b54e-92549cd6e010' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/audit a tag and it's value'", + "nonCompliantResources": 1 } } ] }, { - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7", - "PolicySetDefinitionId": "", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7'", - "NonCompliantResources": 1, - "NonCompliantPolicies": 1 + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7", + "policySetDefinitionId": "", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7'", + "nonCompliantResources": 1, + "nonCompliantPolicies": 1 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", - "NonCompliantResources": 1 + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", + "nonCompliantResources": 1 } } ] }, { - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d6be6bb37e5f4333baa95c2a", - "PolicySetDefinitionId": "", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d6be6bb37e5f4333baa95c2a'", - "NonCompliantResources": 1, - "NonCompliantPolicies": 1 + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d6be6bb37e5f4333baa95c2a", + "policySetDefinitionId": "", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d6be6bb37e5f4333baa95c2a'", + "nonCompliantResources": 1, + "nonCompliantPolicies": 1 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/5948d091-78b7-4d3b-a404-cc6a0329b0c6", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d6be6bb37e5f4333baa95c2a' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/5948d091-78b7-4d3b-a404-cc6a0329b0c6'", - "NonCompliantResources": 1 + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/5948d091-78b7-4d3b-a404-cc6a0329b0c6", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/d6be6bb37e5f4333baa95c2a' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/5948d091-78b7-4d3b-a404-cc6a0329b0c6'", + "nonCompliantResources": 1 } } ] }, { - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29", - "PolicySetDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29'", - "NonCompliantResources": 1, - "NonCompliantPolicies": 1 + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29", + "policySetDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29'", + "nonCompliantResources": 1, + "nonCompliantPolicies": 1 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", - "NonCompliantResources": 1 + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", + "nonCompliantResources": 1 } } ] }, { - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", - "PolicySetDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531'", - "NonCompliantResources": 1, - "NonCompliantPolicies": 3 + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531", + "policySetDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531'", + "nonCompliantResources": 1, + "nonCompliantPolicies": 3 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/locationauditdefinition", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/locationauditdefinition'", - "NonCompliantResources": 1 + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/locationauditdefinition", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/locationauditdefinition'", + "nonCompliantResources": 1 } }, { - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'", - "NonCompliantResources": 1 + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'", + "nonCompliantResources": 1 } }, { - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", - "NonCompliantResources": 1 + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/f4cc58b7db524a9799381531' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", + "nonCompliantResources": 1 } } ] }, { - "PolicyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", - "PolicySetDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1'", - "NonCompliantResources": 1, - "NonCompliantPolicies": 3 + "policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1", + "policySetDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policysetdefinitions/12b58873-e0f8-4b95-936c-86cbe7c9d697", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1'", + "nonCompliantResources": 1, + "nonCompliantPolicies": 3 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/locationauditdefinition", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/locationauditdefinition'", - "NonCompliantResources": 1 + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/locationauditdefinition", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/locationauditdefinition'", + "nonCompliantResources": 1 } }, { - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'", - "NonCompliantResources": 1 + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'", + "nonCompliantResources": 1 } }, { - "PolicyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", - "NonCompliantResources": 1 + "policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/my-vault/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:59:17Z&$to=2018-02-13 19:59:17Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policyassignments/ddd8ef92e3714a5ea3d208c1' and PolicyDefinitionId eq '/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", + "nonCompliantResources": 1 } } ] diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionScope.json index 1c9372d87887..34e5a0c99b89 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionScope.json @@ -14,119 +14,119 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary/$entity", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false", - "NonCompliantResources": 619, - "NonCompliantPolicies": 40 + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false", + "nonCompliantResources": 619, + "nonCompliantPolicies": 40 }, - "PolicyAssignments": [ + "policyAssignments": [ { - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/a03db67e-a286-43c3-9098-b2da83d361ad", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01'", - "NonCompliantResources": 557, - "NonCompliantPolicies": 1 + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/a03db67e-a286-43c3-9098-b2da83d361ad", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01'", + "nonCompliantResources": 557, + "nonCompliantPolicies": 1 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'", - "NonCompliantResources": 557 + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'", + "nonCompliantResources": 557 } } ] }, { - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7", - "PolicySetDefinitionId": "", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7'", - "NonCompliantResources": 557, - "NonCompliantPolicies": 1 + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7", + "policySetDefinitionId": "", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7'", + "nonCompliantResources": 557, + "nonCompliantPolicies": 1 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", - "NonCompliantResources": 557 + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", + "nonCompliantResources": 557 } } ] }, { - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49", - "PolicySetDefinitionId": "", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49'", - "NonCompliantResources": 557, - "NonCompliantPolicies": 1 + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49", + "policySetDefinitionId": "", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49'", + "nonCompliantResources": 557, + "nonCompliantPolicies": 1 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'", - "NonCompliantResources": 557 + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474'", + "nonCompliantResources": 557 } } ] }, { - "PolicyAssignmentId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a", - "PolicySetDefinitionId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policysetdefinitions/335cefd2-ab16-430f-b364-974a170eb1d5", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a'", - "NonCompliantResources": 557, - "NonCompliantPolicies": 1 + "policyAssignmentId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a", + "policySetDefinitionId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policysetdefinitions/335cefd2-ab16-430f-b364-974a170eb1d5", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a'", + "nonCompliantResources": 557, + "nonCompliantPolicies": 1 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d'", - "NonCompliantResources": 557 + "policyDefinitionId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a' and PolicyDefinitionId eq '/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d'", + "nonCompliantResources": 557 } } ] }, { - "PolicyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29", - "PolicySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29'", - "NonCompliantResources": 552, - "NonCompliantPolicies": 3 + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29", + "policySetDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29'", + "nonCompliantResources": 552, + "nonCompliantPolicies": 3 }, - "PolicyDefinitions": [ + "policyDefinitions": [ { - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", - "NonCompliantResources": 552 + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1'", + "nonCompliantResources": 552 } }, { - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/locationauditdefinition", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/locationauditdefinition'", - "NonCompliantResources": 29 + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/locationauditdefinition", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/locationauditdefinition'", + "nonCompliantResources": 29 } }, { - "PolicyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682", - "Effect": "audit", - "Results": { - "QueryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682'", - "NonCompliantResources": 2 + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-12 19:48:53Z&$to=2018-02-13 19:48:53Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682'", + "nonCompliantResources": 2 } } ] diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/TimeRangeSortSelectTop.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/TimeRangeSortSelectTop.json index df1d92c8d5ad..9d9e4f61d44f 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/TimeRangeSortSelectTop.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/TimeRangeSortSelectTop.json @@ -18,22 +18,22 @@ { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-06T17:58:00Z", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/8cb1e007-947f-423a-ad0c-7ab7dc7d0255/providers/Microsoft.Authorization/policyAssignments/1654a0254ab34920a60f94eb", - "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/655cb504-bcee-4362-bd4c-402e6aa38759", - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceGroup": "myrg1", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/Microsoft.Storage/storageAccounts/mysa1" + "timestamp": "2018-02-06T17:58:00Z", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/8cb1e007-947f-423a-ad0c-7ab7dc7d0255/providers/Microsoft.Authorization/policyAssignments/1654a0254ab34920a60f94eb", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/655cb504-bcee-4362-bd4c-402e6aa38759", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceGroup": "myrg1", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg1/providers/Microsoft.Storage/storageAccounts/mysa1" }, { "@odata.id": null, "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity", - "Timestamp": "2018-02-06T17:58:00Z", - "PolicyAssignmentId": "/providers/Microsoft.Management/managementGroups/8cb1e007-947f-423a-ad0c-7ab7dc7d0255/providers/Microsoft.Authorization/policyAssignments/1654a0254ab34920a60f94eb", - "PolicyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/655cb504-bcee-4362-bd4c-402e6aa38759", - "SubscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", - "ResourceGroup": "myrg2", - "ResourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg2/providers/Microsoft.Storage/storageAccounts/mysa2" + "timestamp": "2018-02-06T17:58:00Z", + "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/8cb1e007-947f-423a-ad0c-7ab7dc7d0255/providers/Microsoft.Authorization/policyAssignments/1654a0254ab34920a60f94eb", + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/655cb504-bcee-4362-bd4c-402e6aa38759", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceGroup": "myrg2", + "resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myrg2/providers/Microsoft.Storage/storageAccounts/mysa2" } ] } From 55e64b92fb810633a0a1b918c6c4cc234b9e9ea7 Mon Sep 17 00:00:00 2001 From: Bulent Elmaci Date: Fri, 23 Feb 2018 16:15:05 -0800 Subject: [PATCH 08/13] Fix additionalParameters definition; fix duplicate paths --- .../examples/QueryManagementGroupScope.json | 3 +- .../2017-08-09-preview/policyEvents.json | 38 ++- .../examples/QueryManagementGroupScope.json | 3 +- .../2017-10-17-preview/policyEvents.json | 37 ++- .../examples/QueryManagementGroupScope.json | 3 +- ...sourceGroupLevelPolicyAssignmentScope.json | 5 +- ...ubscriptionLevelPolicyAssignmentScope.json | 4 +- ...ubscriptionLevelPolicyDefinitionScope.json | 4 +- ...criptionLevelPolicySetDefinitionScope.json | 4 +- .../2017-12-12-preview/policyEvents.json | 178 ++++++++--- .../examples/QueryManagementGroupScope.json | 3 +- .../2017-08-09-preview/policyStates.json | 38 ++- .../examples/QueryManagementGroupScope.json | 3 +- .../2017-10-17-preview/policyStates.json | 37 ++- .../examples/QueryManagementGroupScope.json | 3 +- ...sourceGroupLevelPolicyAssignmentScope.json | 5 +- ...ubscriptionLevelPolicyAssignmentScope.json | 4 +- ...ubscriptionLevelPolicyDefinitionScope.json | 4 +- ...criptionLevelPolicySetDefinitionScope.json | 4 +- .../SummarizeManagementGroupScope.json | 3 +- ...sourceGroupLevelPolicyAssignmentScope.json | 49 +++ ...bscriptionLevelPolicyAssignmentScope.json} | 4 +- ...bscriptionLevelPolicyDefinitionScope.json} | 4 +- ...riptionLevelPolicySetDefinitionScope.json} | 4 +- .../2017-12-12-preview/policyStates.json | 284 ++++++++++++++---- 25 files changed, 563 insertions(+), 165 deletions(-) create mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceGroupLevelPolicyAssignmentScope.json rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/{SummarizePolicyAssignmentScope.json => SummarizeSubscriptionLevelPolicyAssignmentScope.json} (97%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/{SummarizePolicyDefinitionScope.json => SummarizeSubscriptionLevelPolicyDefinitionScope.json} (98%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/{SummarizePolicySetDefinitionScope.json => SummarizeSubscriptionLevelPolicySetDefinitionScope.json} (89%) diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryManagementGroupScope.json index 574fe6fb143f..b1f067647e55 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryManagementGroupScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryManagementGroupScope.json @@ -1,7 +1,8 @@ { "parameters": { "policyEventsResource": "default", - "managementGroupId": "providers/Microsoft.Management/managementGroups/myManagementGroup", + "managementGroupsNamespace": "Microsoft.Management", + "managementGroupName": "myManagementGroup", "api-version": "2017-08-09-preview" }, "responses": { diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/policyEvents.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/policyEvents.json index 05bca0b0d07b..4ec9e1a27d21 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/policyEvents.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/policyEvents.json @@ -30,7 +30,7 @@ } }, "paths": { - "/{managementGroupId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { + "/providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { "post": { "operationId": "PolicyEvents_ListQueryResultsForManagementGroup", "description": "Queries policy events for the resources under the management group.", @@ -39,7 +39,10 @@ "$ref": "#/parameters/policyEventsResourceParameter" }, { - "$ref": "#/parameters/managementGroupIdParameter" + "$ref": "#/parameters/managementGroupsNamespaceParameter" + }, + { + "$ref": "#/parameters/managementGroupNameParameter" }, { "$ref": "#/parameters/apiVersionParameter" @@ -316,6 +319,7 @@ } }, "columns": { + "type": "object", "description": "List of columns included in query results.", "properties": { "Timestamp": { @@ -425,14 +429,10 @@ "PrincipalOid": { "description": "Principal object ID for the user who initiated the resource operation that triggered the policy event.", "$ref": "#/definitions/Column" - }, - "ExtendedProperties": { - "type": "object", - "description": "The collection of extended properties, e.g. aggregates.", - "additionalProperties": { - "$ref": "#/definitions/Column" - } } + }, + "additionalProperties": { + "description": "The list of key/value pairs for the additional properties, in the format 'key':'value' where key = the field name, and value = the field value. By default this is not populated" } }, "rows": { @@ -539,14 +539,24 @@ "description": "The name of the virtual resource under PolicyEvents resource type; only \"default\" is allowed.", "x-ms-parameter-location": "method" }, - "managementGroupIdParameter": { - "name": "managementGroupId", + "managementGroupsNamespaceParameter": { + "name": "managementGroupsNamespace", "in": "path", "required": true, "type": "string", - "description": "Management group ID, e.g. /providers/Microsoft.Management/managementGroups/{name}.", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true + "enum": [ + "Microsoft.Management" + ], + "description": "The namespace for Microsoft Management resource provider; only \"Microsoft.Management\" is allowed.", + "x-ms-parameter-location": "method" + }, + "managementGroupNameParameter": { + "name": "managementGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Management group name.", + "x-ms-parameter-location": "method" }, "subscriptionIdParameter": { "name": "subscriptionId", diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json index bc316b27b29e..0d6f25644a88 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json @@ -1,7 +1,8 @@ { "parameters": { "policyEventsResource": "default", - "managementGroupId": "providers/Microsoft.Management/managementGroups/myManagementGroup", + "managementGroupsNamespace": "Microsoft.Management", + "managementGroupName": "myManagementGroup", "api-version": "2017-10-17-preview" }, "responses": { diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/policyEvents.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/policyEvents.json index e3810d594318..c2777a11d5da 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/policyEvents.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/policyEvents.json @@ -30,7 +30,7 @@ } }, "paths": { - "/{managementGroupId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { + "/providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { "post": { "operationId": "PolicyEvents_ListQueryResultsForManagementGroup", "description": "Queries policy events for the resources under the management group.", @@ -39,7 +39,10 @@ "$ref": "#/parameters/policyEventsResourceParameter" }, { - "$ref": "#/parameters/managementGroupIdParameter" + "$ref": "#/parameters/managementGroupsNamespaceParameter" + }, + { + "$ref": "#/parameters/managementGroupNameParameter" }, { "$ref": "#/parameters/apiVersionParameter" @@ -348,6 +351,7 @@ } }, "PolicyEvent": { + "type": "object", "description": "Policy event record.", "properties": { "@odata.id": { @@ -466,13 +470,10 @@ "principalOid": { "description": "Principal object ID for the user who initiated the resource operation that triggered the policy event.", "type": "string" - }, - "extendedProperties": { - "description": "The collection of extended properties, e.g. aggregates.", - "type": "object", - "additionalProperties": { - } } + }, + "additionalProperties": { + "description": "The list of key/value pairs for the additional properties, in the format 'key':'value' where key = the field name, and value = the field value. By default this is not populated" } }, "QueryFailure": { @@ -558,14 +559,24 @@ "description": "The name of the virtual resource under PolicyEvents resource type; only \"default\" is allowed.", "x-ms-parameter-location": "method" }, - "managementGroupIdParameter": { - "name": "managementGroupId", + "managementGroupsNamespaceParameter": { + "name": "managementGroupsNamespace", "in": "path", "required": true, "type": "string", - "description": "Management group ID, e.g. /providers/Microsoft.Management/managementGroups/{name}.", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true + "enum": [ + "Microsoft.Management" + ], + "description": "The namespace for Microsoft Management resource provider; only \"Microsoft.Management\" is allowed.", + "x-ms-parameter-location": "method" + }, + "managementGroupNameParameter": { + "name": "managementGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Management group name.", + "x-ms-parameter-location": "method" }, "subscriptionIdParameter": { "name": "subscriptionId", diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json index 8f8a041ed201..f8bb22eaf682 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json @@ -1,7 +1,8 @@ { "parameters": { "policyEventsResource": "default", - "managementGroupId": "providers/Microsoft.Management/managementGroups/myManagementGroup", + "managementGroupsNamespace": "Microsoft.Management", + "managementGroupName": "myManagementGroup", "api-version": "2017-12-12-preview" }, "responses": { diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json index 689cd22ab9e7..8d2fa1415698 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json @@ -1,7 +1,10 @@ { "parameters": { "policyEventsResource": "default", - "policyAssignmentId": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceGroupName": "myResourceGroup", + "authorizationNamespace": "Microsoft.Authorization", + "policyAssignmentName": "myPolicyAssignment", "api-version": "2017-12-12-preview" }, "responses": { diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json index dad565083ecd..f9e2e62aed51 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json @@ -1,7 +1,9 @@ { "parameters": { "policyEventsResource": "default", - "policyAssignmentId": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "authorizationNamespace": "Microsoft.Authorization", + "policyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", "api-version": "2017-12-12-preview" }, "responses": { diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json index 048e646e0b65..c6c7aa9644c2 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json @@ -1,7 +1,9 @@ { "parameters": { "policyEventsResource": "default", - "policyDefinitionId": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "authorizationNamespace": "Microsoft.Authorization", + "policyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", "api-version": "2017-12-12-preview" }, "responses": { diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json index 407220af986d..26b417ffb39e 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json @@ -1,7 +1,9 @@ { "parameters": { "policyEventsResource": "default", - "policySetDefinitionId": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "authorizationNamespace": "Microsoft.Authorization", + "policySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", "api-version": "2017-12-12-preview" }, "responses": { diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/policyEvents.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/policyEvents.json index d2157926abb8..88d02141a27c 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/policyEvents.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/policyEvents.json @@ -30,7 +30,7 @@ } }, "paths": { - "/{managementGroupId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { + "/providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { "post": { "operationId": "PolicyEvents_ListQueryResultsForManagementGroup", "description": "Queries policy events for the resources under the management group.", @@ -39,7 +39,10 @@ "$ref": "#/parameters/policyEventsResourceParameter" }, { - "$ref": "#/parameters/managementGroupIdParameter" + "$ref": "#/parameters/managementGroupsNamespaceParameter" + }, + { + "$ref": "#/parameters/managementGroupNameParameter" }, { "$ref": "#/parameters/apiVersionParameter" @@ -261,16 +264,22 @@ } } }, - "/{policySetDefinitionId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { + "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { "post": { "operationId": "PolicyEvents_ListQueryResultsForPolicySetDefinition", - "description": "Queries policy events for the policy set definition.", + "description": "Queries policy events for the subscription level policy set definition.", "parameters": [ { "$ref": "#/parameters/policyEventsResourceParameter" }, { - "$ref": "#/parameters/policySetDefinitionIdParameter" + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/authorizationNamespaceParameter" + }, + { + "$ref": "#/parameters/policySetDefinitionNameParameter" }, { "$ref": "#/parameters/apiVersionParameter" @@ -316,16 +325,22 @@ } } }, - "/{policyDefinitionId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { + "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { "post": { "operationId": "PolicyEvents_ListQueryResultsForPolicyDefinition", - "description": "Queries policy events for the policy definition.", + "description": "Queries policy events for the subscription level policy definition.", "parameters": [ { "$ref": "#/parameters/policyEventsResourceParameter" }, { - "$ref": "#/parameters/policyDefinitionIdParameter" + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/authorizationNamespaceParameter" + }, + { + "$ref": "#/parameters/policyDefinitionNameParameter" }, { "$ref": "#/parameters/apiVersionParameter" @@ -371,16 +386,86 @@ } } }, - "/{policyAssignmentId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { + "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { + "post": { + "operationId": "PolicyEvents_ListQueryResultsForSubscriptionLevelPolicyAssignment", + "description": "Queries policy events for the subscription level policy assignment.", + "parameters": [ + { + "$ref": "#/parameters/policyEventsResourceParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/authorizationNamespaceParameter" + }, + { + "$ref": "#/parameters/policyAssignmentNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyEventsQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query at subscription level policy assignment scope": { "$ref": "./examples/QuerySubscriptionLevelPolicyAssignmentScope.json" } + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { "post": { - "operationId": "PolicyEvents_ListQueryResultsForPolicyAssignment", - "description": "Queries policy events for the policy assignment.", + "operationId": "PolicyEvents_ListQueryResultsForResourceGroupLevelPolicyAssignment", + "description": "Queries policy events for the resource group level policy assignment.", "parameters": [ { "$ref": "#/parameters/policyEventsResourceParameter" }, { - "$ref": "#/parameters/policyAssignmentIdParameter" + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/authorizationNamespaceParameter" + }, + { + "$ref": "#/parameters/policyAssignmentNameParameter" }, { "$ref": "#/parameters/apiVersionParameter" @@ -422,7 +507,6 @@ } }, "x-ms-examples": { - "Query at subscription level policy assignment scope": { "$ref": "./examples/QuerySubscriptionLevelPolicyAssignmentScope.json" }, "Query at resource group level policy assignment scope": { "$ref": "./examples/QueryResourceGroupLevelPolicyAssignmentScope.json" } } } @@ -514,6 +598,7 @@ } }, "PolicyEvent": { + "type": "object", "description": "Policy event record.", "properties": { "@odata.id": { @@ -632,13 +717,10 @@ "principalOid": { "description": "Principal object ID for the user who initiated the resource operation that triggered the policy event.", "type": "string" - }, - "extendedProperties": { - "description": "The collection of extended properties, e.g. aggregates.", - "type": "object", - "additionalProperties": { - } } + }, + "additionalProperties": { + "description": "The list of key/value pairs for the additional properties, in the format 'key':'value' where key = the field name, and value = the field value. By default this is not populated" } }, "QueryFailure": { @@ -724,14 +806,24 @@ "description": "The name of the virtual resource under PolicyEvents resource type; only \"default\" is allowed.", "x-ms-parameter-location": "method" }, - "managementGroupIdParameter": { - "name": "managementGroupId", + "managementGroupsNamespaceParameter": { + "name": "managementGroupsNamespace", "in": "path", "required": true, "type": "string", - "description": "Management group ID, e.g. /providers/Microsoft.Management/managementGroups/{name}.", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true + "enum": [ + "Microsoft.Management" + ], + "description": "The namespace for Microsoft Management RP; only \"Microsoft.Management\" is allowed.", + "x-ms-parameter-location": "method" + }, + "managementGroupNameParameter": { + "name": "managementGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Management group name.", + "x-ms-parameter-location": "method" }, "subscriptionIdParameter": { "name": "subscriptionId", @@ -758,32 +850,40 @@ "x-ms-parameter-location": "method", "x-ms-skip-url-encoding": true }, - "policySetDefinitionIdParameter": { - "name": "policySetDefinitionId", + "authorizationNamespaceParameter": { + "name": "authorizationNamespace", "in": "path", "required": true, "type": "string", - "description": "Subscription level policy set definition ID.", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true + "enum": [ + "Microsoft.Authorization" + ], + "description": "The namespace for Microsoft Authorization resource provider; only \"Microsoft.Authorization\" is allowed.", + "x-ms-parameter-location": "method" }, - "policyDefinitionIdParameter": { - "name": "policyDefinitionId", + "policySetDefinitionNameParameter": { + "name": "policySetDefinitionName", "in": "path", "required": true, "type": "string", - "description": "Subscription level policy definition ID.", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true + "description": "Policy set definition name.", + "x-ms-parameter-location": "method" }, - "policyAssignmentIdParameter": { - "name": "policyAssignmentId", + "policyDefinitionNameParameter": { + "name": "policyDefinitionName", "in": "path", "required": true, "type": "string", - "description": "Subscription level or a resource group level policy assignment ID.", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true + "description": "Policy definition name.", + "x-ms-parameter-location": "method" + }, + "policyAssignmentNameParameter": { + "name": "policyAssignmentName", + "in": "path", + "required": true, + "type": "string", + "description": "Policy assignment name.", + "x-ms-parameter-location": "method" }, "scopeParameter": { "name": "scope", diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryManagementGroupScope.json index 3c7b1026693a..b8fd01144798 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryManagementGroupScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryManagementGroupScope.json @@ -1,7 +1,8 @@ { "parameters": { "policyStatesResource": "latest", - "managementGroupId": "providers/Microsoft.Management/managementGroups/myManagementGroup", + "managementGroupsNamespace": "Microsoft.Management", + "managementGroupName": "myManagementGroup", "api-version": "2017-08-09-preview" }, "responses": { diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/policyStates.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/policyStates.json index 972da9e98edf..d59ae97be095 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/policyStates.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/policyStates.json @@ -30,7 +30,7 @@ } }, "paths": { - "/{managementGroupId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { + "/providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { "post": { "operationId": "PolicyStates_ListQueryResultsForManagementGroup", "description": "Queries policy states for the resources under the management group.", @@ -39,7 +39,10 @@ "$ref": "#/parameters/policyStatesResourceParameter" }, { - "$ref": "#/parameters/managementGroupIdParameter" + "$ref": "#/parameters/managementGroupsNamespaceParameter" + }, + { + "$ref": "#/parameters/managementGroupNameParameter" }, { "$ref": "#/parameters/apiVersionParameter" @@ -316,6 +319,7 @@ } }, "columns": { + "type": "object", "description": "List of columns included in query results.", "properties": { "Timestamp": { @@ -417,14 +421,10 @@ "PolicyDefinitionReferenceId": { "description": "Reference ID for the policy definition inside the policy set, if the policy assignment is for a policy set.", "$ref": "#/definitions/Column" - }, - "ExtendedProperties": { - "type": "object", - "description": "The collection of extended properties, e.g. aggregates.", - "additionalProperties": { - "$ref": "#/definitions/Column" - } } + }, + "additionalProperties": { + "description": "The list of key/value pairs for the additional properties, in the format 'key':'value' where key = the field name, and value = the field value. By default this is not populated" } }, "rows": { @@ -536,14 +536,24 @@ "description": "The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).", "x-ms-parameter-location": "method" }, - "managementGroupIdParameter": { - "name": "managementGroupId", + "managementGroupsNamespaceParameter": { + "name": "managementGroupsNamespace", "in": "path", "required": true, "type": "string", - "description": "Management group ID, e.g. /providers/Microsoft.Management/managementGroups/{name}.", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true + "enum": [ + "Microsoft.Management" + ], + "description": "The namespace for Microsoft Management resource provider; only \"Microsoft.Management\" is allowed.", + "x-ms-parameter-location": "method" + }, + "managementGroupNameParameter": { + "name": "managementGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Management group name.", + "x-ms-parameter-location": "method" }, "subscriptionIdParameter": { "name": "subscriptionId", diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json index 6740f1c4ad0f..c14cf9a26164 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json @@ -1,7 +1,8 @@ { "parameters": { "policyStatesResource": "latest", - "managementGroupId": "providers/Microsoft.Management/managementGroups/myManagementGroup", + "managementGroupsNamespace": "Microsoft.Management", + "managementGroupName": "myManagementGroup", "api-version": "2017-10-17-preview" }, "responses": { diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/policyStates.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/policyStates.json index ef0e2074d7dc..1045dba699eb 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/policyStates.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/policyStates.json @@ -30,7 +30,7 @@ } }, "paths": { - "/{managementGroupId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { + "/providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { "post": { "operationId": "PolicyStates_ListQueryResultsForManagementGroup", "description": "Queries policy states for the resources under the management group.", @@ -39,7 +39,10 @@ "$ref": "#/parameters/policyStatesResourceParameter" }, { - "$ref": "#/parameters/managementGroupIdParameter" + "$ref": "#/parameters/managementGroupsNamespaceParameter" + }, + { + "$ref": "#/parameters/managementGroupNameParameter" }, { "$ref": "#/parameters/apiVersionParameter" @@ -348,6 +351,7 @@ } }, "PolicyState": { + "type": "object", "description": "Policy state record.", "properties": { "@odata.id": { @@ -458,13 +462,10 @@ "policyDefinitionReferenceId": { "description": "Reference ID for the policy definition inside the policy set, if the policy assignment is for a policy set.", "type": "string" - }, - "extendedProperties": { - "description": "The collection of extended properties, e.g. aggregates.", - "type": "object", - "additionalProperties": { - } } + }, + "additionalProperties": { + "description": "The list of key/value pairs for the additional properties, in the format 'key':'value' where key = the field name, and value = the field value. By default this is not populated" } }, "QueryFailure": { @@ -555,14 +556,24 @@ "description": "The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).", "x-ms-parameter-location": "method" }, - "managementGroupIdParameter": { - "name": "managementGroupId", + "managementGroupsNamespaceParameter": { + "name": "managementGroupsNamespace", "in": "path", "required": true, "type": "string", - "description": "Management group ID, e.g. /providers/Microsoft.Management/managementGroups/{name}.", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true + "enum": [ + "Microsoft.Management" + ], + "description": "The namespace for Microsoft Management resource provider; only \"Microsoft.Management\" is allowed.", + "x-ms-parameter-location": "method" + }, + "managementGroupNameParameter": { + "name": "managementGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Management group name.", + "x-ms-parameter-location": "method" }, "subscriptionIdParameter": { "name": "subscriptionId", diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json index 38584b03bf6a..efe90a0008d0 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json @@ -1,7 +1,8 @@ { "parameters": { "policyStatesResource": "latest", - "managementGroupId": "providers/Microsoft.Management/managementGroups/myManagementGroup", + "managementGroupsNamespace": "Microsoft.Management", + "managementGroupName": "myManagementGroup", "api-version": "2017-12-12-preview" }, "responses": { diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json index aad36ab77595..40bab8a3e9d5 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json @@ -1,7 +1,10 @@ { "parameters": { "policyStatesResource": "latest", - "policyAssignmentId": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceGroupName": "myResourceGroup", + "authorizationNamespace": "Microsoft.Authorization", + "policyAssignmentName": "myPolicyAssignment", "api-version": "2017-12-12-preview" }, "responses": { diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json index a9607c4eee48..f95cc04233bb 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json @@ -1,7 +1,9 @@ { "parameters": { "policyStatesResource": "latest", - "policyAssignmentId": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "authorizationNamespace": "Microsoft.Authorization", + "policyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", "api-version": "2017-12-12-preview" }, "responses": { diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json index cbee57e61261..e7628e99e314 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json @@ -1,7 +1,9 @@ { "parameters": { "policyStatesResource": "latest", - "policyDefinitionId": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "authorizationNamespace": "Microsoft.Authorization", + "policyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", "api-version": "2017-12-12-preview" }, "responses": { diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json index 895eec5d6cc2..61a473d612c6 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json @@ -1,7 +1,9 @@ { "parameters": { "policyStatesResource": "latest", - "policySetDefinitionId": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "authorizationNamespace": "Microsoft.Authorization", + "policySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", "api-version": "2017-12-12-preview" }, "responses": { diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeManagementGroupScope.json index 79bae0a915b0..1aacf3df0b2a 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeManagementGroupScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeManagementGroupScope.json @@ -1,7 +1,8 @@ { "parameters": { "policyStatesSummaryResource": "latest", - "managementGroupId": "providers/Microsoft.Management/managementGroups/myManagementGroup", + "managementGroupsNamespace": "Microsoft.Management", + "managementGroupName": "myManagementGroup", "api-version": "2017-12-12-preview", "$from": "2018-02-05T18:00:00Z", "$to": "2018-02-06T18:00:00Z", diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceGroupLevelPolicyAssignmentScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceGroupLevelPolicyAssignmentScope.json new file mode 100644 index 000000000000..09f4625afaba --- /dev/null +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceGroupLevelPolicyAssignmentScope.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "policyStatesSummaryResource": "latest", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "resourceGroupName": "myResourceGroup", + "authorizationNamespace": "Microsoft.Authorization", + "policyAssignmentName": "b7a1ca2596524e3ab19597f2", + "api-version": "2017-12-12-preview" + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/b7a1ca2596524e3ab19597f2/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary", + "@odata.count": 1, + "value": [ + { + "@odata.id": null, + "@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/b7a1ca2596524e3ab19597f2/providers/Microsoft.PolicyInsights/policyStates/$metadata#summary/$entity", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/b7a1ca2596524e3ab19597f2/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-22 23:54:22Z&$to=2018-02-23 23:54:22Z&$filter=IsCompliant eq false", + "nonCompliantResources": 7, + "nonCompliantPolicies": 1 + }, + "policyAssignments": [ + { + "policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.authorization/policyassignments/b7a1ca2596524e3ab19597f2", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/b7a1ca2596524e3ab19597f2/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-22 23:54:22Z&$to=2018-02-23 23:54:22Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.authorization/policyassignments/b7a1ca2596524e3ab19597f2'", + "nonCompliantResources": 7, + "nonCompliantPolicies": 1 + }, + "policyDefinitions": [ + { + "policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/4a0425e4-97bf-4ad0-ab36-145b94083c60", + "effect": "audit", + "results": { + "queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/b7a1ca2596524e3ab19597f2/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2017-12-12-preview&$from=2018-02-22 23:54:22Z&$to=2018-02-23 23:54:22Z&$filter=IsCompliant eq false and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/microsoft.authorization/policyassignments/b7a1ca2596524e3ab19597f2' and PolicyDefinitionId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/4a0425e4-97bf-4ad0-ab36-145b94083c60'", + "nonCompliantResources": 7 + } + } + ] + } + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicyAssignmentScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionLevelPolicyAssignmentScope.json similarity index 97% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicyAssignmentScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionLevelPolicyAssignmentScope.json index 704d4595584d..827514a8d3cd 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicyAssignmentScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionLevelPolicyAssignmentScope.json @@ -1,7 +1,9 @@ { "parameters": { "policyStatesSummaryResource": "latest", - "policyAssignmentId": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "authorizationNamespace": "Microsoft.Authorization", + "policyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003", "api-version": "2017-12-12-preview" }, "responses": { diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicyDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionLevelPolicyDefinitionScope.json similarity index 98% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicyDefinitionScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionLevelPolicyDefinitionScope.json index 31a618249131..11c50f5e2540 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicyDefinitionScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionLevelPolicyDefinitionScope.json @@ -1,7 +1,9 @@ { "parameters": { "policyStatesSummaryResource": "latest", - "policyDefinitionId": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "authorizationNamespace": "Microsoft.Authorization", + "policyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1", "api-version": "2017-12-12-preview" }, "responses": { diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicySetDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionLevelPolicySetDefinitionScope.json similarity index 89% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicySetDefinitionScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionLevelPolicySetDefinitionScope.json index 1ff2cc46e86b..6b609fed669d 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizePolicySetDefinitionScope.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionLevelPolicySetDefinitionScope.json @@ -1,7 +1,9 @@ { "parameters": { "policyStatesSummaryResource": "latest", - "policySetDefinitionId": "subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c", + "subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852", + "authorizationNamespace": "Microsoft.Authorization", + "policySetDefinitionName": "3e3807c1-65c9-49e0-a406-82d8ae3e338c", "api-version": "2017-12-12-preview", "$from": "2018-02-05T18:00:00Z", "$to": "2018-02-06T18:00:00Z", diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/policyStates.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/policyStates.json index 4839db83ff08..ff60596be33e 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/policyStates.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/policyStates.json @@ -30,7 +30,7 @@ } }, "paths": { - "/{managementGroupId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { + "/providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { "post": { "operationId": "PolicyStates_ListQueryResultsForManagementGroup", "description": "Queries policy states for the resources under the management group.", @@ -39,7 +39,10 @@ "$ref": "#/parameters/policyStatesResourceParameter" }, { - "$ref": "#/parameters/managementGroupIdParameter" + "$ref": "#/parameters/managementGroupsNamespaceParameter" + }, + { + "$ref": "#/parameters/managementGroupNameParameter" }, { "$ref": "#/parameters/apiVersionParameter" @@ -85,7 +88,7 @@ } } }, - "/{managementGroupId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { + "/providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { "post": { "operationId": "PolicyStates_SummarizeForManagementGroup", "description": "Summarizes policy states for the resources under the management group.", @@ -94,7 +97,10 @@ "$ref": "#/parameters/policyStatesSummaryResourceParameter" }, { - "$ref": "#/parameters/managementGroupIdParameter" + "$ref": "#/parameters/managementGroupsNamespaceParameter" + }, + { + "$ref": "#/parameters/managementGroupNameParameter" }, { "$ref": "#/parameters/apiVersionParameter" @@ -448,16 +454,22 @@ } } }, - "/{policySetDefinitionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { + "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { "post": { "operationId": "PolicyStates_ListQueryResultsForPolicySetDefinition", - "description": "Queries policy states for the policy set definition.", + "description": "Queries policy states for the subscription level policy set definition.", "parameters": [ { "$ref": "#/parameters/policyStatesResourceParameter" }, { - "$ref": "#/parameters/policySetDefinitionIdParameter" + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/authorizationNamespaceParameter" + }, + { + "$ref": "#/parameters/policySetDefinitionNameParameter" }, { "$ref": "#/parameters/apiVersionParameter" @@ -503,16 +515,22 @@ } } }, - "/{policySetDefinitionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { + "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { "post": { "operationId": "PolicyStates_SummarizeForPolicySetDefinition", - "description": "Summarizes policy states for the policy set definition.", + "description": "Summarizes policy states for the subscription level policy set definition.", "parameters": [ { "$ref": "#/parameters/policyStatesSummaryResourceParameter" }, { - "$ref": "#/parameters/policySetDefinitionIdParameter" + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/authorizationNamespaceParameter" + }, + { + "$ref": "#/parameters/policySetDefinitionNameParameter" }, { "$ref": "#/parameters/apiVersionParameter" @@ -545,20 +563,26 @@ } }, "x-ms-examples": { - "Summarize at policy set definition scope": { "$ref": "./examples/SummarizePolicySetDefinitionScope.json" } + "Summarize at policy set definition scope": { "$ref": "./examples/SummarizeSubscriptionLevelPolicySetDefinitionScope.json" } } } }, - "/{policyDefinitionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { + "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { "post": { "operationId": "PolicyStates_ListQueryResultsForPolicyDefinition", - "description": "Queries policy states for the policy definition.", + "description": "Queries policy states for the subscription level policy definition.", "parameters": [ { "$ref": "#/parameters/policyStatesResourceParameter" }, { - "$ref": "#/parameters/policyDefinitionIdParameter" + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/authorizationNamespaceParameter" + }, + { + "$ref": "#/parameters/policyDefinitionNameParameter" }, { "$ref": "#/parameters/apiVersionParameter" @@ -604,16 +628,135 @@ } } }, - "/{policyDefinitionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { + "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { "post": { "operationId": "PolicyStates_SummarizeForPolicyDefinition", - "description": "Summarizes policy states for the policy definition.", + "description": "Summarizes policy states for the subscription level policy definition.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesSummaryResourceParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/authorizationNamespaceParameter" + }, + { + "$ref": "#/parameters/policyDefinitionNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + } + ], + "responses": { + "200": { + "description": "Summarize results.", + "schema": { + "$ref": "#/definitions/SummarizeResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Summarize at policy definition scope": { "$ref": "./examples/SummarizeSubscriptionLevelPolicyDefinitionScope.json" } + } + } + }, + "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { + "post": { + "operationId": "PolicyStates_ListQueryResultsForSubscriptionLevelPolicyAssignment", + "description": "Queries policy states for the subscription level policy assignment.", + "parameters": [ + { + "$ref": "#/parameters/policyStatesResourceParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/authorizationNamespaceParameter" + }, + { + "$ref": "#/parameters/policyAssignmentNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/topParameter" + }, + { + "$ref": "#/parameters/orderByParameter" + }, + { + "$ref": "#/parameters/selectParameter" + }, + { + "$ref": "#/parameters/fromParameter" + }, + { + "$ref": "#/parameters/toParameter" + }, + { + "$ref": "#/parameters/filterParameter" + }, + { + "$ref": "#/parameters/applyParameter" + } + ], + "responses": { + "200": { + "description": "Query results.", + "schema": { + "$ref": "#/definitions/PolicyStatesQueryResults" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/QueryFailure" + } + } + }, + "x-ms-examples": { + "Query latest at subscription level policy assignment scope": { "$ref": "./examples/QuerySubscriptionLevelPolicyAssignmentScope.json" } + } + } + }, + "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { + "post": { + "operationId": "PolicyStates_SummarizeForSubscriptionLevelPolicyAssignment", + "description": "Summarizes policy states for the subscription level policy assignment.", "parameters": [ { "$ref": "#/parameters/policyStatesSummaryResourceParameter" }, { - "$ref": "#/parameters/policyDefinitionIdParameter" + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/authorizationNamespaceParameter" + }, + { + "$ref": "#/parameters/policyAssignmentNameParameter" }, { "$ref": "#/parameters/apiVersionParameter" @@ -646,20 +789,29 @@ } }, "x-ms-examples": { - "Summarize at policy definition scope": { "$ref": "./examples/SummarizePolicyDefinitionScope.json" } + "Summarize at policy assignment scope": { "$ref": "./examples/SummarizeSubscriptionLevelPolicyAssignmentScope.json" } } } }, - "/{policyAssignmentId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { "post": { - "operationId": "PolicyStates_ListQueryResultsForPolicyAssignment", - "description": "Queries policy states for the policy assignment.", + "operationId": "PolicyStates_ListQueryResultsForResourceGroupLevelPolicyAssignment", + "description": "Queries policy states for the resource group level policy assignment.", "parameters": [ { "$ref": "#/parameters/policyStatesResourceParameter" }, { - "$ref": "#/parameters/policyAssignmentIdParameter" + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/authorizationNamespaceParameter" + }, + { + "$ref": "#/parameters/policyAssignmentNameParameter" }, { "$ref": "#/parameters/apiVersionParameter" @@ -701,21 +853,29 @@ } }, "x-ms-examples": { - "Query latest at subscription level policy assignment scope": { "$ref": "./examples/QuerySubscriptionLevelPolicyAssignmentScope.json" }, "Query latest at resource group level policy assignment scope": { "$ref": "./examples/QueryResourceGroupLevelPolicyAssignmentScope.json" } } } }, - "/{policyAssignmentId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { "post": { - "operationId": "PolicyStates_SummarizeForPolicyAssignment", - "description": "Summarizes policy states for the policy assignment.", + "operationId": "PolicyStates_SummarizeForResourceGroupLevelPolicyAssignment", + "description": "Summarizes policy states for the resource group level policy assignment.", "parameters": [ { "$ref": "#/parameters/policyStatesSummaryResourceParameter" }, { - "$ref": "#/parameters/policyAssignmentIdParameter" + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/authorizationNamespaceParameter" + }, + { + "$ref": "#/parameters/policyAssignmentNameParameter" }, { "$ref": "#/parameters/apiVersionParameter" @@ -748,7 +908,7 @@ } }, "x-ms-examples": { - "Summarize at policy assignment scope": { "$ref": "./examples/SummarizePolicyAssignmentScope.json" } + "Summarize at policy assignment scope": { "$ref": "./examples/SummarizeResourceGroupLevelPolicyAssignmentScope.json" } } } }, @@ -839,6 +999,7 @@ } }, "PolicyState": { + "type": "object", "description": "Policy state record.", "properties": { "@odata.id": { @@ -949,13 +1110,10 @@ "policyDefinitionReferenceId": { "description": "Reference ID for the policy definition inside the policy set, if the policy assignment is for a policy set.", "type": "string" - }, - "extendedProperties": { - "description": "The collection of extended properties, e.g. aggregates.", - "type": "object", - "additionalProperties": { - } } + }, + "additionalProperties": { + "description": "The list of key/value pairs for the additional properties, in the format 'key':'value' where key = the field name, and value = the field value. By default this is not populated" } }, "SummarizeResults": { @@ -1166,14 +1324,24 @@ "description": "The virtual resource under PolicyStates resource type for summarize action. In a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.", "x-ms-parameter-location": "method" }, - "managementGroupIdParameter": { - "name": "managementGroupId", + "managementGroupsNamespaceParameter": { + "name": "managementGroupsNamespace", "in": "path", "required": true, "type": "string", - "description": "Management group ID, e.g. /providers/Microsoft.Management/managementGroups/{name}.", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true + "enum": [ + "Microsoft.Management" + ], + "description": "The namespace for Microsoft Management RP; only \"Microsoft.Management\" is allowed.", + "x-ms-parameter-location": "method" + }, + "managementGroupNameParameter": { + "name": "managementGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Management group name.", + "x-ms-parameter-location": "method" }, "subscriptionIdParameter": { "name": "subscriptionId", @@ -1200,32 +1368,40 @@ "x-ms-parameter-location": "method", "x-ms-skip-url-encoding": true }, - "policySetDefinitionIdParameter": { - "name": "policySetDefinitionId", + "authorizationNamespaceParameter": { + "name": "authorizationNamespace", "in": "path", "required": true, "type": "string", - "description": "Subscription level policy set definition ID.", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true + "enum": [ + "Microsoft.Authorization" + ], + "description": "The namespace for Microsoft Authorization resource provider; only \"Microsoft.Authorization\" is allowed.", + "x-ms-parameter-location": "method" }, - "policyDefinitionIdParameter": { - "name": "policyDefinitionId", + "policySetDefinitionNameParameter": { + "name": "policySetDefinitionName", "in": "path", "required": true, "type": "string", - "description": "Subscription level policy definition ID.", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true + "description": "Policy set definition name.", + "x-ms-parameter-location": "method" }, - "policyAssignmentIdParameter": { - "name": "policyAssignmentId", + "policyDefinitionNameParameter": { + "name": "policyDefinitionName", "in": "path", "required": true, "type": "string", - "description": "Subscription level or a resource group level policy assignment ID.", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true + "description": "Policy definition name.", + "x-ms-parameter-location": "method" + }, + "policyAssignmentNameParameter": { + "name": "policyAssignmentName", + "in": "path", + "required": true, + "type": "string", + "description": "Policy assignment name.", + "x-ms-parameter-location": "method" }, "scopeParameter": { "name": "scope", From a01973b3be2e1a8c0fd6a05e3d3472cd37a99c98 Mon Sep 17 00:00:00 2001 From: Bulent Elmaci Date: Tue, 27 Feb 2018 14:48:29 -0800 Subject: [PATCH 09/13] Remove redundant operations path/definitions from one of the swagger files for each version (one per namespace is sufficient as long as both files are fed into autorest as a bundle) --- .../examples/ListOperations.json | 40 ---------- .../2017-08-09-preview/policyEvents.json | 70 ----------------- .../examples/ListOperations.json | 41 ---------- .../2017-10-17-preview/policyEvents.json | 76 ------------------- .../examples/ListOperations.json | 50 ------------ .../2017-12-12-preview/policyEvents.json | 76 ------------------- 6 files changed, 353 deletions(-) delete mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/ListOperations.json delete mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/ListOperations.json delete mode 100644 specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/ListOperations.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/ListOperations.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/ListOperations.json deleted file mode 100644 index d5a2b53cb332..000000000000 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/ListOperations.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "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." - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/policyEvents.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/policyEvents.json index 4ec9e1a27d21..c210b4653b4d 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/policyEvents.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/policyEvents.json @@ -263,34 +263,6 @@ "Query at subscription level nested resource scope": { "$ref": "./examples/QuerySubscriptionLevelNestedResourceScope.json" } } } - }, - "/providers/Microsoft.PolicyInsights/operations": { - "get": { - "operationId": "PolicyInsights_ListOperations", - "description": "Lists available operations.", - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - } - ], - "responses": { - "200": { - "description": "List of available operations.", - "schema": { - "$ref": "#/definitions/Operations" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/QueryFailure" - } - } - }, - "x-ms-examples": { - "List operations": { "$ref": "./examples/ListOperations.json" } - } - } } }, "definitions": { @@ -483,48 +455,6 @@ } } } - }, - "Operations": { - "description": "List of available operations.", - "properties": { - "value": { - "description": "List of available operations.", - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - } - } - } - }, - "Operation": { - "description": "Operation definition.", - "properties": { - "name": { - "description": "Operation name.", - "type": "string" - }, - "display": { - "description": "Display metadata associated with the operation.", - "properties": { - "provider": { - "description": "Resource provider name.", - "type": "string" - }, - "resource": { - "description": "Resource name on which the operation is performed.", - "type": "string" - }, - "operation": { - "description": "Operation name.", - "type": "string" - }, - "description": { - "description": "Operation description.", - "type": "string" - } - } - } - } } }, "parameters": { diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/ListOperations.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/ListOperations.json deleted file mode 100644 index 7dfa6867003f..000000000000 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/ListOperations.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "parameters": { - "api-version": "2017-10-17-preview" - }, - "responses": { - "200": { - "body": { - "@odata.count": 3, - "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." - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/policyEvents.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/policyEvents.json index c2777a11d5da..92ae30f6b40b 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/policyEvents.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/policyEvents.json @@ -264,34 +264,6 @@ } } }, - "/providers/Microsoft.PolicyInsights/operations": { - "get": { - "operationId": "PolicyInsights_ListOperations", - "description": "Lists available operations.", - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - } - ], - "responses": { - "200": { - "description": "List of available operations.", - "schema": { - "$ref": "#/definitions/Operations" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/QueryFailure" - } - } - }, - "x-ms-examples": { - "List operations": { "$ref": "./examples/ListOperations.json" } - } - } - }, "/{scope}/providers/Microsoft.PolicyInsights/policyEvents/$metadata": { "get": { "operationId": "PolicyEvents_GetMetadata", @@ -494,54 +466,6 @@ } } }, - "Operations": { - "description": "List of available operations.", - "properties": { - "@odata.count": { - "description": "OData entity count; represents the number of operations returned.", - "type": "integer", - "format": "int32", - "minimum": 1 - }, - "value": { - "description": "List of available operations.", - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - } - } - } - }, - "Operation": { - "description": "Operation definition.", - "properties": { - "name": { - "description": "Operation name.", - "type": "string" - }, - "display": { - "description": "Display metadata associated with the operation.", - "properties": { - "provider": { - "description": "Resource provider name.", - "type": "string" - }, - "resource": { - "description": "Resource name on which the operation is performed.", - "type": "string" - }, - "operation": { - "description": "Operation name.", - "type": "string" - }, - "description": { - "description": "Operation description.", - "type": "string" - } - } - } - } - }, "MetadataDocument": { "description": "Metadata XML document.", "type": "string" diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/ListOperations.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/ListOperations.json deleted file mode 100644 index 3de5d287b34c..000000000000 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/ListOperations.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "parameters": { - "api-version": "2017-12-12-preview" - }, - "responses": { - "200": { - "body": { - "@odata.count": 4, - "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." - } - }, - { - "name": "latest/summarize/action", - "display": { - "provider": "Microsoft Policy Insights", - "resource": "Policy Latest States", - "operation": "Query Policy Latest States Summary", - "description": "Query summary information about policy latest states." - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/policyEvents.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/policyEvents.json index 88d02141a27c..0de99f15635e 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/policyEvents.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/policyEvents.json @@ -511,34 +511,6 @@ } } }, - "/providers/Microsoft.PolicyInsights/operations": { - "get": { - "operationId": "PolicyInsights_ListOperations", - "description": "Lists available operations.", - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - } - ], - "responses": { - "200": { - "description": "List of available operations.", - "schema": { - "$ref": "#/definitions/Operations" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/QueryFailure" - } - } - }, - "x-ms-examples": { - "List operations": { "$ref": "./examples/ListOperations.json" } - } - } - }, "/{scope}/providers/Microsoft.PolicyInsights/policyEvents/$metadata": { "get": { "operationId": "PolicyEvents_GetMetadata", @@ -741,54 +713,6 @@ } } }, - "Operations": { - "description": "List of available operations.", - "properties": { - "@odata.count": { - "description": "OData entity count; represents the number of operations returned.", - "type": "integer", - "format": "int32", - "minimum": 1 - }, - "value": { - "description": "List of available operations.", - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - } - } - } - }, - "Operation": { - "description": "Operation definition.", - "properties": { - "name": { - "description": "Operation name.", - "type": "string" - }, - "display": { - "description": "Display metadata associated with the operation.", - "properties": { - "provider": { - "description": "Resource provider name.", - "type": "string" - }, - "resource": { - "description": "Resource name on which the operation is performed.", - "type": "string" - }, - "operation": { - "description": "Operation name.", - "type": "string" - }, - "description": { - "description": "Operation description.", - "type": "string" - } - } - } - } - }, "MetadataDocument": { "description": "Metadata XML document.", "type": "string" From 0ace4e94ee046dc7783215f54ae0876a8ce84c20 Mon Sep 17 00:00:00 2001 From: Bulent Elmaci Date: Wed, 28 Feb 2018 14:26:36 -0800 Subject: [PATCH 10/13] Change group name for operations path, and rename response type definition --- .../preview/2017-12-12-preview/policyStates.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/policyStates.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/policyStates.json index ff60596be33e..3f9451d787ee 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/policyStates.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/policyStates.json @@ -914,7 +914,7 @@ }, "/providers/Microsoft.PolicyInsights/operations": { "get": { - "operationId": "PolicyInsights_ListOperations", + "operationId": "Operations_List", "description": "Lists available operations.", "parameters": [ { @@ -925,7 +925,7 @@ "200": { "description": "List of available operations.", "schema": { - "$ref": "#/definitions/Operations" + "$ref": "#/definitions/OperationsListResults" } }, "default": { @@ -1243,7 +1243,7 @@ } } }, - "Operations": { + "OperationsListResults": { "description": "List of available operations.", "properties": { "@odata.count": { From 4bd6443dbb40bbcd367a716607357d2818e51862 Mon Sep 17 00:00:00 2001 From: Bulent Elmaci Date: Wed, 28 Feb 2018 14:31:59 -0800 Subject: [PATCH 11/13] Change group name for operations path, and rename response type definition (old API versions) --- .../preview/2017-08-09-preview/policyStates.json | 6 +++--- .../preview/2017-10-17-preview/policyStates.json | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/policyStates.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/policyStates.json index d59ae97be095..888b5f4b53c3 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/policyStates.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/policyStates.json @@ -266,7 +266,7 @@ }, "/providers/Microsoft.PolicyInsights/operations": { "get": { - "operationId": "PolicyInsights_ListOperations", + "operationId": "Operations_List", "description": "Lists available operations.", "parameters": [ { @@ -277,7 +277,7 @@ "200": { "description": "List of available operations.", "schema": { - "$ref": "#/definitions/Operations" + "$ref": "#/definitions/OperationsListResults" } }, "default": { @@ -476,7 +476,7 @@ } } }, - "Operations": { + "OperationsListResults": { "description": "List of available operations.", "properties": { "value": { diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/policyStates.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/policyStates.json index 1045dba699eb..8cebdac734aa 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/policyStates.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/policyStates.json @@ -266,7 +266,7 @@ }, "/providers/Microsoft.PolicyInsights/operations": { "get": { - "operationId": "PolicyInsights_ListOperations", + "operationId": "Operations_List", "description": "Lists available operations.", "parameters": [ { @@ -277,7 +277,7 @@ "200": { "description": "List of available operations.", "schema": { - "$ref": "#/definitions/Operations" + "$ref": "#/definitions/OperationsListResults" } }, "default": { @@ -486,7 +486,7 @@ } } }, - "Operations": { + "OperationsListResults": { "description": "List of available operations.", "properties": { "@odata.count": { From 648b3651cc044b52ce58431a57ba3b7f7392fc2d Mon Sep 17 00:00:00 2001 From: Bulent Elmaci Date: Tue, 6 Mar 2018 10:24:38 -0800 Subject: [PATCH 12/13] Reorganize files; change modelAsString for x-ms-enum to true Reorganize files (remove resource type based subfolders; rename conflicting example files to have resource type name; change swagger spec files and MD file based on new file locations and names); change modelAsString for x-ms-enum to true based on API review board recommendation --- .../PolicyEvents_FilterAndAggregateOnly.json} | 0 ...Events_FilterAndGroupByWithAggregate.json} | 0 ...nts_FilterAndGroupByWithoutAggregate.json} | 0 ...PolicyEvents_FilterAndMultipleGroups.json} | 0 ...licyEvents_QueryManagementGroupScope.json} | 0 ...olicyEvents_QueryNestedResourceScope.json} | 0 ...PolicyEvents_QueryResourceGroupScope.json} | 0 .../PolicyEvents_QueryResourceScope.json} | 0 ...SubscriptionLevelNestedResourceScope.json} | 0 ..._QuerySubscriptionLevelResourceScope.json} | 0 .../PolicyEvents_QuerySubscriptionScope.json} | 0 .../PolicyEvents_TimeRangeSortSelectTop.json} | 0 .../PolicyStates_FilterAndAggregateOnly.json} | 0 ...States_FilterAndGroupByWithAggregate.json} | 0 ...tes_FilterAndGroupByWithoutAggregate.json} | 0 ...PolicyStates_FilterAndMultipleGroups.json} | 0 .../PolicyStates_ListOperations.json} | 0 ...licyStates_QueryManagementGroupScope.json} | 0 ...olicyStates_QueryNestedResourceScope.json} | 0 ...PolicyStates_QueryResourceGroupScope.json} | 0 .../PolicyStates_QueryResourceScope.json} | 0 ...SubscriptionLevelNestedResourceScope.json} | 0 ..._QuerySubscriptionLevelResourceScope.json} | 0 .../PolicyStates_QuerySubscriptionScope.json} | 0 .../PolicyStates_TimeRangeSortSelectTop.json} | 0 .../2017-08-09-preview/policyEvents.json | 24 ++++----- .../2017-08-09-preview/policyStates.json | 28 +++++----- .../PolicyEvents_FilterAndAggregateOnly.json} | 0 ...Events_FilterAndGroupByWithAggregate.json} | 0 ...nts_FilterAndGroupByWithoutAggregate.json} | 0 ...PolicyEvents_FilterAndMultipleGroups.json} | 0 .../examples/PolicyEvents_GetMetadata.json} | 0 ...licyEvents_QueryManagementGroupScope.json} | 0 ...olicyEvents_QueryNestedResourceScope.json} | 0 ...PolicyEvents_QueryResourceGroupScope.json} | 0 .../PolicyEvents_QueryResourceScope.json} | 0 ...SubscriptionLevelNestedResourceScope.json} | 0 ..._QuerySubscriptionLevelResourceScope.json} | 0 .../PolicyEvents_QuerySubscriptionScope.json} | 0 .../PolicyEvents_TimeRangeSortSelectTop.json} | 0 .../PolicyStates_FilterAndAggregateOnly.json} | 0 ...States_FilterAndGroupByWithAggregate.json} | 0 ...tes_FilterAndGroupByWithoutAggregate.json} | 0 ...PolicyStates_FilterAndMultipleGroups.json} | 0 .../examples/PolicyStates_GetMetadata.json} | 0 .../PolicyStates_ListOperations.json} | 0 ...licyStates_QueryManagementGroupScope.json} | 0 ...olicyStates_QueryNestedResourceScope.json} | 0 ...PolicyStates_QueryResourceGroupScope.json} | 0 .../PolicyStates_QueryResourceScope.json} | 0 ...SubscriptionLevelNestedResourceScope.json} | 0 ..._QuerySubscriptionLevelResourceScope.json} | 0 .../PolicyStates_QuerySubscriptionScope.json} | 0 .../PolicyStates_TimeRangeSortSelectTop.json} | 0 .../2017-10-17-preview/policyEvents.json | 26 ++++----- .../2017-10-17-preview/policyStates.json | 30 +++++------ .../PolicyEvents_FilterAndAggregateOnly.json} | 0 ...Events_FilterAndGroupByWithAggregate.json} | 0 ...nts_FilterAndGroupByWithoutAggregate.json} | 0 ...PolicyEvents_FilterAndMultipleGroups.json} | 0 .../examples/PolicyEvents_GetMetadata.json} | 0 ...licyEvents_QueryManagementGroupScope.json} | 0 ...olicyEvents_QueryNestedResourceScope.json} | 0 ...ourceGroupLevelPolicyAssignmentScope.json} | 0 ...PolicyEvents_QueryResourceGroupScope.json} | 0 .../PolicyEvents_QueryResourceScope.json} | 0 ...SubscriptionLevelNestedResourceScope.json} | 0 ...bscriptionLevelPolicyAssignmentScope.json} | 0 ...bscriptionLevelPolicyDefinitionScope.json} | 0 ...riptionLevelPolicySetDefinitionScope.json} | 0 ..._QuerySubscriptionLevelResourceScope.json} | 0 .../PolicyEvents_QuerySubscriptionScope.json} | 0 .../PolicyEvents_TimeRangeSortSelectTop.json} | 0 .../PolicyStates_FilterAndAggregateOnly.json} | 0 ...States_FilterAndGroupByWithAggregate.json} | 0 ...tes_FilterAndGroupByWithoutAggregate.json} | 0 ...PolicyStates_FilterAndMultipleGroups.json} | 0 .../examples/PolicyStates_GetMetadata.json} | 0 .../PolicyStates_ListOperations.json} | 0 ...licyStates_QueryManagementGroupScope.json} | 0 ...olicyStates_QueryNestedResourceScope.json} | 0 ...ourceGroupLevelPolicyAssignmentScope.json} | 0 ...PolicyStates_QueryResourceGroupScope.json} | 0 .../PolicyStates_QueryResourceScope.json} | 0 ...SubscriptionLevelNestedResourceScope.json} | 0 ...bscriptionLevelPolicyAssignmentScope.json} | 0 ...bscriptionLevelPolicyDefinitionScope.json} | 0 ...riptionLevelPolicySetDefinitionScope.json} | 0 ..._QuerySubscriptionLevelResourceScope.json} | 0 .../PolicyStates_QuerySubscriptionScope.json} | 0 ...States_SummarizeManagementGroupScope.json} | 0 ...ourceGroupLevelPolicyAssignmentScope.json} | 0 ...cyStates_SummarizeResourceGroupScope.json} | 0 .../PolicyStates_SummarizeResourceScope.json} | 0 ...bscriptionLevelPolicyAssignmentScope.json} | 0 ...bscriptionLevelPolicyDefinitionScope.json} | 0 ...riptionLevelPolicySetDefinitionScope.json} | 0 ...icyStates_SummarizeSubscriptionScope.json} | 0 .../PolicyStates_TimeRangeSortSelectTop.json} | 0 .../2017-12-12-preview/policyEvents.json | 34 ++++++------ .../2017-12-12-preview/policyStates.json | 54 +++++++++---------- .../policyinsights/resource-manager/readme.md | 12 ++--- 102 files changed, 104 insertions(+), 104 deletions(-) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-08-09-preview/examples/FilterAndAggregateOnly.json => preview/2017-08-09-preview/examples/PolicyEvents_FilterAndAggregateOnly.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-08-09-preview/examples/FilterAndGroupByWithAggregate.json => preview/2017-08-09-preview/examples/PolicyEvents_FilterAndGroupByWithAggregate.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-08-09-preview/examples/FilterAndGroupByWithoutAggregate.json => preview/2017-08-09-preview/examples/PolicyEvents_FilterAndGroupByWithoutAggregate.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-08-09-preview/examples/FilterAndMultipleGroups.json => preview/2017-08-09-preview/examples/PolicyEvents_FilterAndMultipleGroups.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-08-09-preview/examples/QueryManagementGroupScope.json => preview/2017-08-09-preview/examples/PolicyEvents_QueryManagementGroupScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-08-09-preview/examples/QueryNestedResourceScope.json => preview/2017-08-09-preview/examples/PolicyEvents_QueryNestedResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-08-09-preview/examples/QueryResourceGroupScope.json => preview/2017-08-09-preview/examples/PolicyEvents_QueryResourceGroupScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-08-09-preview/examples/QueryResourceScope.json => preview/2017-08-09-preview/examples/PolicyEvents_QueryResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-08-09-preview/examples/QuerySubscriptionLevelNestedResourceScope.json => preview/2017-08-09-preview/examples/PolicyEvents_QuerySubscriptionLevelNestedResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-08-09-preview/examples/QuerySubscriptionLevelResourceScope.json => preview/2017-08-09-preview/examples/PolicyEvents_QuerySubscriptionLevelResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-08-09-preview/examples/QuerySubscriptionScope.json => preview/2017-08-09-preview/examples/PolicyEvents_QuerySubscriptionScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-08-09-preview/examples/TimeRangeSortSelectTop.json => preview/2017-08-09-preview/examples/PolicyEvents_TimeRangeSortSelectTop.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-08-09-preview/examples/FilterAndAggregateOnly.json => preview/2017-08-09-preview/examples/PolicyStates_FilterAndAggregateOnly.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-08-09-preview/examples/FilterAndGroupByWithAggregate.json => preview/2017-08-09-preview/examples/PolicyStates_FilterAndGroupByWithAggregate.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-08-09-preview/examples/FilterAndGroupByWithoutAggregate.json => preview/2017-08-09-preview/examples/PolicyStates_FilterAndGroupByWithoutAggregate.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-08-09-preview/examples/FilterAndMultipleGroups.json => preview/2017-08-09-preview/examples/PolicyStates_FilterAndMultipleGroups.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-08-09-preview/examples/ListOperations.json => preview/2017-08-09-preview/examples/PolicyStates_ListOperations.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-08-09-preview/examples/QueryManagementGroupScope.json => preview/2017-08-09-preview/examples/PolicyStates_QueryManagementGroupScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-08-09-preview/examples/QueryNestedResourceScope.json => preview/2017-08-09-preview/examples/PolicyStates_QueryNestedResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-08-09-preview/examples/QueryResourceGroupScope.json => preview/2017-08-09-preview/examples/PolicyStates_QueryResourceGroupScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-08-09-preview/examples/QueryResourceScope.json => preview/2017-08-09-preview/examples/PolicyStates_QueryResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-08-09-preview/examples/QuerySubscriptionLevelNestedResourceScope.json => preview/2017-08-09-preview/examples/PolicyStates_QuerySubscriptionLevelNestedResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-08-09-preview/examples/QuerySubscriptionLevelResourceScope.json => preview/2017-08-09-preview/examples/PolicyStates_QuerySubscriptionLevelResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-08-09-preview/examples/QuerySubscriptionScope.json => preview/2017-08-09-preview/examples/PolicyStates_QuerySubscriptionScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-08-09-preview/examples/TimeRangeSortSelectTop.json => preview/2017-08-09-preview/examples/PolicyStates_TimeRangeSortSelectTop.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents => }/preview/2017-08-09-preview/policyEvents.json (95%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates => }/preview/2017-08-09-preview/policyStates.json (95%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-10-17-preview/examples/FilterAndAggregateOnly.json => preview/2017-10-17-preview/examples/PolicyEvents_FilterAndAggregateOnly.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-10-17-preview/examples/FilterAndGroupByWithAggregate.json => preview/2017-10-17-preview/examples/PolicyEvents_FilterAndGroupByWithAggregate.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-10-17-preview/examples/FilterAndGroupByWithoutAggregate.json => preview/2017-10-17-preview/examples/PolicyEvents_FilterAndGroupByWithoutAggregate.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-10-17-preview/examples/FilterAndMultipleGroups.json => preview/2017-10-17-preview/examples/PolicyEvents_FilterAndMultipleGroups.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-10-17-preview/examples/GetMetadata.json => preview/2017-10-17-preview/examples/PolicyEvents_GetMetadata.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json => preview/2017-10-17-preview/examples/PolicyEvents_QueryManagementGroupScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-10-17-preview/examples/QueryNestedResourceScope.json => preview/2017-10-17-preview/examples/PolicyEvents_QueryNestedResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-10-17-preview/examples/QueryResourceGroupScope.json => preview/2017-10-17-preview/examples/PolicyEvents_QueryResourceGroupScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-10-17-preview/examples/QueryResourceScope.json => preview/2017-10-17-preview/examples/PolicyEvents_QueryResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionLevelNestedResourceScope.json => preview/2017-10-17-preview/examples/PolicyEvents_QuerySubscriptionLevelNestedResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionLevelResourceScope.json => preview/2017-10-17-preview/examples/PolicyEvents_QuerySubscriptionLevelResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionScope.json => preview/2017-10-17-preview/examples/PolicyEvents_QuerySubscriptionScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-10-17-preview/examples/TimeRangeSortSelectTop.json => preview/2017-10-17-preview/examples/PolicyEvents_TimeRangeSortSelectTop.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-10-17-preview/examples/FilterAndAggregateOnly.json => preview/2017-10-17-preview/examples/PolicyStates_FilterAndAggregateOnly.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-10-17-preview/examples/FilterAndGroupByWithAggregate.json => preview/2017-10-17-preview/examples/PolicyStates_FilterAndGroupByWithAggregate.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-10-17-preview/examples/FilterAndGroupByWithoutAggregate.json => preview/2017-10-17-preview/examples/PolicyStates_FilterAndGroupByWithoutAggregate.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-10-17-preview/examples/FilterAndMultipleGroups.json => preview/2017-10-17-preview/examples/PolicyStates_FilterAndMultipleGroups.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-10-17-preview/examples/GetMetadata.json => preview/2017-10-17-preview/examples/PolicyStates_GetMetadata.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-10-17-preview/examples/ListOperations.json => preview/2017-10-17-preview/examples/PolicyStates_ListOperations.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json => preview/2017-10-17-preview/examples/PolicyStates_QueryManagementGroupScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-10-17-preview/examples/QueryNestedResourceScope.json => preview/2017-10-17-preview/examples/PolicyStates_QueryNestedResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-10-17-preview/examples/QueryResourceGroupScope.json => preview/2017-10-17-preview/examples/PolicyStates_QueryResourceGroupScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-10-17-preview/examples/QueryResourceScope.json => preview/2017-10-17-preview/examples/PolicyStates_QueryResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionLevelNestedResourceScope.json => preview/2017-10-17-preview/examples/PolicyStates_QuerySubscriptionLevelNestedResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionLevelResourceScope.json => preview/2017-10-17-preview/examples/PolicyStates_QuerySubscriptionLevelResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionScope.json => preview/2017-10-17-preview/examples/PolicyStates_QuerySubscriptionScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-10-17-preview/examples/TimeRangeSortSelectTop.json => preview/2017-10-17-preview/examples/PolicyStates_TimeRangeSortSelectTop.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents => }/preview/2017-10-17-preview/policyEvents.json (95%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates => }/preview/2017-10-17-preview/policyStates.json (95%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-12-12-preview/examples/FilterAndAggregateOnly.json => preview/2017-12-12-preview/examples/PolicyEvents_FilterAndAggregateOnly.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-12-12-preview/examples/FilterAndGroupByWithAggregate.json => preview/2017-12-12-preview/examples/PolicyEvents_FilterAndGroupByWithAggregate.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-12-12-preview/examples/FilterAndGroupByWithoutAggregate.json => preview/2017-12-12-preview/examples/PolicyEvents_FilterAndGroupByWithoutAggregate.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-12-12-preview/examples/FilterAndMultipleGroups.json => preview/2017-12-12-preview/examples/PolicyEvents_FilterAndMultipleGroups.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-12-12-preview/examples/GetMetadata.json => preview/2017-12-12-preview/examples/PolicyEvents_GetMetadata.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json => preview/2017-12-12-preview/examples/PolicyEvents_QueryManagementGroupScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-12-12-preview/examples/QueryNestedResourceScope.json => preview/2017-12-12-preview/examples/PolicyEvents_QueryNestedResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json => preview/2017-12-12-preview/examples/PolicyEvents_QueryResourceGroupLevelPolicyAssignmentScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupScope.json => preview/2017-12-12-preview/examples/PolicyEvents_QueryResourceGroupScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceScope.json => preview/2017-12-12-preview/examples/PolicyEvents_QueryResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelNestedResourceScope.json => preview/2017-12-12-preview/examples/PolicyEvents_QuerySubscriptionLevelNestedResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json => preview/2017-12-12-preview/examples/PolicyEvents_QuerySubscriptionLevelPolicyAssignmentScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json => preview/2017-12-12-preview/examples/PolicyEvents_QuerySubscriptionLevelPolicyDefinitionScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json => preview/2017-12-12-preview/examples/PolicyEvents_QuerySubscriptionLevelPolicySetDefinitionScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelResourceScope.json => preview/2017-12-12-preview/examples/PolicyEvents_QuerySubscriptionLevelResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionScope.json => preview/2017-12-12-preview/examples/PolicyEvents_QuerySubscriptionScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents/preview/2017-12-12-preview/examples/TimeRangeSortSelectTop.json => preview/2017-12-12-preview/examples/PolicyEvents_TimeRangeSortSelectTop.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/FilterAndAggregateOnly.json => preview/2017-12-12-preview/examples/PolicyStates_FilterAndAggregateOnly.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/FilterAndGroupByWithAggregate.json => preview/2017-12-12-preview/examples/PolicyStates_FilterAndGroupByWithAggregate.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/FilterAndGroupByWithoutAggregate.json => preview/2017-12-12-preview/examples/PolicyStates_FilterAndGroupByWithoutAggregate.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/FilterAndMultipleGroups.json => preview/2017-12-12-preview/examples/PolicyStates_FilterAndMultipleGroups.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/GetMetadata.json => preview/2017-12-12-preview/examples/PolicyStates_GetMetadata.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/ListOperations.json => preview/2017-12-12-preview/examples/PolicyStates_ListOperations.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json => preview/2017-12-12-preview/examples/PolicyStates_QueryManagementGroupScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/QueryNestedResourceScope.json => preview/2017-12-12-preview/examples/PolicyStates_QueryNestedResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json => preview/2017-12-12-preview/examples/PolicyStates_QueryResourceGroupLevelPolicyAssignmentScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupScope.json => preview/2017-12-12-preview/examples/PolicyStates_QueryResourceGroupScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/QueryResourceScope.json => preview/2017-12-12-preview/examples/PolicyStates_QueryResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelNestedResourceScope.json => preview/2017-12-12-preview/examples/PolicyStates_QuerySubscriptionLevelNestedResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json => preview/2017-12-12-preview/examples/PolicyStates_QuerySubscriptionLevelPolicyAssignmentScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json => preview/2017-12-12-preview/examples/PolicyStates_QuerySubscriptionLevelPolicyDefinitionScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json => preview/2017-12-12-preview/examples/PolicyStates_QuerySubscriptionLevelPolicySetDefinitionScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelResourceScope.json => preview/2017-12-12-preview/examples/PolicyStates_QuerySubscriptionLevelResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionScope.json => preview/2017-12-12-preview/examples/PolicyStates_QuerySubscriptionScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/SummarizeManagementGroupScope.json => preview/2017-12-12-preview/examples/PolicyStates_SummarizeManagementGroupScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceGroupLevelPolicyAssignmentScope.json => preview/2017-12-12-preview/examples/PolicyStates_SummarizeResourceGroupLevelPolicyAssignmentScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceGroupScope.json => preview/2017-12-12-preview/examples/PolicyStates_SummarizeResourceGroupScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceScope.json => preview/2017-12-12-preview/examples/PolicyStates_SummarizeResourceScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionLevelPolicyAssignmentScope.json => preview/2017-12-12-preview/examples/PolicyStates_SummarizeSubscriptionLevelPolicyAssignmentScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionLevelPolicyDefinitionScope.json => preview/2017-12-12-preview/examples/PolicyStates_SummarizeSubscriptionLevelPolicyDefinitionScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionLevelPolicySetDefinitionScope.json => preview/2017-12-12-preview/examples/PolicyStates_SummarizeSubscriptionLevelPolicySetDefinitionScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionScope.json => preview/2017-12-12-preview/examples/PolicyStates_SummarizeSubscriptionScope.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates/preview/2017-12-12-preview/examples/TimeRangeSortSelectTop.json => preview/2017-12-12-preview/examples/PolicyStates_TimeRangeSortSelectTop.json} (100%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyEvents => }/preview/2017-12-12-preview/policyEvents.json (95%) rename specification/policyinsights/resource-manager/Microsoft.PolicyInsights/{PolicyStates => }/preview/2017-12-12-preview/policyStates.json (95%) diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndAggregateOnly.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_FilterAndAggregateOnly.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndAggregateOnly.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_FilterAndAggregateOnly.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndGroupByWithAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_FilterAndGroupByWithAggregate.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndGroupByWithAggregate.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_FilterAndGroupByWithAggregate.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndGroupByWithoutAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_FilterAndGroupByWithoutAggregate.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndGroupByWithoutAggregate.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_FilterAndGroupByWithoutAggregate.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndMultipleGroups.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_FilterAndMultipleGroups.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/FilterAndMultipleGroups.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_FilterAndMultipleGroups.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_QueryManagementGroupScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryManagementGroupScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_QueryManagementGroupScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_QueryNestedResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryNestedResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_QueryNestedResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryResourceGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_QueryResourceGroupScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryResourceGroupScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_QueryResourceGroupScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_QueryResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QueryResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_QueryResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QuerySubscriptionLevelNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_QuerySubscriptionLevelNestedResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QuerySubscriptionLevelNestedResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_QuerySubscriptionLevelNestedResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QuerySubscriptionLevelResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_QuerySubscriptionLevelResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QuerySubscriptionLevelResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_QuerySubscriptionLevelResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QuerySubscriptionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_QuerySubscriptionScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/QuerySubscriptionScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_QuerySubscriptionScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/TimeRangeSortSelectTop.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_TimeRangeSortSelectTop.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/examples/TimeRangeSortSelectTop.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyEvents_TimeRangeSortSelectTop.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndAggregateOnly.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_FilterAndAggregateOnly.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndAggregateOnly.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_FilterAndAggregateOnly.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndGroupByWithAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_FilterAndGroupByWithAggregate.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndGroupByWithAggregate.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_FilterAndGroupByWithAggregate.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndGroupByWithoutAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_FilterAndGroupByWithoutAggregate.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndGroupByWithoutAggregate.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_FilterAndGroupByWithoutAggregate.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndMultipleGroups.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_FilterAndMultipleGroups.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/FilterAndMultipleGroups.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_FilterAndMultipleGroups.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/ListOperations.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_ListOperations.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/ListOperations.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_ListOperations.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_QueryManagementGroupScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryManagementGroupScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_QueryManagementGroupScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_QueryNestedResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryNestedResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_QueryNestedResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryResourceGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_QueryResourceGroupScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryResourceGroupScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_QueryResourceGroupScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_QueryResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QueryResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_QueryResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QuerySubscriptionLevelNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_QuerySubscriptionLevelNestedResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QuerySubscriptionLevelNestedResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_QuerySubscriptionLevelNestedResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QuerySubscriptionLevelResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_QuerySubscriptionLevelResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QuerySubscriptionLevelResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_QuerySubscriptionLevelResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QuerySubscriptionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_QuerySubscriptionScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/QuerySubscriptionScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_QuerySubscriptionScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/TimeRangeSortSelectTop.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_TimeRangeSortSelectTop.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/examples/TimeRangeSortSelectTop.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/examples/PolicyStates_TimeRangeSortSelectTop.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/policyEvents.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/policyEvents.json similarity index 95% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/policyEvents.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/policyEvents.json index c210b4653b4d..47397a564335 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/policyEvents.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/policyEvents.json @@ -84,7 +84,7 @@ } }, "x-ms-examples": { - "Query at management group scope": { "$ref": "./examples/QueryManagementGroupScope.json" } + "Query at management group scope": { "$ref": "./examples/PolicyEvents_QueryManagementGroupScope.json" } } } }, @@ -139,12 +139,12 @@ } }, "x-ms-examples": { - "Query at subscription scope": { "$ref": "./examples/QuerySubscriptionScope.json" }, - "Time range; sort, select and limit": { "$ref": "./examples/TimeRangeSortSelectTop.json" }, - "Filter and group with aggregate": { "$ref": "./examples/FilterAndGroupByWithAggregate.json" }, - "Filter and group without aggregate": { "$ref": "./examples/FilterAndGroupByWithoutAggregate.json" }, - "Filter and aggregate only": { "$ref": "./examples/FilterAndAggregateOnly.json" }, - "Filter and multiple groups": { "$ref": "./examples/FilterAndMultipleGroups.json" } + "Query at subscription scope": { "$ref": "./examples/PolicyEvents_QuerySubscriptionScope.json" }, + "Time range; sort, select and limit": { "$ref": "./examples/PolicyEvents_TimeRangeSortSelectTop.json" }, + "Filter and group with aggregate": { "$ref": "./examples/PolicyEvents_FilterAndGroupByWithAggregate.json" }, + "Filter and group without aggregate": { "$ref": "./examples/PolicyEvents_FilterAndGroupByWithoutAggregate.json" }, + "Filter and aggregate only": { "$ref": "./examples/PolicyEvents_FilterAndAggregateOnly.json" }, + "Filter and multiple groups": { "$ref": "./examples/PolicyEvents_FilterAndMultipleGroups.json" } } } }, @@ -202,7 +202,7 @@ } }, "x-ms-examples": { - "Query at resource group scope": { "$ref": "./examples/QueryResourceGroupScope.json" } + "Query at resource group scope": { "$ref": "./examples/PolicyEvents_QueryResourceGroupScope.json" } } } }, @@ -257,10 +257,10 @@ } }, "x-ms-examples": { - "Query at resource scope": { "$ref": "./examples/QueryResourceScope.json" }, - "Query at subscription level resource scope": { "$ref": "./examples/QuerySubscriptionLevelResourceScope.json" }, - "Query at nested resource scope": { "$ref": "./examples/QueryNestedResourceScope.json" }, - "Query at subscription level nested resource scope": { "$ref": "./examples/QuerySubscriptionLevelNestedResourceScope.json" } + "Query at resource scope": { "$ref": "./examples/PolicyEvents_QueryResourceScope.json" }, + "Query at subscription level resource scope": { "$ref": "./examples/PolicyEvents_QuerySubscriptionLevelResourceScope.json" }, + "Query at nested resource scope": { "$ref": "./examples/PolicyEvents_QueryNestedResourceScope.json" }, + "Query at subscription level nested resource scope": { "$ref": "./examples/PolicyEvents_QuerySubscriptionLevelNestedResourceScope.json" } } } } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/policyStates.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/policyStates.json similarity index 95% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/policyStates.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/policyStates.json index 888b5f4b53c3..ca2fcb4d4d97 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/policyStates.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-08-09-preview/policyStates.json @@ -84,7 +84,7 @@ } }, "x-ms-examples": { - "Query latest at management group scope": { "$ref": "./examples/QueryManagementGroupScope.json" } + "Query latest at management group scope": { "$ref": "./examples/PolicyStates_QueryManagementGroupScope.json" } } } }, @@ -139,12 +139,12 @@ } }, "x-ms-examples": { - "Query latest at subscription scope": { "$ref": "./examples/QuerySubscriptionScope.json" }, - "Time range; sort, select and limit": { "$ref": "./examples/TimeRangeSortSelectTop.json" }, - "Filter and group with aggregate": { "$ref": "./examples/FilterAndGroupByWithAggregate.json" }, - "Filter and group without aggregate": { "$ref": "./examples/FilterAndGroupByWithoutAggregate.json" }, - "Filter and aggregate only": { "$ref": "./examples/FilterAndAggregateOnly.json" }, - "Filter and multiple groups": { "$ref": "./examples/FilterAndMultipleGroups.json" } + "Query latest at subscription scope": { "$ref": "./examples/PolicyStates_QuerySubscriptionScope.json" }, + "Time range; sort, select and limit": { "$ref": "./examples/PolicyStates_TimeRangeSortSelectTop.json" }, + "Filter and group with aggregate": { "$ref": "./examples/PolicyStates_FilterAndGroupByWithAggregate.json" }, + "Filter and group without aggregate": { "$ref": "./examples/PolicyStates_FilterAndGroupByWithoutAggregate.json" }, + "Filter and aggregate only": { "$ref": "./examples/PolicyStates_FilterAndAggregateOnly.json" }, + "Filter and multiple groups": { "$ref": "./examples/PolicyStates_FilterAndMultipleGroups.json" } } } }, @@ -202,7 +202,7 @@ } }, "x-ms-examples": { - "Query latest at resource group scope": { "$ref": "./examples/QueryResourceGroupScope.json" } + "Query latest at resource group scope": { "$ref": "./examples/PolicyStates_QueryResourceGroupScope.json" } } } }, @@ -257,10 +257,10 @@ } }, "x-ms-examples": { - "Query all policy states at resource scope": { "$ref": "./examples/QueryResourceScope.json" }, - "Query all policy states at subscription level resource scope": { "$ref": "./examples/QuerySubscriptionLevelResourceScope.json" }, - "Query all policy states at nested resource scope": { "$ref": "./examples/QueryNestedResourceScope.json" }, - "Query all policy states at subscription level nested resource scope": { "$ref": "./examples/QuerySubscriptionLevelNestedResourceScope.json" } + "Query all policy states at resource scope": { "$ref": "./examples/PolicyStates_QueryResourceScope.json" }, + "Query all policy states at subscription level resource scope": { "$ref": "./examples/PolicyStates_QuerySubscriptionLevelResourceScope.json" }, + "Query all policy states at nested resource scope": { "$ref": "./examples/PolicyStates_QueryNestedResourceScope.json" }, + "Query all policy states at subscription level nested resource scope": { "$ref": "./examples/PolicyStates_QuerySubscriptionLevelNestedResourceScope.json" } } } }, @@ -288,7 +288,7 @@ } }, "x-ms-examples": { - "List operations": { "$ref": "./examples/ListOperations.json" } + "List operations": { "$ref": "./examples/PolicyStates_ListOperations.json" } } } } @@ -531,7 +531,7 @@ ], "x-ms-enum": { "name": "PolicyStatesResource", - "modelAsString": false + "modelAsString": true }, "description": "The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).", "x-ms-parameter-location": "method" diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndAggregateOnly.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_FilterAndAggregateOnly.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndAggregateOnly.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_FilterAndAggregateOnly.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndGroupByWithAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_FilterAndGroupByWithAggregate.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndGroupByWithAggregate.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_FilterAndGroupByWithAggregate.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndGroupByWithoutAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_FilterAndGroupByWithoutAggregate.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndGroupByWithoutAggregate.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_FilterAndGroupByWithoutAggregate.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndMultipleGroups.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_FilterAndMultipleGroups.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/FilterAndMultipleGroups.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_FilterAndMultipleGroups.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/GetMetadata.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_GetMetadata.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/GetMetadata.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_GetMetadata.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_QueryManagementGroupScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_QueryManagementGroupScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_QueryNestedResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryNestedResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_QueryNestedResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryResourceGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_QueryResourceGroupScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryResourceGroupScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_QueryResourceGroupScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_QueryResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QueryResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_QueryResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionLevelNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_QuerySubscriptionLevelNestedResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionLevelNestedResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_QuerySubscriptionLevelNestedResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionLevelResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_QuerySubscriptionLevelResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionLevelResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_QuerySubscriptionLevelResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_QuerySubscriptionScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/QuerySubscriptionScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_QuerySubscriptionScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/TimeRangeSortSelectTop.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_TimeRangeSortSelectTop.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/examples/TimeRangeSortSelectTop.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyEvents_TimeRangeSortSelectTop.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndAggregateOnly.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_FilterAndAggregateOnly.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndAggregateOnly.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_FilterAndAggregateOnly.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndGroupByWithAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_FilterAndGroupByWithAggregate.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndGroupByWithAggregate.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_FilterAndGroupByWithAggregate.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndGroupByWithoutAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_FilterAndGroupByWithoutAggregate.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndGroupByWithoutAggregate.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_FilterAndGroupByWithoutAggregate.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndMultipleGroups.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_FilterAndMultipleGroups.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/FilterAndMultipleGroups.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_FilterAndMultipleGroups.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/GetMetadata.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_GetMetadata.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/GetMetadata.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_GetMetadata.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/ListOperations.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_ListOperations.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/ListOperations.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_ListOperations.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_QueryManagementGroupScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryManagementGroupScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_QueryManagementGroupScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_QueryNestedResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryNestedResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_QueryNestedResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryResourceGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_QueryResourceGroupScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryResourceGroupScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_QueryResourceGroupScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_QueryResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QueryResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_QueryResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionLevelNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_QuerySubscriptionLevelNestedResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionLevelNestedResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_QuerySubscriptionLevelNestedResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionLevelResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_QuerySubscriptionLevelResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionLevelResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_QuerySubscriptionLevelResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_QuerySubscriptionScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/QuerySubscriptionScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_QuerySubscriptionScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/TimeRangeSortSelectTop.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_TimeRangeSortSelectTop.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/examples/TimeRangeSortSelectTop.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/examples/PolicyStates_TimeRangeSortSelectTop.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/policyEvents.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/policyEvents.json similarity index 95% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/policyEvents.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/policyEvents.json index 92ae30f6b40b..445cea0a6181 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/policyEvents.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/policyEvents.json @@ -84,7 +84,7 @@ } }, "x-ms-examples": { - "Query at management group scope": { "$ref": "./examples/QueryManagementGroupScope.json" } + "Query at management group scope": { "$ref": "./examples/PolicyEvents_QueryManagementGroupScope.json" } } } }, @@ -139,12 +139,12 @@ } }, "x-ms-examples": { - "Query at subscription scope": { "$ref": "./examples/QuerySubscriptionScope.json" }, - "Time range; sort, select and limit": { "$ref": "./examples/TimeRangeSortSelectTop.json" }, - "Filter and group with aggregate": { "$ref": "./examples/FilterAndGroupByWithAggregate.json" }, - "Filter and group without aggregate": { "$ref": "./examples/FilterAndGroupByWithoutAggregate.json" }, - "Filter and aggregate only": { "$ref": "./examples/FilterAndAggregateOnly.json" }, - "Filter and multiple groups": { "$ref": "./examples/FilterAndMultipleGroups.json" } + "Query at subscription scope": { "$ref": "./examples/PolicyEvents_QuerySubscriptionScope.json" }, + "Time range; sort, select and limit": { "$ref": "./examples/PolicyEvents_TimeRangeSortSelectTop.json" }, + "Filter and group with aggregate": { "$ref": "./examples/PolicyEvents_FilterAndGroupByWithAggregate.json" }, + "Filter and group without aggregate": { "$ref": "./examples/PolicyEvents_FilterAndGroupByWithoutAggregate.json" }, + "Filter and aggregate only": { "$ref": "./examples/PolicyEvents_FilterAndAggregateOnly.json" }, + "Filter and multiple groups": { "$ref": "./examples/PolicyEvents_FilterAndMultipleGroups.json" } } } }, @@ -202,7 +202,7 @@ } }, "x-ms-examples": { - "Query at resource group scope": { "$ref": "./examples/QueryResourceGroupScope.json" } + "Query at resource group scope": { "$ref": "./examples/PolicyEvents_QueryResourceGroupScope.json" } } } }, @@ -257,10 +257,10 @@ } }, "x-ms-examples": { - "Query at resource scope": { "$ref": "./examples/QueryResourceScope.json" }, - "Query at subscription level resource scope": { "$ref": "./examples/QuerySubscriptionLevelResourceScope.json" }, - "Query at nested resource scope": { "$ref": "./examples/QueryNestedResourceScope.json" }, - "Query at subscription level nested resource scope": { "$ref": "./examples/QuerySubscriptionLevelNestedResourceScope.json" } + "Query at resource scope": { "$ref": "./examples/PolicyEvents_QueryResourceScope.json" }, + "Query at subscription level resource scope": { "$ref": "./examples/PolicyEvents_QuerySubscriptionLevelResourceScope.json" }, + "Query at nested resource scope": { "$ref": "./examples/PolicyEvents_QueryNestedResourceScope.json" }, + "Query at subscription level nested resource scope": { "$ref": "./examples/PolicyEvents_QuerySubscriptionLevelNestedResourceScope.json" } } } }, @@ -294,7 +294,7 @@ } }, "x-ms-examples": { - "Get metadata": { "$ref": "./examples/GetMetadata.json" } + "Get metadata": { "$ref": "./examples/PolicyEvents_GetMetadata.json" } } } } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/policyStates.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/policyStates.json similarity index 95% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/policyStates.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/policyStates.json index 8cebdac734aa..cc16f8d0feda 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/policyStates.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-10-17-preview/policyStates.json @@ -84,7 +84,7 @@ } }, "x-ms-examples": { - "Query latest at management group scope": { "$ref": "./examples/QueryManagementGroupScope.json" } + "Query latest at management group scope": { "$ref": "./examples/PolicyStates_QueryManagementGroupScope.json" } } } }, @@ -139,12 +139,12 @@ } }, "x-ms-examples": { - "Query latest at subscription scope": { "$ref": "./examples/QuerySubscriptionScope.json" }, - "Time range; sort, select and limit": { "$ref": "./examples/TimeRangeSortSelectTop.json" }, - "Filter and group with aggregate": { "$ref": "./examples/FilterAndGroupByWithAggregate.json" }, - "Filter and group without aggregate": { "$ref": "./examples/FilterAndGroupByWithoutAggregate.json" }, - "Filter and aggregate only": { "$ref": "./examples/FilterAndAggregateOnly.json" }, - "Filter and multiple groups": { "$ref": "./examples/FilterAndMultipleGroups.json" } + "Query latest at subscription scope": { "$ref": "./examples/PolicyStates_QuerySubscriptionScope.json" }, + "Time range; sort, select and limit": { "$ref": "./examples/PolicyStates_TimeRangeSortSelectTop.json" }, + "Filter and group with aggregate": { "$ref": "./examples/PolicyStates_FilterAndGroupByWithAggregate.json" }, + "Filter and group without aggregate": { "$ref": "./examples/PolicyStates_FilterAndGroupByWithoutAggregate.json" }, + "Filter and aggregate only": { "$ref": "./examples/PolicyStates_FilterAndAggregateOnly.json" }, + "Filter and multiple groups": { "$ref": "./examples/PolicyStates_FilterAndMultipleGroups.json" } } } }, @@ -202,7 +202,7 @@ } }, "x-ms-examples": { - "Query latest at resource group scope": { "$ref": "./examples/QueryResourceGroupScope.json" } + "Query latest at resource group scope": { "$ref": "./examples/PolicyStates_QueryResourceGroupScope.json" } } } }, @@ -257,10 +257,10 @@ } }, "x-ms-examples": { - "Query all policy states at resource scope": { "$ref": "./examples/QueryResourceScope.json" }, - "Query all policy states at subscription level resource scope": { "$ref": "./examples/QuerySubscriptionLevelResourceScope.json" }, - "Query all policy states at nested resource scope": { "$ref": "./examples/QueryNestedResourceScope.json" }, - "Query all policy states at subscription level nested resource scope": { "$ref": "./examples/QuerySubscriptionLevelNestedResourceScope.json" } + "Query all policy states at resource scope": { "$ref": "./examples/PolicyStates_QueryResourceScope.json" }, + "Query all policy states at subscription level resource scope": { "$ref": "./examples/PolicyStates_QuerySubscriptionLevelResourceScope.json" }, + "Query all policy states at nested resource scope": { "$ref": "./examples/PolicyStates_QueryNestedResourceScope.json" }, + "Query all policy states at subscription level nested resource scope": { "$ref": "./examples/PolicyStates_QuerySubscriptionLevelNestedResourceScope.json" } } } }, @@ -288,7 +288,7 @@ } }, "x-ms-examples": { - "List operations": { "$ref": "./examples/ListOperations.json" } + "List operations": { "$ref": "./examples/PolicyStates_ListOperations.json" } } } }, @@ -322,7 +322,7 @@ } }, "x-ms-examples": { - "Get metadata": { "$ref": "./examples/GetMetadata.json" } + "Get metadata": { "$ref": "./examples/PolicyStates_GetMetadata.json" } } } } @@ -551,7 +551,7 @@ ], "x-ms-enum": { "name": "PolicyStatesResource", - "modelAsString": false + "modelAsString": true }, "description": "The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).", "x-ms-parameter-location": "method" diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndAggregateOnly.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_FilterAndAggregateOnly.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndAggregateOnly.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_FilterAndAggregateOnly.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndGroupByWithAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_FilterAndGroupByWithAggregate.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndGroupByWithAggregate.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_FilterAndGroupByWithAggregate.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndGroupByWithoutAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_FilterAndGroupByWithoutAggregate.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndGroupByWithoutAggregate.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_FilterAndGroupByWithoutAggregate.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndMultipleGroups.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_FilterAndMultipleGroups.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/FilterAndMultipleGroups.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_FilterAndMultipleGroups.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/GetMetadata.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_GetMetadata.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/GetMetadata.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_GetMetadata.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_QueryManagementGroupScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_QueryManagementGroupScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_QueryNestedResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryNestedResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_QueryNestedResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_QueryResourceGroupLevelPolicyAssignmentScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_QueryResourceGroupLevelPolicyAssignmentScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_QueryResourceGroupScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceGroupScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_QueryResourceGroupScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_QueryResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QueryResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_QueryResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_QuerySubscriptionLevelNestedResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelNestedResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_QuerySubscriptionLevelNestedResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_QuerySubscriptionLevelPolicyAssignmentScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_QuerySubscriptionLevelPolicyAssignmentScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_QuerySubscriptionLevelPolicyDefinitionScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_QuerySubscriptionLevelPolicyDefinitionScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_QuerySubscriptionLevelPolicySetDefinitionScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_QuerySubscriptionLevelPolicySetDefinitionScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_QuerySubscriptionLevelResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionLevelResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_QuerySubscriptionLevelResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_QuerySubscriptionScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/QuerySubscriptionScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_QuerySubscriptionScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/TimeRangeSortSelectTop.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_TimeRangeSortSelectTop.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/examples/TimeRangeSortSelectTop.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyEvents_TimeRangeSortSelectTop.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndAggregateOnly.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_FilterAndAggregateOnly.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndAggregateOnly.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_FilterAndAggregateOnly.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndGroupByWithAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_FilterAndGroupByWithAggregate.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndGroupByWithAggregate.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_FilterAndGroupByWithAggregate.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndGroupByWithoutAggregate.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_FilterAndGroupByWithoutAggregate.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndGroupByWithoutAggregate.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_FilterAndGroupByWithoutAggregate.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndMultipleGroups.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_FilterAndMultipleGroups.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/FilterAndMultipleGroups.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_FilterAndMultipleGroups.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/GetMetadata.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_GetMetadata.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/GetMetadata.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_GetMetadata.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/ListOperations.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_ListOperations.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/ListOperations.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_ListOperations.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_QueryManagementGroupScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryManagementGroupScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_QueryManagementGroupScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_QueryNestedResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryNestedResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_QueryNestedResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_QueryResourceGroupLevelPolicyAssignmentScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupLevelPolicyAssignmentScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_QueryResourceGroupLevelPolicyAssignmentScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_QueryResourceGroupScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceGroupScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_QueryResourceGroupScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_QueryResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QueryResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_QueryResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelNestedResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_QuerySubscriptionLevelNestedResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelNestedResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_QuerySubscriptionLevelNestedResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_QuerySubscriptionLevelPolicyAssignmentScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyAssignmentScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_QuerySubscriptionLevelPolicyAssignmentScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_QuerySubscriptionLevelPolicyDefinitionScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicyDefinitionScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_QuerySubscriptionLevelPolicyDefinitionScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_QuerySubscriptionLevelPolicySetDefinitionScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelPolicySetDefinitionScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_QuerySubscriptionLevelPolicySetDefinitionScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_QuerySubscriptionLevelResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionLevelResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_QuerySubscriptionLevelResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_QuerySubscriptionScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/QuerySubscriptionScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_QuerySubscriptionScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeManagementGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_SummarizeManagementGroupScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeManagementGroupScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_SummarizeManagementGroupScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceGroupLevelPolicyAssignmentScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_SummarizeResourceGroupLevelPolicyAssignmentScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceGroupLevelPolicyAssignmentScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_SummarizeResourceGroupLevelPolicyAssignmentScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceGroupScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_SummarizeResourceGroupScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceGroupScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_SummarizeResourceGroupScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_SummarizeResourceScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeResourceScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_SummarizeResourceScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionLevelPolicyAssignmentScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_SummarizeSubscriptionLevelPolicyAssignmentScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionLevelPolicyAssignmentScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_SummarizeSubscriptionLevelPolicyAssignmentScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionLevelPolicyDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_SummarizeSubscriptionLevelPolicyDefinitionScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionLevelPolicyDefinitionScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_SummarizeSubscriptionLevelPolicyDefinitionScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionLevelPolicySetDefinitionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_SummarizeSubscriptionLevelPolicySetDefinitionScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionLevelPolicySetDefinitionScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_SummarizeSubscriptionLevelPolicySetDefinitionScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionScope.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_SummarizeSubscriptionScope.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/SummarizeSubscriptionScope.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_SummarizeSubscriptionScope.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/TimeRangeSortSelectTop.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_TimeRangeSortSelectTop.json similarity index 100% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/examples/TimeRangeSortSelectTop.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/examples/PolicyStates_TimeRangeSortSelectTop.json diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/policyEvents.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/policyEvents.json similarity index 95% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/policyEvents.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/policyEvents.json index 0de99f15635e..410b9616fc2d 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/policyEvents.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/policyEvents.json @@ -84,7 +84,7 @@ } }, "x-ms-examples": { - "Query at management group scope": { "$ref": "./examples/QueryManagementGroupScope.json" } + "Query at management group scope": { "$ref": "./examples/PolicyEvents_QueryManagementGroupScope.json" } } } }, @@ -139,12 +139,12 @@ } }, "x-ms-examples": { - "Query at subscription scope": { "$ref": "./examples/QuerySubscriptionScope.json" }, - "Time range; sort, select and limit": { "$ref": "./examples/TimeRangeSortSelectTop.json" }, - "Filter and group with aggregate": { "$ref": "./examples/FilterAndGroupByWithAggregate.json" }, - "Filter and group without aggregate": { "$ref": "./examples/FilterAndGroupByWithoutAggregate.json" }, - "Filter and aggregate only": { "$ref": "./examples/FilterAndAggregateOnly.json" }, - "Filter and multiple groups": { "$ref": "./examples/FilterAndMultipleGroups.json" } + "Query at subscription scope": { "$ref": "./examples/PolicyEvents_QuerySubscriptionScope.json" }, + "Time range; sort, select and limit": { "$ref": "./examples/PolicyEvents_TimeRangeSortSelectTop.json" }, + "Filter and group with aggregate": { "$ref": "./examples/PolicyEvents_FilterAndGroupByWithAggregate.json" }, + "Filter and group without aggregate": { "$ref": "./examples/PolicyEvents_FilterAndGroupByWithoutAggregate.json" }, + "Filter and aggregate only": { "$ref": "./examples/PolicyEvents_FilterAndAggregateOnly.json" }, + "Filter and multiple groups": { "$ref": "./examples/PolicyEvents_FilterAndMultipleGroups.json" } } } }, @@ -202,7 +202,7 @@ } }, "x-ms-examples": { - "Query at resource group scope": { "$ref": "./examples/QueryResourceGroupScope.json" } + "Query at resource group scope": { "$ref": "./examples/PolicyEvents_QueryResourceGroupScope.json" } } } }, @@ -257,10 +257,10 @@ } }, "x-ms-examples": { - "Query at resource scope": { "$ref": "./examples/QueryResourceScope.json" }, - "Query at subscription level resource scope": { "$ref": "./examples/QuerySubscriptionLevelResourceScope.json" }, - "Query at nested resource scope": { "$ref": "./examples/QueryNestedResourceScope.json" }, - "Query at subscription level nested resource scope": { "$ref": "./examples/QuerySubscriptionLevelNestedResourceScope.json" } + "Query at resource scope": { "$ref": "./examples/PolicyEvents_QueryResourceScope.json" }, + "Query at subscription level resource scope": { "$ref": "./examples/PolicyEvents_QuerySubscriptionLevelResourceScope.json" }, + "Query at nested resource scope": { "$ref": "./examples/PolicyEvents_QueryNestedResourceScope.json" }, + "Query at subscription level nested resource scope": { "$ref": "./examples/PolicyEvents_QuerySubscriptionLevelNestedResourceScope.json" } } } }, @@ -321,7 +321,7 @@ } }, "x-ms-examples": { - "Query at subscription level policy set definition scope": { "$ref": "./examples/QuerySubscriptionLevelPolicySetDefinitionScope.json" } + "Query at subscription level policy set definition scope": { "$ref": "./examples/PolicyEvents_QuerySubscriptionLevelPolicySetDefinitionScope.json" } } } }, @@ -382,7 +382,7 @@ } }, "x-ms-examples": { - "Query at subscription level policy definition scope": { "$ref": "./examples/QuerySubscriptionLevelPolicyDefinitionScope.json" } + "Query at subscription level policy definition scope": { "$ref": "./examples/PolicyEvents_QuerySubscriptionLevelPolicyDefinitionScope.json" } } } }, @@ -443,7 +443,7 @@ } }, "x-ms-examples": { - "Query at subscription level policy assignment scope": { "$ref": "./examples/QuerySubscriptionLevelPolicyAssignmentScope.json" } + "Query at subscription level policy assignment scope": { "$ref": "./examples/PolicyEvents_QuerySubscriptionLevelPolicyAssignmentScope.json" } } } }, @@ -507,7 +507,7 @@ } }, "x-ms-examples": { - "Query at resource group level policy assignment scope": { "$ref": "./examples/QueryResourceGroupLevelPolicyAssignmentScope.json" } + "Query at resource group level policy assignment scope": { "$ref": "./examples/PolicyEvents_QueryResourceGroupLevelPolicyAssignmentScope.json" } } } }, @@ -541,7 +541,7 @@ } }, "x-ms-examples": { - "Get metadata": { "$ref": "./examples/GetMetadata.json" } + "Get metadata": { "$ref": "./examples/PolicyEvents_GetMetadata.json" } } } } diff --git a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/policyStates.json b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/policyStates.json similarity index 95% rename from specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/policyStates.json rename to specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/policyStates.json index 3f9451d787ee..e1bfb3e4db29 100644 --- a/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/policyStates.json +++ b/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/preview/2017-12-12-preview/policyStates.json @@ -84,7 +84,7 @@ } }, "x-ms-examples": { - "Query latest at management group scope": { "$ref": "./examples/QueryManagementGroupScope.json" } + "Query latest at management group scope": { "$ref": "./examples/PolicyStates_QueryManagementGroupScope.json" } } } }, @@ -133,7 +133,7 @@ } }, "x-ms-examples": { - "Summarize at management group scope": { "$ref": "./examples/SummarizeManagementGroupScope.json" } + "Summarize at management group scope": { "$ref": "./examples/PolicyStates_SummarizeManagementGroupScope.json" } } } }, @@ -188,12 +188,12 @@ } }, "x-ms-examples": { - "Query latest at subscription scope": { "$ref": "./examples/QuerySubscriptionScope.json" }, - "Time range; sort, select and limit": { "$ref": "./examples/TimeRangeSortSelectTop.json" }, - "Filter and group with aggregate": { "$ref": "./examples/FilterAndGroupByWithAggregate.json" }, - "Filter and group without aggregate": { "$ref": "./examples/FilterAndGroupByWithoutAggregate.json" }, - "Filter and aggregate only": { "$ref": "./examples/FilterAndAggregateOnly.json" }, - "Filter and multiple groups": { "$ref": "./examples/FilterAndMultipleGroups.json" } + "Query latest at subscription scope": { "$ref": "./examples/PolicyStates_QuerySubscriptionScope.json" }, + "Time range; sort, select and limit": { "$ref": "./examples/PolicyStates_TimeRangeSortSelectTop.json" }, + "Filter and group with aggregate": { "$ref": "./examples/PolicyStates_FilterAndGroupByWithAggregate.json" }, + "Filter and group without aggregate": { "$ref": "./examples/PolicyStates_FilterAndGroupByWithoutAggregate.json" }, + "Filter and aggregate only": { "$ref": "./examples/PolicyStates_FilterAndAggregateOnly.json" }, + "Filter and multiple groups": { "$ref": "./examples/PolicyStates_FilterAndMultipleGroups.json" } } } }, @@ -239,7 +239,7 @@ } }, "x-ms-examples": { - "Summarize at subscription scope": { "$ref": "./examples/SummarizeSubscriptionScope.json" } + "Summarize at subscription scope": { "$ref": "./examples/PolicyStates_SummarizeSubscriptionScope.json" } } } }, @@ -297,7 +297,7 @@ } }, "x-ms-examples": { - "Query latest at resource group scope": { "$ref": "./examples/QueryResourceGroupScope.json" } + "Query latest at resource group scope": { "$ref": "./examples/PolicyStates_QueryResourceGroupScope.json" } } } }, @@ -346,7 +346,7 @@ } }, "x-ms-examples": { - "Summarize at resource group scope": { "$ref": "./examples/SummarizeResourceGroupScope.json" } + "Summarize at resource group scope": { "$ref": "./examples/PolicyStates_SummarizeResourceGroupScope.json" } } } }, @@ -401,10 +401,10 @@ } }, "x-ms-examples": { - "Query all policy states at resource scope": { "$ref": "./examples/QueryResourceScope.json" }, - "Query all policy states at subscription level resource scope": { "$ref": "./examples/QuerySubscriptionLevelResourceScope.json" }, - "Query all policy states at nested resource scope": { "$ref": "./examples/QueryNestedResourceScope.json" }, - "Query all policy states at subscription level nested resource scope": { "$ref": "./examples/QuerySubscriptionLevelNestedResourceScope.json" } + "Query all policy states at resource scope": { "$ref": "./examples/PolicyStates_QueryResourceScope.json" }, + "Query all policy states at subscription level resource scope": { "$ref": "./examples/PolicyStates_QuerySubscriptionLevelResourceScope.json" }, + "Query all policy states at nested resource scope": { "$ref": "./examples/PolicyStates_QueryNestedResourceScope.json" }, + "Query all policy states at subscription level nested resource scope": { "$ref": "./examples/PolicyStates_QuerySubscriptionLevelNestedResourceScope.json" } } } }, @@ -450,7 +450,7 @@ } }, "x-ms-examples": { - "Summarize at resource scope": { "$ref": "./examples/SummarizeResourceScope.json" } + "Summarize at resource scope": { "$ref": "./examples/PolicyStates_SummarizeResourceScope.json" } } } }, @@ -511,7 +511,7 @@ } }, "x-ms-examples": { - "Query latest at subscription level policy set definition scope": { "$ref": "./examples/QuerySubscriptionLevelPolicySetDefinitionScope.json" } + "Query latest at subscription level policy set definition scope": { "$ref": "./examples/PolicyStates_QuerySubscriptionLevelPolicySetDefinitionScope.json" } } } }, @@ -563,7 +563,7 @@ } }, "x-ms-examples": { - "Summarize at policy set definition scope": { "$ref": "./examples/SummarizeSubscriptionLevelPolicySetDefinitionScope.json" } + "Summarize at policy set definition scope": { "$ref": "./examples/PolicyStates_SummarizeSubscriptionLevelPolicySetDefinitionScope.json" } } } }, @@ -624,7 +624,7 @@ } }, "x-ms-examples": { - "Query latest at subscription level policy definition scope": { "$ref": "./examples/QuerySubscriptionLevelPolicyDefinitionScope.json" } + "Query latest at subscription level policy definition scope": { "$ref": "./examples/PolicyStates_QuerySubscriptionLevelPolicyDefinitionScope.json" } } } }, @@ -676,7 +676,7 @@ } }, "x-ms-examples": { - "Summarize at policy definition scope": { "$ref": "./examples/SummarizeSubscriptionLevelPolicyDefinitionScope.json" } + "Summarize at policy definition scope": { "$ref": "./examples/PolicyStates_SummarizeSubscriptionLevelPolicyDefinitionScope.json" } } } }, @@ -737,7 +737,7 @@ } }, "x-ms-examples": { - "Query latest at subscription level policy assignment scope": { "$ref": "./examples/QuerySubscriptionLevelPolicyAssignmentScope.json" } + "Query latest at subscription level policy assignment scope": { "$ref": "./examples/PolicyStates_QuerySubscriptionLevelPolicyAssignmentScope.json" } } } }, @@ -789,7 +789,7 @@ } }, "x-ms-examples": { - "Summarize at policy assignment scope": { "$ref": "./examples/SummarizeSubscriptionLevelPolicyAssignmentScope.json" } + "Summarize at policy assignment scope": { "$ref": "./examples/PolicyStates_SummarizeSubscriptionLevelPolicyAssignmentScope.json" } } } }, @@ -853,7 +853,7 @@ } }, "x-ms-examples": { - "Query latest at resource group level policy assignment scope": { "$ref": "./examples/QueryResourceGroupLevelPolicyAssignmentScope.json" } + "Query latest at resource group level policy assignment scope": { "$ref": "./examples/PolicyStates_QueryResourceGroupLevelPolicyAssignmentScope.json" } } } }, @@ -908,7 +908,7 @@ } }, "x-ms-examples": { - "Summarize at policy assignment scope": { "$ref": "./examples/SummarizeResourceGroupLevelPolicyAssignmentScope.json" } + "Summarize at policy assignment scope": { "$ref": "./examples/PolicyStates_SummarizeResourceGroupLevelPolicyAssignmentScope.json" } } } }, @@ -936,7 +936,7 @@ } }, "x-ms-examples": { - "List operations": { "$ref": "./examples/ListOperations.json" } + "List operations": { "$ref": "./examples/PolicyStates_ListOperations.json" } } } }, @@ -970,7 +970,7 @@ } }, "x-ms-examples": { - "Get metadata": { "$ref": "./examples/GetMetadata.json" } + "Get metadata": { "$ref": "./examples/PolicyStates_GetMetadata.json" } } } } @@ -1308,7 +1308,7 @@ ], "x-ms-enum": { "name": "PolicyStatesResource", - "modelAsString": false + "modelAsString": true }, "description": "The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).", "x-ms-parameter-location": "method" diff --git a/specification/policyinsights/resource-manager/readme.md b/specification/policyinsights/resource-manager/readme.md index 5a4420c13852..26977a3bf913 100644 --- a/specification/policyinsights/resource-manager/readme.md +++ b/specification/policyinsights/resource-manager/readme.md @@ -64,8 +64,8 @@ These settings apply only when `--tag=package-2017-12` is specified on the comma ``` yaml $(tag) == 'package-2017-12' input-file: -- Microsoft.PolicyInsights/PolicyEvents/preview/2017-12-12-preview/policyEvents.json -- Microsoft.PolicyInsights/PolicyStates/preview/2017-12-12-preview/policyStates.json +- Microsoft.PolicyInsights/preview/2017-12-12-preview/policyEvents.json +- Microsoft.PolicyInsights/preview/2017-12-12-preview/policyStates.json ``` @@ -75,8 +75,8 @@ These settings apply only when `--tag=package-2017-10` is specified on the comma ``` yaml $(tag) == 'package-2017-10' input-file: -- Microsoft.PolicyInsights/PolicyEvents/preview/2017-10-17-preview/policyEvents.json -- Microsoft.PolicyInsights/PolicyStates/preview/2017-10-17-preview/policyStates.json +- Microsoft.PolicyInsights/preview/2017-10-17-preview/policyEvents.json +- Microsoft.PolicyInsights/preview/2017-10-17-preview/policyStates.json ``` @@ -86,8 +86,8 @@ These settings apply only when `--tag=package-2017-08` is specified on the comma ``` yaml $(tag) == 'package-2017-08' input-file: -- Microsoft.PolicyInsights/PolicyEvents/preview/2017-08-09-preview/policyEvents.json -- Microsoft.PolicyInsights/PolicyStates/preview/2017-08-09-preview/policyStates.json +- Microsoft.PolicyInsights/preview/2017-08-09-preview/policyEvents.json +- Microsoft.PolicyInsights/preview/2017-08-09-preview/policyStates.json ``` From 14bce7a312971c5831a8e2bd1f70d167bd42d96d Mon Sep 17 00:00:00 2001 From: Bulent Elmaci Date: Tue, 6 Mar 2018 11:27:33 -0800 Subject: [PATCH 13/13] Dummy change to kick the CI again --- specification/policyinsights/resource-manager/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/policyinsights/resource-manager/readme.md b/specification/policyinsights/resource-manager/readme.md index 26977a3bf913..52d0ccb02e23 100644 --- a/specification/policyinsights/resource-manager/readme.md +++ b/specification/policyinsights/resource-manager/readme.md @@ -7,7 +7,7 @@ This is the AutoRest configuration file for PolicyInsights. --- -## Getting Started +## Getting Started To build the SDK for PolicyInsights, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: > `autorest`