registries
Creates, updates, deletes, gets or lists a registries resource.
Overview​
| Name | registries |
| Type | Resource |
| Id | ovh.cloud_container_registry.registries |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string | Registry ID |
name | string | Registry name |
project_id | string | Project ID of your registry (wire: projectID) |
created_at | string (date-time) | Registry creation date (wire: createdAt) |
iam_enabled | boolean | OVHcloud IAM enabled (wire: iamEnabled) |
region | string | Region of the registry. |
size | integer | Current size of the registry (bytes) |
status | string | Registry status (DELETED, DELETING, ERROR, INSTALLING, READY, RESTORING, SUSPENDED, SUSPENDING, UPDATING) |
updated_at | string (date-time) | Registry last update date (wire: updatedAt) |
url | string | Access url of the registry |
version | string | Version of your registry |
Managed docker registry
| Name | Datatype | Description |
|---|---|---|
id | string | Registry ID |
name | string | Registry name |
project_id | string | Project ID of your registry (wire: projectID) |
created_at | string (date-time) | Registry creation date (wire: createdAt) |
iam_enabled | boolean | OVHcloud IAM enabled (wire: iamEnabled) |
region | string | Region of the registry. |
size | integer | Current size of the registry (bytes) |
status | string | Registry status (DELETED, DELETING, ERROR, INSTALLING, READY, RESTORING, SUSPENDED, SUSPENDING, UPDATING) |
updated_at | string (date-time) | Registry last update date (wire: updatedAt) |
url | string | Access url of the registry |
version | string | Version of your registry |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | registry_id, service_name | Get the registry information | |
list | select | service_name | List registries of the project | |
create | insert | service_name, name, region | Create a new registry | |
update | update | registry_id, service_name, name | Update the registry | |
delete | delete | registry_id, service_name | Delete a registry | |
delete_iam | exec | registryID, service_name | Disable Ovhcloud IAM | |
iam | exec | registryID, service_name | Enable OVHcloud IAM |
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. |
SELECT examples​
- get
- list
Get the registry information
SELECT
id,
name,
project_id,
created_at,
iam_enabled,
region,
size,
status,
updated_at,
url,
version
FROM ovh.cloud_container_registry.registries
WHERE registry_id = '{{ registry_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;
List registries of the project
SELECT
id,
name,
project_id,
created_at,
iam_enabled,
region,
size,
status,
updated_at,
url,
version
FROM ovh.cloud_container_registry.registries
WHERE service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;
INSERT examples​
- create
- Manifest
Create a new registry
INSERT INTO ovh.cloud_container_registry.registries (
name,
plan_id,
region,
service_name
)
SELECT
'{{ name }}' /* required */,
'{{ plan_id }}',
'{{ region }}' /* required */,
'{{ service_name }}'
RETURNING
id,
name,
project_id,
created_at,
iam_enabled,
region,
size,
status,
updated_at,
url,
version
;
# Description fields are for documentation purposes
- name: registries
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the registries resource.
- name: name
value: "{{ name }}"
description: |
Name of the new registry
- name: plan_id
value: "{{ plan_id }}"
description: |
ID of the plan to use for the new registry
- name: region
value: "{{ region }}"
description: |
Region where to deploy the registry. Get available regions with /cloud/project/{serviceName}/capabilities/containerRegistry.
UPDATE examples​
- update
Update the registry
UPDATE ovh.cloud_container_registry.registries
SET
name = '{{ name }}'
WHERE
registry_id = '{{ registry_id }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
AND name = '{{ name }}' --required;
DELETE examples​
- delete
Delete a registry
DELETE FROM ovh.cloud_container_registry.registries
WHERE registry_id = '{{ registry_id }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- delete_iam
- iam
Disable Ovhcloud IAM
EXEC ovh.cloud_container_registry.registries.delete_iam
@registryID='{{ registryID }}' --required,
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;
Enable OVHcloud IAM
EXEC ovh.cloud_container_registry.registries.iam
@registryID='{{ registryID }}' --required,
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"deleteUsers": {{ deleteUsers }}
}'
;