com.vmware.vcloud.sdk.admin
Class Role

java.lang.Object
  extended by com.vmware.vcloud.sdk.VcloudResource<T>
      extended by com.vmware.vcloud.sdk.VcloudEntity<com.vmware.vcloud.api.rest.schema.RoleType>
          extended by com.vmware.vcloud.sdk.admin.Role

public class Role
extends VcloudEntity<com.vmware.vcloud.api.rest.schema.RoleType>

Helper class for the Role Resource in vCloud Admin API.

See Also:
RoleType

Method Summary
 void delete()
          Delete Role
static void delete(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType roleRef)
          Delete Role
static Role getRoleById(VcloudClient client, String vCloudId)
          Get Role helper using the vCloud ID
static Role getRoleByReference(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType roleRef)
          Returns the Role by ReferenceType
 Role updateRole(com.vmware.vcloud.api.rest.schema.RoleType roleType)
          Updating the Role
 
Methods inherited from class com.vmware.vcloud.sdk.VcloudEntity
getMetadata, getReference, getTasks
 
Methods inherited from class com.vmware.vcloud.sdk.VcloudResource
getResource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRoleByReference

public static Role getRoleByReference(VcloudClient client,
                                      com.vmware.vcloud.api.rest.schema.ReferenceType roleRef)
                               throws VCloudException
Returns the Role by ReferenceType

Parameters:
client - VcloudClient
roleRef - ReferenceType
Returns:
Role
Throws:
VCloudException

getRoleById

public static Role getRoleById(VcloudClient client,
                               String vCloudId)
                        throws VCloudException
Get Role helper using the vCloud ID

Parameters:
client - VcloudClient
vCloudId - format - The vCloud ID is of the form: "urn:vcloud:type:uuid". For example: "urn:vcloud:media:d9d976ba-e0ec-4682-a67d-380af49b54e1". String
Returns:
Role
Throws:
VCloudException
Since:
API 1.5, SDK 1.5

updateRole

public Role updateRole(com.vmware.vcloud.api.rest.schema.RoleType roleType)
                throws VCloudException
Updating the Role

Parameters:
roleType - RoleType
Returns:
Role
Throws:
VCloudException

delete

public void delete()
            throws VCloudException
Delete Role

Throws:
VCloudException

delete

public static void delete(VcloudClient client,
                          com.vmware.vcloud.api.rest.schema.ReferenceType roleRef)
                   throws VCloudException
Delete Role

Parameters:
client - vCloud Client VcloudClient
roleRef - Role Ref
Throws:
VCloudException


Copyright © 2016. All Rights Reserved.