Policy States - Summarize For Subscription
Podsumowuje stany zasad dla zasobów w ramach subskrypcji.
POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/latest/summarize?api-version=2019-10-01
POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/latest/summarize?api-version=2019-10-01&$top={$top}&$from={$from}&$to={$to}&$filter={$filter}
Parametry identyfikatora URI
Nazwa | W | Wymagane | Typ | Opis |
---|---|---|---|---|
policy
|
path | True |
Zasób wirtualny w obszarze PolicyStates typ zasobu dla akcji podsumowania. W danym zakresie czasu "latest" reprezentuje najnowsze stany zasad i jest jedyną dozwoloną wartością. |
|
subscription
|
path | True |
string |
Identyfikator subskrypcji platformy Microsoft Azure. |
api-version
|
query | True |
string |
Wersja interfejsu API klienta. |
$filter
|
query |
string |
Wyrażenie filtru OData. |
|
$from
|
query |
string (date-time) |
Sygnatura czasowa w formacie ISO 8601 określająca godzinę rozpoczęcia interwału zapytania. Jeśli nie zostanie określona, usługa używa ($to — 1-dniowy). |
|
$to
|
query |
string (date-time) |
Sygnatura czasowa w formacie ISO 8601 określająca godzinę zakończenia interwału do zapytania. Jeśli nie zostanie określony, usługa używa czasu żądania. |
|
$top
|
query |
integer (int32) minimum: 0 |
Maksymalna liczba rekordów do zwrócenia. |
Odpowiedzi
Nazwa | Typ | Opis |
---|---|---|
200 OK |
Podsumuj wyniki. |
|
Other Status Codes |
Odpowiedź na błąd opisująca, dlaczego operacja nie powiodła się. |
Zabezpieczenia
azure_auth
Przepływ protokołu OAuth2 usługi Azure Active Directory
Typ:
oauth2
Flow:
implicit
Adres URL autoryzacji:
https://login.microsoftonline.com/common/oauth2/authorize
Zakresy
Nazwa | Opis |
---|---|
user_impersonation | personifikacja konta użytkownika |
Przykłady
Summarize at subscription scope |
Summarize at subscription scope for a policy definition group |
Summarize at subscription scope
Przykładowe żądanie
Przykładowa odpowiedź
{
"@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=2019-10-01&$from=2019-10-12 19:48:53Z&$to=2019-10-13 19:48:53Z&$filter=IsCompliant eq false",
"nonCompliantResources": 619,
"nonCompliantPolicies": 40,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 619
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
]
},
"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=2019-10-01&$from=2019-10-12 19:48:53Z&$to=2019-10-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,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 557
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
]
},
"policyDefinitions": [
{
"policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474",
"policyDefinitionReferenceId": "1b249ab8b4741b249ab8b474",
"policyDefinitionGroupNames": [
"group1"
],
"effect": "audit",
"results": {
"queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2019-10-01&$from=2019-10-12 19:48:53Z&$to=2019-10-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,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 557
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
]
}
}
],
"policyGroups": [
{
"policyGroupName": "group1",
"results": {
"queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2019-10-01&$from=2019-10-12 19:48:53Z&$to=2019-10-13 19:48:53Z&$filter='group1' IN PolicyDefinitionGroupNames and PolicySetDefinitiontId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/a03db67e-a286-43c3-9098-b2da83d361ad' and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01' and 'group1' IN PolicyDefinitionGroupNames",
"nonCompliantResources": 531,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 557
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 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=2019-10-01&$from=2019-10-12 19:48:53Z&$to=2019-10-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,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 557
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
]
},
"policyDefinitions": [
{
"policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1",
"policyDefinitionReferenceId": "",
"effect": "audit",
"results": {
"queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2019-10-01&$from=2019-10-12 19:48:53Z&$to=2019-10-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,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 557
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
]
}
}
],
"policyGroups": [
{
"policyGroupName": "",
"results": {
"queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2019-10-01&$from=2019-10-12 19:48:53Z&$to=2019-10-13 19:48:53Z&$filter=PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/d9da7e80af6344ab9d342aa7'",
"nonCompliantResources": 557,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 14
},
{
"complianceState": "noncompliant",
"count": 557
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 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=2019-10-01&$from=2019-10-12 19:48:53Z&$to=2019-10-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,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 557
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
]
},
"policyDefinitions": [
{
"policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/c8b79b49-a579-4045-984e-1b249ab8b474",
"policyDefinitionReferenceId": "",
"effect": "audit",
"results": {
"queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2019-10-01&$from=2019-10-12 19:48:53Z&$to=2019-10-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,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 557
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
]
}
}
],
"policyGroups": [
{
"policyGroupName": "",
"results": {
"queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2019-10-01&$from=2019-10-12 19:48:53Z&$to=2019-10-13 19:48:53Z&$filter=PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/dcda79d769674aea8bfcaa49'",
"nonCompliantResources": 557,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 14
},
{
"complianceState": "noncompliant",
"count": 557
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 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=2019-10-01&$from=2019-10-12 19:48:53Z&$to=2019-10-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,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 557
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
]
},
"policyDefinitions": [
{
"policyDefinitionId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d",
"policyDefinitionReferenceId": "2134906828137356512",
"policyDefinitionGroupNames": [
"group1"
],
"effect": "audit",
"results": {
"queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2019-10-01&$from=2019-10-12 19:48:53Z&$to=2019-10-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,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 557
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
]
}
}
],
"policyGroups": [
{
"policyGroupName": "group1",
"results": {
"queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2019-10-01&$from=2019-10-12 19:48:53Z&$to=2019-10-13 19:48:53Z&$filter='group1' IN PolicyDefinitionGroupNames and PolicySetDefinitiontId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/335cefd2-ab16-430f-b364-974a170eb1d5' and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/1ef5d536aec743a0aa801c1a' and 'group1' IN PolicyDefinitionGroupNames",
"nonCompliantResources": 557,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 557
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 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.PolicyInsights/policyStates/latest/queryResults?api-version=2019-10-01&$from=2019-10-12 19:48:53Z&$to=2019-10-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,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 552
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 3
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
]
},
"policyDefinitions": [
{
"policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1",
"policyDefinitionReferenceId": "5434906828137356512",
"policyDefinitionGroupNames": [
"group1"
],
"effect": "audit",
"results": {
"queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2019-10-01&$from=2019-10-12 19:48:53Z&$to=2019-10-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,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 552
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
]
}
},
{
"policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/locationauditdefinition",
"policyDefinitionReferenceId": "8724906828137356512",
"policyDefinitionGroupNames": [
"group1"
],
"effect": "audit",
"results": {
"queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2019-10-01&$from=2019-10-12 19:48:53Z&$to=2019-10-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,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 29
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
]
}
},
{
"policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e3682",
"policyDefinitionReferenceId": "7254906828137356512",
"policyDefinitionGroupNames": [
"group1"
],
"effect": "audit",
"results": {
"queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2019-10-01&$from=2019-10-12 19:48:53Z&$to=2019-10-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,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 2
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
]
}
}
],
"policyGroups": [
{
"policyGroupName": "group1",
"results": {
"queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2019-10-01&$from=2019-10-12 19:48:53Z&$to=2019-10-13 19:48:53Z&$filter='group1' IN PolicyDefinitionGroupNames and PolicySetDefinitiontId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c' and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/3f3c4330183b4e218fe6fd29' and 'group1' IN PolicyDefinitionGroupNames",
"nonCompliantResources": 557,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 552
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 3
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
]
}
}
]
}
]
}
]
}
Summarize at subscription scope for a policy definition group
Przykładowe żądanie
Przykładowa odpowiedź
{
"@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=2019-10-01&$from=2019-10-12 19:48:53Z&$to=2019-10-13 19:48:53Z&$filter='group1' IN PolicyDefinitionGroupNames",
"nonCompliantResources": 557,
"nonCompliantPolicies": 1,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 17
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
]
},
"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=2019-10-01&$from=2019-10-12 19:48:53Z&$to=2019-10-13 19:48:53Z&$filter='group1' IN PolicyDefinitionGroupNames and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01'",
"nonCompliantResources": 557,
"nonCompliantPolicies": 1,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 17
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 2
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
]
},
"policyDefinitions": [
{
"policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/ab379b49-a579-4045-984e-1b249ab8b474",
"policyDefinitionReferenceId": "1595906828137356523",
"policyDefinitionGroupNames": [
"group1"
],
"effect": "audit",
"results": {
"queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2019-10-01&$from=2019-10-12 19:48:53Z&$to=2019-10-13 19:48:53Z&$filter='group1' IN PolicyDefinitionGroupNames 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/ab379b49-a579-4045-984e-1b249ab8b474'",
"nonCompliantResources": 557,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 14
},
{
"complianceState": "noncompliant",
"count": 557
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
]
}
},
{
"policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policydefinitions/24813039-7534-408a-9842-eb99f45721b1",
"policyDefinitionReferenceId": "2134906828137356512",
"policyDefinitionGroupNames": [
"group1"
],
"effect": "audit",
"results": {
"queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2019-10-01&$from=2019-10-12 19:48:53Z&$to=2019-10-13 19:48:53Z&$filter='group1' IN PolicyDefinitionGroupNames 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/24813039-7534-408a-9842-eb99f45721b1'",
"nonCompliantResources": 34,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 510
},
{
"complianceState": "noncompliant",
"count": 34
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
]
}
}
],
"policyGroups": [
{
"policyGroupName": "group1",
"results": {
"queryResultsUri": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2019-10-01&$from=2019-10-12 19:48:53Z&$to=2019-10-13 19:48:53Z&$filter='group1' IN PolicyDefinitionGroupNames and PolicySetDefinitiontId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policysetdefinitions/a03db67e-a286-43c3-9098-b2da83d361ad' and PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/e46af646ebdb461dba708e01' and 'group1' IN PolicyDefinitionGroupNames",
"nonCompliantResources": 557,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 14
},
{
"complianceState": "noncompliant",
"count": 557
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 2
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
]
}
}
]
}
]
}
]
}
Definicje
Nazwa | Opis |
---|---|
Compliance |
Zestawienie stanu zgodności. |
Error |
Definicja błędu. |
Policy |
Podsumowanie przypisania zasad. |
Policy |
Podsumowanie definicji zasad. |
Policy |
Podsumowanie grupy definicji zasad. |
Policy |
Zasób wirtualny w obszarze PolicyStates typ zasobu dla akcji podsumowania. W danym zakresie czasu "latest" reprezentuje najnowsze stany zasad i jest jedyną dozwoloną wartością. |
Query |
Odpowiedź na błąd. |
Summarize |
Podsumowanie wyników akcji. |
Summary |
Wyniki podsumowania. |
Summary |
Podsumowanie zgodności na określonym poziomie podsumowania. |
ComplianceDetail
Zestawienie stanu zgodności.
Nazwa | Typ | Opis |
---|---|---|
complianceState |
string |
Stan zgodności. |
count |
integer (int32) |
Podsumowana wartość licznika dla tego stanu zgodności. |
Error
Definicja błędu.
Nazwa | Typ | Opis |
---|---|---|
code |
string |
Kod błędu specyficzny dla usługi, który służy jako podstatu kodu błędu HTTP. |
message |
string |
Opis błędu. |
PolicyAssignmentSummary
Podsumowanie przypisania zasad.
Nazwa | Typ | Opis |
---|---|---|
policyAssignmentId |
string |
Identyfikator przypisania zasad. |
policyDefinitions |
Podsumowanie definicji zasad. |
|
policyGroups |
Podsumowanie grupy definicji zasad. |
|
policySetDefinitionId |
string |
Identyfikator definicji zestawu zasad, jeśli przypisanie zasad dotyczy zestawu zasad. |
results |
Podsumowanie zgodności dla przypisania zasad. |
PolicyDefinitionSummary
Podsumowanie definicji zasad.
Nazwa | Typ | Opis |
---|---|---|
effect |
string |
Efekt zasad, tj. akcja definicji zasad. |
policyDefinitionGroupNames |
string[] |
Nazwy grup definicji zasad. |
policyDefinitionId |
string |
Identyfikator definicji zasad. |
policyDefinitionReferenceId |
string |
Identyfikator odwołania definicji zasad. |
results |
Podsumowanie zgodności definicji zasad. |
PolicyGroupSummary
Podsumowanie grupy definicji zasad.
Nazwa | Typ | Opis |
---|---|---|
policyGroupName |
string |
Nazwa grupy zasad. |
results |
Podsumowanie zgodności dla grupy definicji zasad. |
PolicyStatesSummaryResourceType
Zasób wirtualny w obszarze PolicyStates typ zasobu dla akcji podsumowania. W danym zakresie czasu "latest" reprezentuje najnowsze stany zasad i jest jedyną dozwoloną wartością.
Wartość | Opis |
---|---|
latest |
QueryFailure
Odpowiedź na błąd.
Nazwa | Typ | Opis |
---|---|---|
error |
Definicja błędu. |
SummarizeResults
Podsumowanie wyników akcji.
Nazwa | Typ | Opis |
---|---|---|
@odata.context |
string |
Ciąg kontekstu OData; używany przez klientów OData do rozpoznawania informacji o typie na podstawie metadanych. |
@odata.count |
integer (int32) minimum: 1maximum: 1 |
Liczba jednostek OData; reprezentuje liczbę zwróconych podsumowań; zawsze ustawiono wartość 1. |
value |
Summary[] |
Podsumowanie wyników akcji. |
Summary
Wyniki podsumowania.
Nazwa | Typ | Opis |
---|---|---|
@odata.context |
string |
Ciąg kontekstu OData; używany przez klientów OData do rozpoznawania informacji o typie na podstawie metadanych. |
@odata.id |
string |
Identyfikator jednostki OData; zawsze ustawiono wartość null, ponieważ podsumowania nie mają identyfikatora jednostki. |
policyAssignments |
Podsumowanie przypisań zasad. |
|
results |
Podsumowanie zgodności dla wszystkich przypisań zasad. |
SummaryResults
Podsumowanie zgodności na określonym poziomie podsumowania.
Nazwa | Typ | Opis |
---|---|---|
nonCompliantPolicies |
integer (int32) minimum: 0 |
Liczba niezgodnych zasad. |
nonCompliantResources |
integer (int32) minimum: 0 |
Liczba niezgodnych zasobów. |
policyDetails |
Podsumowanie artefaktów zasad na tym poziomie. W przypadku poziomu zakresu zapytania reprezentuje podsumowanie przypisania zasad. W przypadku poziomu przypisania zasad reprezentuje podsumowanie definicji zasad. |
|
policyGroupDetails |
Podsumowanie grupy definicji zasad na tym poziomie. |
|
queryResultsUri |
string |
Identyfikator URI HTTP POST dla akcji queryResults w witrynie Microsoft.PolicyInsights w celu pobrania nieprzetworzonych wyników podsumowania zgodności. Ta właściwość nie będzie domyślnie dostępna w przyszłych wersjach interfejsu API, ale może być jawnie odpytywane. |
resourceDetails |
Podsumowanie zasobów na tym poziomie. |