projects
Creates, updates, deletes, gets or lists a projects resource.
Overview​
| Name | projects |
| Type | Resource |
| Id | ovh.cloud.projects |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
order_id | integer | Project order id (wire: orderId) |
project_id | string | Project id |
project_name | string | Project name (wire: projectName) |
access | string | Project access (full, restricted) |
creation_date | string (date-time) | Project creation date (wire: creationDate) |
description | string | Description of your project |
expiration | string (date-time) | Expiration date of your project. After this date, your project will be deleted |
iam | object | IAM resource metadata |
manual_quota | boolean | Manual quota prevent automatic quota upgrade (wire: manualQuota) |
plan_code | string | Order plan code (wire: planCode) |
status | string | Current status (creating, deleted, deleting, ok, suspended) |
unleash | boolean | Project unleashed |
Project
| Name | Datatype | Description |
|---|---|---|
order_id | integer | Project order id (wire: orderId) |
project_id | string | Project id |
project_name | string | Project name (wire: projectName) |
access | string | Project access (full, restricted) |
creation_date | string (date-time) | Project creation date (wire: creationDate) |
description | string | Description of your project |
expiration | string (date-time) | Expiration date of your project. After this date, your project will be deleted |
iam | object | IAM resource metadata |
manual_quota | boolean | Manual quota prevent automatic quota upgrade (wire: manualQuota) |
plan_code | string | Order plan code (wire: planCode) |
status | string | Current status (creating, deleted, deleting, ok, suspended) |
unleash | boolean | Project unleashed |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service_name | Get a public cloud project properties | |
list | select | iam_tags, x_pagination_mode | List available public cloud projects | |
update | update | service_name | Alter this object properties | |
activate_monthly_billing | exec | service_name, instances | Activate monthly billing on multiple instances (Beta version) | |
cancel | exec | service_name | Cancel project creation | |
change_contact | exec | service_name | Change service contacts. Starts a procedure to change the admin, tech or billing contact of the service. | |
confirm_termination | exec | service_name, token | Confirm 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. | |
retain | exec | service_name | Do not expire the project, and retain it. You will have to pay for the resources you will use after using this call | |
terminate | exec | service_name | Request service termination. Starts the termination of the service. The admin contact receives a token by email, to confirm with the confirmTermination call. | |
unleash | exec | service_name | Request 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.
| 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"}}) |
service_name | 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_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 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
;
List available public cloud projects
SELECT
order_id,
project_id,
project_name,
access,
creation_date,
description,
expiration,
iam,
manual_quota,
plan_code,
status,
unleash
FROM ovh.cloud.projects
WHERE iam_tags = '{{ iam_tags }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
UPDATE examples​
- update
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
- cancel
- change_contact
- confirm_termination
- retain
- terminate
- unleash
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 }}"
}'
;
Cancel project creation
EXEC ovh.cloud.projects.cancel
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;
Change service contacts. Starts a procedure to change the admin, tech or billing contact of the service.
EXEC ovh.cloud.projects.change_contact
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"contactAdmin": "{{ contactAdmin }}",
"contactBilling": "{{ contactBilling }}",
"contactTech": "{{ contactTech }}"
}'
;
Confirm 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.
EXEC ovh.cloud.projects.confirm_termination
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"commentary": "{{ commentary }}",
"futureUse": "{{ futureUse }}",
"reason": "{{ reason }}",
"token": "{{ token }}"
}'
;
Do not expire the project, and retain it. You will have to pay for the resources you will use after using this call
EXEC ovh.cloud.projects.retain
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;
Request service termination. Starts the termination of the service. The admin contact receives a token by email, to confirm with the confirmTermination call.
EXEC ovh.cloud.projects.terminate
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;
Request more quota on your /cloud project
EXEC ovh.cloud.projects.unleash
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;