Skip to main content

projects

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

Overview​

Nameprojects
TypeResource
Idovh.cloud.projects

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
order_idintegerProject order id (wire: orderId)
project_idstringProject id
project_namestringProject name (wire: projectName)
accessstringProject access (full, restricted)
creation_datestring (date-time)Project creation date (wire: creationDate)
descriptionstringDescription of your project
expirationstring (date-time)Expiration date of your project. After this date, your project will be deleted
iamobjectIAM resource metadata
manual_quotabooleanManual quota prevent automatic quota upgrade (wire: manualQuota)
plan_codestringOrder plan code (wire: planCode)
statusstringCurrent status (creating, deleted, deleting, ok, suspended)
unleashbooleanProject unleashed

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_nameGet a public cloud project properties
listselectiam_tags, x_pagination_modeList available public cloud projects
updateupdateservice_nameAlter this object properties
activate_monthly_billingexecservice_name, instancesActivate monthly billing on multiple instances (Beta version)
cancelexecservice_nameCancel project creation
change_contactexecservice_nameChange service contacts. Starts a procedure to change the admin, tech or billing contact of the service.
confirm_terminationexecservice_name, tokenConfirm service termination. Terminates the service with the token sent by email to the admin contact. A reason, a future use and a comment can be given.
retainexecservice_nameDo not expire the project, and retain it. You will have to pay for the resources you will use after using this call
terminateexecservice_nameRequest service termination. Starts the termination of the service. The admin contact receives a token by email, to confirm with the confirmTermination call.
unleashexecservice_nameRequest more quota on your /cloud project

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"}})
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
iam_tagsobjectFilter resources on IAM tags (wire: iamTags)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get a public cloud project properties

SELECT
order_id,
project_id,
project_name,
access,
creation_date,
description,
expiration,
iam,
manual_quota,
plan_code,
status,
unleash
FROM ovh.cloud.projects
WHERE service_name = '{{ service_name }}' -- required
;

UPDATE examples​

Alter this object properties

UPDATE ovh.cloud.projects
SET
description = '{{ description }}',
manual_quota = {{ manual_quota }}
WHERE
service_name = '{{ service_name }}' --required;

Lifecycle Methods​

EXEC variables use wire (API) names.

Activate monthly billing on multiple instances (Beta version)

EXEC ovh.cloud.projects.activate_monthly_billing
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"instances": "{{ instances }}"
}'
;