users
Creates, updates, deletes, gets or lists a users resource.
Overview​
| Name | users |
| Type | Resource |
| Id | ovh.cloud_container_registry.users |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string | User ID |
email | string | User email |
password | string (password) | User password |
user | string | User name |
Docker registry user
| Name | Datatype | Description |
|---|---|---|
id | string | User ID |
email | string | User email |
password | string (password) | User password |
user | string | User name |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | registry_id, user_id, service_name | Get registry user | |
list | select | registry_id, service_name | List registry user | |
create | insert | registry_id, service_name | Create a new registry user | |
delete | delete | registry_id, user_id, service_name | Delete a registry user | |
set_as_admin | exec | registryID, userID, service_name | Set 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.
| 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"}}) |
registryID | string | RegistryID |
registry_id | string | RegistryID (wire: registryID) |
service_name | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
userID | string | UserID |
user_id | string | UserID (wire: userID) |
SELECT examples​
- get
- list
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
;
List registry user
SELECT
id,
email,
password,
user
FROM ovh.cloud_container_registry.users
WHERE registry_id = '{{ registry_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: users
props:
- name: registry_id
value: "{{ registry_id }}"
description: Required parameter for the users resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the users resource.
- name: email
value: "{{ email }}"
description: |
New user email
- name: login
value: "{{ login }}"
description: |
New user login
DELETE examples​
- delete
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_as_admin
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
;