Bagikan melalui


Policy States - Summarize For Subscription

Meringkas status kebijakan untuk sumber daya di bawah langganan.

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}

Parameter URI

Nama Dalam Diperlukan Jenis Deskripsi
policyStatesSummaryResource
path True

PolicyStatesSummaryResourceType

Sumber daya virtual di bawah Jenis sumber daya PolicyStates untuk meringkas tindakan. Dalam rentang waktu tertentu, 'terbaru' mewakili status kebijakan terbaru dan merupakan satu-satunya nilai yang diizinkan.

subscriptionId
path True

string

ID langganan Microsoft Azure.

api-version
query True

string

Versi Api Klien.

$filter
query

string

Ekspresi filter OData.

$from
query

string

date-time

Tanda waktu berformat ISO 8601 yang menentukan waktu mulai interval untuk kueri. Ketika tidak ditentukan, layanan menggunakan ($to - 1 hari).

$to
query

string

date-time

Tanda waktu berformat ISO 8601 yang menentukan waktu akhir interval untuk kueri. Ketika tidak ditentukan, layanan menggunakan waktu permintaan.

$top
query

integer

int32

Jumlah maksimum rekaman yang akan dikembalikan.

Respons

Nama Jenis Deskripsi
200 OK

SummarizeResults

Meringkas hasil.

Other Status Codes

QueryFailure

Respons kesalahan yang menjelaskan mengapa operasi gagal.

Keamanan

azure_auth

Alur OAuth2 Azure Active Directory

Jenis: oauth2
Alur: implicit
URL Otorisasi: https://login.microsoftonline.com/common/oauth2/authorize

Cakupan

Nama Deskripsi
user_impersonation meniru akun pengguna Anda

Contoh

Summarize at subscription scope
Summarize at subscription scope for a policy definition group

Summarize at subscription scope

Permintaan sampel

POST https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/summarize?api-version=2019-10-01&$top=5

Respon sampel

{
  "@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

Permintaan sampel

POST https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.PolicyInsights/policyStates/latest/summarize?api-version=2019-10-01&$top=1&$filter='group1' IN PolicyDefinitionGroupNames

Respon sampel

{
  "@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
                  }
                ]
              }
            }
          ]
        }
      ]
    }
  ]
}

Definisi

Nama Deskripsi
ComplianceDetail

Rollup status kepatuhan.

Error

Definisi kesalahan.

PolicyAssignmentSummary

Ringkasan penetapan kebijakan.

PolicyDefinitionSummary

Ringkasan definisi kebijakan.

PolicyGroupSummary

Ringkasan grup definisi kebijakan.

PolicyStatesSummaryResourceType

Sumber daya virtual di bawah Jenis sumber daya PolicyStates untuk meringkas tindakan. Dalam rentang waktu tertentu, 'terbaru' mewakili status kebijakan terbaru dan merupakan satu-satunya nilai yang diizinkan.

QueryFailure

Respons kesalahan.

SummarizeResults

Meringkas hasil tindakan.

Summary

Hasil ringkasan.

SummaryResults

Ringkasan kepatuhan pada tingkat ringkasan tertentu.

ComplianceDetail

Rollup status kepatuhan.

Nama Jenis Deskripsi
complianceState

string

Status kepatuhan.

count

integer

Nilai jumlah ringkasan untuk status kepatuhan ini.

Error

Definisi kesalahan.

Nama Jenis Deskripsi
code

string

Kode kesalahan khusus layanan yang berfungsi sebagai substatus untuk kode kesalahan HTTP.

message

string

Deskripsi kesalahan.

PolicyAssignmentSummary

Ringkasan penetapan kebijakan.

Nama Jenis Deskripsi
policyAssignmentId

string

ID penetapan kebijakan.

policyDefinitions

PolicyDefinitionSummary[]

Ringkasan definisi kebijakan.

policyGroups

PolicyGroupSummary[]

Ringkasan grup definisi kebijakan.

policySetDefinitionId

string

ID definisi kumpulan kebijakan, jika penetapan kebijakan adalah untuk kumpulan kebijakan.

results

SummaryResults

Ringkasan kepatuhan untuk penetapan kebijakan.

PolicyDefinitionSummary

Ringkasan definisi kebijakan.

Nama Jenis Deskripsi
effect

string

Efek kebijakan, yaitu tindakan definisi kebijakan.

policyDefinitionGroupNames

string[]

Nama grup definisi kebijakan.

policyDefinitionId

string

ID definisi kebijakan.

policyDefinitionReferenceId

string

ID referensi definisi kebijakan.

results

SummaryResults

Ringkasan kepatuhan untuk definisi kebijakan.

PolicyGroupSummary

Ringkasan grup definisi kebijakan.

Nama Jenis Deskripsi
policyGroupName

string

Nama grup kebijakan.

results

SummaryResults

Ringkasan kepatuhan untuk grup definisi kebijakan.

PolicyStatesSummaryResourceType

Sumber daya virtual di bawah Jenis sumber daya PolicyStates untuk meringkas tindakan. Dalam rentang waktu tertentu, 'terbaru' mewakili status kebijakan terbaru dan merupakan satu-satunya nilai yang diizinkan.

Nama Jenis Deskripsi
latest

string

QueryFailure

Respons kesalahan.

Nama Jenis Deskripsi
error

Error

Definisi kesalahan.

SummarizeResults

Meringkas hasil tindakan.

Nama Jenis Deskripsi
@odata.context

string

String konteks OData; digunakan oleh klien OData untuk mengatasi informasi jenis berdasarkan metadata.

@odata.count

integer

Jumlah entitas OData; menunjukkan jumlah ringkasan yang dikembalikan; selalu atur ke 1.

value

Summary[]

Meringkas hasil tindakan.

Summary

Hasil ringkasan.

Nama Jenis Deskripsi
@odata.context

string

String konteks OData; digunakan oleh klien OData untuk mengatasi informasi jenis berdasarkan metadata.

@odata.id

string

ID entitas OData; selalu atur ke null karena ringkasan tidak memiliki ID entitas.

policyAssignments

PolicyAssignmentSummary[]

Ringkasan penetapan kebijakan.

results

SummaryResults

Ringkasan kepatuhan untuk semua penetapan kebijakan.

SummaryResults

Ringkasan kepatuhan pada tingkat ringkasan tertentu.

Nama Jenis Deskripsi
nonCompliantPolicies

integer

Jumlah kebijakan yang tidak sesuai.

nonCompliantResources

integer

Jumlah sumber daya yang tidak sesuai.

policyDetails

ComplianceDetail[]

Ringkasan artefak kebijakan pada tingkat ini. Untuk tingkat cakupan kueri, ini mewakili ringkasan penetapan kebijakan. Untuk tingkat penetapan kebijakan, ini mewakili ringkasan definisi kebijakan.

policyGroupDetails

ComplianceDetail[]

Ringkasan grup definisi kebijakan pada tingkat ini.

queryResultsUri

string

HTTP POST URI untuk tindakan queryResults di Microsoft.PolicyInsights untuk mengambil hasil mentah untuk ringkasan kepatuhan. Properti ini tidak akan tersedia secara default dalam versi API yang akan datang, tetapi dapat dikueri secara eksplisit.

resourceDetails

ComplianceDetail[]

Ringkasan sumber daya pada tingkat ini.