Policy States - Summarize For Resource Group
Geeft een overzicht van beleidsstatussen voor de resources onder de resourcegroep.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/latest/summarize?api-version=2019-10-01
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/latest/summarize?api-version=2019-10-01&$top={$top}&$from={$from}&$to={$to}&$filter={$filter}
URI-parameters
Name | In | Vereist | Type | Description |
---|---|---|---|---|
policy
|
path | True |
De virtuele resource onder PolicyStates-resourcetype voor een overzichtsactie. In een bepaald tijdsbereik vertegenwoordigt 'latest' de meest recente beleidsstatus(s) en is dit de enige toegestane waarde. |
|
resource
|
path | True |
string |
Naam van resourcegroep. |
subscription
|
path | True |
string |
Microsoft Azure-abonnements-id. |
api-version
|
query | True |
string |
Client-API-versie. |
$filter
|
query |
string |
OData-filterexpressie. |
|
$from
|
query |
string (date-time) |
Met ISO 8601 opgemaakte tijdstempel wordt de begintijd van het interval opgegeven waarop een query moet worden uitgevoerd. Wanneer deze niet is opgegeven, gebruikt de service ($to - 1 dag). |
|
$to
|
query |
string (date-time) |
Met ISO 8601 opgemaakte tijdstempel wordt de eindtijd van het interval opgegeven waarop een query moet worden uitgevoerd. Wanneer deze niet is opgegeven, gebruikt de service de aanvraagtijd. |
|
$top
|
query |
integer (int32) minimum: 0 |
Maximum aantal records dat moet worden geretourneerd. |
Antwoorden
Name | Type | Description |
---|---|---|
200 OK |
Resultaten samenvatten. |
|
Other Status Codes |
Foutreactie waarin wordt beschreven waarom de bewerking is mislukt. |
Beveiliging
azure_auth
Azure Active Directory OAuth2-stroom
Type:
oauth2
Stroom:
implicit
Autorisatie-URL:
https://login.microsoftonline.com/common/oauth2/authorize
Bereiken
Name | Description |
---|---|
user_impersonation | Uw gebruikersaccount imiteren |
Voorbeelden
Summarize at resource group scope
Voorbeeldaanvraag
Voorbeeldrespons
{
"@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=2019-10-01&$from=2019-10-12 19:55:09Z&$to=2019-10-13 19:55:09Z&$filter=IsCompliant eq false",
"nonCompliantResources": 55,
"nonCompliantPolicies": 20,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 55
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 2
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
]
},
"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=2019-10-01&$from=2019-10-12 19:55:09Z&$to=2019-10-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,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 55
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 2
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
]
},
"policyDefinitions": [
{
"policyDefinitionId": "/providers/microsoft.management/managementgroups/myManagementGroup/providers/microsoft.authorization/policydefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d",
"policyDefinitionReferenceId": "",
"policyDefinitionGroupNames": [
"group1"
],
"effect": "audit",
"results": {
"queryResultsUri": "https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2019-10-01&$from=2019-10-12 19:55:09Z&$to=2019-10-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": 100,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 100
}
],
"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 PolicyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/186044306c044a1d8c0ff76c' and 'group1' IN PolicyDefinitionGroupNames",
"nonCompliantResources": 100,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 100
}
],
"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/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2019-10-01&$from=2019-10-12 19:55:09Z&$to=2019-10-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,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 55
}
],
"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": "",
"policyDefinitionGroupNames": [
"group1"
],
"effect": "audit",
"results": {
"queryResultsUri": "https://management.azure.com/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/queryResults?api-version=2019-10-01&$from=2019-10-12 19:55:09Z&$to=2019-10-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,
"resourceDetails": [
{
"complianceState": "compliant",
"count": 140
},
{
"complianceState": "noncompliant",
"count": 55
}
],
"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": 55
}
],
"policyDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
],
"policyGroupDetails": [
{
"complianceState": "noncompliant",
"count": 1
}
]
}
}
]
}
]
}
]
}
Definities
Name | Description |
---|---|
Compliance |
Het samenvouwen van de nalevingsstatus. |
Error |
Foutdefinitie. |
Policy |
Overzicht van beleidstoewijzing. |
Policy |
Samenvatting van beleidsdefinities. |
Policy |
Samenvatting van beleidsdefinitiegroep. |
Policy |
De virtuele resource onder PolicyStates-resourcetype voor een overzichtsactie. In een bepaald tijdsbereik vertegenwoordigt 'latest' de meest recente beleidsstatus(s) en is dit de enige toegestane waarde. |
Query |
Foutreactie. |
Summarize |
Actieresultaten samenvatten. |
Summary |
Samenvattingsresultaten. |
Summary |
Nalevingsoverzicht op een bepaald overzichtsniveau. |
ComplianceDetail
Het samenvouwen van de nalevingsstatus.
Name | Type | Description |
---|---|---|
complianceState |
string |
De nalevingsstatus. |
count |
integer (int32) |
Samengevatte tellingswaarde voor deze nalevingsstatus. |
Error
Foutdefinitie.
Name | Type | Description |
---|---|---|
code |
string |
Servicespecifieke foutcode die fungeert als de substatus voor de HTTP-foutcode. |
message |
string |
Beschrijving van de fout. |
PolicyAssignmentSummary
Overzicht van beleidstoewijzing.
Name | Type | Description |
---|---|---|
policyAssignmentId |
string |
Id van beleidstoewijzing. |
policyDefinitions |
Overzicht van beleidsdefinities. |
|
policyGroups |
Samenvatting van beleidsdefinitiegroep. |
|
policySetDefinitionId |
string |
Definitie-id van beleidsset, als de beleidstoewijzing voor een beleidsset is. |
results |
Nalevingsoverzicht voor de beleidstoewijzing. |
PolicyDefinitionSummary
Samenvatting van beleidsdefinities.
Name | Type | Description |
---|---|---|
effect |
string |
Beleidseffect, bijvoorbeeld actie voor beleidsdefinities. |
policyDefinitionGroupNames |
string[] |
Namen van beleidsdefinitiegroepen. |
policyDefinitionId |
string |
Id van beleidsdefinitie. |
policyDefinitionReferenceId |
string |
Referentie-id voor beleidsdefinities. |
results |
Nalevingsoverzicht voor de beleidsdefinitie. |
PolicyGroupSummary
Samenvatting van beleidsdefinitiegroep.
Name | Type | Description |
---|---|---|
policyGroupName |
string |
Naam van beleidsgroep. |
results |
Overzicht van naleving voor de beleidsdefinitiegroep. |
PolicyStatesSummaryResourceType
De virtuele resource onder PolicyStates-resourcetype voor een overzichtsactie. In een bepaald tijdsbereik vertegenwoordigt 'latest' de meest recente beleidsstatus(s) en is dit de enige toegestane waarde.
Waarde | Description |
---|---|
latest |
QueryFailure
Foutreactie.
Name | Type | Description |
---|---|---|
error |
Foutdefinitie. |
SummarizeResults
Actieresultaten samenvatten.
Name | Type | Description |
---|---|---|
@odata.context |
string |
OData-contexttekenreeks; wordt gebruikt door OData-clients om typegegevens op te lossen op basis van metagegevens. |
@odata.count |
integer (int32) minimum: 1maximum: 1 |
Aantal OData-entiteiten; vertegenwoordigt het aantal geretourneerde samenvattingen; altijd ingesteld op 1. |
value |
Summary[] |
Actieresultaten samenvatten. |
Summary
Samenvattingsresultaten.
Name | Type | Description |
---|---|---|
@odata.context |
string |
OData-contexttekenreeks; wordt gebruikt door OData-clients om typegegevens op te lossen op basis van metagegevens. |
@odata.id |
string |
OData-entiteits-id; altijd ingesteld op null, omdat samenvattingen geen entiteits-id hebben. |
policyAssignments |
Overzicht van beleidstoewijzingen. |
|
results |
Overzicht van naleving voor alle beleidstoewijzingen. |
SummaryResults
Nalevingsoverzicht op een bepaald overzichtsniveau.
Name | Type | Description |
---|---|---|
nonCompliantPolicies |
integer (int32) minimum: 0 |
Aantal niet-compatibele beleidsregels. |
nonCompliantResources |
integer (int32) minimum: 0 |
Aantal niet-compatibele resources. |
policyDetails |
De samenvatting van het beleidsartefact op dit niveau. Voor het bereikniveau van de query vertegenwoordigt het overzicht van beleidstoewijzing. Voor beleidstoewijzingsniveau vertegenwoordigt het overzicht van beleidsdefinities. |
|
policyGroupDetails |
De samenvatting van de beleidsdefinitiegroep op dit niveau. |
|
queryResultsUri |
string |
HTTP POST-URI voor queryResults-actie op Microsoft.PolicyInsights om onbewerkte resultaten op te halen voor het nalevingsoverzicht. Deze eigenschap is niet standaard beschikbaar in toekomstige API-versies, maar kan expliciet worden opgevraagd. |
resourceDetails |
De samenvatting van de resources op dit niveau. |