VMware Cloud Community
irene_zimmerman
Contributor
Contributor
Jump to solution

Manipulate vCenter Permissions with vCO Workflow

Hi,

I'm trying to change user permissions and roles in vCenter with workflows.

For example, I want to copy the permissions from one folder to another. I found the correct object and method: VcAuthorizationManager.setEntityPermissions().

The problem is that I can't find a way to access the AuthorizationManager. AuthorisationManager is access via the content property of the ServiceContent Object and that object is returned by "RetrieveServiceInstance"-Method according to the documentation:

How do I call this mehtod? The documentataion does not make any sense to me since there is no ServiceInstance-Object in vCO and the ServiceContent-Object has no such method.

I would appreciate an example on how to use these objects.

Thanks,

Irene

Reply
0 Kudos
1 Solution

Accepted Solutions
admin
Immortal
Immortal
Jump to solution

Hi Irene

You can use the SdkConnection.authorizationManager (this represent the authorization manager for you vCenter)

SdkConnection reprensents a connection to a specific vCenter Server. You can get all SdkConnection for registered vCenter servers using VcPlugin.allSdkConnections. (VcPlugin is a scriptable object with static-like methods)

Hope this help.

View solution in original post

Reply
0 Kudos
4 Replies
admin
Immortal
Immortal
Jump to solution

Hi Irene

You can use the SdkConnection.authorizationManager (this represent the authorization manager for you vCenter)

SdkConnection reprensents a connection to a specific vCenter Server. You can get all SdkConnection for registered vCenter servers using VcPlugin.allSdkConnections. (VcPlugin is a scriptable object with static-like methods)

Hope this help.

Reply
0 Kudos
irene_zimmerman
Contributor
Contributor
Jump to solution

Hi Cédric,

Thanks a lot! It works this way.

Too bad the documentation does not show AuthorizationManager as property of SdkConnection.

Irene

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

SdkConnection and VcPlugin are not objects existing in the VC API. They are part of the VC Plugin for vCO.

In vCO, go to Tools / API Explorer to view all available obejcts from vCO scripting.

Reply
0 Kudos
irene_zimmerman
Contributor
Contributor
Jump to solution

Of course they are. I'm using API explorer as well as the online documentation.

But if you find AuthenticationManager in the API explorer you have no chance of finding it a property of SdkConnection because thats not in the documentation of AuthenticationManager. The "Property of" entry for "SdkConnection" is missing:

http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.AuthorizationManager....

Would be nice to have that reference.

Regards,

Irene

Reply
0 Kudos