Class: role
A set of permissions associated with a subject
Published in: | XenServer 5.6 (midnight-ride) | A set of permissions associated with a subject |
Fields
bool
is_internal
[RO/runtime]
Indicates whether the role is only to be assigned internally by xapi, or can be used by clients
Default value: | false |
Published in: | XAPI 22.5.0 (22.5.0) | Indicates whether the role is only to be assigned internally by xapi, or can be used by clients |
string
name_description
[RO/constructor]
what this role is for
Default value: | "" |
Published in: | XenServer 5.6 (midnight-ride) | what this role is for |
string
name_label
[RO/constructor]
a short user-friendly name for the role
Default value: | "" |
Published in: | XenServer 5.6 (midnight-ride) | a short user-friendly name for the role |
role ref set
subroles
[RO/constructor]
a list of pointers to other roles or permissions
Default value: | {} |
Published in: | XenServer 5.6 (midnight-ride) | a list of pointers to other roles or permissions |
string
uuid
[RO/runtime]
Unique identifier/object reference
Published in: | XenServer 4.0 (rio) | Unique identifier/object reference |
Messages
role ref set
get_all
(session ref)
Return a list of all the roles known to the system.
Parameters: | session ref session_id | Reference to a valid session |
Minimum role: | read-only |
Result: | references to all objects |
Published in: | XenServer 5.6 (midnight-ride) | A set of permissions associated with a subject |
(role ref → role record) map
get_all_records
(session ref)
Return a map of role references to role records for all roles known to the system.
Parameters: | session ref session_id | Reference to a valid session |
Minimum role: | read-only |
Result: | records of all objects |
Published in: | XenServer 5.6 (midnight-ride) | A set of permissions associated with a subject |
role ref set
get_by_name_label
(session ref, string)
Get all the role instances with the given label.
Parameters: | session ref session_id | Reference to a valid session |
| string label | label of object to return |
Minimum role: | read-only |
Result: | references to objects with matching names |
Published in: | XenServer 5.6 (midnight-ride) | A set of permissions associated with a subject |
role ref set
get_by_permission
(session ref, role ref)
This call returns a list of roles given a permission
Parameters: | session ref session_id | Reference to a valid session |
| role ref permission | a reference to a permission |
Minimum role: | read-only |
Result: | a list of references to roles |
Published in: | XenServer 5.6 (midnight-ride) | This call returns a list of roles given a permission |
role ref set
get_by_permission_name_label
(session ref, string)
This call returns a list of roles given a permission name
Parameters: | session ref session_id | Reference to a valid session |
| string label | The short friendly name of the role |
Minimum role: | read-only |
Result: | a list of references to roles |
Published in: | XenServer 5.6 (midnight-ride) | This call returns a list of roles given a permission name |
role ref
get_by_uuid
(session ref, string)
Get a reference to the role instance with the specified UUID.
Parameters: | session ref session_id | Reference to a valid session |
| string uuid | UUID of object to return |
Minimum role: | read-only |
Result: | reference to the object |
Published in: | XenServer 5.6 (midnight-ride) | A set of permissions associated with a subject |
bool
get_is_internal
(session ref, role ref)
Get the is_internal field of the given role.
Parameters: | session ref session_id | Reference to a valid session |
| role ref self | reference to the object |
Minimum role: | read-only |
Result: | value of the field |
Published in: | XAPI 22.5.0 (22.5.0) | Indicates whether the role is only to be assigned internally by xapi, or can be used by clients |
string
get_name_description
(session ref, role ref)
Get the name/description field of the given role.
Parameters: | session ref session_id | Reference to a valid session |
| role ref self | reference to the object |
Minimum role: | read-only |
Result: | value of the field |
Published in: | XenServer 5.6 (midnight-ride) | what this role is for |
string
get_name_label
(session ref, role ref)
Get the name/label field of the given role.
Parameters: | session ref session_id | Reference to a valid session |
| role ref self | reference to the object |
Minimum role: | read-only |
Result: | value of the field |
Published in: | XenServer 5.6 (midnight-ride) | a short user-friendly name for the role |
role ref set
get_permissions
(session ref, role ref)
This call returns a list of permissions given a role
Parameters: | session ref session_id | Reference to a valid session |
| role ref self | a reference to a role |
Minimum role: | read-only |
Result: | a list of permissions |
Published in: | XenServer 5.6 (midnight-ride) | This call returns a list of permissions given a role |
string set
get_permissions_name_label
(session ref, role ref)
This call returns a list of permission names given a role
Parameters: | session ref session_id | Reference to a valid session |
| role ref self | a reference to a role |
Minimum role: | read-only |
Result: | a list of permission names |
Published in: | XenServer 5.6 (midnight-ride) | This call returns a list of permission names given a role |
role record
get_record
(session ref, role ref)
Get a record containing the current state of the given role.
Parameters: | session ref session_id | Reference to a valid session |
| role ref self | reference to the object |
Minimum role: | read-only |
Result: | all fields from the object |
Published in: | XenServer 5.6 (midnight-ride) | A set of permissions associated with a subject |
role ref set
get_subroles
(session ref, role ref)
Get the subroles field of the given role.
Parameters: | session ref session_id | Reference to a valid session |
| role ref self | reference to the object |
Minimum role: | read-only |
Result: | value of the field |
Published in: | XenServer 5.6 (midnight-ride) | a list of pointers to other roles or permissions |
string
get_uuid
(session ref, role ref)
Get the uuid field of the given role.
Parameters: | session ref session_id | Reference to a valid session |
| role ref self | reference to the object |
Minimum role: | read-only |
Result: | value of the field |
Published in: | XenServer 4.0 (rio) | Unique identifier/object reference |