[Hub Generated] Publish private branch 'nreisch-componentPolicyStates-Microsoft.PolicyInsights-2022-04-01' (#20802)
* Adds base for updating Microsoft.PolicyInsights from version stable/2019-10-01 to version 2022-04-01 * Updates readme * Updates API version in new specs and examples * Clean 2022-04-01 * Add ComponentPolicyStates API * Remove pageable * Fix CI 1 * Fix CI 2 * Fix CI 3 * CI Fix 4 * Fix CI 5 * Fix CI 6 * Fix CI * Fix CI * Fix CI * Fix CI * FIX CI * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI: * Fix CI * Fix * Fix * Fix contract * Address comments 1 * Add to readme * Address comments * Remove operations api * Remove operations api from 2022-04-01 * Add back operations api * Address comments * Fix * Fix CI * Fix CI * Fix CI * Remove x-ms-parameter-grouping * Rename parameters * Whitespace fix * whitespace fix * Fix params * Fix CI * Update PolicyEvaluationDetails example * Fix space * Fixes * Suppress resource name restriction * Add pattern * Fix pattern * Suppress LRO_RESPONSE_HEADER for 2019 api * Update resource name pattern * Remove isDataAction from later api-version * Add back operations api * Remove suppression * Fix LRO * Fix example
This commit is contained in:
Родитель
312544c274
Коммит
4522e1d3fb
|
@ -6,6 +6,13 @@
|
|||
},
|
||||
"responses": {
|
||||
"200": {},
|
||||
"202": {}
|
||||
"202": {
|
||||
"headers": {
|
||||
"Code": "202",
|
||||
"Message": "Accepted",
|
||||
"Retry-After": "30",
|
||||
"Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PolicyInsights/asyncOperationResults/00000000-0000-0000-0000-000000000000?api-version=2019-10-01"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,13 @@
|
|||
},
|
||||
"responses": {
|
||||
"200": {},
|
||||
"202": {}
|
||||
"202": {
|
||||
"headers": {
|
||||
"Code": "202",
|
||||
"Message": "Accepted",
|
||||
"Retry-After": "30",
|
||||
"Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PolicyInsights/asyncOperationResults/00000000-0000-0000-0000-000000000000?api-version=2019-10-01"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,150 @@
|
|||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "Policy Insights Operations API",
|
||||
"version": "2019-10-01"
|
||||
},
|
||||
"host": "management.azure.com",
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"security": [
|
||||
{
|
||||
"azure_auth": [
|
||||
"user_impersonation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"securityDefinitions": {
|
||||
"azure_auth": {
|
||||
"type": "oauth2",
|
||||
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
|
||||
"flow": "implicit",
|
||||
"description": "Azure Active Directory OAuth2 Flow",
|
||||
"scopes": {
|
||||
"user_impersonation": "impersonate your user account"
|
||||
}
|
||||
}
|
||||
},
|
||||
"paths": {
|
||||
"/providers/Microsoft.PolicyInsights/operations": {
|
||||
"get": {
|
||||
"operationId": "Operations_List",
|
||||
"description": "Lists available operations.",
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/apiVersionParameter"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "List of available operations.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/OperationsListResults"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Error response describing why the operation failed.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/QueryFailure"
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-ms-examples": {
|
||||
"List operations": {
|
||||
"$ref": "./examples/Operations_ListOperations.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"OperationsListResults": {
|
||||
"description": "List of available operations.",
|
||||
"properties": {
|
||||
"@odata.count": {
|
||||
"description": "OData entity count; represents the number of operations returned.",
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"minimum": 1
|
||||
},
|
||||
"value": {
|
||||
"description": "List of available operations.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Operation"
|
||||
},
|
||||
"x-ms-identifiers": [
|
||||
"name"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"Operation": {
|
||||
"description": "Operation definition.",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "Operation name.",
|
||||
"type": "string"
|
||||
},
|
||||
"display": {
|
||||
"description": "Display metadata associated with the operation.",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"description": "Resource provider name.",
|
||||
"type": "string"
|
||||
},
|
||||
"resource": {
|
||||
"description": "Resource name on which the operation is performed.",
|
||||
"type": "string"
|
||||
},
|
||||
"operation": {
|
||||
"description": "Operation name.",
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"description": "Operation description.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"QueryFailure": {
|
||||
"description": "Error response.",
|
||||
"properties": {
|
||||
"error": {
|
||||
"description": "Error definition.",
|
||||
"properties": {
|
||||
"code": {
|
||||
"description": "Service specific error code which serves as the substatus for the HTTP error code.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"message": {
|
||||
"description": "Description of the error.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
"apiVersionParameter": {
|
||||
"name": "api-version",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "API version to use with the client requests.",
|
||||
"x-ms-parameter-location": "client"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1131,36 +1131,6 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/providers/Microsoft.PolicyInsights/operations": {
|
||||
"get": {
|
||||
"operationId": "Operations_List",
|
||||
"description": "Lists available operations.",
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/apiVersionParameter"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "List of available operations.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/OperationsListResults"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Error response describing why the operation failed.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/QueryFailure"
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-ms-examples": {
|
||||
"List operations": {
|
||||
"$ref": "./examples/PolicyStates_ListOperations.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-ms-paths": {
|
||||
|
@ -1696,57 +1666,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"OperationsListResults": {
|
||||
"description": "List of available operations.",
|
||||
"properties": {
|
||||
"@odata.count": {
|
||||
"description": "OData entity count; represents the number of operations returned.",
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"minimum": 1
|
||||
},
|
||||
"value": {
|
||||
"description": "List of available operations.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Operation"
|
||||
},
|
||||
"x-ms-identifiers": [
|
||||
"name"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"Operation": {
|
||||
"description": "Operation definition.",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "Operation name.",
|
||||
"type": "string"
|
||||
},
|
||||
"display": {
|
||||
"description": "Display metadata associated with the operation.",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"description": "Resource provider name.",
|
||||
"type": "string"
|
||||
},
|
||||
"resource": {
|
||||
"description": "Resource name on which the operation is performed.",
|
||||
"type": "string"
|
||||
},
|
||||
"operation": {
|
||||
"description": "Operation name.",
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"description": "Operation description.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"MetadataDocument": {
|
||||
"description": "Metadata XML document.",
|
||||
"type": "string"
|
||||
|
|
|
@ -0,0 +1,843 @@
|
|||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "ComponentPolicyStatesClient",
|
||||
"version": "2022-04-01",
|
||||
"description": "Query component policy states at varying resource scopes for Resource Provider mode policies."
|
||||
},
|
||||
"host": "management.azure.com",
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"security": [
|
||||
{
|
||||
"azure_auth": [
|
||||
"user_impersonation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"securityDefinitions": {
|
||||
"azure_auth": {
|
||||
"type": "oauth2",
|
||||
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
|
||||
"flow": "implicit",
|
||||
"description": "Azure Active Directory OAuth2 Flow",
|
||||
"scopes": {
|
||||
"user_impersonation": "impersonate your user account"
|
||||
}
|
||||
}
|
||||
},
|
||||
"paths": {
|
||||
"/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/componentPolicyStates/{componentPolicyStatesResource}/queryResults": {
|
||||
"post": {
|
||||
"operationId": "ComponentPolicyStates_ListQueryResultsForSubscription",
|
||||
"description": "Queries component policy states under subscription scope.",
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/subscriptionId"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/componentPolicyStatesResource"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/apiVersion"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/top"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/orderBy"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/select"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/from"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/to"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/filter"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/apply"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Query results.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ComponentPolicyStatesQueryResults"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Error response describing why the operation failed.",
|
||||
"schema": {
|
||||
"$ref": "../../stable/2019-10-01/policyMetadata.json#/definitions/ErrorResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-ms-examples": {
|
||||
"Query latest component policy states at subscription scope": {
|
||||
"$ref": "./examples/ComponentPolicyStates_QuerySubscriptionScope.json"
|
||||
},
|
||||
"Query latest component policy compliance state count grouped by component type at subscription scope filtered by given assignment.": {
|
||||
"$ref": "./examples/ComponentPolicyStates_QuerySubscriptionScopeGroupByComponentTypeWithAggregate.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": "#/parameters/subscriptionId"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/resourceGroupName"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/componentPolicyStatesResource"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/apiVersion"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/top"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/orderBy"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/select"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/from"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/to"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/filter"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/apply"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Query results.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ComponentPolicyStatesQueryResults"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Error response describing why the operation failed.",
|
||||
"schema": {
|
||||
"$ref": "../../stable/2019-10-01/policyMetadata.json#/definitions/ErrorResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-ms-examples": {
|
||||
"Query latest component policy states at resource group scope": {
|
||||
"$ref": "./examples/ComponentPolicyStates_QueryResourceGroupScope.json"
|
||||
},
|
||||
"Query latest component policy compliance state count grouped by component type at resource group scope filtered by given assignment.": {
|
||||
"$ref": "./examples/ComponentPolicyStates_QueryResourceGroupScopeGroupByComponentTypeWithAggregate.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/{resourceId}/providers/Microsoft.PolicyInsights/componentPolicyStates/{componentPolicyStatesResource}/queryResults": {
|
||||
"post": {
|
||||
"operationId": "ComponentPolicyStates_ListQueryResultsForResource",
|
||||
"description": "Queries component policy states for the resource.",
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/resourceId"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/componentPolicyStatesResource"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/apiVersion"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/top"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/orderBy"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/select"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/from"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/to"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/filter"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/apply"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/componentPolicyStatesExpand"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Query results.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ComponentPolicyStatesQueryResults"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Error response describing why the operation failed.",
|
||||
"schema": {
|
||||
"$ref": "../../stable/2019-10-01/policyMetadata.json#/definitions/ErrorResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-ms-examples": {
|
||||
"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"
|
||||
},
|
||||
"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 compliance state at resource scope filtered by given component id.": {
|
||||
"$ref": "./examples/ComponentPolicyStates_QueryResourceScopeFilterByComponentId.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": "#/parameters/subscriptionId"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/authorizationNamespace"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/policyDefinitionName"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/componentPolicyStatesResource"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/apiVersion"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/top"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/orderBy"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/select"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/from"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/to"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/filter"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/apply"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Query results.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ComponentPolicyStatesQueryResults"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Error response describing why the operation failed.",
|
||||
"schema": {
|
||||
"$ref": "../../stable/2019-10-01/policyMetadata.json#/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}/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": "#/parameters/subscriptionId"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/authorizationNamespace"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/policyAssignmentName"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/componentPolicyStatesResource"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/apiVersion"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/top"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/orderBy"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/select"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/from"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/to"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/filter"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/apply"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Query results.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ComponentPolicyStatesQueryResults"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Error response describing why the operation failed.",
|
||||
"schema": {
|
||||
"$ref": "../../stable/2019-10-01/policyMetadata.json#/definitions/ErrorResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-ms-examples": {
|
||||
"Query latest at subscription level policy assignment scope": {
|
||||
"$ref": "./examples/ComponentPolicyStates_QuerySubscriptionLevelPolicyAssignmentScope.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/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": "#/parameters/subscriptionId"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/resourceGroupName"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/authorizationNamespace"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/policyAssignmentName"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/componentPolicyStatesResource"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/apiVersion"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/top"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/orderBy"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/select"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/from"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/to"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/filter"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/apply"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Query results.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ComponentPolicyStatesQueryResults"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Error response describing why the operation failed.",
|
||||
"schema": {
|
||||
"$ref": "../../stable/2019-10-01/policyMetadata.json#/definitions/ErrorResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-ms-examples": {
|
||||
"Query latest at resource group level policy assignment scope": {
|
||||
"$ref": "./examples/ComponentPolicyStates_QueryResourceGroupLevelPolicyAssignmentScope.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"ComponentPolicyStatesQueryResults": {
|
||||
"type": "object",
|
||||
"description": "Query results.",
|
||||
"properties": {
|
||||
"@odata.context": {
|
||||
"description": "OData context string; used by OData clients to resolve type information based on metadata.",
|
||||
"type": "string"
|
||||
},
|
||||
"@odata.count": {
|
||||
"description": "OData entity count; represents the number of policy state records returned.",
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"minimum": 0
|
||||
},
|
||||
"value": {
|
||||
"description": "Query results.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/ComponentPolicyState"
|
||||
},
|
||||
"x-ms-identifiers": []
|
||||
}
|
||||
}
|
||||
},
|
||||
"ComponentPolicyState": {
|
||||
"type": "object",
|
||||
"description": "Component Policy State record.",
|
||||
"properties": {
|
||||
"@odata.id": {
|
||||
"description": "OData entity ID; always set to null since component policy state records do not have an entity ID.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"@odata.context": {
|
||||
"description": "OData context string; used by OData clients to resolve type information based on metadata.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"timestamp": {
|
||||
"description": "Timestamp for the component policy state record.",
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"readOnly": true
|
||||
},
|
||||
"componentId": {
|
||||
"description": "Component Id.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"componentType": {
|
||||
"description": "Component type.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"componentName": {
|
||||
"description": "Component name.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"resourceId": {
|
||||
"description": "Resource ID.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"policyAssignmentId": {
|
||||
"description": "Policy assignment ID.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"policyDefinitionId": {
|
||||
"description": "Policy definition ID.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"subscriptionId": {
|
||||
"description": "Subscription ID.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"resourceType": {
|
||||
"description": "Resource type.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"resourceLocation": {
|
||||
"description": "Resource location.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"resourceGroup": {
|
||||
"description": "Resource group name.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"policyAssignmentName": {
|
||||
"description": "Policy assignment name.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"policyAssignmentOwner": {
|
||||
"description": "Policy assignment owner.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"policyAssignmentParameters": {
|
||||
"description": "Policy assignment parameters.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"policyAssignmentScope": {
|
||||
"description": "Policy assignment scope.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"policyDefinitionName": {
|
||||
"description": "Policy definition name.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"policyDefinitionAction": {
|
||||
"description": "Policy definition action, i.e. effect.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"policyDefinitionCategory": {
|
||||
"description": "Policy definition category.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"policySetDefinitionId": {
|
||||
"description": "Policy set definition ID, if the policy assignment is for a policy set.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"policySetDefinitionName": {
|
||||
"description": "Policy set definition name, if the policy assignment is for a policy set.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"policySetDefinitionOwner": {
|
||||
"description": "Policy set definition owner, if the policy assignment is for a policy set.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"policySetDefinitionCategory": {
|
||||
"description": "Policy set definition category, if the policy assignment is for a policy set.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"policySetDefinitionParameters": {
|
||||
"description": "Policy set definition parameters, if the policy assignment is for a policy set.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"policyDefinitionReferenceId": {
|
||||
"description": "Reference ID for the policy definition inside the policy set, if the policy assignment is for a policy set.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"complianceState": {
|
||||
"description": "Compliance state of the resource.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"policyEvaluationDetails": {
|
||||
"description": "Policy evaluation details. This is only included in the response if the request contains $expand=PolicyEvaluationDetails.",
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/ComponentPolicyEvaluationDetails"
|
||||
},
|
||||
"policyDefinitionGroupNames": {
|
||||
"description": "Policy definition group names.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"readOnly": true
|
||||
},
|
||||
"policyDefinitionVersion": {
|
||||
"description": "Evaluated policy definition version.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"policySetDefinitionVersion": {
|
||||
"description": "Evaluated policy set definition version.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"policyAssignmentVersion": {
|
||||
"description": "Evaluated policy assignment version.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
}
|
||||
},
|
||||
"additionalProperties": {
|
||||
"description": "The list of key/value pairs for the additional properties, in the format 'key':'value' where key = the field name, and value = the field value. By default this is not populated"
|
||||
}
|
||||
},
|
||||
"ComponentPolicyEvaluationDetails": {
|
||||
"type": "object",
|
||||
"description": "Policy evaluation details.",
|
||||
"properties": {
|
||||
"evaluatedExpressions": {
|
||||
"description": "Details of the evaluated expressions.",
|
||||
"type": "array",
|
||||
"readOnly": true,
|
||||
"items": {
|
||||
"$ref": "#/definitions/ComponentExpressionEvaluationDetails"
|
||||
},
|
||||
"x-ms-identifiers": []
|
||||
},
|
||||
"reason": {
|
||||
"description": "Additional textual reason for the evaluation outcome.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ComponentExpressionEvaluationDetails": {
|
||||
"type": "object",
|
||||
"description": "Evaluation details of policy language expressions.",
|
||||
"properties": {
|
||||
"result": {
|
||||
"description": "Evaluation result.",
|
||||
"type": "string"
|
||||
},
|
||||
"expression": {
|
||||
"description": "Expression evaluated.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"expressionKind": {
|
||||
"description": "The kind of expression that was evaluated.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"path": {
|
||||
"description": "Property path if the expression is a field or an alias.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"expressionValue": {
|
||||
"description": "Value of the expression.",
|
||||
"type": "object",
|
||||
"readOnly": true
|
||||
},
|
||||
"targetValue": {
|
||||
"description": "Target value to be compared with the expression value.",
|
||||
"type": "object",
|
||||
"readOnly": true
|
||||
},
|
||||
"operator": {
|
||||
"description": "Operator to compare the expression value and the target value.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
"componentPolicyStatesResource": {
|
||||
"name": "componentPolicyStatesResource",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"latest"
|
||||
],
|
||||
"x-ms-enum": {
|
||||
"name": "ComponentPolicyStatesResource",
|
||||
"modelAsString": true
|
||||
},
|
||||
"description": "The virtual resource under ComponentPolicyStates resource type. In a given time range, 'latest' represents the latest component policy state(s).",
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"subscriptionId": {
|
||||
"name": "subscriptionId",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "Microsoft Azure subscription ID.",
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"resourceGroupName": {
|
||||
"name": "resourceGroupName",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "Resource group name.",
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"resourceId": {
|
||||
"name": "resourceId",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "Resource ID.",
|
||||
"x-ms-parameter-location": "method",
|
||||
"x-ms-skip-url-encoding": true
|
||||
},
|
||||
"authorizationNamespace": {
|
||||
"name": "authorizationNamespace",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Microsoft.Authorization"
|
||||
],
|
||||
"x-ms-enum": {
|
||||
"name": "AuthorizationNamespaceType",
|
||||
"modelAsString": false
|
||||
},
|
||||
"description": "The namespace for Microsoft Authorization resource provider; only \"Microsoft.Authorization\" is allowed.",
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"policyDefinitionName": {
|
||||
"name": "policyDefinitionName",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "Policy definition name.",
|
||||
"pattern": "^[^<>%&:\\\\?/#]*$",
|
||||
"minLength": 1,
|
||||
"maxLength": 64,
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"policyAssignmentName": {
|
||||
"name": "policyAssignmentName",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "Policy assignment name.",
|
||||
"pattern": "^[^<>%&:\\\\?/#]*$",
|
||||
"minLength": 1,
|
||||
"maxLength": 64,
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"apiVersion": {
|
||||
"name": "api-version",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "Client Api Version.",
|
||||
"x-ms-parameter-location": "client"
|
||||
},
|
||||
"top": {
|
||||
"name": "$top",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"minimum": 0,
|
||||
"description": "Maximum number of records to return.",
|
||||
"x-ms-parameter-location": "method",
|
||||
"x-ms-client-name": "Top"
|
||||
},
|
||||
"orderBy": {
|
||||
"name": "$orderby",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"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\".",
|
||||
"x-ms-parameter-location": "method",
|
||||
"x-ms-client-name": "OrderBy"
|
||||
},
|
||||
"select": {
|
||||
"name": "$select",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"description": "Select expression using OData notation. Limits the columns on each record to just those requested, e.g. \"$select=PolicyAssignmentId, ResourceId\".",
|
||||
"x-ms-parameter-location": "method",
|
||||
"x-ms-client-name": "Select"
|
||||
},
|
||||
"from": {
|
||||
"name": "$from",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day).",
|
||||
"x-ms-parameter-location": "method",
|
||||
"x-ms-client-name": "From"
|
||||
},
|
||||
"to": {
|
||||
"name": "$to",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time.",
|
||||
"x-ms-parameter-location": "method",
|
||||
"x-ms-client-name": "To"
|
||||
},
|
||||
"filter": {
|
||||
"name": "$filter",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"description": "OData filter expression.",
|
||||
"x-ms-parameter-location": "method",
|
||||
"x-ms-client-name": "Filter"
|
||||
},
|
||||
"apply": {
|
||||
"name": "$apply",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"description": "OData apply expression for aggregations.",
|
||||
"x-ms-parameter-location": "method",
|
||||
"x-ms-client-name": "Apply"
|
||||
},
|
||||
"componentPolicyStatesExpand": {
|
||||
"name": "$expand",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"description": "The $expand query parameter.",
|
||||
"x-ms-parameter-location": "method",
|
||||
"x-ms-client-name": "Expand"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
"parameters": {
|
||||
"componentPolicyStatesResource": "latest",
|
||||
"resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVault",
|
||||
"api-version": "2022-04-01"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"body": {
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVault/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest",
|
||||
"@odata.count": 2,
|
||||
"value": [
|
||||
{
|
||||
"@odata.id": null,
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVault/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity",
|
||||
"timestamp": "2022-04-09T16:04:31Z",
|
||||
"componentId": "cert-RSA-cert-3",
|
||||
"componentType": "Certificate",
|
||||
"componentName": "cert-RSA-cert-3",
|
||||
"resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVault",
|
||||
"policyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c",
|
||||
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d",
|
||||
"subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5",
|
||||
"resourceType": "/Microsoft.KeyVault/vaults",
|
||||
"resourceLocation": "eastus",
|
||||
"resourceGroup": "myResourceGroup",
|
||||
"policyAssignmentName": "186044306c044a1d8c0ff76c",
|
||||
"policyAssignmentOwner": "tbd",
|
||||
"policyAssignmentParameters": null,
|
||||
"policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg",
|
||||
"policyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d",
|
||||
"policyDefinitionAction": "audit",
|
||||
"policyDefinitionCategory": "tbd",
|
||||
"policySetDefinitionId": null,
|
||||
"policySetDefinitionName": null,
|
||||
"policySetDefinitionOwner": null,
|
||||
"policySetDefinitionCategory": null,
|
||||
"policySetDefinitionParameters": null,
|
||||
"policyDefinitionReferenceId": null,
|
||||
"complianceState": "NonCompliant",
|
||||
"policyDefinitionGroupNames": [
|
||||
"myGroup"
|
||||
],
|
||||
"policyDefinitionVersion": "1.0.0-preview",
|
||||
"policySetDefinitionVersion": null,
|
||||
"policyAssignmentVersion": "1.0.0"
|
||||
},
|
||||
{
|
||||
"@odata.id": null,
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVault/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity",
|
||||
"timestamp": "2022-04-09T16:04:31Z",
|
||||
"componentId": "cert-RSA-cert-3",
|
||||
"componentType": "Certificate",
|
||||
"componentName": "cert-RSA-cert-3",
|
||||
"resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVault",
|
||||
"policyAssignmentId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyAssignments/186044306c044a1d8c0ff76c",
|
||||
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/mymg/providers/Microsoft.Authorization/policyDefinitions/022d9357-5a90-46f7-9554-21d30ce4c32d",
|
||||
"isCompliant": true,
|
||||
"subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5",
|
||||
"resourceType": "/Microsoft.KeyVault/vaults/myVault",
|
||||
"resourceLocation": "eastus",
|
||||
"resourceGroup": "myResourceGroup",
|
||||
"policyAssignmentName": "186044306c044a1d8c0ff76c",
|
||||
"policyAssignmentOwner": "tbd",
|
||||
"policyAssignmentParameters": null,
|
||||
"policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/mymg",
|
||||
"policyDefinitionName": "022d9357-5a90-46f7-9554-21d30ce4c32d",
|
||||
"policyDefinitionAction": "audit",
|
||||
"policyDefinitionCategory": "tbd",
|
||||
"policySetDefinitionId": null,
|
||||
"policySetDefinitionName": null,
|
||||
"policySetDefinitionOwner": null,
|
||||
"policySetDefinitionCategory": null,
|
||||
"policySetDefinitionParameters": null,
|
||||
"policyDefinitionReferenceId": null,
|
||||
"complianceState": "Compliant",
|
||||
"policyDefinitionGroupNames": [
|
||||
"myGroup"
|
||||
],
|
||||
"policyDefinitionVersion": "1.0.0-preview",
|
||||
"policySetDefinitionVersion": null,
|
||||
"policyAssignmentVersion": "1.0.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
{
|
||||
"parameters": {
|
||||
"componentPolicyStatesResource": "latest",
|
||||
"subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852",
|
||||
"resourceGroupName": "myResourceGroup",
|
||||
"authorizationNamespace": "Microsoft.Authorization",
|
||||
"policyAssignmentName": "myPolicyAssignment",
|
||||
"api-version": "2022-04-01"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"body": {
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest",
|
||||
"@odata.count": 2,
|
||||
"value": [
|
||||
{
|
||||
"@odata.id": null,
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest/$entity",
|
||||
"timestamp": "2022-04-09T16:04:31Z",
|
||||
"componentId": "cert-RSA-cert-3",
|
||||
"componentType": "Certificate",
|
||||
"componentName": "cert-RSA-cert-3",
|
||||
"resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Security/policies/mySecurityPolicy",
|
||||
"policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment",
|
||||
"policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/4a0425e4-97bf-4ad0-ab36-145b94083c60",
|
||||
"subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852",
|
||||
"resourceType": "/Microsoft.KeyVault/vaults",
|
||||
"resourceLocation": null,
|
||||
"resourceGroup": "myResourceGroup",
|
||||
"policyAssignmentName": "myPolicyAssignment",
|
||||
"policyAssignmentOwner": "tbd",
|
||||
"policyAssignmentParameters": null,
|
||||
"policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup",
|
||||
"policyDefinitionName": "4a0425e4-97bf-4ad0-ab36-145b94083c60",
|
||||
"policyDefinitionAction": "audit",
|
||||
"policyDefinitionCategory": "tbd",
|
||||
"policySetDefinitionId": null,
|
||||
"policySetDefinitionName": null,
|
||||
"policySetDefinitionOwner": null,
|
||||
"policySetDefinitionCategory": null,
|
||||
"policySetDefinitionParameters": null,
|
||||
"policyDefinitionReferenceId": null,
|
||||
"complianceState": "NonCompliant",
|
||||
"policyDefinitionGroupNames": [
|
||||
"myGroup"
|
||||
],
|
||||
"policyDefinitionVersion": "1.0.0-preview",
|
||||
"policySetDefinitionVersion": null,
|
||||
"policyAssignmentVersion": "1.0.0"
|
||||
},
|
||||
{
|
||||
"@odata.id": null,
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest/$entity",
|
||||
"timestamp": "2022-04-09T16:04:31Z",
|
||||
"componentId": "cert-RSA-cert-3",
|
||||
"componentType": "Certificate",
|
||||
"componentName": "cert-RSA-cert-3",
|
||||
"resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/test",
|
||||
"policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.Authorization/policyAssignments/myPolicyAssignment",
|
||||
"policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/4a0425e4-97bf-4ad0-ab36-145b94083c60",
|
||||
"isCompliant": true,
|
||||
"subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852",
|
||||
"resourceType": "/Microsoft.KeyVault/vaults",
|
||||
"resourceLocation": null,
|
||||
"resourceGroup": "myResourceGroup",
|
||||
"resourceTags": "tbd",
|
||||
"policyAssignmentName": "myPolicyAssignment",
|
||||
"policyAssignmentOwner": "tbd",
|
||||
"policyAssignmentParameters": null,
|
||||
"policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup",
|
||||
"policyDefinitionName": "4a0425e4-97bf-4ad0-ab36-145b94083c60",
|
||||
"policyDefinitionAction": "audit",
|
||||
"policyDefinitionCategory": "tbd",
|
||||
"policySetDefinitionId": null,
|
||||
"policySetDefinitionName": null,
|
||||
"policySetDefinitionOwner": null,
|
||||
"policySetDefinitionCategory": null,
|
||||
"policySetDefinitionParameters": null,
|
||||
"policyDefinitionReferenceId": null,
|
||||
"complianceState": "Compliant",
|
||||
"policyDefinitionGroupNames": [
|
||||
"myGroup"
|
||||
],
|
||||
"policyDefinitionVersion": "1.0.0-preview",
|
||||
"policySetDefinitionVersion": null,
|
||||
"policyAssignmentVersion": "1.0.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
{
|
||||
"parameters": {
|
||||
"componentPolicyStatesResource": "latest",
|
||||
"subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852",
|
||||
"resourceGroupName": "myResourceGroup",
|
||||
"api-version": "2022-04-01"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"body": {
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest",
|
||||
"@odata.count": 2,
|
||||
"value": [
|
||||
{
|
||||
"@odata.id": null,
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest/$entity",
|
||||
"componentId": "cert-RSA-cert-3",
|
||||
"componentType": "Certificate",
|
||||
"componentName": "cert-RSA-cert-3",
|
||||
"timestamp": "2022-04-09T16:04:31Z",
|
||||
"resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.KeyVault/Vaults/myKVName",
|
||||
"policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test",
|
||||
"policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/ab108bc4-32df-4677-8b38-fa8b2905df56",
|
||||
"subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5",
|
||||
"resourceType": "/Microsoft.KeyVault/vaults",
|
||||
"resourceLocation": "eastus",
|
||||
"resourceGroup": "myResourceGroup",
|
||||
"policyAssignmentName": "test",
|
||||
"policyAssignmentOwner": "tbd",
|
||||
"policyAssignmentParameters": null,
|
||||
"policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5",
|
||||
"policyDefinitionName": "ab108bc4-32df-4677-8b38-fa8b2905df56",
|
||||
"policyDefinitionAction": "audit",
|
||||
"policyDefinitionCategory": "tbd",
|
||||
"policySetDefinitionId": null,
|
||||
"policySetDefinitionName": null,
|
||||
"policySetDefinitionOwner": null,
|
||||
"policySetDefinitionCategory": null,
|
||||
"policySetDefinitionParameters": null,
|
||||
"policyDefinitionReferenceId": null,
|
||||
"complianceState": "NonCompliant",
|
||||
"complianceReasonCode": "tbd",
|
||||
"policyDefinitionGroupNames": [
|
||||
"myGroup"
|
||||
],
|
||||
"policyDefinitionVersion": "1.0.0-preview",
|
||||
"policySetDefinitionVersion": null,
|
||||
"policyAssignmentVersion": "1.0.0"
|
||||
},
|
||||
{
|
||||
"@odata.id": null,
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest/$entity",
|
||||
"componentId": "cert-RSA-cert-2",
|
||||
"componentType": "Certificate",
|
||||
"componentName": "cert-RSA-cert-2",
|
||||
"timestamp": "2022-04-09T16:04:31Z",
|
||||
"resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.KeyVault/Vaults/myKVName",
|
||||
"policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test",
|
||||
"policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/ab108bc4-32df-4677-8b38-fa8b2905df59",
|
||||
"subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5",
|
||||
"resourceType": "/Microsoft.KeyVault/vaults",
|
||||
"resourceLocation": "eastus",
|
||||
"resourceGroup": "myResourceGroup",
|
||||
"policyAssignmentName": "test",
|
||||
"policyAssignmentOwner": "tbd",
|
||||
"policyAssignmentParameters": null,
|
||||
"policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5",
|
||||
"policyDefinitionName": "ab108bc4-32df-4677-8b38-fa8b2905df59",
|
||||
"policyDefinitionAction": "audit",
|
||||
"policyDefinitionCategory": "tbd",
|
||||
"policySetDefinitionId": null,
|
||||
"policySetDefinitionName": null,
|
||||
"policySetDefinitionOwner": null,
|
||||
"policySetDefinitionCategory": null,
|
||||
"policySetDefinitionParameters": null,
|
||||
"policyDefinitionReferenceId": null,
|
||||
"complianceState": "NonCompliant",
|
||||
"complianceReasonCode": "tbd",
|
||||
"policyDefinitionGroupNames": [
|
||||
"myGroup"
|
||||
],
|
||||
"policyDefinitionVersion": "1.0.0-preview",
|
||||
"policySetDefinitionVersion": null,
|
||||
"policyAssignmentVersion": "1.0.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"parameters": {
|
||||
"componentPolicyStatesResource": "latest",
|
||||
"subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852",
|
||||
"resourceGroupName": "myResourceGroup",
|
||||
"api-version": "2022-04-01",
|
||||
"$filter": "policyAssignmentId eq '/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/microsoft.authorization/policyassignments/560050f83dbb4a24974323f8'",
|
||||
"$apply": "groupby((type,complianceState),aggregate($count as count))"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"body": {
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.KeyVault/Vaults/myKVName/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest",
|
||||
"@odata.count": 2,
|
||||
"value": [
|
||||
{
|
||||
"componentType": "Certificate",
|
||||
"complianceState": "NonCompliant",
|
||||
"count": 26
|
||||
},
|
||||
{
|
||||
"componentType": "Certificate",
|
||||
"complianceState": "Compliant",
|
||||
"count": 10
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,89 @@
|
|||
{
|
||||
"parameters": {
|
||||
"componentPolicyStatesResource": "latest",
|
||||
"resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/Vaults/myKVName",
|
||||
"api-version": "2022-04-01"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"body": {
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.KeyVault/Vaults/myKVName/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest",
|
||||
"@odata.count": 2,
|
||||
"value": [
|
||||
{
|
||||
"@odata.id": null,
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.KeyVault/Vaults/myKVName/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest/$entity",
|
||||
"componentId": "cert-RSA-cert-3",
|
||||
"componentType": "Certificate",
|
||||
"componentName": "cert-RSA-cert-3",
|
||||
"timestamp": "2022-04-09T16:04:31Z",
|
||||
"resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.KeyVault/Vaults/myKVName",
|
||||
"policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test",
|
||||
"policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/ab108bc4-32df-4677-8b38-fa8b2905df56",
|
||||
"subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5",
|
||||
"resourceType": "/Microsoft.KeyVault/vaults",
|
||||
"resourceLocation": "eastus",
|
||||
"resourceGroup": "myResourceGroup",
|
||||
"policyAssignmentName": "test",
|
||||
"policyAssignmentOwner": "tbd",
|
||||
"policyAssignmentParameters": null,
|
||||
"policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5",
|
||||
"policyDefinitionName": "ab108bc4-32df-4677-8b38-fa8b2905df56",
|
||||
"policyDefinitionAction": "audit",
|
||||
"policyDefinitionCategory": "tbd",
|
||||
"policySetDefinitionId": null,
|
||||
"policySetDefinitionName": null,
|
||||
"policySetDefinitionOwner": null,
|
||||
"policySetDefinitionCategory": null,
|
||||
"policySetDefinitionParameters": null,
|
||||
"policyDefinitionReferenceId": null,
|
||||
"complianceState": "NonCompliant",
|
||||
"complianceReasonCode": "tbd",
|
||||
"policyDefinitionGroupNames": [
|
||||
"myGroup"
|
||||
],
|
||||
"policyDefinitionVersion": "1.0.0-preview",
|
||||
"policySetDefinitionVersion": null,
|
||||
"policyAssignmentVersion": "1.0.0"
|
||||
},
|
||||
{
|
||||
"@odata.id": null,
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.KeyVault/Vaults/myKVName/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest/$entity",
|
||||
"componentId": "cert-RSA-cert-2",
|
||||
"componentType": "Certificate",
|
||||
"componentName": "cert-RSA-cert-2",
|
||||
"timestamp": "2022-04-09T16:04:31Z",
|
||||
"resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.KeyVault/Vaults/myKVName",
|
||||
"policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test",
|
||||
"policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/ab108bc4-32df-4677-8b38-fa8b2905df59",
|
||||
"subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5",
|
||||
"resourceType": "/Microsoft.KeyVault/vaults",
|
||||
"resourceLocation": "eastus",
|
||||
"resourceGroup": "myResourceGroup",
|
||||
"policyAssignmentName": "test",
|
||||
"policyAssignmentOwner": "tbd",
|
||||
"policyAssignmentParameters": null,
|
||||
"policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5",
|
||||
"policyDefinitionName": "ab108bc4-32df-4677-8b38-fa8b2905df59",
|
||||
"policyDefinitionAction": "audit",
|
||||
"policyDefinitionCategory": "tbd",
|
||||
"policySetDefinitionId": null,
|
||||
"policySetDefinitionName": null,
|
||||
"policySetDefinitionOwner": null,
|
||||
"policySetDefinitionCategory": null,
|
||||
"policySetDefinitionParameters": null,
|
||||
"policyDefinitionReferenceId": null,
|
||||
"complianceState": "NonCompliant",
|
||||
"complianceReasonCode": "tbd",
|
||||
"policyDefinitionGroupNames": [
|
||||
"myGroup"
|
||||
],
|
||||
"policyDefinitionVersion": "1.0.0-preview",
|
||||
"policySetDefinitionVersion": null,
|
||||
"policyAssignmentVersion": "1.0.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
{
|
||||
"parameters": {
|
||||
"componentPolicyStatesResource": "latest",
|
||||
"resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/myCluster",
|
||||
"api-version": "2022-04-01",
|
||||
"$expand": "PolicyEvaluationDetails",
|
||||
"$filter": "componentType eq 'pod' AND componentId eq 'default/test-pod' AND componentName eq 'test-pod'"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"body": {
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/myCluster/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest",
|
||||
"@odata.count": 1,
|
||||
"value": [
|
||||
{
|
||||
"@odata.id": null,
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providersMicrosoft.ContainerService/managedClusters/myCluster/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest/$entity",
|
||||
"componentId": "default/test-pod",
|
||||
"componentType": "pod",
|
||||
"componentName": "test-pod",
|
||||
"timestamp": "2022-04-09T16:04:31Z",
|
||||
"resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/myCluster",
|
||||
"policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test",
|
||||
"policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/ab108bc4-32df-4677-8b38-fa8b2905df56",
|
||||
"subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5",
|
||||
"resourceType": "/Microsoft.ContainerService/managedClusters",
|
||||
"resourceLocation": "eastus",
|
||||
"resourceGroup": "myResourceGroup",
|
||||
"policyAssignmentName": "test",
|
||||
"policyAssignmentOwner": "tbd",
|
||||
"policyAssignmentParameters": null,
|
||||
"policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5",
|
||||
"policyDefinitionName": "Audit Kubernetes policy",
|
||||
"policyDefinitionAction": "audit",
|
||||
"policyDefinitionCategory": "tbd",
|
||||
"policySetDefinitionId": null,
|
||||
"policySetDefinitionName": null,
|
||||
"policySetDefinitionOwner": null,
|
||||
"policySetDefinitionCategory": null,
|
||||
"policySetDefinitionParameters": null,
|
||||
"policyDefinitionReferenceId": null,
|
||||
"complianceState": "NonCompliant",
|
||||
"complianceReasonCode": "tbd",
|
||||
"policyDefinitionGroupNames": [
|
||||
"myGroup"
|
||||
],
|
||||
"policyDefinitionVersion": "1.0.0-preview",
|
||||
"policySetDefinitionVersion": null,
|
||||
"policyAssignmentVersion": "1.0.0",
|
||||
"policyEvaluationDetails": {
|
||||
"reason": "tbd reason for evaluation outcome"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@odata.id": null,
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providersMicrosoft.ContainerService/managedClusters/myCluster/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest/$entity",
|
||||
"componentId": "default/test-pod",
|
||||
"componentType": "pod",
|
||||
"componentName": "test-pod",
|
||||
"timestamp": "2022-04-09T16:04:31Z",
|
||||
"resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/myCluster",
|
||||
"policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test2",
|
||||
"policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/ab108bc4-32df-4677-8b38-fa8b2905df56",
|
||||
"subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5",
|
||||
"resourceType": "/Microsoft.ContainerService/managedClusters",
|
||||
"resourceLocation": "eastus",
|
||||
"resourceGroup": "myResourceGroup",
|
||||
"policyAssignmentName": "test",
|
||||
"policyAssignmentOwner": "tbd",
|
||||
"policyAssignmentParameters": null,
|
||||
"policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5",
|
||||
"policyDefinitionName": "Audit Kubernetes policy",
|
||||
"policyDefinitionAction": "audit",
|
||||
"policyDefinitionCategory": "tbd",
|
||||
"policySetDefinitionId": null,
|
||||
"policySetDefinitionName": null,
|
||||
"policySetDefinitionOwner": null,
|
||||
"policySetDefinitionCategory": null,
|
||||
"policySetDefinitionParameters": null,
|
||||
"policyDefinitionReferenceId": null,
|
||||
"complianceState": "NonCompliant",
|
||||
"complianceReasonCode": "tbd",
|
||||
"policyDefinitionGroupNames": [
|
||||
"myGroup"
|
||||
],
|
||||
"policyDefinitionVersion": "1.0.0-preview",
|
||||
"policySetDefinitionVersion": null,
|
||||
"policyAssignmentVersion": "1.0.0",
|
||||
"policyEvaluationDetails": {
|
||||
"reason": "tbd reason for evaluation outcome"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
{
|
||||
"parameters": {
|
||||
"componentPolicyStatesResource": "latest",
|
||||
"resourceId": "subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/Vaults/myKVName",
|
||||
"api-version": "2022-04-01",
|
||||
"$filter": "componentId eq cert-RSA-cert-3"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"body": {
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.KeyVault/Vaults/myKVName/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest",
|
||||
"@odata.count": 2,
|
||||
"value": [
|
||||
{
|
||||
"@odata.id": null,
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.KeyVault/Vaults/myKVName/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest/$entity",
|
||||
"componentId": "cert-RSA-cert-3",
|
||||
"componentType": "Certificate",
|
||||
"componentName": "cert-RSA-cert-3",
|
||||
"timestamp": "2022-04-09T16:04:31Z",
|
||||
"resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.KeyVault/Vaults/myKVName",
|
||||
"policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test1",
|
||||
"policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/ab108bc4-32df-4677-8b38-fa8b2905df56",
|
||||
"subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5",
|
||||
"resourceType": "/Microsoft.KeyVault/vaults",
|
||||
"resourceLocation": "eastus",
|
||||
"resourceGroup": "myResourceGroup",
|
||||
"policyAssignmentName": "test",
|
||||
"policyAssignmentOwner": "tbd",
|
||||
"policyAssignmentParameters": null,
|
||||
"policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5",
|
||||
"policyDefinitionName": "ab108bc4-32df-4677-8b38-fa8b2905df56",
|
||||
"policyDefinitionAction": "audit",
|
||||
"policyDefinitionCategory": "tbd",
|
||||
"policySetDefinitionId": null,
|
||||
"policySetDefinitionName": null,
|
||||
"policySetDefinitionOwner": null,
|
||||
"policySetDefinitionCategory": null,
|
||||
"policySetDefinitionParameters": null,
|
||||
"policyDefinitionReferenceId": null,
|
||||
"complianceState": "NonCompliant",
|
||||
"complianceReasonCode": "tbd",
|
||||
"policyDefinitionGroupNames": [
|
||||
"myGroup"
|
||||
],
|
||||
"policyDefinitionVersion": "1.0.0-preview",
|
||||
"policySetDefinitionVersion": null,
|
||||
"policyAssignmentVersion": "1.0.0"
|
||||
},
|
||||
{
|
||||
"@odata.id": null,
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.KeyVault/Vaults/myKVName/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest/$entity",
|
||||
"componentId": "cert-RSA-cert-3",
|
||||
"componentType": "Certificate",
|
||||
"componentName": "cert-RSA-cert-3",
|
||||
"timestamp": "2022-04-09T16:04:31Z",
|
||||
"resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.KeyVault/Vaults/myKVName",
|
||||
"policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test2",
|
||||
"policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/ab108bc4-32df-4677-8b38-fa8b2905df59",
|
||||
"subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5",
|
||||
"resourceType": "/Microsoft.KeyVault/vaults",
|
||||
"resourceLocation": "eastus",
|
||||
"resourceGroup": "myResourceGroup",
|
||||
"policyAssignmentName": "test",
|
||||
"policyAssignmentOwner": "tbd",
|
||||
"policyAssignmentParameters": null,
|
||||
"policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5",
|
||||
"policyDefinitionName": "ab108bc4-32df-4677-8b38-fa8b2905df59",
|
||||
"policyDefinitionAction": "audit",
|
||||
"policyDefinitionCategory": "tbd",
|
||||
"policySetDefinitionId": null,
|
||||
"policySetDefinitionName": null,
|
||||
"policySetDefinitionOwner": null,
|
||||
"policySetDefinitionCategory": null,
|
||||
"policySetDefinitionParameters": null,
|
||||
"policyDefinitionReferenceId": null,
|
||||
"complianceState": "NonCompliant",
|
||||
"complianceReasonCode": "tbd",
|
||||
"policyDefinitionGroupNames": [
|
||||
"myGroup"
|
||||
],
|
||||
"policyDefinitionVersion": "1.0.0-preview",
|
||||
"policySetDefinitionVersion": null,
|
||||
"policyAssignmentVersion": "1.0.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"parameters": {
|
||||
"componentPolicyStatesResource": "latest",
|
||||
"resourceId": "subscriptions/e78961ba-36fe-4739-9212-e3031b4c8db7/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/Vaults/myKVName",
|
||||
"api-version": "2022-04-01",
|
||||
"$filter": "policyAssignmentId eq '/subscriptions/e78961ba-36fe-4739-9212-e3031b4c8db7/providers/microsoft.authorization/policyassignments/560050f83dbb4a24974323f8'",
|
||||
"$apply": "groupby((componentType,complianceState),aggregate($count as count))"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"body": {
|
||||
"@odata.context": "https://management.azure.com/subscriptions/e78961ba-36fe-4739-9212-e3031b4c8db7/resourcegroups/myResourceGroup/providers/Microsoft.KeyVault/Vaults/myKVName/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest",
|
||||
"@odata.count": 2,
|
||||
"value": [
|
||||
{
|
||||
"componentType": "Certificate",
|
||||
"complianceState": "NonCompliant",
|
||||
"count": 26
|
||||
},
|
||||
{
|
||||
"componentType": "Certificate",
|
||||
"complianceState": "Compliant",
|
||||
"count": 10
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
{
|
||||
"parameters": {
|
||||
"componentPolicyStatesResource": "latest",
|
||||
"subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852",
|
||||
"authorizationNamespace": "Microsoft.Authorization",
|
||||
"policyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003",
|
||||
"api-version": "2022-04-01"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"body": {
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest",
|
||||
"@odata.count": 2,
|
||||
"value": [
|
||||
{
|
||||
"@odata.id": null,
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity",
|
||||
"timestamp": "2022-04-09T16:04:31Z",
|
||||
"componentId": "cert-RSA-cert-3",
|
||||
"componentType": "Certificate",
|
||||
"componentName": "cert-RSA-cert-3",
|
||||
"resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVault",
|
||||
"policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003",
|
||||
"policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/c8b79b49-a579-4045-984e-1b249ab8b474",
|
||||
"subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852",
|
||||
"resourceType": "/Microsoft.KeyVault/vaults",
|
||||
"resourceLocation": "eastus",
|
||||
"resourceGroup": "myResourceGroup",
|
||||
"policyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003",
|
||||
"policyAssignmentOwner": "tbd",
|
||||
"policyAssignmentParameters": null,
|
||||
"policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852",
|
||||
"policyDefinitionName": "c8b79b49-a579-4045-984e-1b249ab8b474",
|
||||
"policyDefinitionAction": "audit",
|
||||
"policyDefinitionCategory": "tbd",
|
||||
"policySetDefinitionId": null,
|
||||
"policySetDefinitionName": null,
|
||||
"policySetDefinitionOwner": null,
|
||||
"policySetDefinitionCategory": null,
|
||||
"policySetDefinitionParameters": null,
|
||||
"policyDefinitionReferenceId": "2124621540977569058",
|
||||
"complianceState": "NonCompliant",
|
||||
"policyDefinitionGroupNames": [
|
||||
"myGroup"
|
||||
],
|
||||
"policyDefinitionVersion": "1.0.0-preview",
|
||||
"policySetDefinitionVersion": "2.0.1",
|
||||
"policyAssignmentVersion": "1.0.0"
|
||||
},
|
||||
{
|
||||
"@odata.id": null,
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003/providers/Microsoft.PolicyInsights/policyStates/$metadata#latest/$entity",
|
||||
"timestamp": "2022-04-09T16:04:31Z",
|
||||
"componentId": "cert-RSA-cert-3",
|
||||
"componentType": "Certificate",
|
||||
"componentName": "cert-RSA-cert-3",
|
||||
"resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVault",
|
||||
"policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/ec8f9645-8ecb-4abb-9c0b-5292f19d4003",
|
||||
"policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1",
|
||||
"isCompliant": true,
|
||||
"subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852",
|
||||
"resourceType": "/Microsoft.KeyVault/vaults",
|
||||
"resourceLocation": "eastus",
|
||||
"resourceGroup": "myResourceGroup",
|
||||
"policyAssignmentName": "ec8f9645-8ecb-4abb-9c0b-5292f19d4003",
|
||||
"policyAssignmentOwner": "tbd",
|
||||
"policyAssignmentParameters": null,
|
||||
"policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852",
|
||||
"policyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1",
|
||||
"policyDefinitionAction": "audit",
|
||||
"policyDefinitionCategory": "tbd",
|
||||
"policySetDefinitionId": null,
|
||||
"policySetDefinitionName": null,
|
||||
"policySetDefinitionOwner": null,
|
||||
"policySetDefinitionCategory": null,
|
||||
"policySetDefinitionParameters": null,
|
||||
"policyDefinitionReferenceId": "14799174781370023846",
|
||||
"complianceState": "Compliant",
|
||||
"policyDefinitionGroupNames": [
|
||||
"myGroup"
|
||||
],
|
||||
"policyDefinitionVersion": "1.0.0-preview",
|
||||
"policySetDefinitionVersion": "2.0.1",
|
||||
"policyAssignmentVersion": "1.0.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
{
|
||||
"parameters": {
|
||||
"componentPolicyStatesResource": "latest",
|
||||
"subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852",
|
||||
"authorizationNamespace": "Microsoft.Authorization",
|
||||
"policyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1",
|
||||
"api-version": "2022-04-01"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"body": {
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest",
|
||||
"@odata.count": 2,
|
||||
"value": [
|
||||
{
|
||||
"@odata.id": null,
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest/$entity",
|
||||
"timestamp": "2022-04-09T16:04:31Z",
|
||||
"componentId": "cert-RSA-cert-3",
|
||||
"componentType": "Certificate",
|
||||
"componentName": "cert-RSA-cert-3",
|
||||
"resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVault",
|
||||
"policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/d9da7e80af6344ab9d342aa7",
|
||||
"policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1",
|
||||
"subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852",
|
||||
"resourceType": "/Microsoft.KeyVault/vaults",
|
||||
"resourceLocation": "eastus",
|
||||
"resourceGroup": "myResourceGroup",
|
||||
"policyAssignmentName": "d9da7e80af6344ab9d342aa7",
|
||||
"policyAssignmentOwner": "tbd",
|
||||
"policyAssignmentParameters": null,
|
||||
"policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852",
|
||||
"policyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1",
|
||||
"policyDefinitionAction": "audit",
|
||||
"policyDefinitionCategory": "tbd",
|
||||
"policySetDefinitionId": null,
|
||||
"policySetDefinitionName": null,
|
||||
"policySetDefinitionOwner": null,
|
||||
"policySetDefinitionCategory": null,
|
||||
"policySetDefinitionParameters": null,
|
||||
"policyDefinitionReferenceId": null,
|
||||
"complianceState": "NonCompliant",
|
||||
"policyDefinitionGroupNames": [
|
||||
"myGroup"
|
||||
],
|
||||
"policyDefinitionVersion": "1.0.0-preview",
|
||||
"policySetDefinitionVersion": null,
|
||||
"policyAssignmentVersion": "1.0.0"
|
||||
},
|
||||
{
|
||||
"@odata.id": null,
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest/$entity",
|
||||
"timestamp": "2022-04-09T16:04:31Z",
|
||||
"resourceId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/resourcegroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVault",
|
||||
"policyAssignmentId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyAssignments/d9da7e80af6344ab9d342aa7",
|
||||
"policyDefinitionId": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852/providers/Microsoft.Authorization/policyDefinitions/24813039-7534-408a-9842-eb99f45721b1",
|
||||
"subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852",
|
||||
"resourceType": "/Microsoft.KeyVault/vaults",
|
||||
"resourceLocation": "eastus",
|
||||
"resourceGroup": "myResourceGroup",
|
||||
"policyAssignmentName": "d9da7e80af6344ab9d342aa7",
|
||||
"policyAssignmentOwner": "tbd",
|
||||
"policyAssignmentParameters": null,
|
||||
"policyAssignmentScope": "/subscriptions/fffedd8f-ffff-fffd-fffd-fffed2f84852",
|
||||
"policyDefinitionName": "24813039-7534-408a-9842-eb99f45721b1",
|
||||
"policyDefinitionAction": "audit",
|
||||
"policyDefinitionCategory": "tbd",
|
||||
"policySetDefinitionId": null,
|
||||
"policySetDefinitionName": null,
|
||||
"policySetDefinitionOwner": null,
|
||||
"policySetDefinitionCategory": null,
|
||||
"policySetDefinitionParameters": null,
|
||||
"policyDefinitionReferenceId": null,
|
||||
"complianceState": "Compliant",
|
||||
"policyDefinitionGroupNames": [
|
||||
"myGroup"
|
||||
],
|
||||
"policyDefinitionVersion": "1.0.0-preview",
|
||||
"policySetDefinitionVersion": null,
|
||||
"policyAssignmentVersion": "1.0.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,89 @@
|
|||
{
|
||||
"parameters": {
|
||||
"componentPolicyStatesResource": "latest",
|
||||
"subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5",
|
||||
"api-version": "2022-04-01"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"body": {
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest",
|
||||
"@odata.count": 2,
|
||||
"value": [
|
||||
{
|
||||
"@odata.id": null,
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest/$entity",
|
||||
"componentId": "cert-RSA-cert-3",
|
||||
"componentType": "Certificate",
|
||||
"componentName": "cert-RSA-cert-3",
|
||||
"timestamp": "2022-04-09T16:04:31Z",
|
||||
"resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.KeyVault/Vaults/myKVName",
|
||||
"policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test",
|
||||
"policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/ab108bc4-32df-4677-8b38-fa8b2905df56",
|
||||
"subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5",
|
||||
"resourceType": "/Microsoft.KeyVault/vaults",
|
||||
"resourceLocation": "eastus",
|
||||
"resourceGroup": "myResourceGroup",
|
||||
"policyAssignmentName": "test",
|
||||
"policyAssignmentOwner": "tbd",
|
||||
"policyAssignmentParameters": null,
|
||||
"policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5",
|
||||
"policyDefinitionName": "ab108bc4-32df-4677-8b38-fa8b2905df56",
|
||||
"policyDefinitionAction": "audit",
|
||||
"policyDefinitionCategory": "tbd",
|
||||
"policySetDefinitionId": null,
|
||||
"policySetDefinitionName": null,
|
||||
"policySetDefinitionOwner": null,
|
||||
"policySetDefinitionCategory": null,
|
||||
"policySetDefinitionParameters": null,
|
||||
"policyDefinitionReferenceId": null,
|
||||
"complianceState": "NonCompliant",
|
||||
"complianceReasonCode": "tbd",
|
||||
"policyDefinitionGroupNames": [
|
||||
"myGroup"
|
||||
],
|
||||
"policyDefinitionVersion": "1.0.0-preview",
|
||||
"policySetDefinitionVersion": null,
|
||||
"policyAssignmentVersion": "1.0.0"
|
||||
},
|
||||
{
|
||||
"@odata.id": null,
|
||||
"@odata.context": "https://management.azure.com/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest/$entity",
|
||||
"componentId": "cert-RSA-cert-2",
|
||||
"componentType": "Certificate",
|
||||
"componentName": "cert-RSA-cert-2",
|
||||
"timestamp": "2022-04-09T16:04:31Z",
|
||||
"resourceId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourcegroups/myResourceGroup/providers/Microsoft.KeyVault/Vaults/myKVName",
|
||||
"policyAssignmentId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyAssignments/test",
|
||||
"policyDefinitionId": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/providers/Microsoft.Authorization/policyDefinitions/ab108bc4-32df-4677-8b38-fa8b2905df59",
|
||||
"subscriptionId": "fff10b27-fff3-fff5-fff8-fffbe01e86a5",
|
||||
"resourceType": "/Microsoft.KeyVault/vaults",
|
||||
"resourceLocation": "eastus",
|
||||
"resourceGroup": "myResourceGroup",
|
||||
"policyAssignmentName": "test",
|
||||
"policyAssignmentOwner": "tbd",
|
||||
"policyAssignmentParameters": null,
|
||||
"policyAssignmentScope": "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5",
|
||||
"policyDefinitionName": "ab108bc4-32df-4677-8b38-fa8b2905df59",
|
||||
"policyDefinitionAction": "audit",
|
||||
"policyDefinitionCategory": "tbd",
|
||||
"policySetDefinitionId": null,
|
||||
"policySetDefinitionName": null,
|
||||
"policySetDefinitionOwner": null,
|
||||
"policySetDefinitionCategory": null,
|
||||
"policySetDefinitionParameters": null,
|
||||
"policyDefinitionReferenceId": null,
|
||||
"complianceState": "NonCompliant",
|
||||
"complianceReasonCode": "tbd",
|
||||
"policyDefinitionGroupNames": [
|
||||
"myGroup"
|
||||
],
|
||||
"policyDefinitionVersion": "1.0.0-preview",
|
||||
"policySetDefinitionVersion": null,
|
||||
"policyAssignmentVersion": "1.0.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"parameters": {
|
||||
"componentPolicyStatesResource": "latest",
|
||||
"subscriptionId": "e78961ba-36fe-4739-9212-e3031b4c8db7",
|
||||
"api-version": "2022-04-01",
|
||||
"$filter": "policyAssignmentId eq '/subscriptions/e78961ba-36fe-4739-9212-e3031b4c8db7/providers/microsoft.authorization/policyassignments/560050f83dbb4a24974323f8'",
|
||||
"$apply": "groupby((componentType,complianceState),aggregate($count as count))"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"body": {
|
||||
"@odata.context": "https://management.azure.com/subscriptions/e78961ba-36fe-4739-9212-e3031b4c8db7/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata#latest",
|
||||
"@odata.count": 2,
|
||||
"value": [
|
||||
{
|
||||
"componentType": "Certificate",
|
||||
"complianceState": "NonCompliant",
|
||||
"count": 26
|
||||
},
|
||||
{
|
||||
"componentType": "Certificate",
|
||||
"complianceState": "Compliant",
|
||||
"count": 10
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
"parameters": {
|
||||
"api-version": "2022-04-01"
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"body": {
|
||||
"@odata.count": 4,
|
||||
"value": [
|
||||
{
|
||||
"name": "Microsoft.PolicyInsights/policyEvents/queryResults/action",
|
||||
"display": {
|
||||
"provider": "Microsoft Policy Insights",
|
||||
"resource": "Policy Events",
|
||||
"operation": "Query Policy Events",
|
||||
"description": "Query information about policy events."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Microsoft.PolicyInsights/policyStates/queryResults/action",
|
||||
"display": {
|
||||
"provider": "Microsoft Policy Insights",
|
||||
"resource": "Policy States",
|
||||
"operation": "Query Policy States",
|
||||
"description": "Query information about policy states."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Microsoft.PolicyInsights/policyStates/summarize/action",
|
||||
"display": {
|
||||
"provider": "Microsoft Policy Insights",
|
||||
"resource": "Policy States",
|
||||
"operation": "Query Policy Latest States Summary",
|
||||
"description": "Query summary information about policy latest states."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Microsoft.PolicyInsights/componentPolicyStates/queryResults/action",
|
||||
"display": {
|
||||
"provider": "Microsoft Policy Insights",
|
||||
"resource": "Component Policy States",
|
||||
"operation": "Query Component Policy States",
|
||||
"description": "Query information about component policy states."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,137 @@
|
|||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "Policy Insights Operations API",
|
||||
"version": "2022-04-01"
|
||||
},
|
||||
"host": "management.azure.com",
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"security": [
|
||||
{
|
||||
"azure_auth": [
|
||||
"user_impersonation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"securityDefinitions": {
|
||||
"azure_auth": {
|
||||
"type": "oauth2",
|
||||
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
|
||||
"flow": "implicit",
|
||||
"description": "Azure Active Directory OAuth2 Flow",
|
||||
"scopes": {
|
||||
"user_impersonation": "impersonate your user account"
|
||||
}
|
||||
}
|
||||
},
|
||||
"paths": {
|
||||
"/providers/Microsoft.PolicyInsights/operations": {
|
||||
"get": {
|
||||
"operationId": "Operations_List",
|
||||
"description": "Lists available operations.",
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/apiVersionParameter"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "List of available operations.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/OperationsListResults"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Error response describing why the operation failed.",
|
||||
"schema": {
|
||||
"$ref": "../../stable/2019-10-01/operations.json#/definitions/QueryFailure"
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-ms-examples": {
|
||||
"List operations": {
|
||||
"$ref": "./examples/Operations_ListOperations.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"OperationsListResults": {
|
||||
"description": "List of available operations.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"@odata.count": {
|
||||
"description": "OData entity count; represents the number of operations returned.",
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"minimum": 1
|
||||
},
|
||||
"value": {
|
||||
"description": "List of available operations.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Operation"
|
||||
},
|
||||
"x-ms-identifiers": [
|
||||
"name"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"Operation": {
|
||||
"description": "Operation definition.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "Operation name.",
|
||||
"type": "string"
|
||||
},
|
||||
"isDataAction": {
|
||||
"description": "Indicates whether the operation is a data action",
|
||||
"type": "boolean"
|
||||
},
|
||||
"display": {
|
||||
"description": "Display metadata associated with the operation.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"description": "Resource provider name.",
|
||||
"type": "string"
|
||||
},
|
||||
"resource": {
|
||||
"description": "Resource name on which the operation is performed.",
|
||||
"type": "string"
|
||||
},
|
||||
"operation": {
|
||||
"description": "Operation name.",
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"description": "Operation description.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
"apiVersionParameter": {
|
||||
"name": "api-version",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "API version to use with the client requests.",
|
||||
"x-ms-parameter-location": "client"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -24,6 +24,7 @@ modelerfour:
|
|||
``` yaml $(go) && $(multiapi)
|
||||
batch:
|
||||
- tag: package-2022-09
|
||||
- tag: package-2022-04
|
||||
- tag: package-2022-03
|
||||
- tag: package-2021-10
|
||||
- tag: package-2021-01
|
||||
|
@ -42,6 +43,15 @@ Please also specify `--go-sdk-folder=<path to the root directory of your azure-s
|
|||
output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2022-09-01/$(namespace)
|
||||
```
|
||||
|
||||
### Tag: package-2022-04 and go
|
||||
|
||||
These settings apply only when `--tag=package-2022-04 --go` is specified on the command line.
|
||||
Please also specify `--go-sdk-folder=<path to the root directory of your azure-sdk-for-go clone>`.
|
||||
|
||||
``` yaml $(tag) == 'package-2022-04' && $(go)
|
||||
output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2022-04-01/$(namespace)
|
||||
```
|
||||
|
||||
### Tag: package-2022-03 and go
|
||||
|
||||
These settings apply only when `--tag=package-2022-03 --go` is specified on the command line.
|
||||
|
|
|
@ -56,6 +56,8 @@ directive:
|
|||
where:
|
||||
- $.paths["/{scope}/providers/Microsoft.PolicyInsights/policyEvents/$metadata"].get.produces[0]
|
||||
- $.paths["/{scope}/providers/Microsoft.PolicyInsights/policyStates/$metadata"].get.produces[0]
|
||||
- $.paths["/{scope}/providers/Microsoft.PolicyInsights/componentPolicyStates/$metadata"].get.produces[0]
|
||||
|
||||
|
||||
- suppress: OperationIdNounConflictingModelNames
|
||||
reason: Metadata is already in plural form.
|
||||
|
@ -149,8 +151,27 @@ input-file:
|
|||
- Microsoft.PolicyInsights/stable/2019-10-01/policyStates.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/policyMetadata.json
|
||||
- Microsoft.PolicyInsights/stable/2022-03-01/checkPolicyRestrictions.json
|
||||
- Microsoft.PolicyInsights/stable/2022-04-01/componentPolicyStates.json
|
||||
- Microsoft.PolicyInsights/stable/2022-04-01/operations.json
|
||||
- Microsoft.PolicyInsights/stable/2022-09-01/attestations.json
|
||||
```
|
||||
### Tag: package-2022-04
|
||||
|
||||
These settings apply only when `--tag=package-2022-04` is specified on the command line.
|
||||
|
||||
```yaml $(tag) == 'package-2022-04'
|
||||
input-file:
|
||||
- Microsoft.PolicyInsights/preview/2018-07-01-preview/policyTrackedResources.json
|
||||
- Microsoft.PolicyInsights/stable/2021-10-01/remediations.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/policyEvents.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/policyStates.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/policyMetadata.json
|
||||
- Microsoft.PolicyInsights/stable/2022-03-01/checkPolicyRestrictions.json
|
||||
- Microsoft.PolicyInsights/stable/2021-01-01/attestations.json
|
||||
- Microsoft.PolicyInsights/stable/2022-04-01/componentPolicyStates.json
|
||||
- Microsoft.PolicyInsights/stable/2022-04-01/operations.json
|
||||
```
|
||||
|
||||
### Tag: package-2022-03
|
||||
|
||||
These settings apply only when `--tag=package-2022-03` is specified on the command line.
|
||||
|
@ -161,6 +182,7 @@ input-file:
|
|||
- Microsoft.PolicyInsights/stable/2021-10-01/remediations.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/policyEvents.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/policyStates.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/operations.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/policyMetadata.json
|
||||
- Microsoft.PolicyInsights/stable/2022-03-01/checkPolicyRestrictions.json
|
||||
- Microsoft.PolicyInsights/stable/2021-01-01/attestations.json
|
||||
|
@ -176,6 +198,7 @@ input-file:
|
|||
- Microsoft.PolicyInsights/stable/2021-10-01/remediations.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/policyEvents.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/policyStates.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/operations.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/policyMetadata.json
|
||||
- Microsoft.PolicyInsights/stable/2020-07-01/checkPolicyRestrictions.json
|
||||
- Microsoft.PolicyInsights/stable/2021-01-01/attestations.json
|
||||
|
@ -191,6 +214,7 @@ input-file:
|
|||
- Microsoft.PolicyInsights/stable/2019-07-01/remediations.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/policyEvents.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/policyStates.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/operations.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/policyMetadata.json
|
||||
- Microsoft.PolicyInsights/stable/2020-07-01/checkPolicyRestrictions.json
|
||||
- Microsoft.PolicyInsights/stable/2021-01-01/attestations.json
|
||||
|
@ -206,6 +230,7 @@ input-file:
|
|||
- Microsoft.PolicyInsights/stable/2019-07-01/remediations.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/policyEvents.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/policyStates.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/operations.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/policyMetadata.json
|
||||
- Microsoft.PolicyInsights/stable/2020-07-01/checkPolicyRestrictions.json
|
||||
```
|
||||
|
@ -220,6 +245,7 @@ input-file:
|
|||
- Microsoft.PolicyInsights/stable/2019-07-01/remediations.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/policyEvents.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/policyStates.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/operations.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/policyMetadata.json
|
||||
- Microsoft.PolicyInsights/preview/2020-07-01-preview/checkPolicyRestrictions.json
|
||||
```
|
||||
|
@ -234,6 +260,7 @@ input-file:
|
|||
- Microsoft.PolicyInsights/stable/2019-07-01/remediations.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/policyEvents.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/policyStates.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/operations.json
|
||||
- Microsoft.PolicyInsights/stable/2019-10-01/policyMetadata.json
|
||||
```
|
||||
|
||||
|
@ -321,6 +348,7 @@ output-folder: $(azure-libraries-for-java-folder)/azure-mgmt-policyinsights
|
|||
``` yaml $(java) && $(multiapi)
|
||||
batch:
|
||||
- tag: package-2022-09
|
||||
- tag: package-2022-04
|
||||
- tag: package-2022-03
|
||||
- tag: package-2021-10
|
||||
- tag: package-2021-01
|
||||
|
@ -342,6 +370,18 @@ java:
|
|||
regenerate-manager: true
|
||||
generate-interface: true
|
||||
```
|
||||
### Tag: package-2022-04 and java
|
||||
|
||||
These settings apply only when `--tag=package-2022-04 --java` is specified on the command line.
|
||||
Please also specify `--azure-libraries-for-java-folder=<path to the root directory of your azure-sdk-for-java clone>`.
|
||||
|
||||
``` yaml $(tag) == 'package-2022-04' && $(java)
|
||||
java:
|
||||
namespace: com.microsoft.azure.management.policyinsights.v2022_04_01
|
||||
output-folder: $(azure-libraries-for-java-folder)/sdk/policyinsights/mgmt-v2022_04_01
|
||||
regenerate-manager: true
|
||||
generate-interface: true
|
||||
```
|
||||
|
||||
### Tag: package-2022-03 and java
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче