I've not yet attempted to create any policies via the api. I assume I can do so via the /policy/api/policies api with a post. The documentation lists this as "Trigger a policy dry-run" but I'm assuming that is really just an option of some sort? I'm confused. I upgraded my dev instance and all the entitlements now show as migrated=true and I have new content policies that were created. For some automation I have i need to create these via api as well. Gonna just try it this week but I was curious if others here know why the docs read as they do and can confirm they have no issues creating policies via the api?
What is a content policy? In my 8.8.0 I can see only the following policy types I can create:
Then you're asking about entitlements. Please clarify what you're looking for...
(I've already created approval policies via API successfully, and also entitlements.)
the 'content' sharing policies that I have in Service Broker allow for cloud template entitlement (ie create in one project, share with others). Here's a segment of my powershell script that does the actual entitlement. In service broker this shows up as a new content sharing policy.
ForEach ($CatalogEntitlement in $missingEntitlements ) {
$BPContentSharing = @{"projectId"=$ProjectID;"definition"=@{"type"="CatalogSourceIdentifier";"id"=$CatalogEntitlement.id}} | ConvertTo-Json
$bpSharingResults = Invoke-RestMethod -uri "https://api.mgmt.cloud.vmware.com/catalog/api/admin/entitlements" -Method POST -ContentType "application/json" -headers $headers -Body $BPContentSharing
if ($null -ne $bpSharingResults ) {$returnErrorCode += 1}
}
I've also played with deployment permission policies in order to prevent my platform teams (specific VRA groups) from deleting or rebooting entire deployments. These worked until they started using deploying machines themselves and wanted to delete or reboot single instances. I ended up deleting most of these policies because they tended to cause more heartache than good.
Just logged into my vRA cloud account and see there is a new policy type "Content Sharing Policy":
This is something new not available in my 8.8.0 env yet... Was "Content Sharing" menu completely removed?
Yes the "Content Sharing" menu is gone and it is all in the policies now. In our environment now it will be a big mess requiring a policy for every project. I wish they have scope choices for more than one project or at a organization level. We have some content we want globally available so that will mean anytime we make a tweak we will have to update all of the policies. Not feeling like a big fan of this change. I believe it breaks the way our current vRA deployment is designed to work which is keeping me stuck on 8.8.1 until I figure it out.