projects
Creates, updates, deletes, gets or lists a projects resource.
Overview​
| Name | projects |
| Type | Resource |
| Id | ovh.public_cloud.projects |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier of the project |
name | string | Project name |
created_at | string (date-time) | Date of project creation (wire: createdAt) |
current_state | object | Current configuration applied to the cloud project (wire: currentState) |
current_tasks | array | Asynchronous operations ongoing on the cloud project (wire: currentTasks) |
iam | object | IAM resource metadata |
resource_status | string | Reflects 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_spec | object | Last target specification of the cloud project (wire: targetSpec) |
updated_at | string (date-time) | Date of the last cloud project update (wire: updatedAt) |
A Public Cloud project
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier of the project |
name | string | Project name |
created_at | string (date-time) | Date of project creation (wire: createdAt) |
current_state | object | Current configuration applied to the cloud project (wire: currentState) |
current_tasks | array | Asynchronous operations ongoing on the cloud project (wire: currentTasks) |
iam | object | IAM resource metadata |
resource_status | string | Reflects 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_spec | object | Last target specification of the cloud project (wire: targetSpec) |
updated_at | string (date-time) | Date of the last cloud project update (wire: updatedAt) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | project_id | Returns the project, its current state and its ongoing tasks. | |
list | select | x_pagination_cursor, x_pagination_size, iam_tags | Returns 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.
| 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"}}) |
project_id | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
iam_tags | object | Filter resources on IAM tags (wire: iamTags) |
x_pagination_cursor | string | Pagination cursor (wire: X-Pagination-Cursor) |
x_pagination_size | integer | Pagination size (wire: X-Pagination-Size) |
SELECT examples​
- get
- list
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
;
Returns the projects of the account with their current state.
SELECT
id,
name,
created_at,
current_state,
current_tasks,
iam,
resource_status,
target_spec,
updated_at
FROM ovh.public_cloud.projects
WHERE x_pagination_cursor = '{{ x_pagination_cursor }}'
AND x_pagination_size = '{{ x_pagination_size }}'
AND iam_tags = '{{ iam_tags }}'
;