cloud_projects
Creates, updates, deletes, gets or lists a cloud_projects resource.
Overview​
| Name | cloud_projects |
| Type | Resource |
| Id | ovh.vrack.cloud_projects |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
project | string | publicCloud project |
vrack | string | vrack name |
PublicCloud project in vrack
| Name | Datatype | Description |
|---|---|---|
project | string | publicCloud project |
vrack | string | vrack name |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | project, service_name | Get a project. Returns the attached Public Cloud project and its vRack. | |
list | select | service_name | x_pagination_mode | List projects. Returns the identifiers of the Public Cloud projects attached to the vRack. |
create | insert | service_name, project | Attach a project. Attaches a Public Cloud project to the vRack. Returns the task that performs it. | |
delete | delete | project, service_name | Detach a project. Detaches the Public Cloud project from the vRack. Returns the task that performs it. |
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 | string | publicCloud project |
service_name | string | The internal name of your vrack (wire: serviceName) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
Get a project. Returns the attached Public Cloud project and its vRack.
SELECT
project,
vrack
FROM ovh.vrack.cloud_projects
WHERE project = '{{ project }}' -- required
AND service_name = '{{ service_name }}' -- required
;
List projects. Returns the identifiers of the Public Cloud projects attached to the vRack.
SELECT
project,
vrack
FROM ovh.vrack.cloud_projects
WHERE service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Attach a project. Attaches a Public Cloud project to the vRack. Returns the task that performs it.
INSERT INTO ovh.vrack.cloud_projects (
project,
service_name
)
SELECT
'{{ project }}' /* required */,
'{{ service_name }}'
RETURNING
id,
order_id,
service_name,
function,
last_update,
status,
target_domain,
todo_date
;
# Description fields are for documentation purposes
- name: cloud_projects
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the cloud_projects resource.
- name: project
value: "{{ project }}"
description: |
publicCloud project to add
DELETE examples​
- delete
Detach a project. Detaches the Public Cloud project from the vRack. Returns the task that performs it.
DELETE FROM ovh.vrack.cloud_projects
WHERE project = '{{ project }}' --required
AND service_name = '{{ service_name }}' --required
;