Policy Events - List Query Results For Policy Set Definition
Hiermee worden beleidsevenementen opgevraagd voor de definitie van de beleidsset op abonnementsniveau.
POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyEvents/default/queryResults?api-version=2019-10-01
POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyEvents/default/queryResults?api-version=2019-10-01&$top={$top}&$orderby={$orderby}&$select={$select}&$from={$from}&$to={$to}&$filter={$filter}&$apply={$apply}&$skiptoken={$skiptoken}
URI-parameters
Name | In | Vereist | Type | Description |
---|---|---|---|---|
authorization
|
path | True |
De naamruimte voor Microsoft Authorization-resourceprovider; alleen 'Microsoft.Authorization' is toegestaan. |
|
policy
|
path | True |
De naam van de virtuele resource onder PolicyEvents resourcetype; alleen 'standaard' is toegestaan. |
|
policy
|
path | True |
string |
Definitienaam van beleidsset. |
subscription
|
path | True |
string |
Microsoft Azure-abonnements-id. |
api-version
|
query | True |
string |
Client-API-versie. |
$apply
|
query |
string |
OData-expressie toepassen voor aggregaties. |
|
$filter
|
query |
string |
OData-filterexpressie. |
|
$from
|
query |
string date-time |
Tijdstempel met ISO 8601-indeling die de begintijd aangeeft van het interval dat moet worden opgevraagd. Als deze niet is opgegeven, gebruikt de service ($to - 1 dag). |
|
$orderby
|
query |
string |
Expressies ordenen met behulp van OData-notatie. Een of meer door komma's gescheiden kolomnamen met een optionele 'desc' (de standaardinstelling) of 'asc', bijvoorbeeld '$orderby=PolicyAssignmentId, ResourceId asc'. |
|
$select
|
query |
string |
Selecteer expressie met behulp van OData-notatie. Beperkt de kolommen voor elke record tot alleen de kolommen die zijn aangevraagd, bijvoorbeeld '$select=PolicyAssignmentId, ResourceId'. |
|
$skiptoken
|
query |
string |
Skiptoken wordt alleen opgegeven als een eerder antwoord een gedeeltelijk resultaat heeft geretourneerd als onderdeel van het element nextLink. |
|
$to
|
query |
string date-time |
Tijdstempel met ISO 8601-indeling die de eindtijd aangeeft van het interval dat moet worden opgevraagd. Als de service niet is opgegeven, wordt de aanvraagtijd gebruikt. |
|
$top
|
query |
integer int32 |
Maximum aantal records dat moet worden geretourneerd. |
Antwoorden
Name | Type | Description |
---|---|---|
200 OK |
Queryresultaten. |
|
Other Status Codes |
Foutreactie waarin wordt beschreven waarom de bewerking is mislukt. |
Beveiliging
azure_auth
Azure Active Directory OAuth2-stroom
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | uw gebruikersaccount imiteren |
Voorbeelden
Query at subscription level policy set definition scope |
Query at subscription level policy set definition scope with next link |
Query at subscription level policy set definition scope
Sample Request
POST https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyEvents/default/queryResults?api-version=2019-10-01
Sample Response
{
"@odata.nextLink": 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",
"@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",
"complianceState": "NonCompliant"
},
{
"@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",
"complianceState": "NonCompliant"
}
]
}
Query at subscription level policy set definition scope with next link
Sample Request
POST https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policySetDefinitions/3e3807c1-65c9-49e0-a406-82d8ae3e338c/providers/Microsoft.PolicyInsights/policyEvents/default/queryResults?api-version=2019-10-01&$skiptoken=WpmWfBSvPhkAK6QD
Sample Response
{
"@odata.nextLink": 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",
"@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",
"complianceState": "NonCompliant"
},
{
"@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",
"complianceState": "NonCompliant"
}
]
}
Definities
Name | Description |
---|---|
Authorization |
De naamruimte voor Microsoft Authorization-resourceprovider; alleen 'Microsoft.Authorization' is toegestaan. |
Component |
Details van onderdeel gebeurtenis. |
Error |
Foutdefinitie. |
Policy |
Record van beleidsevenementen. |
Policy |
Queryresultaten. |
Policy |
De naam van de virtuele resource onder PolicyEvents resourcetype; alleen 'standaard' is toegestaan. |
Query |
Foutreactie. |
AuthorizationNamespaceType
De naamruimte voor Microsoft Authorization-resourceprovider; alleen 'Microsoft.Authorization' is toegestaan.
Name | Type | Description |
---|---|---|
Microsoft.Authorization |
string |
ComponentEventDetails
Details van onderdeel gebeurtenis.
Name | Type | Description |
---|---|---|
id |
string |
Onderdeel-id. |
name |
string |
Onderdeelnaam. |
policyDefinitionAction |
string |
Beleidsdefinitieactie, d.w.w.v. effect. |
principalOid |
string |
Principal-object-id voor de gebruiker die de bewerking van het resourceonderdeel heeft geïnitieerd die de beleidsgebeurtenis heeft geactiveerd. |
tenantId |
string |
Tenant-id voor de beleids gebeurtenisrecord. |
timestamp |
string |
Tijdstempel voor gebeurtenisrecord van onderdeelbeleid. |
type |
string |
Onderdeeltype. |
Error
Foutdefinitie.
Name | Type | Description |
---|---|---|
code |
string |
Servicespecifieke foutcode die fungeert als de substatus voor de HTTP-foutcode. |
message |
string |
Beschrijving van de fout. |
PolicyEvent
Record van beleidsevenementen.
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 beleids gebeurtenisrecords geen entiteits-id hebben. |
complianceState |
string |
Nalevingsstatus van de resource. |
components |
Onderdeelgebeurtenisrecords worden alleen ingevuld wanneer de URL de component $expand=components bevat. |
|
effectiveParameters |
string |
Effectieve parameters voor de beleidstoewijzing. |
isCompliant |
boolean |
Vlag die aangeeft of de resource compatibel is met de beleidstoewijzing waarvoor deze is geëvalueerd. |
managementGroupIds |
string |
Door komma's gescheiden lijst met beheergroep-id's, die de hiërarchie vertegenwoordigen van de beheergroepen waaronder de resource zich bevindt. |
policyAssignmentId |
string |
Beleidstoewijzings-id. |
policyAssignmentName |
string |
Naam van beleidstoewijzing. |
policyAssignmentOwner |
string |
Eigenaar van beleidstoewijzing. |
policyAssignmentParameters |
string |
Parameters voor beleidstoewijzing. |
policyAssignmentScope |
string |
Bereik van beleidstoewijzing. |
policyDefinitionAction |
string |
Beleidsdefinitieactie, d.w.w.v. effect. |
policyDefinitionCategory |
string |
Beleidsdefinitiecategorie. |
policyDefinitionId |
string |
Beleidsdefinitie-id. |
policyDefinitionName |
string |
Naam van beleidsdefinitie. |
policyDefinitionReferenceId |
string |
Referentie-id voor de beleidsdefinitie in de beleidsset, als de beleidstoewijzing voor een beleidsset is. |
policySetDefinitionCategory |
string |
Definitiecategorie van beleidsset, als de beleidstoewijzing voor een beleidsset is. |
policySetDefinitionId |
string |
Definitie-id van beleidsset, als de beleidstoewijzing voor een beleidsset is. |
policySetDefinitionName |
string |
Definitienaam van beleidsset, als de beleidstoewijzing voor een beleidsset is. |
policySetDefinitionOwner |
string |
De eigenaar van de definitie van de beleidsset, als de beleidstoewijzing voor een beleidsset is. |
policySetDefinitionParameters |
string |
Definitieparameters voor beleidssets, als de beleidstoewijzing voor een beleidsset is. |
principalOid |
string |
Principal-object-id voor de gebruiker die de resourcebewerking heeft gestart die de beleidsgebeurtenis heeft geactiveerd. |
resourceGroup |
string |
Naam van de resourcegroep. |
resourceId |
string |
Resource-id. |
resourceLocation |
string |
Resourcelocatie. |
resourceTags |
string |
Lijst met resourcetags. |
resourceType |
string |
Resourcetype. |
subscriptionId |
string |
Abonnements-id. |
tenantId |
string |
Tenant-id voor de beleids gebeurtenisrecord. |
timestamp |
string |
Tijdstempel voor de beleids-gebeurtenisrecord. |
PolicyEventsQueryResults
Queryresultaten.
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 |
Aantal OData-entiteiten; vertegenwoordigt het aantal geretourneerde beleidsgebeurtenisrecords. |
@odata.nextLink |
string |
Odata volgende koppeling; URL om de volgende set resultaten op te halen. |
value |
Queryresultaten. |
PolicyEventsResourceType
De naam van de virtuele resource onder PolicyEvents resourcetype; alleen 'standaard' is toegestaan.
Name | Type | Description |
---|---|---|
default |
string |
QueryFailure
Foutreactie.
Name | Type | Description |
---|---|---|
error |
Foutdefinitie. |