projects
Creates, updates, deletes, gets or lists a projects
resource.
Overview
Name | projects |
Type | Resource |
Id | digitalocean.projects.projects |
Fields
Name | Datatype | Description |
---|---|---|
column_anon | `` |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_get | SELECT | project_id | To get a project, send a GET request to /v2/projects/$PROJECT_ID . |
projects_list | SELECT |
| To list all your projects, send a GET request to /v2/projects . |
projects_create | INSERT |
| To create a project, send a POST request to /v2/projects . |
projects_delete | DELETE | project_id | To delete a project, send a DELETE request to /v2/projects/$PROJECT_ID . To be deleted, a project must not have any resources assigned to it. Any existing resources must first be reassigned or destroyed, or you will receive a 412 error. A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully. |
projects_patch | UPDATE | project_id | To update only specific attributes of a project, send a PATCH request to /v2/projects/$PROJECT_ID . At least one of the following attributes needs to be sent. |
projects_update | EXEC | project_id | To update a project, send a PUT request to /v2/projects/$PROJECT_ID . All of the following attributes must be sent. |
SELECT
examples
To list all your projects, send a GET request to /v2/projects
.
SELECT
column_anon
FROM digitalocean.projects.projects
;
INSERT
example
Use the following StackQL query and manifest file to create a new projects
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO digitalocean.projects.projects (
data__name,
data__description,
data__purpose,
data__environment
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ purpose }}',
'{{ environment }}'
;
- name: projects
props:
- name: name
value: string
- name: description
value: string
- name: purpose
value: string
- name: environment
value: string
UPDATE
example
Updates a projects
resource.
/*+ update */
UPDATE digitalocean.projects.projects
SET
name = '{{ name }}',
description = '{{ description }}',
purpose = '{{ purpose }}',
environment = '{{ environment }}',
is_default = true|false
WHERE
project_id = '{{ project_id }}';
DELETE
example
Deletes the specified projects
resource.
/*+ delete */
DELETE FROM digitalocean.projects.projects
WHERE project_id = '{{ project_id }}';