To update a subset of information about a VPC, send a PATCH request to
/v2/vpcs/$VPC_ID
.
Name | Type | Required | Description | Default Value |
---|---|---|---|---|
vpc_id |
string | True | A unique identifier for a VPC. | |
body |
JSON or IO[bytes] | True |
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
req = {
"name": "env.prod-vpc",
"description": "VPC for production environment",
"default": True
}
resp = client.vpcs.patch(vpc_id="8fdsfa", body=req)
See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.