Skip to main content

users

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

Overview​

Nameusers
TypeResource
Idovh.dedicated_ceph.users

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
namestringName of ceph user
service_namestringID of cluster (wire: serviceName)
keystringKey of user to connect into cluster
key_typestringType of the user key (AES, AES256K) (wire: keyType)
mds_capsstringCapabilities of user on MDS (wire: mdsCaps)
mon_capsstringCapabilities of user on MON (wire: monCaps)
osd_capsstringCapabilities of user on OSD (wire: osdCaps)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_name, user_nameReturns a Ceph user. Use its key to connect a client to the cluster.
listselectservice_nameReturns the Ceph users of the cluster.
createinsertservice_name, user_nameCreates a Ceph user with no pool permissions. The name must contain at least three characters.
deletedeleteservice_name, user_nameDeletes the Ceph user from the cluster.

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"}})
service_namestringService name (wire: serviceName)
user_namestringUser name (wire: userName)

SELECT examples​

Returns a Ceph user. Use its key to connect a client to the cluster.

SELECT
name,
service_name,
key,
key_type,
mds_caps,
mon_caps,
osd_caps
FROM ovh.dedicated_ceph.users
WHERE service_name = '{{ service_name }}' -- required
AND user_name = '{{ user_name }}' -- required
;

INSERT examples​

Creates a Ceph user with no pool permissions. The name must contain at least three characters.

INSERT INTO ovh.dedicated_ceph.users (
key_type,
user_name,
service_name
)
SELECT
'{{ key_type }}',
'{{ user_name }}' /* required */,
'{{ service_name }}'
;

DELETE examples​

Deletes the Ceph user from the cluster.

DELETE FROM ovh.dedicated_ceph.users
WHERE service_name = '{{ service_name }}' --required
AND user_name = '{{ user_name }}' --required
;