-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing GLB create params (#962)
* Add missing GLB create params Also add new endpoint supported for purging CDN cache. * Update domains description
- Loading branch information
Showing
7 changed files
with
160 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
specification/resources/load_balancers/examples/curl/loadBalancers_delete_cache.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
lang: cURL | ||
source: |- | ||
curl -X DELETE \ | ||
-H "Content-Type: application/json" \ | ||
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ | ||
"https://api.digitalocean.com/v2/load_balancers/4de7ac8b-495b-4884-9a69-1050c6793cd6/cache" |
17 changes: 17 additions & 0 deletions
17
specification/resources/load_balancers/examples/go/loadBalancers_delete_cache.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
lang: Go | ||
source: |- | ||
import ( | ||
"context" | ||
"os" | ||
"github.com/digitalocean/godo" | ||
) | ||
func main() { | ||
token := os.Getenv("DIGITALOCEAN_TOKEN") | ||
client := godo.NewFromToken(token) | ||
ctx := context.TODO() | ||
_, err := client.LoadBalancers.PurgeCache(ctx, "4de7ac8b-495b-4884-9a69-1050c6793cd6") | ||
} |
43 changes: 43 additions & 0 deletions
43
specification/resources/load_balancers/loadBalancers_delete_cache.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
operationId: loadBalancers_delete_cache | ||
|
||
summary: Delete a Global Load Balancer CDN Cache | ||
|
||
description: | | ||
To delete a Global load balancer CDN cache, send a DELETE request to | ||
`/v2/load_balancers/$LOAD_BALANCER_ID/cache`. | ||
A successful request will receive a 204 status code with no body in response. | ||
This indicates that the request was processed successfully. | ||
tags: | ||
- Load Balancers | ||
|
||
parameters: | ||
- $ref: 'parameters.yml#/load_balancer_id' | ||
|
||
responses: | ||
'204': | ||
$ref: '../../shared/responses/no_content.yml' | ||
|
||
'401': | ||
$ref: '../../shared/responses/unauthorized.yml' | ||
|
||
'404': | ||
$ref: '../../shared/responses/not_found.yml' | ||
|
||
'429': | ||
$ref: '../../shared/responses/too_many_requests.yml' | ||
|
||
'500': | ||
$ref: '../../shared/responses/server_error.yml' | ||
|
||
default: | ||
$ref: '../../shared/responses/unexpected_error.yml' | ||
|
||
x-codeSamples: | ||
- $ref: 'examples/curl/loadBalancers_delete_cache.yml' | ||
- $ref: 'examples/go/loadBalancers_delete_cache.yml' | ||
|
||
security: | ||
- bearer_auth: | ||
- 'load_balancer:delete' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
type: object | ||
|
||
description: An object specifying domain configurations for a Global load balancer. | ||
|
||
properties: | ||
name: | ||
type: string | ||
example: example.com | ||
description: FQDN to associate with a Global load balancer. | ||
|
||
is_managed: | ||
type: boolean | ||
example: true | ||
description: A boolean value indicating if the domain is already managed | ||
by DigitalOcean. If true, all A and AAAA records required to enable Global | ||
load balancers will be automatically added. | ||
|
||
certificate_id: | ||
type: string | ||
example: 892071a0-bb95-49bc-8021-3afd67a210bf | ||
description: The ID of the TLS certificate used for SSL termination. |
49 changes: 49 additions & 0 deletions
49
specification/resources/load_balancers/models/glb_settings.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
type: object | ||
|
||
description: An object specifying forwarding configurations for a Global load balancer. | ||
|
||
properties: | ||
target_protocol: | ||
type: string | ||
enum: | ||
- http | ||
- https | ||
- http2 | ||
example: http | ||
description: The protocol used for forwarding traffic from the load balancer to the | ||
target backends. The possible values are `http`, `https` and `http2`. | ||
|
||
target_port: | ||
type: integer | ||
example: 80 | ||
description: An integer representing the port on the target backends which the | ||
load balancer will forward traffic to. | ||
|
||
cdn: | ||
type: object | ||
properties: | ||
is_enabled: | ||
type: boolean | ||
example: true | ||
description: A boolean flag to enable CDN caching. | ||
description: An object specifying CDN configurations for a Global load balancer. | ||
|
||
region_priorities: | ||
type: object | ||
additionalProperties: | ||
type: integer | ||
example: | ||
"nyc1": 1 | ||
"fra1": 2 | ||
"sgp1": 3 | ||
description: A map of region string to an integer priority value indicating preference | ||
for which regional target a Global load balancer will forward traffic to. A lower | ||
value indicates a higher priority. | ||
|
||
failover_threshold: | ||
type: integer | ||
example: 50 | ||
description: An integer value as a percentage to indicate failure threshold to decide how | ||
the regional priorities will take effect. A value of `50` would indicate that the Global | ||
load balancer will choose a lower priority region to forward traffic to once this failure | ||
threshold has been reached for the higher priority region. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters