【VMware Cloud Director】ローカルユーザーの作成(API)

・ユーザー(User10)の作成

# curl -k --header "Content-Type: application/vnd.vmware.admin.user+xml" --header "Accept: application/*;version=37.0" --header "Authorization: Bearer xxx" --request POST https://172.16.20.20/api/admin/org/6ccb9c49-55f4-4591-83c3-c63b1e295287/users -d '<?xml version="1.0" encoding="UTF-8"?><vcloud:User
    xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
    name="User10"
    operationKey="operationKey">
    <vcloud:IsEnabled>true</vcloud:IsEnabled>
    <vcloud:IsLocked>false</vcloud:IsLocked>
    <vcloud:IsExternal>false</vcloud:IsExternal>
    <vcloud:ProviderType>INTEGRATED</vcloud:ProviderType>
    <vcloud:StoredVmQuota>10</vcloud:StoredVmQuota>
    <vcloud:DeployedVmQuota>5</vcloud:DeployedVmQuota>
    <vcloud:Role
        href="https://172.16.20.20/api/admin/role/38da3903-2149-30ac-a523-8e535480d094"
        type="application/vnd.vmware.admin.role+xml"/>
    <vcloud:Password>pass1234</vcloud:Password>
</vcloud:User>'

参考:VMware Cloud Director API - POST-CreateUser

・ロール確認

# curl -k --header "Accept: application/*;version=37.0" --header "Authorization: Bearer xxx" --request GET https://172.16.20.20/cloudapi/1.0.0/roles

※レスポンス
{
   "resultTotal":7,
   "pageCount":1,
   "page":1,
   "pageSize":25,
   "associations":null,
   "values":[
      {
         "name":"Organization Administrator",
         "id":"urn:vcloud:role:38da3903-2149-30ac-a523-8e535480d094",
         "description":"Built-in rights for administering an organization",
         "bundleKey":"ROLE_ORGANIZATION_ADMINISTRATOR",
         "readOnly":true
      },
      {
         "name":"Catalog Author",
         "id":"urn:vcloud:role:03158989-6bc5-3f94-86bf-462ee51d5f1d",
         "description":"Rights given to a user who creates and publishes new catalogs",
         "bundleKey":"ROLE_CATALOG_AUTHOR",
         "readOnly":true
      },
      {
         "name":"vApp Author",
         "id":"urn:vcloud:role:f810ab9b-628e-3d36-8868-b04c3a188a5b",
         "description":"Rights given to a user who uses catalogs and creates vApps",
         "bundleKey":"ROLE_VAPP_AUTHOR",
         "readOnly":true
      },
      {
         "name":"vApp User",
         "id":"urn:vcloud:role:6aba7036-821f-374f-966f-f97d0a705315",
         "description":"Rights given to a user who uses vApps created by others",
         "bundleKey":"ROLE_VAPP_USER",
         "readOnly":true
      },
      {
         "name":"Console Access Only",
         "id":"urn:vcloud:role:0370fc96-7392-3801-9c1e-9366945d54e8",
         "description":"Rights given to a user who can only view virtual machine state and properties and use the guest OS",
         "bundleKey":"ROLE_CONSOLE_ACCESS_ONLY",
         "readOnly":true
      },
      {
         "name":"Defer to Identity Provider",
         "id":"urn:vcloud:role:656e8ef0-7527-356a-a25c-9cb9044a676b",
         "description":"Rights will be determined based on information received from IDP",
         "bundleKey":"ROLE_DEFER_TO_IDP",
         "readOnly":true
      },
      {
         "name":"clone:Organization Administrator",
         "id":"urn:vcloud:role:e32010df-22da-414a-b6fb-0e3625d378dd",
         "description":"Built-in rights for administering an organization",
         "bundleKey":"com.vmware.vcloud.undefined.key",
         "readOnly":false
      }
   ]
}

参考:vCloud Director OpenAPI