user_rights
Creates, updates, deletes, gets or lists a user_rights resource.
Overview​
| Name | user_rights |
| Type | Resource |
| Id | ovh.dedicated_cloud.user_rights |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
datacenter_id | integer | (wire: datacenterId) |
right_id | integer | (wire: rightId) |
can_add_ressource | boolean | Determine if the user can add ressources in your VMware on OVHcloud (wire: canAddRessource) |
network_role | string | Determine how this user can interact with the VMware on OVHcloud V(x)Lans (admin, manager, noAccess, readonly) (wire: networkRole) |
right | string | Determine what kind of access the User will have in this Datacenter of your VMware on OVHcloud (admin, disabled, readonly, readwrite) |
vm_network_role | string | Determine how this user can interact with the VMware on OVHcloud VM Network (admin, noAccess, readonly) (wire: vmNetworkRole) |
User datacenter right
| Name | Datatype | Description |
|---|---|---|
datacenter_id | integer | (wire: datacenterId) |
right_id | integer | (wire: rightId) |
can_add_ressource | boolean | Determine if the user can add ressources in your VMware on OVHcloud (wire: canAddRessource) |
network_role | string | Determine how this user can interact with the VMware on OVHcloud V(x)Lans (admin, manager, noAccess, readonly) (wire: networkRole) |
right | string | Determine what kind of access the User will have in this Datacenter of your VMware on OVHcloud (admin, disabled, readonly, readwrite) |
vm_network_role | string | Determine how this user can interact with the VMware on OVHcloud VM Network (admin, noAccess, readonly) (wire: vmNetworkRole) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | right_id, service_name, user_id | Get a user datacenter right. Returns the access of the user on a datacenter: access level, network and VM network roles, and right to add resources. | |
list | select | service_name, user_id | x_pagination_mode | List user datacenter rights |
update | update | right_id, service_name, user_id | Update a user datacenter right. Updates the access level, the network and VM network roles, and the right to add resources. Returns a task to track progress. |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
right_id | integer | (wire: rightId) |
service_name | string | Domain of the service (wire: serviceName) |
user_id | integer | (wire: userId) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
Get a user datacenter right. Returns the access of the user on a datacenter: access level, network and VM network roles, and right to add resources.
SELECT
datacenter_id,
right_id,
can_add_ressource,
network_role,
right,
vm_network_role
FROM ovh.dedicated_cloud.user_rights
WHERE right_id = '{{ right_id }}' -- required
AND service_name = '{{ service_name }}' -- required
AND user_id = '{{ user_id }}' -- required
;
List user datacenter rights
SELECT
datacenter_id,
right_id,
can_add_ressource,
network_role,
right,
vm_network_role
FROM ovh.dedicated_cloud.user_rights
WHERE service_name = '{{ service_name }}' -- required
AND user_id = '{{ user_id }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
UPDATE examples​
- update
Update a user datacenter right. Updates the access level, the network and VM network roles, and the right to add resources. Returns a task to track progress.
UPDATE ovh.dedicated_cloud.user_rights
SET
can_add_ressource = {{ can_add_ressource }},
network_role = '{{ network_role }}',
right = '{{ right }}',
vm_network_role = '{{ vm_network_role }}'
WHERE
right_id = '{{ right_id }}' --required
AND service_name = '{{ service_name }}' --required
AND user_id = '{{ user_id }}' --required
RETURNING
name,
datacenter_id,
filer_id,
host_id,
network_access_id,
order_id,
parent_task_id,
task_id,
user_id,
vlan_id,
created_by,
created_from,
description,
end_date,
execution_date,
last_modification_date,
maintenance_date_from,
maintenance_date_to,
network,
progress,
state,
type;