For AI agents: The documentation index is at https://docs.digitalocean.com/llms.txt. Markdown versions of pages use the same URL with index.html.md in place of the HTML page (for example, append index.html.md to the directory path instead of opening the HTML document).
Usage
client.v2.addOns.saas.byResource_uuid(resource_uuid).plan.patch(body: PlanPatchRequestBody, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | PlanPatchResponse>
Description
To change the plan associated with an Add-On Resource, send a PATCH request to /v2/add-ons/saas/{resource_uuid}/plan.
Replace {resource_uuid} with the UUID of the resource for which you want to change the plan.
Parameters
Path Parameters
resource_uuid string required
Example: 123e4567-e89b-12d3-a456-426614174000
The UUID of the add-on resource to update.
Request Body
planSlug string required
Example: basic_plan
The slug identifier for the new plan to apply to the add-on resource.
Request Sample
Show Request Sample
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
createDigitalOceanClient,
DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";
const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);
const response = await client.v2.addOns.saas
.byResource_uuid("123e4567-e89b-12d3-a456-426614174000").plan.patch({
planSlug: "basic_plan",
});
Response Example
Show Response Example
{
"resource": {
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"name": "my-resource-01",
"state": "provisioned",
"app_name": "Example App",
"app_slug": "example_app",
"plan_name": "Basic Plan",
"plan_slug": "basic_plan",
"plan_price_per_month": 10,
"has_config": true,
"metadata": [],
"sso_url": "https://example.com/sso",
"message": "Resource is provisioned successfully."
}
}
See /v2/add-ons/saas/{resource_uuid}/plan in the API reference for additional detail on responses, headers, parameters, and more.