Skip to content
Prev Previous commit
Next Next commit
Add built in policy definitions paths
  • Loading branch information
vivsriaus committed Oct 3, 2017
commit 4288c9c52b462ac0b9d334472b44467dcd55ea9b
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,35 @@
}
}
},
"/providers/Microsoft.Authorization/policydefinitions/{policyDefinitionName}": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this api missing from the spec? or is it newly added to the existing api version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was missing from the spec

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

camel case ->policyDefinitions

"get": {
"tags": [
"PolicyDefinitions"
],
"operationId": "PolicyDefinitions_GetBuiltIn",
"description": "Gets the built in policy definition.",
"parameters": [
{
"name": "policyDefinitionName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the built in policy definition to get."
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

404 should be valid response correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep

"description": "OK - Returns information about the built in policy definition.",
"schema": {
"$ref": "#/definitions/PolicyDefinition"
}
}
}
}
},
"/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policydefinitions/{policyDefinitionName}": {
"put": {
"tags": [
Expand Down Expand Up @@ -283,6 +312,39 @@
"x-ms-odata": "#/definitions/PolicyDefinition"
}
},
"/providers/Microsoft.Authorization/policydefinitions": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this api missing from the spec before but existed in the service?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, we never added this to spec

"get": {
"tags": [
"PolicyDefinitions"
],
"operationId": "PolicyDefinitions_ListBuiltIn",
"description": "Gets all the built in policy definitions.",
"parameters": [
{
"name": "$filter",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

policyDefinition collection requests don't support odata fliters. Only policyAssignments have filters

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

"in": "query",
"required": false,
"type": "string",
"description": "The filter to apply on the operation."
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK - Returns ana array of built in policy definitions.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Returns an"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

"schema": {
"$ref": "#/definitions/PolicyDefinitionListResult"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "#/definitions/PolicyDefinition"
}
},
"/providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policydefinitions": {
"get": {
"tags": [
Expand Down