droplets
Creates, updates, deletes, gets or lists a droplets
resource.
Overview
Name | droplets |
Type | Resource |
Id | digitalocean.load_balancers.droplets |
Fields
SELECT
not supported for this resource, use SHOW METHODS
to view available operations for the resource.
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
load_balancers_add_droplets | INSERT | lb_id, data__droplet_ids | To assign a Droplet to a load balancer instance, send a POST request to /v2/load_balancers/$LOAD_BALANCER_ID/droplets . In the body of the request, there should be a droplet_ids attribute containing a list of Droplet IDs. Individual Droplets can not be added to a load balancer configured with a Droplet tag. Attempting to do so will result in a "422 Unprocessable Entity" response from the API. No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data. |
load_balancers_remove_droplets | DELETE | lb_id, data__droplet_ids | To remove a Droplet from a load balancer instance, send a DELETE request to /v2/load_balancers/$LOAD_BALANCER_ID/droplets . In the body of the request, there should be a droplet_ids attribute containing a list of Droplet IDs. No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data. |
INSERT
example
Use the following StackQL query and manifest file to create a new droplets
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO digitalocean.load_balancers.droplets (
data__droplet_ids,
lb_id
)
SELECT
'{{ droplet_ids }}',
'{{ lb_id }}'
;
- name: droplets
props:
- name: lb_id
value: string
- name: data__droplet_ids
value: string
- name: droplet_ids
value: array
DELETE
example
Deletes the specified droplets
resource.
/*+ delete */
DELETE FROM digitalocean.load_balancers.droplets
WHERE lb_id = '{{ lb_id }}'
AND data__droplet_ids = '{{ data__droplet_ids }}';