Skip to content

Commit

Permalink
Add trigger evalation API to swagger (#8312)
Browse files Browse the repository at this point in the history
  • Loading branch information
calecarter authored Feb 6, 2020
1 parent d166055 commit 97f9215
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"parameters": {
"subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852",
"resourceGroupName": "myResourceGroup",
"api-version": "2019-10-01"
},
"responses": {
"200": {},
"202": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"parameters": {
"subscriptionId": "fffedd8f-ffff-fffd-fffd-fffed2f84852",
"api-version": "2019-10-01"
},
"responses": {
"200": {},
"202": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,83 @@
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/latest/triggerEvaluation": {
"post": {
"operationId": "PolicyStates_TriggerSubscriptionEvaluation",
"description": "Triggers a policy evaluation scan for all the resources under the subscription",
"parameters": [
{
"$ref": "#/parameters/subscriptionId"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "The scan is done."
},
"202": {
"description": "The scan was successfully triggered."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/QueryFailure"
}
}
},
"x-ms-examples": {
"Trigger evaluations for all resources in a subscription": {
"$ref": "./examples/PolicyStates_TriggerSubscriptionEvaluation.json"
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/latest/triggerEvaluation": {
"post": {
"operationId": "PolicyStates_TriggerResourceGroupEvaluation",
"description": "Triggers a policy evaluation scan for all the resources under the resource group.",
"parameters": [
{
"$ref": "#/parameters/subscriptionId"
},
{
"$ref": "#/parameters/resourceGroupNameParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "The scan is done."
},
"202": {
"description": "The scan was successfully triggered."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/QueryFailure"
}
}
},
"x-ms-examples": {
"Trigger evaluations for all resources in a resource group": {
"$ref": "./examples/PolicyStates_TriggerResourceGroupEvaluation.json"
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
}
}
},
"/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults": {
"post": {
"operationId": "PolicyStates_ListQueryResultsForPolicySetDefinition",
Expand Down

0 comments on commit 97f9215

Please sign in to comment.