Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ requestBody:
content:
application/json:
schema:
properties:
$ref: 'models/attributes.yml#/load_balancer_droplet_ids'
required:
- droplet_ids
allOf:
- $ref: 'models/attributes.yml#/load_balancer_droplet_ids'
- type: object
required:
- droplet_ids

responses:
'204':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ requestBody:
content:
application/json:
schema:
properties:
$ref: 'models/attributes.yml#/load_balancer_droplet_ids'
required:
- droplet_ids
allOf:
- $ref: 'models/attributes.yml#/load_balancer_droplet_ids'
- type: object
required:
- droplet_ids

responses:
'204':
Expand Down
56 changes: 31 additions & 25 deletions specification/resources/load_balancers/models/attributes.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
load_balancer_droplet_ids:
droplet_ids:
type: array
items:
type: integer
example:
- 3164444
- 3164445
description: An array containing the IDs of the Droplets assigned to the
load balancer.
type: object
properties:
droplet_ids:
type: array
items:
type: integer
example:
- 3164444
- 3164445
description: An array containing the IDs of the Droplets assigned to the
load balancer.

load_balancer_droplet_tag:
tag:
type: string
example: prod:web
description: The name of a Droplet tag corresponding to Droplets assigned
to the load balancer.
type: object
properties:
tag:
type: string
example: prod:web
description: The name of a Droplet tag corresponding to Droplets assigned
to the load balancer.

load_balancer_ip:
ip:
type: string
pattern: '^$|^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'
example: '203.0.113.42'
description: >-
An optional IP address to assign to the load balancer from one of your
Bring Your Own IP (BYOIP) prefixes. The address must be an unassigned
BYOIP address on your account in the same region as the load balancer.
If omitted, DigitalOcean assigns a public IP address automatically. This
field is only applied when creating the load balancer, cannot be changed
afterward, and is not supported for `GLOBAL` or `INTERNAL` load balancers.
type: object
properties:
ip:
type: string
pattern: '^$|^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'
example: '203.0.113.42'
description: >-
An optional IP address to assign to the load balancer from one of your
Bring Your Own IP (BYOIP) prefixes. The address must be an unassigned
BYOIP address on your account in the same region as the load balancer.
If omitted, DigitalOcean assigns a public IP address automatically. This
field is only applied when creating the load balancer, cannot be changed
afterward, and is not supported for `GLOBAL` or `INTERNAL` load balancers.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ allOf:
be returned.
- $ref: '../../regions/models/region.yml'

- type: object
properties:
$ref: 'attributes.yml#/load_balancer_droplet_ids'
- $ref: 'attributes.yml#/load_balancer_droplet_ids'

- type: object
properties:
$ref: 'attributes.yml#/load_balancer_droplet_tag'
- $ref: 'attributes.yml#/load_balancer_droplet_tag'
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,37 @@ description: >-
update schema with the addition of the create-only `ip` field, which assigns
a Bring Your Own IP (BYOIP) address to the load balancer.

allOf:
- $ref: 'load_balancer_update.yml'
oneOf:
- title: Assign Droplets by ID
allOf:
- $ref: 'attributes.yml#/load_balancer_droplet_ids'

- type: object
properties:
$ref: 'attributes.yml#/load_balancer_ip'
- $ref: 'attributes.yml#/load_balancer_ip'

- type: object
properties:
region:
$ref: '../../../shared/attributes/region_slug.yml'

- $ref: 'load_balancer_base.yml'

required:
- droplet_ids
- region

- title: Assign Droplets by Tag
allOf:
- $ref: 'attributes.yml#/load_balancer_droplet_tag'

- $ref: 'attributes.yml#/load_balancer_ip'

- type: object
properties:
region:
$ref: '../../../shared/attributes/region_slug.yml'

- $ref: 'load_balancer_base.yml'

required:
- tag
- region
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
oneOf:
- title: Assign Droplets by ID
allOf:
- type: object
properties:
$ref: 'attributes.yml#/load_balancer_droplet_ids'
- $ref: 'attributes.yml#/load_balancer_droplet_ids'

- type: object
properties:
Expand All @@ -18,9 +16,7 @@ oneOf:

- title: Assign Droplets by Tag
allOf:
- type: object
properties:
$ref: 'attributes.yml#/load_balancer_droplet_tag'
- $ref: 'attributes.yml#/load_balancer_droplet_tag'

- type: object
properties:
Expand Down
Loading