Skip to main content

users

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

Overview​

Nameusers
TypeResource
Idovh.cloud_container_registry.users

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstringUser ID
emailstringUser email
passwordstring (password)User password
userstringUser name

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectregistry_id, user_id, service_nameGet registry user
listselectregistry_id, service_nameList registry user
createinsertregistry_id, service_nameCreate a new registry user
deletedeleteregistry_id, user_id, service_nameDelete a registry user
set_as_adminexecregistryID, userID, service_nameSet the user as Admin

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"}})
registryIDstringRegistryID
registry_idstringRegistryID (wire: registryID)
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
userIDstringUserID
user_idstringUserID (wire: userID)

SELECT examples​

Get registry user

SELECT
id,
email,
password,
user
FROM ovh.cloud_container_registry.users
WHERE registry_id = '{{ registry_id }}' -- required
AND user_id = '{{ user_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Create a new registry user

INSERT INTO ovh.cloud_container_registry.users (
email,
login,
registry_id,
service_name
)
SELECT
'{{ email }}',
'{{ login }}',
'{{ registry_id }}',
'{{ service_name }}'
RETURNING
id,
email,
password,
user
;

DELETE examples​

Delete a registry user

DELETE FROM ovh.cloud_container_registry.users
WHERE registry_id = '{{ registry_id }}' --required
AND user_id = '{{ user_id }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Set the user as Admin

EXEC ovh.cloud_container_registry.users.set_as_admin
@registryID='{{ registryID }}' --required,
@userID='{{ userID }}' --required,
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;