VMware VSHIELD APP 1.0 - API Uživatelský manuál Strana 19

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 104
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 18
VMware, Inc. 19
Chapter 2 vShield Manager Management
Role Management
Get Role for a User
Youcanretrieveinformationabouttheroleassignedtothisuser.
Example 2-13. Retrieve the role of a user
Request:
GET https://<vsm-ip>/api/2.0/services/usermgmt/role/<userId>
Possiblerolesaresuper_user,vshield_admin,enterprise_admin,security_admin,andauditor.
Add Role and Resources for a User
Youcanaddroleandaccessibleresourcesforthespecifieduser.ItaffectsonlyvCenterusers,notlocalusers.
ForlocalvShieldManagerusers,itthrowserror“400:Useralreadypresent.”
Example 2-14. Update the role of a user
RequestHeader:
POST https://<vsm-ip>/api/2.0/services/usermgmt/role/<userId>
RequestBody:
<accessControlEntry>
<role>new_role</role>
<resource>
<resourceId>resource-num</resourceId>
...
</resource>
</accessControlEntry>
ThisAPIreturns“204NoContent”ifsuccessful.
Change Role for a User
Youcanupdatetheroleassignmentforagivenuser.TheAPIreturnsanoutputrepresentationspecifyinga
new<accessControlEntry>fortheuser.
Example 2-15. Change the role of a user
RequestHeader:
PUT https://<vsm-ip>/api/2.0/services/usermgmt/role/<userId>
RequestBody:
<accessControlEntry>
<role>new_role</role>
<resource>
<resourceId>resource-num</resourceId>
...
</resource>
</accessControlEntry>
Possiblerolesaresuper_user,vshield_admin,enterprise_admin,security_admin,andauditor.
Zobrazit stránku 18
1 2 ... 14 15 16 17 18 19 20 21 22 23 24 ... 103 104

Komentáře k této Příručce

Žádné komentáře