pydo.vpcs.list_members()
Generated on 24 Apr 2025
from pydo
version
v0.10.0
Description
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
.
Parameters
Name | Type | Required | Description | Default Value |
---|---|---|---|---|
vpc_id |
string | True | A unique identifier for a VPC. | |
resource_type |
string | False | Used to filter VPC members by a resource type. | |
per_page |
integer | False | Number of items returned per page | 20 |
page |
integer | False | Which ‘page’ of paginated results to return. | 1 |
Request Sample
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
resp = client.vpcs.list_members(vpc_id="e0fe0f4d")
More Information
See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.