Skip to main content

user_rights

Creates, updates, deletes, gets or lists a user_rights resource.

Overview​

Nameuser_rights
TypeResource
Idovh.dedicated_cloud.user_rights

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
datacenter_idinteger (wire: datacenterId)
right_idinteger (wire: rightId)
can_add_ressourcebooleanDetermine if the user can add ressources in your VMware on OVHcloud (wire: canAddRessource)
network_rolestringDetermine how this user can interact with the VMware on OVHcloud V(x)Lans (admin, manager, noAccess, readonly) (wire: networkRole)
rightstringDetermine what kind of access the User will have in this Datacenter of your VMware on OVHcloud (admin, disabled, readonly, readwrite)
vm_network_rolestringDetermine 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:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectright_id, service_name, user_idGet 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.
listselectservice_name, user_idx_pagination_modeList user datacenter rights
updateupdateright_id, service_name, user_idUpdate 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.

NameDatatypeDescription
api_hoststringThe 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_idinteger (wire: rightId)
service_namestringDomain of the service (wire: serviceName)
user_idinteger (wire: userId)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

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
;

UPDATE examples​

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;