Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add trigger evalation API to swagger #8312

Merged
merged 6 commits into from
Feb 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": {
calecarter marked this conversation as resolved.
Show resolved Hide resolved
"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."
},
calecarter marked this conversation as resolved.
Show resolved Hide resolved
"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