Skip to main content

roles

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

Overview​

Nameroles
TypeResource
Idovh.dbaas_logs.roles

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
namestringRole name
role_idstring (uuid)Role ID (wire: roleId)
created_atstring (date-time)Role creation (wire: createdAt)
descriptionstringRole description
nb_memberintegerNumber of members (wire: nbMember)
nb_permissionintegerNumber of permissions (wire: nbPermission)
updated_atstring (date-time)Role last update (wire: updatedAt)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectrole_id, service_nameReturns the role. (Deprecated, will be removed)
listselectservice_namename_pattern, x_pagination_modeReturns the roles of the Logs Data Platform service. (Deprecated, will be removed)
createinsertservice_name, description, nameCreates a role on the Logs Data Platform service. (Deprecated, will be removed)
updateupdaterole_id, service_name, description, nameUpdates the role. (Deprecated, will be removed)
deletedeleterole_id, service_nameDeletes the role. (Deprecated, will be removed)

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"}})
role_idstring (uuid)Role ID (wire: roleId)
service_namestringService name (wire: serviceName)
name_patternstringFilter by name (like) (wire: namePattern)
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​

Returns the role. (Deprecated, will be removed)

SELECT
name,
role_id,
created_at,
description,
nb_member,
nb_permission,
updated_at
FROM ovh.dbaas_logs.roles
WHERE role_id = '{{ role_id }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Creates a role on the Logs Data Platform service. (Deprecated, will be removed)

INSERT INTO ovh.dbaas_logs.roles (
description,
name,
service_name
)
SELECT
'{{ description }}' /* required */,
'{{ name }}' /* required */,
'{{ service_name }}'
RETURNING
alias_id,
dashboard_id,
encryption_key_id,
index_id,
input_id,
operation_id,
osd_id,
role_id,
stream_id,
subscription_id,
tenant_id,
token_id,
service_name,
created_at,
state,
updated_at
;

UPDATE examples​

Updates the role. (Deprecated, will be removed)

UPDATE ovh.dbaas_logs.roles
SET
description = '{{ description }}',
name = '{{ name }}'
WHERE
role_id = '{{ role_id }}' --required
AND service_name = '{{ service_name }}' --required
AND description = '{{ description }}' --required
AND name = '{{ name }}' --required
RETURNING
alias_id,
dashboard_id,
encryption_key_id,
index_id,
input_id,
operation_id,
osd_id,
role_id,
stream_id,
subscription_id,
tenant_id,
token_id,
service_name,
created_at,
state,
updated_at;

DELETE examples​

Deletes the role. (Deprecated, will be removed)

DELETE FROM ovh.dbaas_logs.roles
WHERE role_id = '{{ role_id }}' --required
AND service_name = '{{ service_name }}' --required
;