Skip to main content

registries

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

Overview​

Nameregistries
TypeResource
Idovh.cloud_container_registry.registries

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstringRegistry ID
namestringRegistry name
project_idstringProject ID of your registry (wire: projectID)
created_atstring (date-time)Registry creation date (wire: createdAt)
iam_enabledbooleanOVHcloud IAM enabled (wire: iamEnabled)
regionstringRegion of the registry.
sizeintegerCurrent size of the registry (bytes)
statusstringRegistry status (DELETED, DELETING, ERROR, INSTALLING, READY, RESTORING, SUSPENDED, SUSPENDING, UPDATING)
updated_atstring (date-time)Registry last update date (wire: updatedAt)
urlstringAccess url of the registry
versionstringVersion of your registry

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectregistry_id, service_nameGet the registry information
listselectservice_nameList registries of the project
createinsertservice_name, name, regionCreate a new registry
updateupdateregistry_id, service_name, nameUpdate the registry
deletedeleteregistry_id, service_nameDelete a registry
delete_iamexecregistryID, service_nameDisable Ovhcloud IAM
iamexecregistryID, service_nameEnable 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.

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.

SELECT examples​

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
;

INSERT examples​

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
;

UPDATE examples​

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 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.

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
;