Skip to main content

projects

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

Overview​

Nameprojects
TypeResource
Idovh.public_cloud.projects

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstringUnique identifier of the project
namestringProject name
created_atstring (date-time)Date of project creation (wire: createdAt)
current_stateobjectCurrent configuration applied to the cloud project (wire: currentState)
current_tasksarrayAsynchronous operations ongoing on the cloud project (wire: currentTasks)
iamobjectIAM resource metadata
resource_statusstringReflects the readiness of the cloud project. A new target specification request will be accepted only in READY status. (CREATING, CREATION_PLANNED, DELETING, ERROR, OUT_OF_SYNC, READY, SUSPENDED, UNKNOWN, UPDATING) (wire: resourceStatus)
target_specobjectLast target specification of the cloud project (wire: targetSpec)
updated_atstring (date-time)Date of the last cloud project update (wire: updatedAt)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectproject_idReturns the project, its current state and its ongoing tasks.
listselectx_pagination_cursor, x_pagination_size, iam_tagsReturns the projects of the account with their current state.

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"}})
project_idstringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
iam_tagsobjectFilter resources on IAM tags (wire: iamTags)
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

Returns the project, its current state and its ongoing tasks.

SELECT
id,
name,
created_at,
current_state,
current_tasks,
iam,
resource_status,
target_spec,
updated_at
FROM ovh.public_cloud.projects
WHERE project_id = '{{ project_id }}' -- required
;