{ "swagger": "2.0", "info": { "title": "RemediationsClient", "version": "2024-10-01", "description": "Query component policy states at varying resource scopes for Resource Provider mode policies.", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" } ] }, "schemes": [ "https" ], "host": "management.azure.com", "produces": [ "application/json" ], "consumes": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "description": "Azure Active Directory OAuth2 Flow.", "flow": "implicit", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { "user_impersonation": "impersonate your user account" } } }, "tags": [], "paths": { "/{resourceId}/providers/Microsoft.PolicyInsights/attestations": { "get": { "operationId": "Attestations_ListForResource", "description": "Gets all attestations for a resource.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "resourceId", "in": "path", "description": "Resource ID.", "required": true, "type": "string", "x-ms-skip-url-encoding": true }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/AttestationListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List attestations at individual resource scope": { "$ref": "./examples/Attestations_ListResourceScope.json" }, "List attestations at individual resource scope with query parameters": { "$ref": "./examples/Attestations_ListResourceScope_WithQuery.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/{resourceId}/providers/Microsoft.PolicyInsights/attestations/{attestationName}": { "get": { "operationId": "Attestations_GetAtResource", "description": "Gets an existing attestation at resource scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "resourceId", "in": "path", "description": "Resource ID.", "required": true, "type": "string", "x-ms-skip-url-encoding": true }, { "name": "attestationName", "in": "path", "description": "The name of the attestation.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/Attestation" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Get attestation at individual resource scope": { "$ref": "./examples/Attestations_GetResourceScope.json" } } }, "put": { "operationId": "Attestations_CreateOrUpdateAtResource", "description": "Creates or updates an attestation at resource scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "resourceId", "in": "path", "description": "Resource ID.", "required": true, "type": "string", "x-ms-skip-url-encoding": true }, { "name": "attestationName", "in": "path", "description": "The name of the attestation.", "required": true, "type": "string" }, { "name": "parameters", "in": "body", "description": "The attestation parameters.", "required": true, "schema": { "$ref": "#/definitions/Attestation" } } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/Attestation" } }, "201": { "description": "Resource 'Attestation' create operation succeeded", "schema": { "$ref": "#/definitions/Attestation" }, "headers": { "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Create attestation at individual resource scope": { "$ref": "./examples/Attestations_CreateResourceScope.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location", "final-state-schema": "#/definitions/Attestation" }, "x-ms-long-running-operation": true }, "delete": { "operationId": "Attestations_DeleteAtResource", "description": "Deletes an existing attestation at individual resource scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "resourceId", "in": "path", "description": "Resource ID.", "required": true, "type": "string", "x-ms-skip-url-encoding": true }, { "name": "attestationName", "in": "path", "description": "The name of the attestation.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded." }, "204": { "description": "Resource does not exist." }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Delete attestation at individual resource scope": { "$ref": "./examples/Attestations_DeleteResourceScope.json" } } } }, "/{resourceId}/providers/Microsoft.PolicyInsights/componentPolicyStates/{componentPolicyStatesResource}/queryResults": { "post": { "operationId": "ComponentPolicyStates_ListQueryResultsForResource", "description": "Queries component policy states for the resource.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "resourceId", "in": "path", "description": "Resource ID.", "required": true, "type": "string", "x-ms-skip-url-encoding": true }, { "name": "componentPolicyStatesResource", "in": "path", "description": "The virtual resource under ComponentPolicyStates resource type. In a given time range, 'latest' represents the latest component policy state(s).", "required": true, "type": "string", "enum": [ "latest" ], "x-ms-enum": { "name": "ComponentPolicyStatesResource", "modelAsString": true, "values": [ { "name": "latest", "value": "latest", "description": "latest" } ] } }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$orderby", "in": "query", "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", "required": false, "type": "string", "x-ms-client-name": "OrderBy" }, { "name": "$select", "in": "query", "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", "required": false, "type": "string", "x-ms-client-name": "Select" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" }, { "name": "$apply", "in": "query", "description": "OData apply expression for aggregations.", "required": false, "type": "string", "x-ms-client-name": "Apply" }, { "name": "$expand", "in": "query", "description": "The $expand query parameter.", "required": false, "type": "string", "x-ms-client-name": "Expand" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/ComponentPolicyStatesQueryResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Query latest component policy compliance state at resource scope filtered by given component id.": { "$ref": "./examples/ComponentPolicyStates_QueryResourceScopeFilterByComponentId.json" }, "Query latest component policy compliance state count grouped by component type at resource scope filtered by given assignment.": { "$ref": "./examples/ComponentPolicyStates_QueryResourceScopeGroupByComponentTypeWithAggregate.json" }, "Query latest component policy states at nested resource scope": { "$ref": "./examples/ComponentPolicyStates_QueryNestedResourceScope.json" }, "Query latest component policy states at resource scope": { "$ref": "./examples/ComponentPolicyStates_QueryResourceScope.json" }, "Query latest component policy states at resource scope and expand policyEvaluationDetails": { "$ref": "./examples/ComponentPolicyStates_QueryResourceScopeExpandPolicyEvaluationDetails.json" } } } }, "/{resourceId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { "post": { "operationId": "PolicyEvents_ListQueryResultsForResource", "description": "Queries policy events for the resource.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "policyEventsResource", "in": "path", "description": "The name of the virtual resource under PolicyEvents resource type; only \"default\" is allowed.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "PolicyEventsResourceType", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" } ] } }, { "name": "resourceId", "in": "path", "description": "Resource ID.", "required": true, "type": "string", "x-ms-skip-url-encoding": true }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$orderby", "in": "query", "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", "required": false, "type": "string", "x-ms-client-name": "OrderBy" }, { "name": "$select", "in": "query", "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", "required": false, "type": "string", "x-ms-client-name": "Select" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" }, { "name": "$apply", "in": "query", "description": "OData apply expression for aggregations.", "required": false, "type": "string", "x-ms-client-name": "Apply" }, { "name": "$expand", "in": "query", "description": "The $expand query parameter. For example, to expand components use $expand=components", "required": false, "type": "string", "x-ms-client-name": "Expand" }, { "name": "$skiptoken", "in": "query", "description": "Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.", "required": false, "type": "string", "x-ms-client-name": "SkipToken" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PolicyEventsQueryResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Query at nested resource scope": { "$ref": "./examples/PolicyEvents_QueryNestedResourceScope.json" }, "Query at resource scope": { "$ref": "./examples/PolicyEvents_QueryResourceScope.json" }, "Query at resource scope with next link": { "$ref": "./examples/PolicyEvents_QueryResourceScopeNextLink.json" }, "Query at subscription level nested resource scope": { "$ref": "./examples/PolicyEvents_QuerySubscriptionLevelNestedResourceScope.json" }, "Query at subscription level resource scope": { "$ref": "./examples/PolicyEvents_QuerySubscriptionLevelResourceScope.json" }, "Query components policy events count grouped by user and action type for resource scope filtered by given assignment.": { "$ref": "./examples/PolicyEvents_QueryResourceScopeExpandComponentsGroupByWithAggregate.json" }, "Query components policy events for resource scope filtered by given assignment.": { "$ref": "./examples/PolicyEvents_QueryResourceScopeExpandComponents.json" } }, "x-ms-pageable": { "nextLinkName": "@odata.nextLink" } } }, "/{resourceId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { "post": { "operationId": "PolicyStates_ListQueryResultsForResource", "description": "Queries policy states for the resource.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "policyStatesResource", "in": "path", "description": "The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).", "required": true, "type": "string", "enum": [ "default", "latest" ], "x-ms-enum": { "name": "PolicyStatesResource", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" }, { "name": "latest", "value": "latest", "description": "latest" } ] } }, { "name": "resourceId", "in": "path", "description": "Resource ID.", "required": true, "type": "string", "x-ms-skip-url-encoding": true }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$orderby", "in": "query", "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", "required": false, "type": "string", "x-ms-client-name": "OrderBy" }, { "name": "$select", "in": "query", "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", "required": false, "type": "string", "x-ms-client-name": "Select" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" }, { "name": "$apply", "in": "query", "description": "OData apply expression for aggregations.", "required": false, "type": "string", "x-ms-client-name": "Apply" }, { "name": "$expand", "in": "query", "description": "The $expand query parameter. For example, to expand components use $expand=components", "required": false, "type": "string", "x-ms-client-name": "Expand" }, { "name": "$skiptoken", "in": "query", "description": "Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.", "required": false, "type": "string", "x-ms-client-name": "SkipToken" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PolicyStatesQueryResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Query all policy states at nested resource scope": { "$ref": "./examples/PolicyStates_QueryNestedResourceScope.json" }, "Query all policy states at resource scope": { "$ref": "./examples/PolicyStates_QueryResourceScope.json" }, "Query all policy states at resource scope and expand policyEvaluationDetails": { "$ref": "./examples/PolicyStates_QueryResourceScopeExpandPolicyEvaluationDetails.json" }, "Query all policy states at resource scope with next link": { "$ref": "./examples/PolicyStates_QueryResourceScopeNextLink.json" }, "Query all policy states at subscription level nested resource scope": { "$ref": "./examples/PolicyStates_QuerySubscriptionLevelNestedResourceScope.json" }, "Query all policy states at subscription level resource scope": { "$ref": "./examples/PolicyStates_QuerySubscriptionLevelResourceScope.json" }, "Query component policy compliance state at resource scope filtered by given assignment.": { "$ref": "./examples/PolicyStates_QueryResourceScopeExpandComponents.json" }, "Query component policy compliance state count grouped by state type at resource scope filtered by given assignment.": { "$ref": "./examples/PolicyStates_QueryResourceScopeExpandComponentsGroupByWithAggregate.json" } }, "x-ms-pageable": { "nextLinkName": "@odata.nextLink" } } }, "/{resourceId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { "post": { "operationId": "PolicyStates_SummarizeForResource", "description": "Summarizes policy states for the resource.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "policyStatesSummaryResource", "in": "path", "description": "The virtual resource under PolicyStates resource type for summarize action. In a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.", "required": true, "type": "string", "enum": [ "latest" ], "x-ms-enum": { "name": "PolicyStatesSummaryResourceType", "modelAsString": true, "values": [ { "name": "latest", "value": "latest", "description": "latest" } ] } }, { "name": "resourceId", "in": "path", "description": "Resource ID.", "required": true, "type": "string", "x-ms-skip-url-encoding": true }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/SummarizeResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Summarize at resource scope": { "$ref": "./examples/PolicyStates_SummarizeResourceScope.json" } } } }, "/{resourceId}/providers/Microsoft.PolicyInsights/remediations": { "get": { "operationId": "Remediations_ListForResource", "description": "Gets all remediations for a resource.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "resourceId", "in": "path", "description": "Resource ID.", "required": true, "type": "string", "x-ms-skip-url-encoding": true }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/RemediationListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List remediations at individual resource scope": { "$ref": "./examples/Remediations_ListResourceScope.json" }, "List remediations at individual resource scope with query parameters": { "$ref": "./examples/Remediations_ListResourceScope_WithQuery.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/{resourceId}/providers/Microsoft.PolicyInsights/remediations/{remediationName}": { "get": { "operationId": "Remediations_GetAtResource", "description": "Gets an existing remediation at resource scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "resourceId", "in": "path", "description": "Resource ID.", "required": true, "type": "string", "x-ms-skip-url-encoding": true }, { "name": "remediationName", "in": "path", "description": "The name of the remediation.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/Remediation" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Get remediation at individual resource scope": { "$ref": "./examples/Remediations_GetResourceScope.json" } } }, "put": { "operationId": "Remediations_CreateOrUpdateAtResource", "description": "Creates or updates a remediation at resource scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "resourceId", "in": "path", "description": "Resource ID.", "required": true, "type": "string", "x-ms-skip-url-encoding": true }, { "name": "remediationName", "in": "path", "description": "The name of the remediation.", "required": true, "type": "string" }, { "name": "parameters", "in": "body", "description": "The remediation parameters.", "required": true, "schema": { "$ref": "#/definitions/Remediation" } } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/Remediation" } }, "201": { "description": "The request has succeeded and a new resource has been created as a result.", "schema": { "$ref": "#/definitions/Remediation" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Create remediation at individual resource scope": { "$ref": "./examples/Remediations_CreateResourceScope.json" } } }, "delete": { "operationId": "Remediations_DeleteAtResource", "description": "Deletes an existing remediation at individual resource scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "resourceId", "in": "path", "description": "Resource ID.", "required": true, "type": "string", "x-ms-skip-url-encoding": true }, { "name": "remediationName", "in": "path", "description": "The name of the remediation.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/Remediation" } }, "204": { "description": "Resource does not exist." }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Delete remediation at individual resource scope": { "$ref": "./examples/Remediations_DeleteResourceScope.json" } } } }, "/{resourceId}/providers/Microsoft.PolicyInsights/remediations/{remediationName}/cancel": { "post": { "operationId": "Remediations_CancelAtResource", "description": "Cancel a remediation at resource scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "resourceId", "in": "path", "description": "Resource ID.", "required": true, "type": "string", "x-ms-skip-url-encoding": true }, { "name": "remediationName", "in": "path", "description": "The name of the remediation.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/Remediation" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Cancel a remediation at individual resource scope": { "$ref": "./examples/Remediations_CancelResourceScope.json" } } } }, "/{resourceId}/providers/Microsoft.PolicyInsights/remediations/{remediationName}/listDeployments": { "post": { "operationId": "Remediations_ListDeploymentsAtResource", "description": "Gets all deployments for a remediation at resource scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "resourceId", "in": "path", "description": "Resource ID.", "required": true, "type": "string", "x-ms-skip-url-encoding": true }, { "name": "remediationName", "in": "path", "description": "The name of the remediation.", "required": true, "type": "string" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/RemediationDeploymentsListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List deployments for a remediation at individual resource scope": { "$ref": "./examples/Remediations_ListDeploymentsResourceScope.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/providers/{managementGroupsNamespace}/managementGroups/{managementGroupId}/providers/Microsoft.PolicyInsights/checkPolicyRestrictions": { "post": { "operationId": "PolicyRestrictions_CheckAtManagementGroupScope", "description": "Checks what restrictions Azure Policy will place on resources within a management group.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "managementGroupsNamespace", "in": "path", "description": "The namespace for Microsoft Management RP; only \"Microsoft.Management\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Management" ], "x-ms-enum": { "modelAsString": false } }, { "name": "managementGroupId", "in": "path", "description": "Management group ID.", "required": true, "type": "string" }, { "name": "parameters", "in": "body", "description": "The check policy restrictions parameters.", "required": true, "schema": { "$ref": "#/definitions/CheckManagementGroupRestrictionsRequest" } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/CheckRestrictionsResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Check policy restrictions at management group scope": { "$ref": "./examples/PolicyRestrictions_CheckAtManagementGroupScope.json" } } } }, "/providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { "post": { "operationId": "PolicyEvents_ListQueryResultsForManagementGroup", "description": "Queries policy events for the resources under the management group.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "policyEventsResource", "in": "path", "description": "The name of the virtual resource under PolicyEvents resource type; only \"default\" is allowed.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "PolicyEventsResourceType", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" } ] } }, { "name": "managementGroupsNamespace", "in": "path", "description": "The namespace for Microsoft Management RP; only \"Microsoft.Management\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Management" ], "x-ms-enum": { "modelAsString": false } }, { "name": "managementGroupName", "in": "path", "description": "Management group name.", "required": true, "type": "string" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$orderby", "in": "query", "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", "required": false, "type": "string", "x-ms-client-name": "OrderBy" }, { "name": "$select", "in": "query", "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", "required": false, "type": "string", "x-ms-client-name": "Select" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" }, { "name": "$apply", "in": "query", "description": "OData apply expression for aggregations.", "required": false, "type": "string", "x-ms-client-name": "Apply" }, { "name": "$skiptoken", "in": "query", "description": "Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.", "required": false, "type": "string", "x-ms-client-name": "SkipToken" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PolicyEventsQueryResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Query at management group scope": { "$ref": "./examples/PolicyEvents_QueryManagementGroupScope.json" }, "Query at management group scope with next link": { "$ref": "./examples/PolicyEvents_QueryManagementGroupScopeNextLink.json" } }, "x-ms-pageable": { "nextLinkName": "@odata.nextLink" } } }, "/providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { "post": { "operationId": "PolicyStates_ListQueryResultsForManagementGroup", "description": "Queries policy states for the resources under the management group.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "policyStatesResource", "in": "path", "description": "The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).", "required": true, "type": "string", "enum": [ "default", "latest" ], "x-ms-enum": { "name": "PolicyStatesResource", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" }, { "name": "latest", "value": "latest", "description": "latest" } ] } }, { "name": "managementGroupsNamespace", "in": "path", "description": "The namespace for Microsoft Management RP; only \"Microsoft.Management\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Management" ], "x-ms-enum": { "modelAsString": false } }, { "name": "managementGroupName", "in": "path", "description": "Management group name.", "required": true, "type": "string" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$orderby", "in": "query", "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", "required": false, "type": "string", "x-ms-client-name": "OrderBy" }, { "name": "$select", "in": "query", "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", "required": false, "type": "string", "x-ms-client-name": "Select" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" }, { "name": "$apply", "in": "query", "description": "OData apply expression for aggregations.", "required": false, "type": "string", "x-ms-client-name": "Apply" }, { "name": "$skiptoken", "in": "query", "description": "Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.", "required": false, "type": "string", "x-ms-client-name": "SkipToken" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PolicyStatesQueryResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Query latest at management group scope": { "$ref": "./examples/PolicyStates_QueryManagementGroupScope.json" }, "Query latest at management group scope with next link": { "$ref": "./examples/PolicyStates_QueryManagementGroupScopeNextLink.json" } }, "x-ms-pageable": { "nextLinkName": "@odata.nextLink" } } }, "/providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { "post": { "operationId": "PolicyStates_SummarizeForManagementGroup", "description": "Summarizes policy states for the resources under the management group.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "policyStatesSummaryResource", "in": "path", "description": "The virtual resource under PolicyStates resource type for summarize action. In a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.", "required": true, "type": "string", "enum": [ "latest" ], "x-ms-enum": { "name": "PolicyStatesSummaryResourceType", "modelAsString": true, "values": [ { "name": "latest", "value": "latest", "description": "latest" } ] } }, { "name": "managementGroupsNamespace", "in": "path", "description": "The namespace for Microsoft Management RP; only \"Microsoft.Management\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Management" ], "x-ms-enum": { "modelAsString": false } }, { "name": "managementGroupName", "in": "path", "description": "Management group name.", "required": true, "type": "string" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/SummarizeResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Summarize at management group scope": { "$ref": "./examples/PolicyStates_SummarizeManagementGroupScope.json" } } } }, "/providers/{managementGroupsNamespace}/managementGroups/{managementGroupId}/providers/Microsoft.PolicyInsights/remediations": { "get": { "operationId": "Remediations_ListForManagementGroup", "description": "Gets all remediations for the management group.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "managementGroupsNamespace", "in": "path", "description": "The namespace for Microsoft Management RP; only \"Microsoft.Management\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Management" ], "x-ms-enum": { "name": "ManagementGroupsNamespaceType", "modelAsString": false } }, { "name": "managementGroupId", "in": "path", "description": "Management group ID.", "required": true, "type": "string" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/RemediationListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List remediations at management group scope": { "$ref": "./examples/Remediations_ListManagementGroupScope.json" }, "List remediations at management group scope with query parameters": { "$ref": "./examples/Remediations_ListManagementGroupScope_WithQuery.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/providers/{managementGroupsNamespace}/managementGroups/{managementGroupId}/providers/Microsoft.PolicyInsights/remediations/{remediationName}": { "get": { "operationId": "Remediations_GetAtManagementGroup", "description": "Gets an existing remediation at management group scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "managementGroupsNamespace", "in": "path", "description": "The namespace for Microsoft Management RP; only \"Microsoft.Management\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Management" ], "x-ms-enum": { "name": "ManagementGroupsNamespaceType", "modelAsString": false } }, { "name": "managementGroupId", "in": "path", "description": "Management group ID.", "required": true, "type": "string" }, { "name": "remediationName", "in": "path", "description": "The name of the remediation.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/Remediation" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Get remediation at management group scope": { "$ref": "./examples/Remediations_GetManagementGroupScope.json" } } }, "put": { "operationId": "Remediations_CreateOrUpdateAtManagementGroup", "description": "Creates or updates a remediation at management group scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "managementGroupsNamespace", "in": "path", "description": "The namespace for Microsoft Management RP; only \"Microsoft.Management\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Management" ], "x-ms-enum": { "name": "ManagementGroupsNamespaceType", "modelAsString": false } }, { "name": "managementGroupId", "in": "path", "description": "Management group ID.", "required": true, "type": "string" }, { "name": "remediationName", "in": "path", "description": "The name of the remediation.", "required": true, "type": "string" }, { "name": "parameters", "in": "body", "description": "The remediation parameters.", "required": true, "schema": { "$ref": "#/definitions/Remediation" } } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/Remediation" } }, "201": { "description": "The request has succeeded and a new resource has been created as a result.", "schema": { "$ref": "#/definitions/Remediation" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Create remediation at management group scope": { "$ref": "./examples/Remediations_CreateManagementGroupScope.json" } } }, "delete": { "operationId": "Remediations_DeleteAtManagementGroup", "description": "Deletes an existing remediation at management group scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "managementGroupsNamespace", "in": "path", "description": "The namespace for Microsoft Management RP; only \"Microsoft.Management\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Management" ], "x-ms-enum": { "name": "ManagementGroupsNamespaceType", "modelAsString": false } }, { "name": "managementGroupId", "in": "path", "description": "Management group ID.", "required": true, "type": "string" }, { "name": "remediationName", "in": "path", "description": "The name of the remediation.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/Remediation" } }, "204": { "description": "Resource does not exist." }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Delete remediation at management group scope": { "$ref": "./examples/Remediations_DeleteManagementGroupScope.json" } } } }, "/providers/{managementGroupsNamespace}/managementGroups/{managementGroupId}/providers/Microsoft.PolicyInsights/remediations/{remediationName}/cancel": { "post": { "operationId": "Remediations_CancelAtManagementGroup", "description": "Cancels a remediation at management group scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "managementGroupsNamespace", "in": "path", "description": "The namespace for Microsoft Management RP; only \"Microsoft.Management\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Management" ], "x-ms-enum": { "modelAsString": false } }, { "name": "managementGroupId", "in": "path", "description": "Management group ID.", "required": true, "type": "string" }, { "name": "remediationName", "in": "path", "description": "The name of the remediation.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/Remediation" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Cancel a remediation at management group scope": { "$ref": "./examples/Remediations_CancelManagementGroupScope.json" } } } }, "/providers/{managementGroupsNamespace}/managementGroups/{managementGroupId}/providers/Microsoft.PolicyInsights/remediations/{remediationName}/listDeployments": { "post": { "operationId": "Remediations_ListDeploymentsAtManagementGroup", "description": "Gets all deployments for a remediation at management group scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "managementGroupsNamespace", "in": "path", "description": "The namespace for Microsoft Management RP; only \"Microsoft.Management\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Management" ], "x-ms-enum": { "modelAsString": false } }, { "name": "managementGroupId", "in": "path", "description": "Management group ID.", "required": true, "type": "string" }, { "name": "remediationName", "in": "path", "description": "The name of the remediation.", "required": true, "type": "string" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/RemediationDeploymentsListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List deployments for a remediation at management group scope": { "$ref": "./examples/Remediations_ListDeploymentsManagementGroupScope.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/providers/Microsoft.PolicyInsights/operations": { "get": { "operationId": "Operations_List", "description": "Lists available operations.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/OperationsListResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "List operations": { "$ref": "./examples/Operations_ListOperations.json" } } } }, "/providers/Microsoft.PolicyInsights/policyMetadata": { "get": { "operationId": "PolicyMetadata_List", "description": "Get a list of the policy metadata resources.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PolicyMetadataCollection" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Get collection of policy metadata resources": { "$ref": "./examples/PolicyMetadata_List.json" }, "Get collection of policy metadata resources using top query parameter": { "$ref": "./examples/PolicyMetadata_List_WithTop.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/providers/Microsoft.PolicyInsights/policyMetadata/{resourceName}": { "get": { "operationId": "PolicyMetadata_GetResource", "description": "Get policy metadata resource.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "resourceName", "in": "path", "description": "The name of the policy metadata resource.", "required": true, "type": "string", "x-ms-skip-url-encoding": true } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PolicyMetadata" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Get a single policy metadata resource": { "$ref": "./examples/PolicyMetadata_GetResource.json" } } } }, "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/componentPolicyStates/{componentPolicyStatesResource}/queryResults": { "post": { "operationId": "ComponentPolicyStates_ListQueryResultsForSubscriptionLevelPolicyAssignment", "description": "Queries component policy states for the subscription level policy assignment.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "authorizationNamespace", "in": "path", "description": "The namespace for Microsoft Authorization resource provider; only \"Microsoft.Authorization\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Authorization" ], "x-ms-enum": { "modelAsString": false } }, { "name": "policyAssignmentName", "in": "path", "description": "Policy assignment name.", "required": true, "type": "string", "minLength": 1, "maxLength": 64, "pattern": "^[^<>%&:\\\\?/#]*$" }, { "name": "componentPolicyStatesResource", "in": "path", "description": "The virtual resource under ComponentPolicyStates resource type. In a given time range, 'latest' represents the latest component policy state(s).", "required": true, "type": "string", "enum": [ "latest" ], "x-ms-enum": { "name": "ComponentPolicyStatesResource", "modelAsString": true, "values": [ { "name": "latest", "value": "latest", "description": "latest" } ] } }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$orderby", "in": "query", "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", "required": false, "type": "string", "x-ms-client-name": "OrderBy" }, { "name": "$select", "in": "query", "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", "required": false, "type": "string", "x-ms-client-name": "Select" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" }, { "name": "$apply", "in": "query", "description": "OData apply expression for aggregations.", "required": false, "type": "string", "x-ms-client-name": "Apply" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/ComponentPolicyStatesQueryResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Query latest at subscription level policy assignment scope": { "$ref": "./examples/ComponentPolicyStates_QuerySubscriptionLevelPolicyAssignmentScope.json" } } } }, "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { "post": { "operationId": "PolicyEvents_ListQueryResultsForSubscriptionLevelPolicyAssignment", "description": "Queries policy events for the subscription level policy assignment.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "policyEventsResource", "in": "path", "description": "The name of the virtual resource under PolicyEvents resource type; only \"default\" is allowed.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "PolicyEventsResourceType", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" } ] } }, { "name": "authorizationNamespace", "in": "path", "description": "The namespace for Microsoft Authorization resource provider; only \"Microsoft.Authorization\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Authorization" ], "x-ms-enum": { "modelAsString": false } }, { "name": "policyAssignmentName", "in": "path", "description": "Policy assignment name.", "required": true, "type": "string" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$orderby", "in": "query", "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", "required": false, "type": "string", "x-ms-client-name": "OrderBy" }, { "name": "$select", "in": "query", "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", "required": false, "type": "string", "x-ms-client-name": "Select" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" }, { "name": "$apply", "in": "query", "description": "OData apply expression for aggregations.", "required": false, "type": "string", "x-ms-client-name": "Apply" }, { "name": "$skiptoken", "in": "query", "description": "Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.", "required": false, "type": "string", "x-ms-client-name": "SkipToken" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PolicyEventsQueryResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Query at subscription level policy assignment scope": { "$ref": "./examples/PolicyEvents_QuerySubscriptionLevelPolicyAssignmentScope.json" }, "Query at subscription level policy assignment scope with next link": { "$ref": "./examples/PolicyEvents_QuerySubscriptionLevelPolicyAssignmentScopeNextLink.json" } }, "x-ms-pageable": { "nextLinkName": "@odata.nextLink" } } }, "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { "post": { "operationId": "PolicyStates_ListQueryResultsForSubscriptionLevelPolicyAssignment", "description": "Queries policy states for the subscription level policy assignment.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "policyStatesResource", "in": "path", "description": "The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).", "required": true, "type": "string", "enum": [ "default", "latest" ], "x-ms-enum": { "name": "PolicyStatesResource", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" }, { "name": "latest", "value": "latest", "description": "latest" } ] } }, { "name": "authorizationNamespace", "in": "path", "description": "The namespace for Microsoft Authorization resource provider; only \"Microsoft.Authorization\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Authorization" ], "x-ms-enum": { "modelAsString": false } }, { "name": "policyAssignmentName", "in": "path", "description": "Policy assignment name.", "required": true, "type": "string" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$orderby", "in": "query", "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", "required": false, "type": "string", "x-ms-client-name": "OrderBy" }, { "name": "$select", "in": "query", "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", "required": false, "type": "string", "x-ms-client-name": "Select" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" }, { "name": "$apply", "in": "query", "description": "OData apply expression for aggregations.", "required": false, "type": "string", "x-ms-client-name": "Apply" }, { "name": "$skiptoken", "in": "query", "description": "Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.", "required": false, "type": "string", "x-ms-client-name": "SkipToken" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PolicyStatesQueryResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Query latest at subscription level policy assignment scope": { "$ref": "./examples/PolicyStates_QuerySubscriptionLevelPolicyAssignmentScope.json" }, "Query latest at subscription level policy assignment scope with next link": { "$ref": "./examples/PolicyStates_QuerySubscriptionLevelPolicyAssignmentScopeNextLink.json" } }, "x-ms-pageable": { "nextLinkName": "@odata.nextLink" } } }, "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { "post": { "operationId": "PolicyStates_SummarizeForSubscriptionLevelPolicyAssignment", "description": "Summarizes policy states for the subscription level policy assignment.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "policyStatesSummaryResource", "in": "path", "description": "The virtual resource under PolicyStates resource type for summarize action. In a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.", "required": true, "type": "string", "enum": [ "latest" ], "x-ms-enum": { "name": "PolicyStatesSummaryResourceType", "modelAsString": true, "values": [ { "name": "latest", "value": "latest", "description": "latest" } ] } }, { "name": "authorizationNamespace", "in": "path", "description": "The namespace for Microsoft Authorization resource provider; only \"Microsoft.Authorization\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Authorization" ], "x-ms-enum": { "modelAsString": false } }, { "name": "policyAssignmentName", "in": "path", "description": "Policy assignment name.", "required": true, "type": "string" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/SummarizeResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Summarize at policy assignment scope": { "$ref": "./examples/PolicyStates_SummarizeSubscriptionLevelPolicyAssignmentScope.json" } } } }, "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/componentPolicyStates/{componentPolicyStatesResource}/queryResults": { "post": { "operationId": "ComponentPolicyStates_ListQueryResultsForPolicyDefinition", "description": "Queries component policy states for the subscription level policy definition.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "authorizationNamespace", "in": "path", "description": "The namespace for Microsoft Authorization resource provider; only \"Microsoft.Authorization\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Authorization" ], "x-ms-enum": { "modelAsString": false } }, { "name": "policyDefinitionName", "in": "path", "description": "Policy definition name.", "required": true, "type": "string", "minLength": 1, "maxLength": 64, "pattern": "^[^<>%&:\\\\?/#]*$" }, { "name": "componentPolicyStatesResource", "in": "path", "description": "The virtual resource under ComponentPolicyStates resource type. In a given time range, 'latest' represents the latest component policy state(s).", "required": true, "type": "string", "enum": [ "latest" ], "x-ms-enum": { "name": "ComponentPolicyStatesResource", "modelAsString": true, "values": [ { "name": "latest", "value": "latest", "description": "latest" } ] } }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$orderby", "in": "query", "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", "required": false, "type": "string", "x-ms-client-name": "OrderBy" }, { "name": "$select", "in": "query", "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", "required": false, "type": "string", "x-ms-client-name": "Select" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" }, { "name": "$apply", "in": "query", "description": "OData apply expression for aggregations.", "required": false, "type": "string", "x-ms-client-name": "Apply" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/ComponentPolicyStatesQueryResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Query latest component policy states at subscription level policy definition scope": { "$ref": "./examples/ComponentPolicyStates_QuerySubscriptionLevelPolicyDefinitionScope.json" } } } }, "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { "post": { "operationId": "PolicyEvents_ListQueryResultsForPolicyDefinition", "description": "Queries policy events for the subscription level policy definition.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "policyEventsResource", "in": "path", "description": "The name of the virtual resource under PolicyEvents resource type; only \"default\" is allowed.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "PolicyEventsResourceType", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" } ] } }, { "name": "authorizationNamespace", "in": "path", "description": "The namespace for Microsoft Authorization resource provider; only \"Microsoft.Authorization\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Authorization" ], "x-ms-enum": { "modelAsString": false } }, { "name": "policyDefinitionName", "in": "path", "description": "Policy definition name.", "required": true, "type": "string" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$orderby", "in": "query", "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", "required": false, "type": "string", "x-ms-client-name": "OrderBy" }, { "name": "$select", "in": "query", "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", "required": false, "type": "string", "x-ms-client-name": "Select" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" }, { "name": "$apply", "in": "query", "description": "OData apply expression for aggregations.", "required": false, "type": "string", "x-ms-client-name": "Apply" }, { "name": "$skiptoken", "in": "query", "description": "Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.", "required": false, "type": "string", "x-ms-client-name": "SkipToken" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PolicyEventsQueryResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Query at subscription level policy definition scope": { "$ref": "./examples/PolicyEvents_QuerySubscriptionLevelPolicyDefinitionScope.json" }, "Query at subscription level policy definition scope with next link": { "$ref": "./examples/PolicyEvents_QuerySubscriptionLevelPolicyDefinitionScopeNextLink.json" } }, "x-ms-pageable": { "nextLinkName": "@odata.nextLink" } } }, "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { "post": { "operationId": "PolicyStates_ListQueryResultsForPolicyDefinition", "description": "Queries policy states for the subscription level policy definition.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "policyStatesResource", "in": "path", "description": "The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).", "required": true, "type": "string", "enum": [ "default", "latest" ], "x-ms-enum": { "name": "PolicyStatesResource", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" }, { "name": "latest", "value": "latest", "description": "latest" } ] } }, { "name": "authorizationNamespace", "in": "path", "description": "The namespace for Microsoft Authorization resource provider; only \"Microsoft.Authorization\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Authorization" ], "x-ms-enum": { "modelAsString": false } }, { "name": "policyDefinitionName", "in": "path", "description": "Policy definition name.", "required": true, "type": "string" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$orderby", "in": "query", "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", "required": false, "type": "string", "x-ms-client-name": "OrderBy" }, { "name": "$select", "in": "query", "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", "required": false, "type": "string", "x-ms-client-name": "Select" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" }, { "name": "$apply", "in": "query", "description": "OData apply expression for aggregations.", "required": false, "type": "string", "x-ms-client-name": "Apply" }, { "name": "$skiptoken", "in": "query", "description": "Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.", "required": false, "type": "string", "x-ms-client-name": "SkipToken" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PolicyStatesQueryResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Query latest at subscription level policy definition scope": { "$ref": "./examples/PolicyStates_QuerySubscriptionLevelPolicyDefinitionScope.json" }, "Query latest at subscription level policy definition scope with next link": { "$ref": "./examples/PolicyStates_QuerySubscriptionLevelPolicyDefinitionScopeNextLink.json" } }, "x-ms-pageable": { "nextLinkName": "@odata.nextLink" } } }, "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { "post": { "operationId": "PolicyStates_SummarizeForPolicyDefinition", "description": "Summarizes policy states for the subscription level policy definition.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "policyStatesSummaryResource", "in": "path", "description": "The virtual resource under PolicyStates resource type for summarize action. In a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.", "required": true, "type": "string", "enum": [ "latest" ], "x-ms-enum": { "name": "PolicyStatesSummaryResourceType", "modelAsString": true, "values": [ { "name": "latest", "value": "latest", "description": "latest" } ] } }, { "name": "authorizationNamespace", "in": "path", "description": "The namespace for Microsoft Authorization resource provider; only \"Microsoft.Authorization\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Authorization" ], "x-ms-enum": { "modelAsString": false } }, { "name": "policyDefinitionName", "in": "path", "description": "Policy definition name.", "required": true, "type": "string" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/SummarizeResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Summarize at policy definition scope": { "$ref": "./examples/PolicyStates_SummarizeSubscriptionLevelPolicyDefinitionScope.json" } } } }, "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { "post": { "operationId": "PolicyEvents_ListQueryResultsForPolicySetDefinition", "description": "Queries policy events for the subscription level policy set definition.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "policyEventsResource", "in": "path", "description": "The name of the virtual resource under PolicyEvents resource type; only \"default\" is allowed.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "PolicyEventsResourceType", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" } ] } }, { "name": "authorizationNamespace", "in": "path", "description": "The namespace for Microsoft Authorization resource provider; only \"Microsoft.Authorization\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Authorization" ], "x-ms-enum": { "modelAsString": false } }, { "name": "policySetDefinitionName", "in": "path", "description": "Policy set definition name.", "required": true, "type": "string" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$orderby", "in": "query", "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", "required": false, "type": "string", "x-ms-client-name": "OrderBy" }, { "name": "$select", "in": "query", "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", "required": false, "type": "string", "x-ms-client-name": "Select" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" }, { "name": "$apply", "in": "query", "description": "OData apply expression for aggregations.", "required": false, "type": "string", "x-ms-client-name": "Apply" }, { "name": "$skiptoken", "in": "query", "description": "Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.", "required": false, "type": "string", "x-ms-client-name": "SkipToken" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PolicyEventsQueryResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Query at subscription level policy set definition scope": { "$ref": "./examples/PolicyEvents_QuerySubscriptionLevelPolicySetDefinitionScope.json" }, "Query at subscription level policy set definition scope with next link": { "$ref": "./examples/PolicyEvents_QuerySubscriptionLevelPolicySetDefinitionScopeNextLink.json" } }, "x-ms-pageable": { "nextLinkName": "@odata.nextLink" } } }, "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { "post": { "operationId": "PolicyStates_ListQueryResultsForPolicySetDefinition", "description": "Queries policy states for the subscription level policy set definition.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "policyStatesResource", "in": "path", "description": "The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).", "required": true, "type": "string", "enum": [ "default", "latest" ], "x-ms-enum": { "name": "PolicyStatesResource", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" }, { "name": "latest", "value": "latest", "description": "latest" } ] } }, { "name": "authorizationNamespace", "in": "path", "description": "The namespace for Microsoft Authorization resource provider; only \"Microsoft.Authorization\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Authorization" ], "x-ms-enum": { "modelAsString": false } }, { "name": "policySetDefinitionName", "in": "path", "description": "Policy set definition name.", "required": true, "type": "string" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$orderby", "in": "query", "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", "required": false, "type": "string", "x-ms-client-name": "OrderBy" }, { "name": "$select", "in": "query", "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", "required": false, "type": "string", "x-ms-client-name": "Select" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" }, { "name": "$apply", "in": "query", "description": "OData apply expression for aggregations.", "required": false, "type": "string", "x-ms-client-name": "Apply" }, { "name": "$skiptoken", "in": "query", "description": "Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.", "required": false, "type": "string", "x-ms-client-name": "SkipToken" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PolicyStatesQueryResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Query latest at subscription level policy set definition scope": { "$ref": "./examples/PolicyStates_QuerySubscriptionLevelPolicySetDefinitionScope.json" }, "Query latest at subscription level policy set definition scope with next link": { "$ref": "./examples/PolicyStates_QuerySubscriptionLevelPolicySetDefinitionScopeNextLink.json" } }, "x-ms-pageable": { "nextLinkName": "@odata.nextLink" } } }, "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { "post": { "operationId": "PolicyStates_SummarizeForPolicySetDefinition", "description": "Summarizes policy states for the subscription level policy set definition.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "policyStatesSummaryResource", "in": "path", "description": "The virtual resource under PolicyStates resource type for summarize action. In a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.", "required": true, "type": "string", "enum": [ "latest" ], "x-ms-enum": { "name": "PolicyStatesSummaryResourceType", "modelAsString": true, "values": [ { "name": "latest", "value": "latest", "description": "latest" } ] } }, { "name": "authorizationNamespace", "in": "path", "description": "The namespace for Microsoft Authorization resource provider; only \"Microsoft.Authorization\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Authorization" ], "x-ms-enum": { "modelAsString": false } }, { "name": "policySetDefinitionName", "in": "path", "description": "Policy set definition name.", "required": true, "type": "string" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/SummarizeResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Summarize at policy set definition scope": { "$ref": "./examples/PolicyStates_SummarizeSubscriptionLevelPolicySetDefinitionScope.json" } } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/attestations": { "get": { "operationId": "Attestations_ListForSubscription", "description": "Gets all attestations for the subscription.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/AttestationListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List attestations at subscription scope": { "$ref": "./examples/Attestations_ListSubscriptionScope.json" }, "List attestations at subscription scope with query parameters": { "$ref": "./examples/Attestations_ListSubscriptionScope_WithQuery.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/attestations/{attestationName}": { "get": { "operationId": "Attestations_GetAtSubscription", "description": "Gets an existing attestation at subscription scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "attestationName", "in": "path", "description": "The name of the attestation.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/Attestation" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Get attestation at subscription scope": { "$ref": "./examples/Attestations_GetSubscriptionScope.json" } } }, "put": { "operationId": "Attestations_CreateOrUpdateAtSubscription", "description": "Creates or updates an attestation at subscription scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "attestationName", "in": "path", "description": "The name of the attestation.", "required": true, "type": "string" }, { "name": "parameters", "in": "body", "description": "The attestation parameters.", "required": true, "schema": { "$ref": "#/definitions/Attestation" } } ], "responses": { "200": { "description": "Resource 'Attestation' update operation succeeded", "schema": { "$ref": "#/definitions/Attestation" } }, "201": { "description": "Resource 'Attestation' create operation succeeded", "schema": { "$ref": "#/definitions/Attestation" }, "headers": { "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Create attestation at subscription scope": { "$ref": "./examples/Attestations_CreateSubscriptionScope.json" }, "Create attestation at subscription scope with all properties": { "$ref": "./examples/Attestations_CreateSubscriptionScope_AllProperties.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location", "final-state-schema": "#/definitions/Attestation" }, "x-ms-long-running-operation": true }, "delete": { "operationId": "Attestations_DeleteAtSubscription", "description": "Deletes an existing attestation at subscription scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "attestationName", "in": "path", "description": "The name of the attestation.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Resource deleted successfully." }, "204": { "description": "Resource does not exist." }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Delete attestation at subscription scope": { "$ref": "./examples/Attestations_DeleteSubscriptionScope.json" } } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/checkPolicyRestrictions": { "post": { "operationId": "PolicyRestrictions_CheckAtSubscriptionScope", "description": "Checks what restrictions Azure Policy will place on a resource within a subscription.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "parameters", "in": "body", "description": "The request body", "required": true, "schema": { "$ref": "#/definitions/CheckRestrictionsRequest" } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/CheckRestrictionsResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Check policy restrictions at subscription scope": { "$ref": "./examples/PolicyRestrictions_CheckAtSubscriptionScope.json" }, "Check policy restrictions at subscription scope including audit effect": { "$ref": "./examples/PolicyRestrictions_CheckAtSubscriptionScopeIncludeAuditEffect.json" } } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/componentPolicyStates/{componentPolicyStatesResource}/queryResults": { "post": { "operationId": "ComponentPolicyStates_ListQueryResultsForSubscription", "description": "Queries component policy states under subscription scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "componentPolicyStatesResource", "in": "path", "description": "The virtual resource under ComponentPolicyStates resource type. In a given time range, 'latest' represents the latest component policy state(s).", "required": true, "type": "string", "enum": [ "latest" ], "x-ms-enum": { "name": "ComponentPolicyStatesResource", "modelAsString": true, "values": [ { "name": "latest", "value": "latest", "description": "latest" } ] } }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$orderby", "in": "query", "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", "required": false, "type": "string", "x-ms-client-name": "OrderBy" }, { "name": "$select", "in": "query", "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", "required": false, "type": "string", "x-ms-client-name": "Select" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" }, { "name": "$apply", "in": "query", "description": "OData apply expression for aggregations.", "required": false, "type": "string", "x-ms-client-name": "Apply" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/ComponentPolicyStatesQueryResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Query latest component policy compliance state count grouped by component type at subscription scope filtered by given assignment.": { "$ref": "./examples/ComponentPolicyStates_QuerySubscriptionScopeGroupByComponentTypeWithAggregate.json" }, "Query latest component policy states at subscription scope": { "$ref": "./examples/ComponentPolicyStates_QuerySubscriptionScope.json" } } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { "post": { "operationId": "PolicyEvents_ListQueryResultsForSubscription", "description": "Queries policy events for the resources under the subscription.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "policyEventsResource", "in": "path", "description": "The name of the virtual resource under PolicyEvents resource type; only \"default\" is allowed.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "PolicyEventsResourceType", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" } ] } }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$orderby", "in": "query", "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", "required": false, "type": "string", "x-ms-client-name": "OrderBy" }, { "name": "$select", "in": "query", "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", "required": false, "type": "string", "x-ms-client-name": "Select" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" }, { "name": "$apply", "in": "query", "description": "OData apply expression for aggregations.", "required": false, "type": "string", "x-ms-client-name": "Apply" }, { "name": "$skiptoken", "in": "query", "description": "Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.", "required": false, "type": "string", "x-ms-client-name": "SkipToken" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PolicyEventsQueryResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Filter and aggregate only": { "$ref": "./examples/PolicyEvents_FilterAndAggregateOnly.json" }, "Filter and group with aggregate": { "$ref": "./examples/PolicyEvents_FilterAndGroupByWithAggregate.json" }, "Filter and group without aggregate": { "$ref": "./examples/PolicyEvents_FilterAndGroupByWithoutAggregate.json" }, "Filter and multiple groups": { "$ref": "./examples/PolicyEvents_FilterAndMultipleGroups.json" }, "Query at subscription scope": { "$ref": "./examples/PolicyEvents_QuerySubscriptionScope.json" }, "Query at subscription scope with next link": { "$ref": "./examples/PolicyEvents_QuerySubscriptionScopeNextLink.json" }, "Time range; sort, select and limit": { "$ref": "./examples/PolicyEvents_TimeRangeSortSelectTop.json" } }, "x-ms-pageable": { "nextLinkName": "@odata.nextLink" } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { "post": { "operationId": "PolicyStates_ListQueryResultsForSubscription", "description": "Queries policy states for the resources under the subscription.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "policyStatesResource", "in": "path", "description": "The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).", "required": true, "type": "string", "enum": [ "default", "latest" ], "x-ms-enum": { "name": "PolicyStatesResource", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" }, { "name": "latest", "value": "latest", "description": "latest" } ] } }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$orderby", "in": "query", "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", "required": false, "type": "string", "x-ms-client-name": "OrderBy" }, { "name": "$select", "in": "query", "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", "required": false, "type": "string", "x-ms-client-name": "Select" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" }, { "name": "$apply", "in": "query", "description": "OData apply expression for aggregations.", "required": false, "type": "string", "x-ms-client-name": "Apply" }, { "name": "$skiptoken", "in": "query", "description": "Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.", "required": false, "type": "string", "x-ms-client-name": "SkipToken" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PolicyStatesQueryResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Filter and aggregate only": { "$ref": "./examples/PolicyStates_FilterAndAggregateOnly.json" }, "Filter and group with aggregate": { "$ref": "./examples/PolicyStates_FilterAndGroupByWithAggregate.json" }, "Filter and group without aggregate": { "$ref": "./examples/PolicyStates_FilterAndGroupByWithoutAggregate.json" }, "Filter and multiple groups": { "$ref": "./examples/PolicyStates_FilterAndMultipleGroups.json" }, "Query latest at subscription scope": { "$ref": "./examples/PolicyStates_QuerySubscriptionScope.json" }, "Query latest at subscription scope with next link": { "$ref": "./examples/PolicyStates_QuerySubscriptionScopeNextLink.json" }, "Time range; sort, select and limit": { "$ref": "./examples/PolicyStates_TimeRangeSortSelectTop.json" } }, "x-ms-pageable": { "nextLinkName": "@odata.nextLink" } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { "post": { "operationId": "PolicyStates_SummarizeForSubscription", "description": "Summarizes policy states for the resources under the subscription.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "policyStatesSummaryResource", "in": "path", "description": "The virtual resource under PolicyStates resource type for summarize action. In a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.", "required": true, "type": "string", "enum": [ "latest" ], "x-ms-enum": { "name": "PolicyStatesSummaryResourceType", "modelAsString": true, "values": [ { "name": "latest", "value": "latest", "description": "latest" } ] } }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/SummarizeResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Summarize at subscription scope": { "$ref": "./examples/PolicyStates_SummarizeSubscriptionScope.json" }, "Summarize at subscription scope for a policy definition group": { "$ref": "./examples/PolicyStates_SummarizeSubscriptionScopeForPolicyGroup.json" } } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/latest/triggerEvaluation": { "post": { "operationId": "PolicyStates_TriggerSubscriptionEvaluation", "description": "Triggers a policy evaluation scan for all the resources under the subscription", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "subscriptionId", "in": "path", "description": "The ID of the target subscription. The value must be an UUID.", "required": true, "type": "string", "format": "uuid", "minLength": 1 } ], "responses": { "200": { "description": "The request has succeeded." }, "202": { "description": "The scan was successfully triggered.", "headers": { "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Trigger evaluations for all resources in a subscription": { "$ref": "./examples/PolicyStates_TriggerSubscriptionEvaluation.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location" }, "x-ms-long-running-operation": true } }, "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/remediations": { "get": { "operationId": "Remediations_ListForSubscription", "description": "Gets all remediations for the subscription.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/RemediationListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List remediations at subscription scope": { "$ref": "./examples/Remediations_ListSubscriptionScope.json" }, "List remediations at subscription scope with query parameters": { "$ref": "./examples/Remediations_ListSubscriptionScope_WithQuery.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/remediations/{remediationName}": { "get": { "operationId": "Remediations_GetAtSubscription", "description": "Gets an existing remediation at subscription scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "remediationName", "in": "path", "description": "The name of the remediation.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/Remediation" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Get remediation at subscription scope": { "$ref": "./examples/Remediations_GetSubscriptionScope.json" } } }, "put": { "operationId": "Remediations_CreateOrUpdateAtSubscription", "description": "Creates or updates a remediation at subscription scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "remediationName", "in": "path", "description": "The name of the remediation.", "required": true, "type": "string" }, { "name": "parameters", "in": "body", "description": "The remediation parameters.", "required": true, "schema": { "$ref": "#/definitions/Remediation" } } ], "responses": { "200": { "description": "Resource 'Remediation' update operation succeeded", "schema": { "$ref": "#/definitions/Remediation" } }, "201": { "description": "Resource 'Remediation' create operation succeeded", "schema": { "$ref": "#/definitions/Remediation" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Create remediation at subscription scope": { "$ref": "./examples/Remediations_CreateSubscriptionScope.json" }, "Create remediation at subscription scope with all properties": { "$ref": "./examples/Remediations_CreateSubscriptionScope_AllProperties.json" }, "Create remediation at subscription scope with resourceIds filter": { "$ref": "./examples/Remediations_CreateSubscriptionScope_ResourceIdsFilter.json" } } }, "delete": { "operationId": "Remediations_DeleteAtSubscription", "description": "Deletes an existing remediation at subscription scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "remediationName", "in": "path", "description": "The name of the remediation.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/Remediation" } }, "204": { "description": "Resource does not exist." }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Delete remediation at subscription scope": { "$ref": "./examples/Remediations_DeleteSubscriptionScope.json" } } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/remediations/{remediationName}/cancel": { "post": { "operationId": "Remediations_CancelAtSubscription", "description": "Cancels a remediation at subscription scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "remediationName", "in": "path", "description": "The name of the remediation.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/Remediation" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Cancel a remediation at subscription scope": { "$ref": "./examples/Remediations_CancelSubscriptionScope.json" } } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/remediations/{remediationName}/listDeployments": { "post": { "operationId": "Remediations_ListDeploymentsAtSubscription", "description": "Gets all deployments for a remediation at subscription scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "remediationName", "in": "path", "description": "The name of the remediation.", "required": true, "type": "string" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/RemediationDeploymentsListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List deployments for a remediation at subscription scope": { "$ref": "./examples/Remediations_ListDeploymentsSubscriptionScope.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/componentPolicyStates/{componentPolicyStatesResource}/queryResults": { "post": { "operationId": "ComponentPolicyStates_ListQueryResultsForResourceGroupLevelPolicyAssignment", "description": "Queries component policy states for the resource group level policy assignment.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "resourceGroupName", "in": "path", "description": "Resource group name.", "required": true, "type": "string" }, { "name": "authorizationNamespace", "in": "path", "description": "The namespace for Microsoft Authorization resource provider; only \"Microsoft.Authorization\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Authorization" ], "x-ms-enum": { "modelAsString": false } }, { "name": "policyAssignmentName", "in": "path", "description": "Policy assignment name.", "required": true, "type": "string", "minLength": 1, "maxLength": 64, "pattern": "^[^<>%&:\\\\?/#]*$" }, { "name": "componentPolicyStatesResource", "in": "path", "description": "The virtual resource under ComponentPolicyStates resource type. In a given time range, 'latest' represents the latest component policy state(s).", "required": true, "type": "string", "enum": [ "latest" ], "x-ms-enum": { "name": "ComponentPolicyStatesResource", "modelAsString": true, "values": [ { "name": "latest", "value": "latest", "description": "latest" } ] } }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$orderby", "in": "query", "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", "required": false, "type": "string", "x-ms-client-name": "OrderBy" }, { "name": "$select", "in": "query", "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", "required": false, "type": "string", "x-ms-client-name": "Select" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" }, { "name": "$apply", "in": "query", "description": "OData apply expression for aggregations.", "required": false, "type": "string", "x-ms-client-name": "Apply" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/ComponentPolicyStatesQueryResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Query latest at resource group level policy assignment scope": { "$ref": "./examples/ComponentPolicyStates_QueryResourceGroupLevelPolicyAssignmentScope.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/attestations": { "get": { "operationId": "Attestations_ListForResourceGroup", "description": "Gets all attestations for the resource group.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/AttestationListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List attestations at resource group scope": { "$ref": "./examples/Attestations_ListResourceGroupScope.json" }, "List attestations at resource group scope with query parameters": { "$ref": "./examples/Attestations_ListResourceGroupScope_WithQuery.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/attestations/{attestationName}": { "get": { "operationId": "Attestations_GetAtResourceGroup", "description": "Gets an existing attestation at resource group scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "attestationName", "in": "path", "description": "The name of the attestation.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/Attestation" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Get attestation at resource group scope": { "$ref": "./examples/Attestations_GetResourceGroupScope.json" } } }, "put": { "operationId": "Attestations_CreateOrUpdateAtResourceGroup", "description": "Creates or updates an attestation at resource group scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "attestationName", "in": "path", "description": "The name of the attestation.", "required": true, "type": "string" }, { "name": "parameters", "in": "body", "description": "The attestation parameters.", "required": true, "schema": { "$ref": "#/definitions/Attestation" } } ], "responses": { "200": { "description": "Resource 'Attestation' update operation succeeded", "schema": { "$ref": "#/definitions/Attestation" } }, "201": { "description": "Resource 'Attestation' create operation succeeded", "schema": { "$ref": "#/definitions/Attestation" }, "headers": { "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Create attestation at resource group scope": { "$ref": "./examples/Attestations_CreateResourceGroupScope.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location", "final-state-schema": "#/definitions/Attestation" }, "x-ms-long-running-operation": true }, "delete": { "operationId": "Attestations_DeleteAtResourceGroup", "description": "Deletes an existing attestation at resource group scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "attestationName", "in": "path", "description": "The name of the attestation.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Resource deleted successfully." }, "204": { "description": "Resource does not exist." }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Delete attestation at resource group scope": { "$ref": "./examples/Attestations_DeleteResourceGroupScope.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/checkPolicyRestrictions": { "post": { "operationId": "PolicyRestrictions_CheckAtResourceGroupScope", "description": "Checks what restrictions Azure Policy will place on a resource within a resource group. Use this when the resource group the resource will be created in is already known.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "parameters", "in": "body", "description": "The request body", "required": true, "schema": { "$ref": "#/definitions/CheckRestrictionsRequest" } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/CheckRestrictionsResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Check policy restrictions at resource group scope": { "$ref": "./examples/PolicyRestrictions_CheckAtResourceGroupScope.json" }, "Check policy restrictions at resource group scope including audit effect": { "$ref": "./examples/PolicyRestrictions_CheckAtResourceGroupScopeIncludeAuditEffect.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/componentPolicyStates/{componentPolicyStatesResource}/queryResults": { "post": { "operationId": "ComponentPolicyStates_ListQueryResultsForResourceGroup", "description": "Queries component policy states under resource group scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "componentPolicyStatesResource", "in": "path", "description": "The virtual resource under ComponentPolicyStates resource type. In a given time range, 'latest' represents the latest component policy state(s).", "required": true, "type": "string", "enum": [ "latest" ], "x-ms-enum": { "name": "ComponentPolicyStatesResource", "modelAsString": true, "values": [ { "name": "latest", "value": "latest", "description": "latest" } ] } }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$orderby", "in": "query", "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", "required": false, "type": "string", "x-ms-client-name": "OrderBy" }, { "name": "$select", "in": "query", "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", "required": false, "type": "string", "x-ms-client-name": "Select" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" }, { "name": "$apply", "in": "query", "description": "OData apply expression for aggregations.", "required": false, "type": "string", "x-ms-client-name": "Apply" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/ComponentPolicyStatesQueryResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Query latest component policy compliance state count grouped by component type at resource group scope filtered by given assignment.": { "$ref": "./examples/ComponentPolicyStates_QueryResourceGroupScopeGroupByComponentTypeWithAggregate.json" }, "Query latest component policy states at resource group scope": { "$ref": "./examples/ComponentPolicyStates_QueryResourceGroupScope.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { "post": { "operationId": "PolicyEvents_ListQueryResultsForResourceGroup", "description": "Queries policy events for the resources under the resource group.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "policyEventsResource", "in": "path", "description": "The name of the virtual resource under PolicyEvents resource type; only \"default\" is allowed.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "PolicyEventsResourceType", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" } ] } }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$orderby", "in": "query", "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", "required": false, "type": "string", "x-ms-client-name": "OrderBy" }, { "name": "$select", "in": "query", "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", "required": false, "type": "string", "x-ms-client-name": "Select" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" }, { "name": "$apply", "in": "query", "description": "OData apply expression for aggregations.", "required": false, "type": "string", "x-ms-client-name": "Apply" }, { "name": "$skiptoken", "in": "query", "description": "Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.", "required": false, "type": "string", "x-ms-client-name": "SkipToken" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PolicyEventsQueryResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Query at resource group scope": { "$ref": "./examples/PolicyEvents_QueryResourceGroupScope.json" }, "Query at resource group scope with next link": { "$ref": "./examples/PolicyEvents_QueryResourceGroupScopeNextLink.json" } }, "x-ms-pageable": { "nextLinkName": "@odata.nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { "post": { "operationId": "PolicyStates_ListQueryResultsForResourceGroup", "description": "Queries policy states for the resources under the resource group.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "policyStatesResource", "in": "path", "description": "The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).", "required": true, "type": "string", "enum": [ "default", "latest" ], "x-ms-enum": { "name": "PolicyStatesResource", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" }, { "name": "latest", "value": "latest", "description": "latest" } ] } }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$orderby", "in": "query", "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", "required": false, "type": "string", "x-ms-client-name": "OrderBy" }, { "name": "$select", "in": "query", "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", "required": false, "type": "string", "x-ms-client-name": "Select" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" }, { "name": "$apply", "in": "query", "description": "OData apply expression for aggregations.", "required": false, "type": "string", "x-ms-client-name": "Apply" }, { "name": "$skiptoken", "in": "query", "description": "Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.", "required": false, "type": "string", "x-ms-client-name": "SkipToken" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PolicyStatesQueryResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Query latest at resource group scope": { "$ref": "./examples/PolicyStates_QueryResourceGroupScope.json" }, "Query latest at resource group scope with next link": { "$ref": "./examples/PolicyStates_QueryResourceGroupScopeNextLink.json" } }, "x-ms-pageable": { "nextLinkName": "@odata.nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { "post": { "operationId": "PolicyStates_SummarizeForResourceGroup", "description": "Summarizes policy states for the resources under the resource group.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "policyStatesSummaryResource", "in": "path", "description": "The virtual resource under PolicyStates resource type for summarize action. In a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.", "required": true, "type": "string", "enum": [ "latest" ], "x-ms-enum": { "name": "PolicyStatesSummaryResourceType", "modelAsString": true, "values": [ { "name": "latest", "value": "latest", "description": "latest" } ] } }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/SummarizeResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Summarize at resource group scope": { "$ref": "./examples/PolicyStates_SummarizeResourceGroupScope.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/latest/triggerEvaluation": { "post": { "operationId": "PolicyStates_TriggerResourceGroupEvaluation", "description": "Triggers a policy evaluation scan for all the resources under the resource group.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "name": "subscriptionId", "in": "path", "description": "The ID of the target subscription. The value must be an UUID.", "required": true, "type": "string", "format": "uuid", "minLength": 1 }, { "name": "resourceGroupName", "in": "path", "description": "Resource group name.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded." }, "202": { "description": "The scan was successfully triggered.", "headers": { "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Trigger evaluations for all resources in a resource group": { "$ref": "./examples/PolicyStates_TriggerResourceGroupEvaluation.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location" }, "x-ms-long-running-operation": true } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/remediations": { "get": { "operationId": "Remediations_ListForResourceGroup", "description": "Gets all remediations for the subscription.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/RemediationListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List remediations at resource group scope": { "$ref": "./examples/Remediations_ListResourceGroupScope.json" }, "List remediations at resource group scope with query parameters": { "$ref": "./examples/Remediations_ListResourceGroupScope_WithQuery.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/remediations/{remediationName}": { "get": { "operationId": "Remediations_GetAtResourceGroup", "description": "Gets an existing remediation at resource group scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "remediationName", "in": "path", "description": "The name of the remediation.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/Remediation" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Get remediation at resource group scope": { "$ref": "./examples/Remediations_GetResourceGroupScope.json" } } }, "put": { "operationId": "Remediations_CreateOrUpdateAtResourceGroup", "description": "Creates or updates a remediation at resource group scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "remediationName", "in": "path", "description": "The name of the remediation.", "required": true, "type": "string" }, { "name": "parameters", "in": "body", "description": "The remediation parameters.", "required": true, "schema": { "$ref": "#/definitions/Remediation" } } ], "responses": { "200": { "description": "Resource 'Remediation' update operation succeeded", "schema": { "$ref": "#/definitions/Remediation" } }, "201": { "description": "Resource 'Remediation' create operation succeeded", "schema": { "$ref": "#/definitions/Remediation" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Create remediation at resource group scope": { "$ref": "./examples/Remediations_CreateResourceGroupScope.json" } } }, "delete": { "operationId": "Remediations_DeleteAtResourceGroup", "description": "Deletes an existing remediation at resource group scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "remediationName", "in": "path", "description": "The name of the remediation.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/Remediation" } }, "204": { "description": "Resource does not exist." }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Delete remediation at resource group scope": { "$ref": "./examples/Remediations_DeleteResourceGroupScope.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/remediations/{remediationName}/cancel": { "post": { "operationId": "Remediations_CancelAtResourceGroup", "description": "Cancels a remediation at resource group scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "remediationName", "in": "path", "description": "The name of the remediation.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/Remediation" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Cancel a remediation at resource group scope": { "$ref": "./examples/Remediations_CancelResourceGroupScope.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/remediations/{remediationName}/listDeployments": { "post": { "operationId": "Remediations_ListDeploymentsAtResourceGroup", "description": "Gets all deployments for a remediation at resource group scope.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "remediationName", "in": "path", "description": "The name of the remediation.", "required": true, "type": "string" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/RemediationDeploymentsListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List deployments for a remediation at resource group scope": { "$ref": "./examples/Remediations_ListDeploymentsResourceGroupScope.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults": { "post": { "operationId": "PolicyEvents_ListQueryResultsForResourceGroupLevelPolicyAssignment", "description": "Queries policy events for the resource group level policy assignment.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "resourceGroupName", "in": "path", "description": "Resource group name.", "required": true, "type": "string" }, { "name": "policyEventsResource", "in": "path", "description": "The name of the virtual resource under PolicyEvents resource type; only \"default\" is allowed.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "PolicyEventsResourceType", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" } ] } }, { "name": "authorizationNamespace", "in": "path", "description": "The namespace for Microsoft Authorization resource provider; only \"Microsoft.Authorization\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Authorization" ], "x-ms-enum": { "modelAsString": false } }, { "name": "policyAssignmentName", "in": "path", "description": "Policy assignment name.", "required": true, "type": "string" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$orderby", "in": "query", "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", "required": false, "type": "string", "x-ms-client-name": "OrderBy" }, { "name": "$select", "in": "query", "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", "required": false, "type": "string", "x-ms-client-name": "Select" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" }, { "name": "$apply", "in": "query", "description": "OData apply expression for aggregations.", "required": false, "type": "string", "x-ms-client-name": "Apply" }, { "name": "$skiptoken", "in": "query", "description": "Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.", "required": false, "type": "string", "x-ms-client-name": "SkipToken" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PolicyEventsQueryResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Query at resource group level policy assignment scope": { "$ref": "./examples/PolicyEvents_QueryResourceGroupLevelPolicyAssignmentScope.json" }, "Query at resource group level policy assignment scope with next link": { "$ref": "./examples/PolicyEvents_QueryResourceGroupLevelPolicyAssignmentScopeNextLink.json" } }, "x-ms-pageable": { "nextLinkName": "@odata.nextLink" } } }, "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": { "post": { "operationId": "PolicyStates_ListQueryResultsForResourceGroupLevelPolicyAssignment", "description": "Queries policy states for the resource group level policy assignment.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "resourceGroupName", "in": "path", "description": "Resource group name.", "required": true, "type": "string" }, { "name": "policyStatesResource", "in": "path", "description": "The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s).", "required": true, "type": "string", "enum": [ "default", "latest" ], "x-ms-enum": { "name": "PolicyStatesResource", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" }, { "name": "latest", "value": "latest", "description": "latest" } ] } }, { "name": "authorizationNamespace", "in": "path", "description": "The namespace for Microsoft Authorization resource provider; only \"Microsoft.Authorization\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Authorization" ], "x-ms-enum": { "modelAsString": false } }, { "name": "policyAssignmentName", "in": "path", "description": "Policy assignment name.", "required": true, "type": "string" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$orderby", "in": "query", "description": "Ordering expression using OData notation. One or more comma-separated column names with an optional \"desc\" (the default) or \"asc\", e.g. \"$orderby=PolicyAssignmentId, ResourceId asc\".", "required": false, "type": "string", "x-ms-client-name": "OrderBy" }, { "name": "$select", "in": "query", "description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".", "required": false, "type": "string", "x-ms-client-name": "Select" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" }, { "name": "$apply", "in": "query", "description": "OData apply expression for aggregations.", "required": false, "type": "string", "x-ms-client-name": "Apply" }, { "name": "$skiptoken", "in": "query", "description": "Skiptoken is only provided if a previous response returned a partial result as a part of nextLink element.", "required": false, "type": "string", "x-ms-client-name": "SkipToken" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PolicyStatesQueryResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Query latest at resource group level policy assignment scope": { "$ref": "./examples/PolicyStates_QueryResourceGroupLevelPolicyAssignmentScope.json" }, "Query latest at resource group level policy assignment scope with next link": { "$ref": "./examples/PolicyStates_QueryResourceGroupLevelPolicyAssignmentScopeNextLink.json" } }, "x-ms-pageable": { "nextLinkName": "@odata.nextLink" } } }, "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize": { "post": { "operationId": "PolicyStates_SummarizeForResourceGroupLevelPolicyAssignment", "description": "Summarizes policy states for the resource group level policy assignment.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "name": "resourceGroupName", "in": "path", "description": "Resource group name.", "required": true, "type": "string" }, { "name": "policyStatesSummaryResource", "in": "path", "description": "The virtual resource under PolicyStates resource type for summarize action. In a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.", "required": true, "type": "string", "enum": [ "latest" ], "x-ms-enum": { "name": "PolicyStatesSummaryResourceType", "modelAsString": true, "values": [ { "name": "latest", "value": "latest", "description": "latest" } ] } }, { "name": "authorizationNamespace", "in": "path", "description": "The namespace for Microsoft Authorization resource provider; only \"Microsoft.Authorization\" is allowed.", "required": true, "type": "string", "enum": [ "Microsoft.Authorization" ], "x-ms-enum": { "modelAsString": false } }, { "name": "policyAssignmentName", "in": "path", "description": "Policy assignment name.", "required": true, "type": "string" }, { "name": "$top", "in": "query", "description": "Maximum number of records to return.", "required": false, "type": "integer", "format": "int32", "minimum": 0, "x-ms-client-name": "Top" }, { "name": "$from", "in": "query", "description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "From" }, { "name": "$to", "in": "query", "description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.", "required": false, "type": "string", "format": "date-time", "x-ms-client-name": "To" }, { "name": "$filter", "in": "query", "description": "OData filter expression.", "required": false, "type": "string", "x-ms-client-name": "Filter" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/SummarizeResults" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailure" } } }, "x-ms-examples": { "Summarize at policy assignment scope": { "$ref": "./examples/PolicyStates_SummarizeResourceGroupLevelPolicyAssignmentScope.json" } } } } }, "definitions": { "Attestation": { "type": "object", "description": "An attestation resource.", "properties": { "properties": { "$ref": "#/definitions/AttestationProperties", "description": "Properties for the attestation.", "x-ms-client-flatten": true } }, "required": [ "properties" ], "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ] }, "AttestationEvidence": { "type": "object", "description": "A piece of evidence supporting the compliance state set in the attestation.", "properties": { "description": { "type": "string", "description": "The description for this piece of evidence." }, "sourceUri": { "type": "string", "description": "The URI location of the evidence." } } }, "AttestationListResult": { "type": "object", "description": "List of attestations.", "properties": { "value": { "type": "array", "description": "The Attestation items on this page", "items": { "$ref": "#/definitions/Attestation" }, "readOnly": true }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "AttestationProperties": { "type": "object", "description": "The properties of an attestation resource.", "properties": { "policyAssignmentId": { "type": "string", "description": "The resource ID of the policy assignment that the attestation is setting the state for." }, "policyDefinitionReferenceId": { "type": "string", "description": "The policy definition reference ID from a policy set definition that the attestation is setting the state for. If the policy assignment assigns a policy set definition the attestation can choose a definition within the set definition with this property or omit this and set the state for the entire set definition." }, "complianceState": { "$ref": "#/definitions/ComplianceState", "description": "The compliance state that should be set on the resource." }, "expiresOn": { "type": "string", "format": "date-time", "description": "The time the compliance state should expire." }, "owner": { "type": "string", "description": "The person responsible for setting the state of the resource. This value is typically an Azure Active Directory object ID." }, "comments": { "type": "string", "description": "Comments describing why this attestation was created." }, "evidence": { "type": "array", "description": "The evidence supporting the compliance state set in this attestation.", "items": { "$ref": "#/definitions/AttestationEvidence" }, "x-ms-identifiers": [] }, "provisioningState": { "type": "string", "description": "The status of the attestation.", "readOnly": true }, "lastComplianceStateChangeAt": { "type": "string", "format": "date-time", "description": "The time the compliance state was last changed in this attestation.", "readOnly": true }, "assessmentDate": { "type": "string", "format": "date-time", "description": "The time the evidence was assessed" }, "metadata": { "description": "Additional metadata for this attestation" } }, "required": [ "policyAssignmentId" ] }, "CheckManagementGroupRestrictionsRequest": { "type": "object", "description": "The check policy restrictions parameters describing the resource that is being evaluated.", "properties": { "resourceDetails": { "$ref": "#/definitions/CheckRestrictionsResourceDetails", "description": "The information about the resource that will be evaluated." }, "pendingFields": { "type": "array", "description": "The list of fields and values that should be evaluated for potential restrictions.", "items": { "$ref": "#/definitions/PendingField" }, "x-ms-identifiers": [] } } }, "CheckRestrictionEvaluationDetails": { "type": "object", "description": "Policy evaluation details.", "properties": { "evaluatedExpressions": { "type": "array", "description": "Details of the evaluated expressions.", "items": { "$ref": "#/definitions/ExpressionEvaluationDetails" }, "x-ms-identifiers": [] }, "ifNotExistsDetails": { "$ref": "#/definitions/IfNotExistsEvaluationDetails", "description": "Evaluation details of IfNotExists effect." }, "reason": { "type": "string", "description": "The reason for the evaluation result.", "readOnly": true } } }, "CheckRestrictionsRequest": { "type": "object", "description": "The check policy restrictions parameters describing the resource that is being evaluated.", "properties": { "resourceDetails": { "$ref": "#/definitions/CheckRestrictionsResourceDetails", "description": "The information about the resource that will be evaluated." }, "pendingFields": { "type": "array", "description": "The list of fields and values that should be evaluated for potential restrictions.", "items": { "$ref": "#/definitions/PendingField" }, "x-ms-identifiers": [] }, "includeAuditEffect": { "type": "boolean", "description": "Whether to include policies with the 'audit' effect in the results. Defaults to false.", "default": false } }, "required": [ "resourceDetails" ] }, "CheckRestrictionsResourceDetails": { "type": "object", "description": "The information about the resource that will be evaluated.", "properties": { "resourceContent": { "description": "The resource content. This should include whatever properties are already known and can be a partial set of all resource properties." }, "apiVersion": { "type": "string", "description": "The api-version of the resource content." }, "scope": { "type": "string", "description": "The scope where the resource is being created. For example, if the resource is a child resource this would be the parent resource's resource ID." } }, "required": [ "resourceContent" ] }, "CheckRestrictionsResult": { "type": "object", "description": "The result of a check policy restrictions evaluation on a resource.", "properties": { "fieldRestrictions": { "type": "array", "description": "The restrictions that will be placed on various fields in the resource by policy.", "items": { "$ref": "#/definitions/FieldRestrictions" }, "readOnly": true, "x-ms-identifiers": [] }, "contentEvaluationResult": { "$ref": "#/definitions/CheckRestrictionsResultContentEvaluationResult", "description": "Evaluation results for the provided partial resource content.", "readOnly": true } } }, "CheckRestrictionsResultContentEvaluationResult": { "type": "object", "description": "Evaluation results for the provided partial resource content.", "properties": { "policyEvaluations": { "type": "array", "description": "Policy evaluation results against the given resource content. This will indicate if the partial content that was provided will be denied as-is.", "items": { "$ref": "#/definitions/PolicyEvaluationResult" }, "x-ms-identifiers": [] } } }, "ComplianceDetail": { "type": "object", "description": "The compliance state rollup.", "properties": { "complianceState": { "type": "string", "description": "The compliance state." }, "count": { "type": "integer", "format": "int32", "description": "Summarized count value for this compliance state." } } }, "ComplianceState": { "type": "string", "description": "The compliance state that should be set on the resource.", "enum": [ "Compliant", "NonCompliant", "Unknown" ], "x-ms-enum": { "name": "ComplianceState", "modelAsString": true, "values": [ { "name": "Compliant", "value": "Compliant", "description": "The resource is in compliance with the policy." }, { "name": "NonCompliant", "value": "NonCompliant", "description": "The resource is not in compliance with the policy." }, { "name": "Unknown", "value": "Unknown", "description": "The compliance state of the resource is not known." } ] } }, "ComponentEventDetails": { "type": "object", "description": "Component event details.", "properties": { "id": { "type": "string", "description": "Component Id." }, "type": { "type": "string", "description": "Component type." }, "name": { "type": "string", "description": "Component name." }, "timestamp": { "type": "string", "format": "date-time", "description": "Timestamp for component policy event record." }, "tenantId": { "type": "string", "description": "Tenant ID for the policy event record." }, "principalOid": { "type": "string", "description": "Principal object ID for the user who initiated the resource component operation that triggered the policy event." }, "policyDefinitionAction": { "type": "string", "description": "Policy definition action, i.e. effect." } }, "additionalProperties": {} }, "ComponentExpressionEvaluationDetails": { "type": "object", "description": "Evaluation details of policy language expressions.", "properties": { "result": { "type": "string", "description": "Evaluation result." }, "expression": { "type": "string", "description": "Expression evaluated.", "readOnly": true }, "expressionKind": { "type": "string", "description": "The kind of expression that was evaluated.", "readOnly": true }, "path": { "type": "string", "description": "Property path if the expression is a field or an alias.", "readOnly": true }, "expressionValue": { "description": "Value of the expression.", "readOnly": true }, "targetValue": { "description": "Target value to be compared with the expression value.", "readOnly": true }, "operator": { "type": "string", "description": "Operator to compare the expression value and the target value.", "readOnly": true } } }, "ComponentPolicyEvaluationDetails": { "type": "object", "description": "Policy evaluation details.", "properties": { "evaluatedExpressions": { "type": "array", "description": "Details of the evaluated expressions.", "items": { "$ref": "#/definitions/ComponentExpressionEvaluationDetails" }, "readOnly": true, "x-ms-identifiers": [] }, "reason": { "type": "string", "description": "Additional textual reason for the evaluation outcome." } } }, "ComponentPolicyState": { "type": "object", "description": "Component Policy State record.", "properties": { "@odata.id": { "type": "string", "description": "OData entity ID; always set to null since component policy state records do not have an entity ID.", "readOnly": true }, "@odata.context": { "type": "string", "description": "OData context string; used by OData clients to resolve type information based on metadata.", "readOnly": true }, "timestamp": { "type": "string", "format": "date-time", "description": "Timestamp for the component policy state record.", "readOnly": true }, "componentId": { "type": "string", "description": "Component Id.", "readOnly": true }, "componentType": { "type": "string", "description": "Component type.", "readOnly": true }, "componentName": { "type": "string", "description": "Component name.", "readOnly": true }, "resourceId": { "type": "string", "description": "Resource ID.", "readOnly": true }, "policyAssignmentId": { "type": "string", "description": "Policy assignment ID.", "readOnly": true }, "policyDefinitionId": { "type": "string", "description": "Policy definition ID.", "readOnly": true }, "subscriptionId": { "type": "string", "description": "Subscription ID.", "readOnly": true }, "resourceType": { "type": "string", "description": "Resource type.", "readOnly": true }, "resourceLocation": { "type": "string", "description": "Resource location.", "readOnly": true }, "resourceGroup": { "type": "string", "description": "Resource group name.", "readOnly": true }, "policyAssignmentName": { "type": "string", "description": "Policy assignment name.", "readOnly": true }, "policyAssignmentOwner": { "type": "string", "description": "Policy assignment owner.", "readOnly": true }, "policyAssignmentParameters": { "type": "string", "description": "Policy assignment parameters.", "readOnly": true }, "policyAssignmentScope": { "type": "string", "description": "Policy assignment scope.", "readOnly": true }, "policyDefinitionName": { "type": "string", "description": "Policy definition name.", "readOnly": true }, "policyDefinitionAction": { "type": "string", "description": "Policy definition action, i.e. effect.", "readOnly": true }, "policyDefinitionCategory": { "type": "string", "description": "Policy definition category.", "readOnly": true }, "policySetDefinitionId": { "type": "string", "description": "Policy set definition ID, if the policy assignment is for a policy set.", "readOnly": true }, "policySetDefinitionName": { "type": "string", "description": "Policy set definition name, if the policy assignment is for a policy set.", "readOnly": true }, "policySetDefinitionOwner": { "type": "string", "description": "Policy set definition owner, if the policy assignment is for a policy set.", "readOnly": true }, "policySetDefinitionCategory": { "type": "string", "description": "Policy set definition category, if the policy assignment is for a policy set.", "readOnly": true }, "policySetDefinitionParameters": { "type": "string", "description": "Policy set definition parameters, if the policy assignment is for a policy set.", "readOnly": true }, "policyDefinitionReferenceId": { "type": "string", "description": "Reference ID for the policy definition inside the policy set, if the policy assignment is for a policy set.", "readOnly": true }, "complianceState": { "type": "string", "description": "Compliance state of the resource.", "readOnly": true }, "policyEvaluationDetails": { "$ref": "#/definitions/ComponentPolicyEvaluationDetails", "description": "Policy evaluation details. This is only included in the response if the request contains $expand=PolicyEvaluationDetails." }, "policyDefinitionGroupNames": { "type": "array", "description": "Policy definition group names.", "items": { "type": "string" }, "readOnly": true }, "policyDefinitionVersion": { "type": "string", "description": "Evaluated policy definition version.", "readOnly": true }, "policySetDefinitionVersion": { "type": "string", "description": "Evaluated policy set definition version.", "readOnly": true }, "policyAssignmentVersion": { "type": "string", "description": "Evaluated policy assignment version.", "readOnly": true } }, "additionalProperties": {} }, "ComponentPolicyStatesQueryResults": { "type": "object", "description": "Query results.", "properties": { "@odata.context": { "type": "string", "description": "OData context string; used by OData clients to resolve type information based on metadata." }, "@odata.count": { "type": "integer", "format": "int32", "description": "OData entity count; represents the number of policy state records returned.", "minimum": 0 }, "value": { "type": "array", "description": "Query results.", "items": { "$ref": "#/definitions/ComponentPolicyState" }, "x-ms-identifiers": [] } } }, "ComponentStateDetails": { "type": "object", "description": "Component state details.", "properties": { "id": { "type": "string", "description": "Component Id." }, "type": { "type": "string", "description": "Component type." }, "name": { "type": "string", "description": "Component name." }, "timestamp": { "type": "string", "format": "date-time", "description": "Component compliance evaluation timestamp." }, "complianceState": { "type": "string", "description": "Component compliance state." } }, "additionalProperties": {} }, "ErrorDefinition": { "type": "object", "description": "Error definition.", "properties": { "code": { "type": "string", "description": "Service specific error code which serves as the substatus for the HTTP error code.", "readOnly": true }, "message": { "type": "string", "description": "Description of the error.", "readOnly": true }, "target": { "type": "string", "description": "The target of the error.", "readOnly": true }, "details": { "type": "array", "description": "Internal error details.", "items": { "$ref": "#/definitions/ErrorDefinition" }, "readOnly": true, "x-ms-identifiers": [] }, "additionalInfo": { "type": "array", "description": "Additional scenario specific error details.", "items": { "$ref": "#/definitions/TypedErrorInfo" }, "readOnly": true, "x-ms-identifiers": [] } } }, "ErrorResponse": { "type": "object", "description": "Error response.", "properties": { "error": { "$ref": "#/definitions/ErrorDefinition", "description": "The error details." } } }, "ExpressionEvaluationDetails": { "type": "object", "description": "Evaluation details of policy language expressions.", "properties": { "result": { "type": "string", "description": "Evaluation result." }, "expression": { "type": "string", "description": "Expression evaluated." }, "expressionKind": { "type": "string", "description": "The kind of expression that was evaluated.", "readOnly": true }, "path": { "type": "string", "description": "Property path if the expression is a field or an alias." }, "expressionValue": { "description": "Value of the expression." }, "targetValue": { "description": "Target value to be compared with the expression value." }, "operator": { "type": "string", "description": "Operator to compare the expression value and the target value." } } }, "FieldRestriction": { "type": "object", "description": "The restrictions on a field imposed by a specific policy.", "properties": { "result": { "$ref": "#/definitions/FieldRestrictionResult", "description": "The type of restriction that is imposed on the field.", "readOnly": true }, "defaultValue": { "type": "string", "description": "The value that policy will set for the field if the user does not provide a value.", "readOnly": true }, "values": { "type": "array", "description": "The values that policy either requires or denies for the field.", "items": { "type": "string" }, "readOnly": true }, "policy": { "$ref": "#/definitions/PolicyReference", "description": "The details of the policy that is causing the field restriction.", "readOnly": true }, "policyEffect": { "type": "string", "description": "The effect of the policy that is causing the field restriction. http://aka.ms/policyeffects", "readOnly": true }, "reason": { "type": "string", "description": "The reason for the restriction.", "readOnly": true } } }, "FieldRestrictionResult": { "type": "string", "description": "The type of restriction that is imposed on the field.", "enum": [ "Required", "Removed", "Deny", "Audit" ], "x-ms-enum": { "name": "FieldRestrictionResult", "modelAsString": true, "values": [ { "name": "Required", "value": "Required", "description": "The field and/or values are required by policy." }, { "name": "Removed", "value": "Removed", "description": "The field will be removed by policy." }, { "name": "Deny", "value": "Deny", "description": "The field and/or values will be denied by policy." }, { "name": "Audit", "value": "Audit", "description": "The field and/or values will be audited by policy." } ] } }, "FieldRestrictions": { "type": "object", "description": "The restrictions that will be placed on a field in the resource by policy.", "properties": { "field": { "type": "string", "description": "The name of the field. This can be a top-level property like 'name' or 'type' or an Azure Policy field alias.", "readOnly": true }, "restrictions": { "type": "array", "description": "The restrictions placed on that field by policy.", "items": { "$ref": "#/definitions/FieldRestriction" }, "x-ms-identifiers": [] } } }, "IfNotExistsEvaluationDetails": { "type": "object", "description": "Evaluation details of IfNotExists effect.", "properties": { "resourceId": { "type": "string", "description": "ID of the last evaluated resource for IfNotExists effect." }, "totalResources": { "type": "integer", "format": "int32", "description": "Total number of resources to which the existence condition is applicable." } } }, "Operation": { "type": "object", "description": "Operation definition.", "properties": { "name": { "type": "string", "description": "Operation name." }, "isDataAction": { "type": "boolean", "description": "Indicates whether the operation is a data action" }, "display": { "$ref": "#/definitions/OperationDisplay", "description": "Display metadata associated with the operation." } } }, "OperationDisplay": { "type": "object", "description": "Display metadata associated with the operation.", "properties": { "provider": { "type": "string", "description": "Resource provider name." }, "resource": { "type": "string", "description": "Resource name on which the operation is performed." }, "operation": { "type": "string", "description": "Operation name." }, "description": { "type": "string", "description": "Operation description." } } }, "OperationsListResults": { "type": "object", "description": "List of available operations.", "properties": { "@odata.count": { "type": "integer", "format": "int32", "description": "OData entity count; represents the number of operations returned.", "minimum": 1 }, "value": { "type": "array", "description": "List of available operations.", "items": { "$ref": "#/definitions/Operation" }, "x-ms-identifiers": [ "name" ] } } }, "PendingField": { "type": "object", "description": "A field that should be evaluated against Azure Policy to determine restrictions.", "properties": { "field": { "type": "string", "description": "The name of the field. This can be a top-level property like 'name' or 'type' or an Azure Policy field alias." }, "values": { "type": "array", "description": "The list of potential values for the field that should be evaluated against Azure Policy.", "items": { "type": "string" } } }, "required": [ "field" ] }, "PolicyAssignmentSummary": { "type": "object", "description": "Policy assignment summary.", "properties": { "policyAssignmentId": { "type": "string", "description": "Policy assignment ID." }, "policySetDefinitionId": { "type": "string", "description": "Policy set definition ID, if the policy assignment is for a policy set." }, "results": { "$ref": "#/definitions/SummaryResults", "description": "Compliance summary for the policy assignment." }, "policyDefinitions": { "type": "array", "description": "Policy definitions summary.", "items": { "$ref": "#/definitions/PolicyDefinitionSummary" }, "x-ms-identifiers": [ "policyDefinitionId" ] }, "policyGroups": { "type": "array", "description": "Policy definition group summary.", "items": { "$ref": "#/definitions/PolicyGroupSummary" }, "x-ms-identifiers": [ "policyGroupName" ] } } }, "PolicyDefinitionSummary": { "type": "object", "description": "Policy definition summary.", "properties": { "policyDefinitionId": { "type": "string", "description": "Policy definition ID." }, "policyDefinitionReferenceId": { "type": "string", "description": "Policy definition reference ID." }, "policyDefinitionGroupNames": { "type": "array", "description": "Policy definition group names.", "items": { "type": "string" } }, "effect": { "type": "string", "description": "Policy effect, i.e. policy definition action." }, "results": { "$ref": "#/definitions/SummaryResults", "description": "Compliance summary for the policy definition." } } }, "PolicyEffectDetails": { "type": "object", "description": "The details of the effect that was applied to the resource.", "properties": { "policyEffect": { "type": "string", "description": "The effect that was applied to the resource. http://aka.ms/policyeffects", "readOnly": true } } }, "PolicyEvaluationDetails": { "type": "object", "description": "Policy evaluation details.", "properties": { "evaluatedExpressions": { "type": "array", "description": "Details of the evaluated expressions.", "items": { "$ref": "#/definitions/ExpressionEvaluationDetails" }, "x-ms-identifiers": [] }, "ifNotExistsDetails": { "$ref": "#/definitions/IfNotExistsEvaluationDetails", "description": "Evaluation details of IfNotExists effect." } } }, "PolicyEvaluationResult": { "type": "object", "description": "The result of a non-compliant policy evaluation against the given resource content.", "properties": { "policyInfo": { "$ref": "#/definitions/PolicyReference", "description": "The details of the policy that was evaluated.", "readOnly": true }, "evaluationResult": { "type": "string", "description": "The result of the policy evaluation against the resource. This will typically be 'NonCompliant' but may contain other values if errors were encountered.", "readOnly": true }, "evaluationDetails": { "$ref": "#/definitions/CheckRestrictionEvaluationDetails", "description": "The detailed results of the policy expressions and values that were evaluated.", "readOnly": true }, "effectDetails": { "$ref": "#/definitions/PolicyEffectDetails", "description": "The details of the effect that was applied to the resource.", "readOnly": true } } }, "PolicyEvent": { "type": "object", "description": "Policy event record.", "properties": { "@odata.id": { "type": "string", "description": "OData entity ID; always set to null since policy event records do not have an entity ID." }, "@odata.context": { "type": "string", "description": "OData context string; used by OData clients to resolve type information based on metadata." }, "timestamp": { "type": "string", "format": "date-time", "description": "Timestamp for the policy event record." }, "resourceId": { "type": "string", "description": "Resource ID." }, "policyAssignmentId": { "type": "string", "description": "Policy assignment ID." }, "policyDefinitionId": { "type": "string", "description": "Policy definition ID." }, "effectiveParameters": { "type": "string", "description": "Effective parameters for the policy assignment." }, "isCompliant": { "type": "boolean", "description": "Flag which states whether the resource is compliant against the policy assignment it was evaluated against." }, "subscriptionId": { "type": "string", "description": "Subscription ID." }, "resourceType": { "type": "string", "description": "Resource type." }, "resourceLocation": { "type": "string", "description": "Resource location." }, "resourceGroup": { "type": "string", "description": "Resource group name." }, "resourceTags": { "type": "string", "description": "List of resource tags." }, "policyAssignmentName": { "type": "string", "description": "Policy assignment name." }, "policyAssignmentOwner": { "type": "string", "description": "Policy assignment owner." }, "policyAssignmentParameters": { "type": "string", "description": "Policy assignment parameters." }, "policyAssignmentScope": { "type": "string", "description": "Policy assignment scope." }, "policyDefinitionName": { "type": "string", "description": "Policy definition name." }, "policyDefinitionAction": { "type": "string", "description": "Policy definition action, i.e. effect." }, "policyDefinitionCategory": { "type": "string", "description": "Policy definition category." }, "policySetDefinitionId": { "type": "string", "description": "Policy set definition ID, if the policy assignment is for a policy set." }, "policySetDefinitionName": { "type": "string", "description": "Policy set definition name, if the policy assignment is for a policy set." }, "policySetDefinitionOwner": { "type": "string", "description": "Policy set definition owner, if the policy assignment is for a policy set." }, "policySetDefinitionCategory": { "type": "string", "description": "Policy set definition category, if the policy assignment is for a policy set." }, "policySetDefinitionParameters": { "type": "string", "description": "Policy set definition parameters, if the policy assignment is for a policy set." }, "managementGroupIds": { "type": "string", "description": "Comma separated list of management group IDs, which represent the hierarchy of the management groups the resource is under." }, "policyDefinitionReferenceId": { "type": "string", "description": "Reference ID for the policy definition inside the policy set, if the policy assignment is for a policy set." }, "complianceState": { "type": "string", "description": "Compliance state of the resource." }, "tenantId": { "type": "string", "description": "Tenant ID for the policy event record." }, "principalOid": { "type": "string", "description": "Principal object ID for the user who initiated the resource operation that triggered the policy event." }, "components": { "type": "array", "description": "Components events records populated only when URL contains $expand=components clause.", "items": { "$ref": "#/definitions/ComponentEventDetails" } } }, "additionalProperties": {} }, "PolicyEventsQueryResults": { "type": "object", "description": "Query results.", "properties": { "@odata.context": { "type": "string", "description": "OData context string; used by OData clients to resolve type information based on metadata." }, "@odata.count": { "type": "integer", "format": "int32", "description": "OData entity count; represents the number of policy event records returned.", "minimum": 0 }, "@odata.nextLink": { "type": "string", "description": "Odata next link; URL to get the next set of results." }, "value": { "type": "array", "description": "Query results.", "items": { "$ref": "#/definitions/PolicyEvent" }, "x-ms-identifiers": [] } } }, "PolicyGroupSummary": { "type": "object", "description": "Policy definition group summary.", "properties": { "policyGroupName": { "type": "string", "description": "Policy group name." }, "results": { "$ref": "#/definitions/SummaryResults", "description": "Compliance summary for the policy definition group." } } }, "PolicyInsightsCommon.QueryFailure": { "type": "object", "description": "Error response.", "properties": { "error": { "$ref": "#/definitions/PolicyInsightsCommon.QueryFailureError", "description": "Error definition." } } }, "PolicyInsightsCommon.QueryFailureError": { "type": "object", "description": "Error definition.", "properties": { "code": { "type": "string", "description": "Service specific error code which serves as the substatus for the HTTP error code.", "readOnly": true }, "message": { "type": "string", "description": "Description of the error.", "readOnly": true } } }, "PolicyMetadata": { "type": "object", "description": "Policy metadata resource definition.", "properties": { "properties": { "$ref": "#/definitions/PolicyMetadataProperties", "description": "Properties of the policy metadata.", "x-ms-client-flatten": true } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ] }, "PolicyMetadataCollection": { "type": "object", "description": "Collection of policy metadata resources.", "properties": { "value": { "type": "array", "description": "The SlimPolicyMetadata items on this page", "items": { "$ref": "#/definitions/SlimPolicyMetadata" }, "readOnly": true }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "PolicyMetadataProperties": { "type": "object", "description": "The properties of the policy metadata.", "properties": { "description": { "type": "string", "description": "The description of the policy metadata.", "readOnly": true }, "requirements": { "type": "string", "description": "The requirements of the policy metadata.", "readOnly": true } }, "allOf": [ { "$ref": "#/definitions/PolicyMetadataSlimProperties" } ] }, "PolicyMetadataSlimProperties": { "type": "object", "description": "The properties of the policy metadata, excluding properties containing large strings", "properties": { "metadataId": { "type": "string", "description": "The policy metadata identifier.", "readOnly": true }, "category": { "type": "string", "description": "The category of the policy metadata.", "readOnly": true }, "title": { "type": "string", "description": "The title of the policy metadata.", "readOnly": true }, "owner": { "type": "string", "description": "The owner of the policy metadata.", "readOnly": true }, "additionalContentUrl": { "type": "string", "description": "Url for getting additional content about the resource metadata.", "readOnly": true }, "metadata": { "description": "Additional metadata.", "readOnly": true } } }, "PolicyReference": { "type": "object", "description": "Resource identifiers for a policy.", "properties": { "policyDefinitionId": { "type": "string", "description": "The resource identifier of the policy definition.", "readOnly": true }, "policySetDefinitionId": { "type": "string", "description": "The resource identifier of the policy set definition.", "readOnly": true }, "policyDefinitionReferenceId": { "type": "string", "description": "The reference identifier of a specific policy definition within a policy set definition.", "readOnly": true }, "policyAssignmentId": { "type": "string", "description": "The resource identifier of the policy assignment.", "readOnly": true } } }, "PolicyState": { "type": "object", "description": "Policy state record.", "properties": { "@odata.id": { "type": "string", "description": "OData entity ID; always set to null since policy state records do not have an entity ID." }, "@odata.context": { "type": "string", "description": "OData context string; used by OData clients to resolve type information based on metadata." }, "timestamp": { "type": "string", "format": "date-time", "description": "Timestamp for the policy state record." }, "resourceId": { "type": "string", "description": "Resource ID." }, "policyAssignmentId": { "type": "string", "description": "Policy assignment ID." }, "policyDefinitionId": { "type": "string", "description": "Policy definition ID." }, "effectiveParameters": { "type": "string", "description": "Effective parameters for the policy assignment." }, "isCompliant": { "type": "boolean", "description": "Flag which states whether the resource is compliant against the policy assignment it was evaluated against. This property is deprecated; please use ComplianceState instead." }, "subscriptionId": { "type": "string", "description": "Subscription ID." }, "resourceType": { "type": "string", "description": "Resource type." }, "resourceLocation": { "type": "string", "description": "Resource location." }, "resourceGroup": { "type": "string", "description": "Resource group name." }, "resourceTags": { "type": "string", "description": "List of resource tags." }, "policyAssignmentName": { "type": "string", "description": "Policy assignment name." }, "policyAssignmentOwner": { "type": "string", "description": "Policy assignment owner." }, "policyAssignmentParameters": { "type": "string", "description": "Policy assignment parameters." }, "policyAssignmentScope": { "type": "string", "description": "Policy assignment scope." }, "policyDefinitionName": { "type": "string", "description": "Policy definition name." }, "policyDefinitionAction": { "type": "string", "description": "Policy definition action, i.e. effect." }, "policyDefinitionCategory": { "type": "string", "description": "Policy definition category." }, "policySetDefinitionId": { "type": "string", "description": "Policy set definition ID, if the policy assignment is for a policy set." }, "policySetDefinitionName": { "type": "string", "description": "Policy set definition name, if the policy assignment is for a policy set." }, "policySetDefinitionOwner": { "type": "string", "description": "Policy set definition owner, if the policy assignment is for a policy set." }, "policySetDefinitionCategory": { "type": "string", "description": "Policy set definition category, if the policy assignment is for a policy set." }, "policySetDefinitionParameters": { "type": "string", "description": "Policy set definition parameters, if the policy assignment is for a policy set." }, "managementGroupIds": { "type": "string", "description": "Comma separated list of management group IDs, which represent the hierarchy of the management groups the resource is under." }, "policyDefinitionReferenceId": { "type": "string", "description": "Reference ID for the policy definition inside the policy set, if the policy assignment is for a policy set." }, "complianceState": { "type": "string", "description": "Compliance state of the resource." }, "policyEvaluationDetails": { "$ref": "#/definitions/PolicyEvaluationDetails", "description": "Policy evaluation details." }, "policyDefinitionGroupNames": { "type": "array", "description": "Policy definition group names.", "items": { "type": "string" } }, "components": { "type": "array", "description": "Components state compliance records populated only when URL contains $expand=components clause.", "items": { "$ref": "#/definitions/ComponentStateDetails" } }, "policyDefinitionVersion": { "type": "string", "description": "Evaluated policy definition version.", "readOnly": true }, "policySetDefinitionVersion": { "type": "string", "description": "Evaluated policy set definition version.", "readOnly": true }, "policyAssignmentVersion": { "type": "string", "description": "Evaluated policy assignment version.", "readOnly": true } }, "additionalProperties": {} }, "PolicyStatesQueryResults": { "type": "object", "description": "Query results.", "properties": { "@odata.context": { "type": "string", "description": "OData context string; used by OData clients to resolve type information based on metadata." }, "@odata.count": { "type": "integer", "format": "int32", "description": "OData entity count; represents the number of policy state records returned.", "minimum": 0 }, "@odata.nextLink": { "type": "string", "description": "Odata next link; URL to get the next set of results." }, "value": { "type": "array", "description": "Query results.", "items": { "$ref": "#/definitions/PolicyState" }, "x-ms-identifiers": [] } } }, "Remediation": { "type": "object", "description": "The remediation definition.", "properties": { "properties": { "$ref": "#/definitions/RemediationProperties", "description": "Properties for the remediation.", "x-ms-client-flatten": true } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ] }, "RemediationDeployment": { "type": "object", "description": "Details of a single deployment created by the remediation.", "properties": { "remediatedResourceId": { "type": "string", "description": "Resource ID of the resource that is being remediated by the deployment.", "readOnly": true }, "deploymentId": { "type": "string", "description": "Resource ID of the template deployment that will remediate the resource.", "readOnly": true }, "status": { "type": "string", "description": "Status of the remediation deployment.", "readOnly": true }, "resourceLocation": { "type": "string", "description": "Location of the resource that is being remediated.", "readOnly": true }, "error": { "$ref": "#/definitions/ErrorDefinition", "description": "Error encountered while remediated the resource.", "readOnly": true }, "createdOn": { "type": "string", "format": "date-time", "description": "The time at which the remediation was created.", "readOnly": true }, "lastUpdatedOn": { "type": "string", "format": "date-time", "description": "The time at which the remediation deployment was last updated.", "readOnly": true } } }, "RemediationDeploymentSummary": { "type": "object", "description": "The deployment status summary for all deployments created by the remediation.", "properties": { "totalDeployments": { "type": "integer", "format": "int32", "description": "The number of deployments required by the remediation.", "readOnly": true }, "successfulDeployments": { "type": "integer", "format": "int32", "description": "The number of deployments required by the remediation that have succeeded.", "readOnly": true }, "failedDeployments": { "type": "integer", "format": "int32", "description": "The number of deployments required by the remediation that have failed.", "readOnly": true } } }, "RemediationDeploymentsListResult": { "type": "object", "description": "List of deployments for a remediation.", "properties": { "value": { "type": "array", "description": "The RemediationDeployment items on this page", "items": { "$ref": "#/definitions/RemediationDeployment" }, "readOnly": true, "x-ms-identifiers": [ "remediatedResourceId" ] }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "RemediationFilters": { "type": "object", "description": "The filters that will be applied to determine which resources to remediate.", "properties": { "locations": { "type": "array", "description": "The resource locations that will be remediated.", "items": { "type": "string" } }, "resourceIds": { "type": "array", "description": "The IDs of the resources that will be remediated. Can specify at most 100 IDs. This filter cannot be used when ReEvaluateCompliance is set to ReEvaluateCompliance, and cannot be empty if provided.", "items": { "type": "string" } } } }, "RemediationListResult": { "type": "object", "description": "List of remediations.", "properties": { "value": { "type": "array", "description": "The Remediation items on this page", "items": { "$ref": "#/definitions/Remediation" }, "readOnly": true }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "RemediationProperties": { "type": "object", "description": "The remediation properties.", "properties": { "policyAssignmentId": { "type": "string", "description": "The resource ID of the policy assignment that should be remediated." }, "policyDefinitionReferenceId": { "type": "string", "description": "The policy definition reference ID of the individual definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition." }, "resourceDiscoveryMode": { "$ref": "#/definitions/ResourceDiscoveryMode", "description": "The way resources to remediate are discovered. Defaults to ExistingNonCompliant if not specified." }, "provisioningState": { "type": "string", "description": "The status of the remediation. This refers to the entire remediation task, not individual deployments. Allowed values are Evaluating, Canceled, Cancelling, Failed, Complete, or Succeeded.", "readOnly": true }, "createdOn": { "type": "string", "format": "date-time", "description": "The time at which the remediation was created.", "readOnly": true }, "lastUpdatedOn": { "type": "string", "format": "date-time", "description": "The time at which the remediation was last updated.", "readOnly": true }, "filters": { "$ref": "#/definitions/RemediationFilters", "description": "The filters that will be applied to determine which resources to remediate." }, "deploymentStatus": { "$ref": "#/definitions/RemediationDeploymentSummary", "description": "The deployment status summary for all deployments created by the remediation.", "readOnly": true }, "statusMessage": { "type": "string", "description": "The remediation status message. Provides additional details regarding the state of the remediation.", "readOnly": true }, "correlationId": { "type": "string", "description": "The remediation correlation Id. Can be used to find events related to the remediation in the activity log.", "readOnly": true }, "resourceCount": { "type": "integer", "format": "int32", "description": "Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used." }, "parallelDeployments": { "type": "integer", "format": "int32", "description": "Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used." }, "failureThreshold": { "$ref": "#/definitions/RemediationPropertiesFailureThreshold", "description": "The remediation failure threshold settings" } } }, "RemediationPropertiesFailureThreshold": { "type": "object", "description": "The remediation failure threshold settings", "properties": { "percentage": { "type": "number", "format": "float", "description": "A number between 0.0 to 1.0 representing the percentage failure threshold. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold." } } }, "ResourceDiscoveryMode": { "type": "string", "description": "The way resources to remediate are discovered. Defaults to ExistingNonCompliant if not specified.", "enum": [ "ExistingNonCompliant", "ReEvaluateCompliance" ], "x-ms-enum": { "name": "ResourceDiscoveryMode", "modelAsString": true, "values": [ { "name": "ExistingNonCompliant", "value": "ExistingNonCompliant", "description": "Remediate resources that are already known to be non-compliant." }, { "name": "ReEvaluateCompliance", "value": "ReEvaluateCompliance", "description": "Re-evaluate the compliance state of resources and then remediate the resources found to be non-compliant. The resourceIds filter cannot be used in this mode." } ] } }, "SlimPolicyMetadata": { "type": "object", "description": "Slim version of policy metadata resource definition, excluding properties with large strings", "properties": { "properties": { "$ref": "#/definitions/PolicyMetadataSlimProperties", "description": "Properties of the policy metadata.", "x-ms-client-flatten": true }, "id": { "type": "string", "description": "The ID of the policy metadata.", "readOnly": true }, "type": { "type": "string", "description": "The type of the policy metadata.", "readOnly": true }, "name": { "type": "string", "description": "The name of the policy metadata.", "readOnly": true } } }, "SummarizeResults": { "type": "object", "description": "Summarize action results.", "properties": { "@odata.context": { "type": "string", "description": "OData context string; used by OData clients to resolve type information based on metadata." }, "@odata.count": { "type": "integer", "format": "int32", "description": "OData entity count; represents the number of summaries returned; always set to 1.", "minimum": 1, "maximum": 1 }, "value": { "type": "array", "description": "Summarize action results.", "items": { "$ref": "#/definitions/Summary" }, "x-ms-identifiers": [] } } }, "Summary": { "type": "object", "description": "Summary results.", "properties": { "@odata.id": { "type": "string", "description": "OData entity ID; always set to null since summaries do not have an entity ID." }, "@odata.context": { "type": "string", "description": "OData context string; used by OData clients to resolve type information based on metadata." }, "results": { "$ref": "#/definitions/SummaryResults", "description": "Compliance summary for all policy assignments." }, "policyAssignments": { "type": "array", "description": "Policy assignments summary.", "items": { "$ref": "#/definitions/PolicyAssignmentSummary" }, "x-ms-identifiers": [ "policyAssignmentId" ] } } }, "SummaryResults": { "type": "object", "description": "Compliance summary on a particular summary level.", "properties": { "queryResultsUri": { "type": "string", "description": "HTTP POST URI for queryResults action on Microsoft.PolicyInsights to retrieve raw results for the compliance summary. This property will not be available by default in future API versions, but could be queried explicitly." }, "nonCompliantResources": { "type": "integer", "format": "int32", "description": "Number of non-compliant resources.", "minimum": 0 }, "nonCompliantPolicies": { "type": "integer", "format": "int32", "description": "Number of non-compliant policies.", "minimum": 0 }, "resourceDetails": { "type": "array", "description": "The resources summary at this level.", "items": { "$ref": "#/definitions/ComplianceDetail" }, "x-ms-identifiers": [] }, "policyDetails": { "type": "array", "description": "The policy artifact summary at this level. For query scope level, it represents policy assignment summary. For policy assignment level, it represents policy definitions summary.", "items": { "$ref": "#/definitions/ComplianceDetail" }, "x-ms-identifiers": [] }, "policyGroupDetails": { "type": "array", "description": "The policy definition group summary at this level.", "items": { "$ref": "#/definitions/ComplianceDetail" }, "x-ms-identifiers": [] } } }, "TypedErrorInfo": { "type": "object", "description": "Scenario specific error details.", "properties": { "type": { "type": "string", "description": "The type of included error details.", "readOnly": true }, "info": { "description": "The scenario specific error details.", "readOnly": true } } } }, "parameters": {} }