Skip to main content

plans

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

Overview​

Nameplans
TypeResource
Idovh.cloud_container_registry.plans

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstringPlan ID
namestringPlan name
codestringPlan code from catalog
created_atstring (date-time)Plan creation date (wire: createdAt)
featuresobjectFeatures of the plan
registry_limitsobjectContainer registry limits (wire: registryLimits)
updated_atstring (date-time)Plan last update date (wire: updatedAt)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectregistry_id, service_nameShow the actual plan of the registry.
updateupdateregistry_id, service_name, plan_idUpdate the plan of a registry.

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

SELECT examples​

Show the actual plan of the registry.

SELECT
id,
name,
code,
created_at,
features,
registry_limits,
updated_at
FROM ovh.cloud_container_registry.plans
WHERE registry_id = '{{ registry_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

UPDATE examples​

Update the plan of a registry.

UPDATE ovh.cloud_container_registry.plans
SET
plan_id = '{{ plan_id }}'
WHERE
registry_id = '{{ registry_id }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
AND plan_id = '{{ plan_id }}' --required;