-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DBaaS: Add API endpoint for applying cluster patches #909
Merged
andrewsomething
merged 6 commits into
digitalocean:main
from
vsharma6855:feature/add-cluster-patch-api-endpoint
Sep 17, 2024
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b6d1cd4
[DBAAS-35] | Add API endpoint for applying cluster patches
2f1a158
Update specification/resources/databases/databases_update_installUpda…
vsharma6855 7a3985b
Update specification/resources/databases/databases_update_installUpda…
vsharma6855 d7d24ae
changed the structure
e41ef07
Add 'install' to linter rules for allowed operation names.
andrewsomething 11eb0dc
Merge branch 'main' into feature/add-cluster-patch-api-endpoint
andrewsomething File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
47 changes: 47 additions & 0 deletions
47
specification/resources/databases/databases_update_installUpdate.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,47 @@ | ||
operationId: databases_install_update | ||
|
||
summary: Start Database Maintenance | ||
|
||
description: >- | ||
To start the installation of updates for a | ||
database cluster, send a PUT request to | ||
`/v2/databases/$DATABASE_ID/install_update`. | ||
|
||
A successful request will receive a 204 No Content status code with no body | ||
in response. | ||
|
||
tags: | ||
- Databases | ||
|
||
parameters: | ||
- $ref: 'parameters.yml#/database_cluster_uuid' | ||
|
||
|
||
|
||
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/databases_update_installUpdate.yml' | ||
- $ref: 'examples/go/databases_update_installUpdate.yml' | ||
- $ref: 'examples/python/databases_update_installUpdate.yml' | ||
|
||
security: | ||
- bearer_auth: | ||
- 'database:update' |
6 changes: 6 additions & 0 deletions
6
specification/resources/databases/examples/curl/databases_update_installUpdate.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 PUT \ | ||
-H "Content-Type: application/json" \ | ||
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ | ||
"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/install_update" |
17 changes: 17 additions & 0 deletions
17
specification/resources/databases/examples/go/databases_update_installUpdate.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.Databases.InstallUpdate(ctx, "88055188-9e54-4f21-ab11-8a918ed79ee2") | ||
} |
8 changes: 8 additions & 0 deletions
8
specification/resources/databases/examples/python/databases_update_installUpdate.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,8 @@ | ||
lang: Python | ||
source: |- | ||
import os | ||
from pydo import Client | ||
|
||
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) | ||
|
||
update_resp = client.databases.install_update(database_cluster_uuid="a7a8bas") |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe a single line in between should be enough.