default_resources
Creates, updates, deletes, gets or lists a default_resources
resource.
Overview
Name | default_resources |
Type | Resource |
Id | digitalocean.projects.default_resources |
Fields
The following fields are returned by SELECT
queries:
- projects_list_resources_default
The response will be a JSON object with a key called resources
.
The value of this will be an object with the standard resource attributes.
Only resources that you are authorized to see will be returned.
Name | Datatype | Description |
---|---|---|
assigned_at | string (date-time) | A time value given in ISO8601 combined date and time format that represents when the project was created. (example: 2018-09-28T19:26:37Z) |
links | object | The links object contains the self object, which contains the resource relationship. |
status | string | The status of assigning and fetching the resources. (example: ok) |
urn | string | The uniform resource name (URN) for the resource in the format do:resource_type:resource_id. (pattern: ^do:(dbaas|domain|droplet|floatingip|loadbalancer|space|volume|kubernetes|vpc):.*, example: do💧13457723) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_list_resources_default | select | To list all your resources in your default project, send a GET request to /v2/projects/default/resources .Only resources that you are authorized to see will be returned. For example, to see Droplets in a project, include the droplet:read scope. | ||
projects_assign_resources_default | insert | To assign resources to your default project, send a POST request to /v2/projects/default/resources .You must have both project:update and <resource>:read scopes to assign new resources. For example, to assign a Droplet to the default project, include both the project:update and droplet:read scopes. |
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 |
---|
SELECT
examples
- projects_list_resources_default
To list all your resources in your default project, send a GET request to /v2/projects/default/resources
.
Only resources that you are authorized to see will be returned. For example, to see Droplets in a project, include the droplet:read
scope.
SELECT
assigned_at,
links,
status,
urn
FROM digitalocean.projects.default_resources;
INSERT
examples
- projects_assign_resources_default
- Manifest
To assign resources to your default project, send a POST request to /v2/projects/default/resources
.
You must have both project:update and <resource>:read scopes to assign new resources. For example, to assign a Droplet to the default project, include both the project:update
and droplet:read
scopes.
INSERT INTO digitalocean.projects.default_resources (
data__resources
)
SELECT
'{{ resources }}'
RETURNING
resources
;
# Description fields are for documentation purposes
- name: default_resources
props:
- name: resources
value: array
description: >
A list of uniform resource names (URNs) to be added to a project. Only resources that you are authorized to see will be returned.