members
Creates, updates, deletes, gets or lists a members resource.
Overview
| Name | members |
| Type | Resource |
| Id | digitalocean.vpcs.members |
Fields
The following fields are returned by SELECT queries:
- vpcs_list_members
The response will be a JSON object with a key called members. This will be set
to an array of objects, each of which will contain the standard attributes
associated with a VPC member.
Only resources that you are authorized to see will be returned (e.g. to see Droplets,
you must have droplet:read).
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the resource. (example: nyc1-load-balancer-01) |
created_at | string | A time value given in ISO8601 combined date and time format that represents when the resource was created. (example: 2020-03-13T19:30:48Z) |
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 |
|---|---|---|---|---|
vpcs_list_members | select | vpc_id | resource_type, per_page, page | To list all of the resources that are members of a VPC, send a GET request to/v2/vpcs/$VPC_ID/members.To only list resources of a specific type that are members of the VPC, included a resource_type query parameter. For example, to only list Dropletsin the VPC, send a GET request to /v2/vpcs/$VPC_ID/members?resource_type=droplet.Only resources that you are authorized to see will be returned (e.g. to see Droplets, you must have droplet:read). |
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 |
|---|---|---|
vpc_id | string (uuid) | A unique identifier for a VPC. (example: 4de7ac8b-495b-4884-9a69-1050c6793cd6) |
page | integer | Which 'page' of paginated results to return. (example: 1) |
per_page | integer | Number of items returned per page (example: 2) |
resource_type | string | Used to filter VPC members by a resource type. (example: droplet) |
SELECT examples
- vpcs_list_members
To list all of the resources that are members of a VPC, send a GET request to/v2/vpcs/$VPC_ID/members.
To only list resources of a specific type that are members of the VPC,
included a resource_type query parameter. For example, to only list Droplets
in the VPC, send a GET request to /v2/vpcs/$VPC_ID/members?resource_type=droplet.
Only resources that you are authorized to see will be returned (e.g. to see Droplets,
you must have droplet:read).
SELECT
name,
created_at,
urn
FROM digitalocean.vpcs.members
WHERE vpc_id = '{{ vpc_id }}' -- required
AND resource_type = '{{ resource_type }}'
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;