From 68e576b6cd834b4d39fcee56fa9f32c961b1658b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 17 Sep 2026 14:18:33 +0000 Subject: [PATCH] Add optional subnet_uuid field to Droplet create requests and examples Co-authored-by: ddatta-do <147642663+ddatta-do@users.noreply.github.com> --- specification/resources/droplets/examples.yml | 4 +++- .../resources/droplets/examples/curl/droplets_create.yml | 2 +- .../resources/droplets/examples/python/droplets_create.yml | 3 ++- .../resources/droplets/examples/ruby/droplets_create.yml | 1 + specification/resources/droplets/models/droplet_create.yml | 7 +++++++ 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/specification/resources/droplets/examples.yml b/specification/resources/droplets/examples.yml index 46310b9f7..d19b4e7b8 100644 --- a/specification/resources/droplets/examples.yml +++ b/specification/resources/droplets/examples.yml @@ -15,6 +15,7 @@ droplet_create_request: - web user_data: "#cloud-config\nruncmd:\n - touch /test.txt\n" vpc_uuid: 760e09ef-dc84-11e8-981e-3cfdfeaae000 + subnet_uuid: 9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1 droplet_multi_create_request: value: @@ -34,4 +35,5 @@ droplet_multi_create_request: - env:prod - web user_data: "#cloud-config\nruncmd:\n - touch /test.txt\n" - vpc_uuid: 760e09ef-dc84-11e8-981e-3cfdfeaae000 \ No newline at end of file + vpc_uuid: 760e09ef-dc84-11e8-981e-3cfdfeaae000 + subnet_uuid: 9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1 \ No newline at end of file diff --git a/specification/resources/droplets/examples/curl/droplets_create.yml b/specification/resources/droplets/examples/curl/droplets_create.yml index 4bbca945c..6fdc7774b 100644 --- a/specification/resources/droplets/examples/curl/droplets_create.yml +++ b/specification/resources/droplets/examples/curl/droplets_create.yml @@ -3,5 +3,5 @@ source: |- curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ - -d '{"name":"example.com","region":"nyc3","size":"s-1vcpu-1gb","image":"ubuntu-20-04-x64","ssh_keys":[289794,"3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45"],"backups":true,"ipv6":true,"monitoring":true,"tags":["env:prod","web"],"user_data":"#cloud-config\nruncmd:\n - touch /test.txt\n","vpc_uuid":"760e09ef-dc84-11e8-981e-3cfdfeaae000"}' \ + -d '{"name":"example.com","region":"nyc3","size":"s-1vcpu-1gb","image":"ubuntu-20-04-x64","ssh_keys":[289794,"3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45"],"backups":true,"ipv6":true,"monitoring":true,"tags":["env:prod","web"],"user_data":"#cloud-config\nruncmd:\n - touch /test.txt\n","vpc_uuid":"760e09ef-dc84-11e8-981e-3cfdfeaae000","subnet_uuid":"9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1"}' \ "https://api.digitalocean.com/v2/droplets" diff --git a/specification/resources/droplets/examples/python/droplets_create.yml b/specification/resources/droplets/examples/python/droplets_create.yml index 3f0a0b8bc..49dab9029 100644 --- a/specification/resources/droplets/examples/python/droplets_create.yml +++ b/specification/resources/droplets/examples/python/droplets_create.yml @@ -22,7 +22,8 @@ source: |- "web" ], "user_data": "#cloud-config\nruncmd:\n - touch /test.txt\n", - "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000" + "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000", + "subnet_uuid": "9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1" } resp = client.droplets.create(body=req) diff --git a/specification/resources/droplets/examples/ruby/droplets_create.yml b/specification/resources/droplets/examples/ruby/droplets_create.yml index f254034b2..a844c73c4 100644 --- a/specification/resources/droplets/examples/ruby/droplets_create.yml +++ b/specification/resources/droplets/examples/ruby/droplets_create.yml @@ -16,5 +16,6 @@ source: |- tags: ["env:prod","web"], user_data: "#cloud-config\nruncmd:\n - touch /test.txt\n", vpc_uuid: "760e09ef-dc84-11e8-981e-3cfdfeaae000", + subnet_uuid: "9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1", ) client.droplets.create(droplet) diff --git a/specification/resources/droplets/models/droplet_create.yml b/specification/resources/droplets/models/droplet_create.yml index 854957c8d..6a786c69c 100644 --- a/specification/resources/droplets/models/droplet_create.yml +++ b/specification/resources/droplets/models/droplet_create.yml @@ -114,6 +114,13 @@ properties: will be assigned. If excluded, the Droplet will be assigned to your account's default VPC for the region.
Requires `vpc:read` scope. + subnet_uuid: + type: string + example: 9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1 + description: An optional string specifying the UUID of the VPC subnet to + which the Droplet will be assigned. If excluded, the Droplet will be + assigned to a default subnet of the VPC.
Requires `vpc:read` scope. + with_droplet_agent: type: boolean example: true